Documentation ¶
Index ¶
- type MiddlewareClient
- func (c *MiddlewareClient) DoAuthenticationRequest(ctx context.Context, hook MiddlewareHook, jsonData []byte) (*MiddlewareHookResponse, error)
- func (c *MiddlewareClient) DoGlobalRequest(ctx context.Context, hook MiddlewareHook, jsonData []byte) (*MiddlewareHookResponse, error)
- func (c *MiddlewareClient) DoOperationRequest(ctx context.Context, operationName string, hook MiddlewareHook, ...) (*MiddlewareHookResponse, error)
- type MiddlewareHook
- type MiddlewareHookResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MiddlewareClient ¶
type MiddlewareClient struct {
// contains filtered or unexported fields
}
func NewMiddlewareClient ¶
func NewMiddlewareClient(serverUrl string) *MiddlewareClient
func (*MiddlewareClient) DoAuthenticationRequest ¶
func (c *MiddlewareClient) DoAuthenticationRequest(ctx context.Context, hook MiddlewareHook, jsonData []byte) (*MiddlewareHookResponse, error)
func (*MiddlewareClient) DoGlobalRequest ¶
func (c *MiddlewareClient) DoGlobalRequest(ctx context.Context, hook MiddlewareHook, jsonData []byte) (*MiddlewareHookResponse, error)
func (*MiddlewareClient) DoOperationRequest ¶
func (c *MiddlewareClient) DoOperationRequest(ctx context.Context, operationName string, hook MiddlewareHook, jsonData []byte) (*MiddlewareHookResponse, error)
type MiddlewareHook ¶
type MiddlewareHook string
const ( MockResolve MiddlewareHook = "mockResolve" PreResolve MiddlewareHook = "preResolve" PostResolve MiddlewareHook = "postResolve" CustomResolve MiddlewareHook = "customResolve" MutatingPreResolve MiddlewareHook = "mutatingPreResolve" MutatingPostResolve MiddlewareHook = "mutatingPostResolve" PostAuthentication MiddlewareHook = "postAuthentication" MutatingPostAuthentication MiddlewareHook = "mutatingPostAuthentication" RevalidateAuthentication MiddlewareHook = "revalidateAuthentication" HttpTransportOnRequest MiddlewareHook = "onRequest" HttpTransportOnResponse MiddlewareHook = "onResponse" )
type MiddlewareHookResponse ¶
type MiddlewareHookResponse struct { Error string `json:"error,omitempty"` Op string `json:"op"` Hook string `json:"hook"` Response json.RawMessage `json:"response"` Input json.RawMessage `json:"input"` SetClientRequestHeaders map[string]string `json:"SetClientRequestHeaders"` }
Click to show internal directories.
Click to hide internal directories.