args.go 824 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package model
  2. import (
  3. "io"
  4. "net/http"
  5. "time"
  6. )
  7. type ListArgs struct {
  8. ReqPath string
  9. }
  10. type LinkArgs struct {
  11. IP string
  12. Header http.Header
  13. Type string
  14. }
  15. type Link struct {
  16. URL string `json:"url"`
  17. Header http.Header `json:"header"` // needed header
  18. Data io.ReadCloser // return file reader directly
  19. Status int // status maybe 200 or 206, etc
  20. FilePath *string // local file, return the filepath
  21. Expiration *time.Duration // url expiration time
  22. Method string `json:"method"` // http method
  23. }
  24. type OtherArgs struct {
  25. Obj Obj
  26. Method string
  27. Data interface{}
  28. }
  29. type FsOtherArgs struct {
  30. Path string `json:"path" form:"path"`
  31. Method string `json:"method" form:"method"`
  32. Data interface{} `json:"data" form:"data"`
  33. }