Documentation ¶
Index ¶
- func AddJsonBodyTenantIDAndUserID(requestBuilder *RequestBuilder, tenantIDField string, userIDField string) error
- func AddQueryParamsTenantIDAndUserID(requestBuilder *RequestBuilder, tenantIDField string, userIDField string) error
- func DestroyGateway(gw *Gateway)
- type BeforeRequestCallback
- type Builder
- func (builder *Builder) AddRoute(httpMethod string, relativePath string, handler Handler, ...)
- func (builder *Builder) AddRouteWithTenantIDAndUserID(httpMethod string, relativePath string, tenantIDField string, ...)
- func (builder *Builder) DeleteRoute(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) DeleteRouteWithTenantID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) DeleteRouteWithTenantIDAndUserID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) DeleteRouteWithTenantIDAndUserIDCommon(relativePath string, tenantIDField string, userIDField string, handler Handler, ...)
- func (builder *Builder) DeleteRouteWithTenantIDCommon(relativePath string, tenantIDField string, handler Handler, ...)
- func (builder *Builder) DeleteRouteWithUserID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) DeleteRouteWithUserIDCommon(relativePath string, userIDField string, handler Handler, ...)
- func (builder *Builder) GetRoute(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) GetRouteWithTenantID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) GetRouteWithTenantIDAndUserID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) GetRouteWithTenantIDAndUserIDCommon(relativePath string, tenantIDField string, userIDField string, handler Handler, ...)
- func (builder *Builder) GetRouteWithTenantIDCommon(relativePath string, tenantIDField string, handler Handler, ...)
- func (builder *Builder) GetRouteWithUserID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) GetRouteWithUserIDCommon(relativePath string, userIDField string, handler Handler, ...)
- func (builder *Builder) PostRoute(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) PostRouteWithTenantID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) PostRouteWithTenantIDAndUserID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) PostRouteWithTenantIDAndUserIDCommon(relativePath string, tenantIDField string, userIDField string, handler Handler, ...)
- func (builder *Builder) PostRouteWithTenantIDCommon(relativePath string, tenantIDField string, handler Handler, ...)
- func (builder *Builder) PostRouteWithUserID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) PostRouteWithUserIDCommon(relativePath string, userIDField string, handler Handler, ...)
- func (builder *Builder) PutRoute(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) PutRouteWithTenantID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) PutRouteWithTenantIDAndUserID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) PutRouteWithTenantIDAndUserIDCommon(relativePath string, tenantIDField string, userIDField string, handler Handler, ...)
- func (builder *Builder) PutRouteWithTenantIDCommon(relativePath string, tenantIDField string, handler Handler, ...)
- func (builder *Builder) PutRouteWithUserID(relativePath string, handler Handler, middlewares ...Handler)
- func (builder *Builder) PutRouteWithUserIDCommon(relativePath string, userIDField string, handler Handler, ...)
- type DeleteRequest
- type Gateway
- type GetRequest
- type Handler
- type Option
- type Options
- type PostRequest
- type PutRequest
- type Request
- type RequestBuilder
- func (builder *RequestBuilder) Context() *api.Context
- func (builder *RequestBuilder) Delete(request *DeleteRequest, opts ...RequestOption) *RequestBuilder
- func (builder *RequestBuilder) Get(request *GetRequest, opts ...RequestOption) *RequestBuilder
- func (builder *RequestBuilder) GetResultMapValue(key string) any
- func (builder *RequestBuilder) HistoryRequests() []Request
- func (builder *RequestBuilder) Post(request *PostRequest, opts ...RequestOption) *RequestBuilder
- func (builder *RequestBuilder) Put(request *PutRequest, opts ...RequestOption) *RequestBuilder
- func (builder *RequestBuilder) Request()
- func (builder *RequestBuilder) ResponseError(err error)
- func (builder *RequestBuilder) ResponseErrorCallback(responseErrorCallback ResponseErrorCallback) *RequestBuilder
- func (builder *RequestBuilder) ResponseSuccessCallback(responseSuccessCallback ResponseSuccessCallback) *RequestBuilder
- func (builder *RequestBuilder) SetResultMapValue(key string, value any)
- type RequestOption
- type RequestOptions
- type RequestResponseCallback
- type ResponseErrorCallback
- type ResponseSuccessCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddJsonBodyTenantIDAndUserID ¶ added in v0.4.0
func AddJsonBodyTenantIDAndUserID(requestBuilder *RequestBuilder, tenantIDField string, userIDField string) error
func AddQueryParamsTenantIDAndUserID ¶ added in v0.4.0
func AddQueryParamsTenantIDAndUserID(requestBuilder *RequestBuilder, tenantIDField string, userIDField string) error
func DestroyGateway ¶
func DestroyGateway(gw *Gateway)
Types ¶
type BeforeRequestCallback ¶ added in v0.10.5
type BeforeRequestCallback func(requestBuilder *RequestBuilder) error
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) AddRouteWithTenantIDAndUserID ¶ added in v0.10.5
func (*Builder) DeleteRoute ¶ added in v0.10.5
func (*Builder) DeleteRouteWithTenantID ¶ added in v0.10.5
func (*Builder) DeleteRouteWithTenantIDAndUserID ¶ added in v0.10.5
func (*Builder) DeleteRouteWithTenantIDAndUserIDCommon ¶ added in v0.10.5
func (*Builder) DeleteRouteWithTenantIDCommon ¶ added in v0.10.5
func (*Builder) DeleteRouteWithUserID ¶ added in v0.10.5
func (*Builder) DeleteRouteWithUserIDCommon ¶ added in v0.10.5
func (*Builder) GetRouteWithTenantID ¶ added in v0.10.5
func (*Builder) GetRouteWithTenantIDAndUserID ¶ added in v0.10.5
func (*Builder) GetRouteWithTenantIDAndUserIDCommon ¶ added in v0.10.5
func (*Builder) GetRouteWithTenantIDCommon ¶ added in v0.10.5
func (*Builder) GetRouteWithUserID ¶ added in v0.10.5
func (*Builder) GetRouteWithUserIDCommon ¶ added in v0.10.5
func (*Builder) PostRouteWithTenantID ¶ added in v0.10.5
func (*Builder) PostRouteWithTenantIDAndUserID ¶ added in v0.10.5
func (*Builder) PostRouteWithTenantIDAndUserIDCommon ¶ added in v0.10.5
func (*Builder) PostRouteWithTenantIDCommon ¶ added in v0.10.5
func (*Builder) PostRouteWithUserID ¶ added in v0.10.5
func (*Builder) PostRouteWithUserIDCommon ¶ added in v0.10.5
func (*Builder) PutRouteWithTenantID ¶ added in v0.10.5
func (*Builder) PutRouteWithTenantIDAndUserID ¶ added in v0.10.5
func (*Builder) PutRouteWithTenantIDAndUserIDCommon ¶ added in v0.10.5
func (*Builder) PutRouteWithTenantIDCommon ¶ added in v0.10.5
func (*Builder) PutRouteWithUserID ¶ added in v0.10.5
type DeleteRequest ¶
type DeleteRequest struct { Url string QueryParams map[string]string PathParams map[string]string // contains filtered or unexported fields }
func (*DeleteRequest) Request ¶
func (req *DeleteRequest) Request(c *api.Context, request *http_client.Request) (Request, 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 // contains filtered or unexported fields }
func (*GetRequest) Request ¶
func (req *GetRequest) Request(c *api.Context, request *http_client.Request) (Request, error)
func (*GetRequest) Response ¶
func (req *GetRequest) Response() *http_client.Response
type Handler ¶ added in v0.10.5
type Handler func(requestBuilder *RequestBuilder)
type PostRequest ¶
func (*PostRequest) Request ¶
func (req *PostRequest) Request(c *api.Context, request *http_client.Request) (Request, error)
func (*PostRequest) Response ¶
func (req *PostRequest) Response() *http_client.Response
type PutRequest ¶
func (*PutRequest) Request ¶
func (req *PutRequest) Request(c *api.Context, request *http_client.Request) (Request, error)
func (*PutRequest) Response ¶
func (req *PutRequest) Response() *http_client.Response
type Request ¶ added in v0.10.5
type Request interface { Request(c *api.Context, request *http_client.Request) (Request, error) Response() *http_client.Response }
type RequestBuilder ¶ added in v0.10.5
type RequestBuilder struct {
// contains filtered or unexported fields
}
func (*RequestBuilder) Context ¶ added in v0.10.5
func (builder *RequestBuilder) Context() *api.Context
func (*RequestBuilder) Delete ¶ added in v0.10.5
func (builder *RequestBuilder) Delete(request *DeleteRequest, opts ...RequestOption) *RequestBuilder
func (*RequestBuilder) Get ¶ added in v0.10.5
func (builder *RequestBuilder) Get(request *GetRequest, opts ...RequestOption) *RequestBuilder
func (*RequestBuilder) GetResultMapValue ¶ added in v0.10.5
func (builder *RequestBuilder) GetResultMapValue(key string) any
func (*RequestBuilder) HistoryRequests ¶ added in v0.10.5
func (builder *RequestBuilder) HistoryRequests() []Request
func (*RequestBuilder) Post ¶ added in v0.10.5
func (builder *RequestBuilder) Post(request *PostRequest, opts ...RequestOption) *RequestBuilder
func (*RequestBuilder) Put ¶ added in v0.10.5
func (builder *RequestBuilder) Put(request *PutRequest, opts ...RequestOption) *RequestBuilder
func (*RequestBuilder) Request ¶ added in v0.10.5
func (builder *RequestBuilder) Request()
func (*RequestBuilder) ResponseError ¶ added in v0.10.5
func (builder *RequestBuilder) ResponseError(err error)
func (*RequestBuilder) ResponseErrorCallback ¶ added in v0.10.5
func (builder *RequestBuilder) ResponseErrorCallback(responseErrorCallback ResponseErrorCallback) *RequestBuilder
func (*RequestBuilder) ResponseSuccessCallback ¶ added in v0.10.5
func (builder *RequestBuilder) ResponseSuccessCallback(responseSuccessCallback ResponseSuccessCallback) *RequestBuilder
func (*RequestBuilder) SetResultMapValue ¶ added in v0.10.5
func (builder *RequestBuilder) SetResultMapValue(key string, value any)
type RequestOption ¶ added in v0.10.1
type RequestOption func(options *RequestOptions)
func WithBeforeRequestCallback ¶ added in v0.10.5
func WithBeforeRequestCallback(callback BeforeRequestCallback) RequestOption
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(requestBuilder *RequestBuilder, response *http_client.Response) error
type ResponseErrorCallback ¶ added in v0.4.0
type ResponseErrorCallback func(requestBuilder *RequestBuilder, err error)
type ResponseSuccessCallback ¶ added in v0.4.0
type ResponseSuccessCallback func(requestBuilder *RequestBuilder)
Click to show internal directories.
Click to hide internal directories.