Documentation ¶
Index ¶
- func AddJsonBodyTenantIDAndUserID(c *api.Context, tenantIDField string, userIDField string) error
- func AddQueryParamsTenantIDAndUserID(c *api.Context, tenantIDField string, userIDField string) error
- func DestroyGateway(gw *Gateway)
- type BodyFormFunc
- type Builder
- func (builder *Builder) Build(middlewares ...api.Handler)
- func (builder *Builder) Delete(request *DeleteRequest, opts ...RequestOption) *Builder
- func (builder *Builder) Get(request *GetRequest, opts ...RequestOption) *Builder
- func (builder *Builder) GlobalRequestCallback(globalRequestResponseCallback GlobalRequestResponseCallback) *Builder
- func (builder *Builder) Local(handler api.Handler, middlewares ...api.Handler)
- func (builder *Builder) Post(request *PostRequest, opts ...RequestOption) *Builder
- func (builder *Builder) Put(request *PutRequest, opts ...RequestOption) *Builder
- func (builder *Builder) ResponseErrorCallback(responseErrorCallback ResponseErrorCallback) *Builder
- func (builder *Builder) ResponseSuccessCallback(responseSuccessCallback ResponseSuccessCallback) *Builder
- func (builder *Builder) Url(httpMethod string, relativePath string) *Builder
- type BuilderRequest
- type DeleteRequest
- type Gateway
- type GetRequest
- type GlobalRequestResponseCallback
- type HeadersFormFunc
- type LocalServiceFunc
- type Option
- type Options
- type PathParamsFormFunc
- type PostRequest
- type PutRequest
- type QueryParamsFormFunc
- type RequestOption
- type RequestOptions
- type RequestResponseCallback
- type ResponseErrorCallback
- type ResponseSuccessCallback
- type UrlFormFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddJsonBodyTenantIDAndUserID ¶ added in v0.4.0
func AddQueryParamsTenantIDAndUserID ¶ added in v0.4.0
func DestroyGateway ¶
func DestroyGateway(gw *Gateway)
Types ¶
type BodyFormFunc ¶ added in v0.6.0
type BodyFormFunc func(c *api.Context, staticBody any, historyRequests []BuilderRequest, resultMap map[string]any) (any, error)
func FormJsonBodyWithTenantIDAndUserIDFunc ¶ added in v0.6.0
func FormJsonBodyWithTenantIDAndUserIDFunc(tenantIDFieldName string, userIDFieldName string) BodyFormFunc
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) Delete ¶
func (builder *Builder) Delete(request *DeleteRequest, opts ...RequestOption) *Builder
func (*Builder) Get ¶
func (builder *Builder) Get(request *GetRequest, opts ...RequestOption) *Builder
func (*Builder) GlobalRequestCallback ¶ added in v0.4.0
func (builder *Builder) GlobalRequestCallback(globalRequestResponseCallback GlobalRequestResponseCallback) *Builder
func (*Builder) Post ¶
func (builder *Builder) Post(request *PostRequest, opts ...RequestOption) *Builder
func (*Builder) Put ¶
func (builder *Builder) Put(request *PutRequest, opts ...RequestOption) *Builder
func (*Builder) ResponseErrorCallback ¶ added in v0.4.0
func (builder *Builder) ResponseErrorCallback(responseErrorCallback ResponseErrorCallback) *Builder
func (*Builder) ResponseSuccessCallback ¶ added in v0.4.0
func (builder *Builder) ResponseSuccessCallback(responseSuccessCallback ResponseSuccessCallback) *Builder
type BuilderRequest ¶
type BuilderRequest interface { Request(c *api.Context, request *http_client.Request, historyRequests []BuilderRequest, resultMap map[string]any) (BuilderRequest, error) Response() *http_client.Response }
type DeleteRequest ¶
type DeleteRequest struct { Url string QueryParams map[string]string PathParams map[string]string UrlFormFunc UrlFormFunc HeadersFormFunc HeadersFormFunc QueryParamsFormFunc QueryParamsFormFunc PathParamsFormFunc PathParamsFormFunc // contains filtered or unexported fields }
func (*DeleteRequest) Request ¶
func (req *DeleteRequest) Request(c *api.Context, request *http_client.Request, historyRequests []BuilderRequest, resultMap map[string]any) (BuilderRequest, error)
func (*DeleteRequest) Response ¶
func (req *DeleteRequest) Response() *http_client.Response
type GetRequest ¶
type GetRequest struct { Url string QueryParams map[string]string PathParams map[string]string UrlFormFunc UrlFormFunc HeadersFormFunc HeadersFormFunc QueryParamsFormFunc QueryParamsFormFunc PathParamsFormFunc PathParamsFormFunc // contains filtered or unexported fields }
func (*GetRequest) Request ¶
func (req *GetRequest) Request(c *api.Context, request *http_client.Request, historyRequests []BuilderRequest, resultMap map[string]any) (BuilderRequest, error)
func (*GetRequest) Response ¶
func (req *GetRequest) Response() *http_client.Response
type GlobalRequestResponseCallback ¶ added in v0.4.0
type GlobalRequestResponseCallback func(c *api.Context, request BuilderRequest, historyRequests []BuilderRequest, resultMap map[string]any) error
type HeadersFormFunc ¶ added in v0.6.0
type LocalServiceFunc ¶ added in v0.6.0
type PathParamsFormFunc ¶ added in v0.6.0
type PostRequest ¶
type PostRequest struct { Url string Body any UrlFormFunc UrlFormFunc BodyFormFunc BodyFormFunc HeadersFormFunc HeadersFormFunc // contains filtered or unexported fields }
func (*PostRequest) Request ¶
func (req *PostRequest) Request(c *api.Context, request *http_client.Request, historyRequests []BuilderRequest, resultMap map[string]any) (BuilderRequest, error)
func (*PostRequest) Response ¶
func (req *PostRequest) Response() *http_client.Response
type PutRequest ¶
type PutRequest struct { Url string Body any UrlFormFunc UrlFormFunc BodyFormFunc BodyFormFunc HeadersFormFunc HeadersFormFunc // contains filtered or unexported fields }
func (*PutRequest) Request ¶
func (req *PutRequest) Request(c *api.Context, request *http_client.Request, historyRequests []BuilderRequest, resultMap map[string]any) (BuilderRequest, error)
func (*PutRequest) Response ¶
func (req *PutRequest) Response() *http_client.Response
type QueryParamsFormFunc ¶ added in v0.6.0
type QueryParamsFormFunc func(c *api.Context, staticQueryParams map[string]string, historyRequests []BuilderRequest, resultMap map[string]any) (map[string]string, error)
func FormQueryParamsWithTenantIDAndUserIDFunc ¶ added in v0.6.0
func FormQueryParamsWithTenantIDAndUserIDFunc(tenantIDFieldName string, userIDFieldName string) QueryParamsFormFunc
type RequestOption ¶ added in v0.10.1
type RequestOption func(options *RequestOptions)
func WithRequestResponseCallback ¶ added in v0.10.1
func WithRequestResponseCallback(callback RequestResponseCallback) RequestOption
type RequestOptions ¶ added in v0.10.1
type RequestOptions struct {
// contains filtered or unexported fields
}
type RequestResponseCallback ¶ added in v0.4.0
type RequestResponseCallback func(c *api.Context, response *http_client.Response, historyRequests []BuilderRequest, resultMap map[string]any) error
type ResponseErrorCallback ¶ added in v0.4.0
type ResponseSuccessCallback ¶ added in v0.4.0
type ResponseSuccessCallback func(c *api.Context, historyRequests []BuilderRequest, resultMap map[string]any)
type UrlFormFunc ¶ added in v0.10.1
Click to show internal directories.
Click to hide internal directories.