Documentation ¶
Index ¶
- Variables
- type Cookie
- type Create
- type Data
- type DataProvider
- type DownloadFile
- type FormMultipartWithFile
- type FormMultipartWithFiles
- type FormURLEncoded
- type GetByID
- type GetByJSON
- type HealthCheck
- type IpInfo
- type Protobuf
- type Proxy
- type ProxyV2
- type Redirect
- type RedirectWhenError
- type RemoveByID
- type ShowImage
- type SubData
- type UpdateByID
Constants ¶
This section is empty.
Variables ¶
View Source
var BinaryRouter = kit.NewRouter(httptransport.Group("/binary"))
View Source
var CookieRouter = kit.NewRouter(httptransport.Group("/cookie"))
View Source
var FormsRouter = kit.NewRouter(httptransport.Group("/forms"))
View Source
var ProxyRouter = kit.NewRouter(httptransport.Group("/proxy"))
View Source
var RedirectRouter = kit.NewRouter(httptransport.Group("/redirect"))
View Source
var RestfulRouter = kit.NewRouter(httptransport.Group("/restful"))
View Source
var RootRouter = kit.NewRouter(httptransport.BasePath("/demo"))
Functions ¶
This section is empty.
Types ¶
type Cookie ¶
type Cookie struct { httpx.MethodPost Token string `name:"token,omitempty" in:"cookie"` }
type Data ¶
type Data struct { ID string `json:"id"` Label string `json:"label"` PtrString *string `json:"ptrString,omitempty"` SubData *SubData `json:"subData,omitempty"` Protocol types.Protocol `json:"protocol,omitempty"` }
func DataFromContext ¶
type DataProvider ¶
type DataProvider struct {
ID string `name:"id" in:"path" validate:"@string[6,]"`
}
func (DataProvider) ContextKey ¶
func (DataProvider) ContextKey() string
func (DataProvider) Output ¶
func (req DataProvider) Output(ctx context.Context) (interface{}, error)
func (DataProvider) Path ¶
func (DataProvider) Path() string
type DownloadFile ¶
download file
func (DownloadFile) Output ¶
func (req DownloadFile) Output(ctx context.Context) (interface{}, error)
func (DownloadFile) Path ¶
func (DownloadFile) Path() string
type FormMultipartWithFile ¶
type FormMultipartWithFile struct { httpx.MethodPost FormData struct { Map map[types.Protocol]int `name:"map,omitempty"` // @deprecated String string `name:"string,omitempty"` Slice []string `name:"slice,omitempty"` Data Data `name:"data,omitempty"` File *multipart.FileHeader `name:"file"` } `in:"body" mime:"multipart"` }
Form Multipart
func (FormMultipartWithFile) Output ¶
func (req FormMultipartWithFile) Output(ctx context.Context) (resp interface{}, err error)
func (FormMultipartWithFile) Path ¶
func (req FormMultipartWithFile) Path() string
type FormMultipartWithFiles ¶
type FormMultipartWithFiles struct { httpx.MethodPost FormData struct { Files []*multipart.FileHeader `name:"files"` } `in:"body" mime:"multipart"` }
Form Multipart With Files
func (FormMultipartWithFiles) Output ¶
func (FormMultipartWithFiles) Output(ctx context.Context) (resp interface{}, err error)
func (FormMultipartWithFiles) Path ¶
func (FormMultipartWithFiles) Path() string
type FormURLEncoded ¶
type FormURLEncoded struct { httpx.MethodPost FormData struct { String string `name:"string"` Slice []string `name:"slice"` Data Data `name:"data"` } `in:"body" mime:"urlencoded"` }
Form URL Encoded
func (FormURLEncoded) Output ¶
func (req FormURLEncoded) Output(ctx context.Context) (resp interface{}, err error)
func (FormURLEncoded) Path ¶
func (FormURLEncoded) Path() string
type GetByID ¶
type GetByID struct { httpx.MethodGet Protocol types.Protocol `name:"protocol,omitempty" in:"query"` Name string `name:"name,omitempty" in:"query"` Label []string `name:"label,omitempty" in:"query"` }
get by id
type HealthCheck ¶
type HealthCheck struct { httpx.MethodHead PullPolicy types.PullPolicy `name:"pullPolicy,omitempty" in:"query"` }
type Protobuf ¶ added in v1.0.0
type Protobuf struct { httpx.MethodPost testdatapb.Event `in:"body" mime:"protobuf"` }
type RedirectWhenError ¶
type RedirectWhenError struct {
httpx.MethodPost
}
Click to show internal directories.
Click to hide internal directories.