Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func NewBlockingStatusRequest(server string) (*http.Request, error)
- func NewCacheFlushRequest(server string) (*http.Request, error)
- func NewDisableBlockingRequest(server string, params *DisableBlockingParams) (*http.Request, error)
- func NewEnableBlockingRequest(server string) (*http.Request, error)
- func NewListRefreshRequest(server string) (*http.Request, error)
- func NewQueryRequest(server string, body QueryJSONRequestBody) (*http.Request, error)
- func NewQueryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func RegisterOpenAPIEndpoints(router chi.Router, impl StrictServerInterface)
- type ApiBlockingStatus
- type ApiQueryRequest
- type ApiQueryResult
- type BlockingControl
- type BlockingStatus
- type BlockingStatus200JSONResponse
- type BlockingStatusRequestObject
- type BlockingStatusResponse
- type BlockingStatusResponseObject
- type CacheControl
- type CacheFlush200Response
- type CacheFlushRequestObject
- type CacheFlushResponse
- type CacheFlushResponseObject
- type ChiServerOptions
- type Client
- func (c *Client) BlockingStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CacheFlush(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DisableBlocking(ctx context.Context, params *DisableBlockingParams, ...) (*http.Response, error)
- func (c *Client) EnableBlocking(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListRefresh(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) Query(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) QueryWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) BlockingStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BlockingStatusResponse, error)
- func (c *ClientWithResponses) CacheFlushWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CacheFlushResponse, error)
- func (c *ClientWithResponses) DisableBlockingWithResponse(ctx context.Context, params *DisableBlockingParams, ...) (*DisableBlockingResponse, error)
- func (c *ClientWithResponses) EnableBlockingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*EnableBlockingResponse, error)
- func (c *ClientWithResponses) ListRefreshWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListRefreshResponse, error)
- func (c *ClientWithResponses) QueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*QueryResponse, error)
- func (c *ClientWithResponses) QueryWithResponse(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryResponse, error)
- type ClientWithResponsesInterface
- type DisableBlocking200Response
- type DisableBlocking400TextResponse
- type DisableBlockingParams
- type DisableBlockingRequestObject
- type DisableBlockingResponse
- type DisableBlockingResponseObject
- type EnableBlocking200Response
- type EnableBlockingRequestObject
- type EnableBlockingResponse
- type EnableBlockingResponseObject
- type HttpRequestDoer
- type InvalidParamFormatError
- type ListRefresh200Response
- type ListRefresh500TextResponse
- type ListRefreshRequestObject
- type ListRefreshResponse
- type ListRefreshResponseObject
- type ListRefresher
- type MiddlewareFunc
- type OpenAPIInterfaceImpl
- func (i *OpenAPIInterfaceImpl) BlockingStatus(_ context.Context, _ BlockingStatusRequestObject) (BlockingStatusResponseObject, error)
- func (i *OpenAPIInterfaceImpl) CacheFlush(ctx context.Context, _ CacheFlushRequestObject) (CacheFlushResponseObject, error)
- func (i *OpenAPIInterfaceImpl) DisableBlocking(ctx context.Context, request DisableBlockingRequestObject) (DisableBlockingResponseObject, error)
- func (i *OpenAPIInterfaceImpl) EnableBlocking(ctx context.Context, _ EnableBlockingRequestObject) (EnableBlockingResponseObject, error)
- func (i *OpenAPIInterfaceImpl) ListRefresh(ctx context.Context, _ ListRefreshRequestObject) (ListRefreshResponseObject, error)
- func (i *OpenAPIInterfaceImpl) Query(ctx context.Context, request QueryRequestObject) (QueryResponseObject, error)
- type Querier
- type Query200JSONResponse
- type Query400TextResponse
- type QueryJSONRequestBody
- type QueryRequestObject
- type QueryResponse
- type QueryResponseObject
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) BlockingStatus(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CacheFlush(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DisableBlocking(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) EnableBlocking(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListRefresh(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Query(w http.ResponseWriter, r *http.Request)
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) BlockingStatus(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CacheFlush(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) DisableBlocking(w http.ResponseWriter, r *http.Request, params DisableBlockingParams)
- func (_ Unimplemented) EnableBlocking(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListRefresh(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) Query(w http.ResponseWriter, r *http.Request)
- type UnmarshalingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewBlockingStatusRequest ¶
NewBlockingStatusRequest generates requests for BlockingStatus
func NewCacheFlushRequest ¶
NewCacheFlushRequest generates requests for CacheFlush
func NewDisableBlockingRequest ¶
func NewDisableBlockingRequest(server string, params *DisableBlockingParams) (*http.Request, error)
NewDisableBlockingRequest generates requests for DisableBlocking
func NewEnableBlockingRequest ¶
NewEnableBlockingRequest generates requests for EnableBlocking
func NewListRefreshRequest ¶
NewListRefreshRequest generates requests for ListRefresh
func NewQueryRequest ¶
func NewQueryRequest(server string, body QueryJSONRequestBody) (*http.Request, error)
NewQueryRequest calls the generic Query builder with application/json body
func NewQueryRequestWithBody ¶
func NewQueryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewQueryRequestWithBody generates requests for Query with any type of body
func RegisterOpenAPIEndpoints ¶
func RegisterOpenAPIEndpoints(router chi.Router, impl StrictServerInterface)
Types ¶
type ApiBlockingStatus ¶
type ApiBlockingStatus struct {
// AutoEnableInSec If blocking is temporary disabled: amount of seconds until blocking will be enabled
AutoEnableInSec *int `json:"autoEnableInSec,omitempty"`
// DisabledGroups Disabled group names
DisabledGroups *[]string `json:"disabledGroups,omitempty"`
// Enabled True if blocking is enabled
Enabled bool `json:"enabled"`
}
ApiBlockingStatus defines model for api.BlockingStatus.
type ApiQueryRequest ¶
type ApiQueryRequest struct {
// Query query for DNS request
Query string `json:"query"`
// Type request type (A, AAAA, ...)
Type string `json:"type"`
}
ApiQueryRequest defines model for api.QueryRequest.
type ApiQueryResult ¶
type ApiQueryResult struct {
// Reason blocky reason for resolution
Reason string `json:"reason"`
// Response actual DNS response
Response string `json:"response"`
// ResponseType response type (CACHED, BLOCKED, ...)
ResponseType string `json:"responseType"`
// ReturnCode DNS return code (NOERROR, NXDOMAIN, ...)
ReturnCode string `json:"returnCode"`
}
ApiQueryResult defines model for api.QueryResult.
type BlockingControl ¶
type BlockingControl interface {
EnableBlocking(ctx context.Context)
DisableBlocking(ctx context.Context, duration time.Duration, disableGroups []string) error
BlockingStatus() BlockingStatus
}
BlockingControl interface to control the blocking status
type BlockingStatus ¶
type BlockingStatus struct {
// True if blocking is enabled
Enabled bool
// Disabled group names
DisabledGroups []string
// If blocking is temporarily disabled: amount of seconds until blocking will be enabled
AutoEnableInSec int
}
BlockingStatus represents the current blocking status
type BlockingStatus200JSONResponse ¶
type BlockingStatus200JSONResponse ApiBlockingStatus
func (BlockingStatus200JSONResponse) VisitBlockingStatusResponse ¶
func (response BlockingStatus200JSONResponse) VisitBlockingStatusResponse(w http.ResponseWriter) error
type BlockingStatusRequestObject ¶
type BlockingStatusRequestObject struct {
}
type BlockingStatusResponse ¶
type BlockingStatusResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ApiBlockingStatus
}
func ParseBlockingStatusResponse ¶
func ParseBlockingStatusResponse(rsp *http.Response) (*BlockingStatusResponse, error)
ParseBlockingStatusResponse parses an HTTP response from a BlockingStatusWithResponse call
func (BlockingStatusResponse) Status ¶
func (r BlockingStatusResponse) Status() string
Status returns HTTPResponse.Status
func (BlockingStatusResponse) StatusCode ¶
func (r BlockingStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type BlockingStatusResponseObject ¶
type BlockingStatusResponseObject interface {
VisitBlockingStatusResponse(w http.ResponseWriter) error
}
type CacheControl ¶
type CacheFlush200Response ¶
type CacheFlush200Response struct {
}
func (CacheFlush200Response) VisitCacheFlushResponse ¶
func (response CacheFlush200Response) VisitCacheFlushResponse(w http.ResponseWriter) error
type CacheFlushRequestObject ¶
type CacheFlushRequestObject struct {
}
type CacheFlushResponse ¶
func ParseCacheFlushResponse ¶
func ParseCacheFlushResponse(rsp *http.Response) (*CacheFlushResponse, error)
ParseCacheFlushResponse parses an HTTP response from a CacheFlushWithResponse call
func (CacheFlushResponse) Status ¶
func (r CacheFlushResponse) Status() string
Status returns HTTPResponse.Status
func (CacheFlushResponse) StatusCode ¶
func (r CacheFlushResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CacheFlushResponseObject ¶
type CacheFlushResponseObject interface {
VisitCacheFlushResponse(w http.ResponseWriter) error
}
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) BlockingStatus ¶
func (*Client) CacheFlush ¶
func (*Client) DisableBlocking ¶
func (c *Client) DisableBlocking(ctx context.Context, params *DisableBlockingParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) EnableBlocking ¶
func (*Client) ListRefresh ¶
func (*Client) Query ¶
func (c *Client) Query(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// DisableBlocking request
DisableBlocking(ctx context.Context, params *DisableBlockingParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// EnableBlocking request
EnableBlocking(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// BlockingStatus request
BlockingStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CacheFlush request
CacheFlush(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListRefresh request
ListRefresh(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// QueryWithBody request with any body
QueryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
Query(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) BlockingStatusWithResponse ¶
func (c *ClientWithResponses) BlockingStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BlockingStatusResponse, error)
BlockingStatusWithResponse request returning *BlockingStatusResponse
func (*ClientWithResponses) CacheFlushWithResponse ¶
func (c *ClientWithResponses) CacheFlushWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CacheFlushResponse, error)
CacheFlushWithResponse request returning *CacheFlushResponse
func (*ClientWithResponses) DisableBlockingWithResponse ¶
func (c *ClientWithResponses) DisableBlockingWithResponse(ctx context.Context, params *DisableBlockingParams, reqEditors ...RequestEditorFn) (*DisableBlockingResponse, error)
DisableBlockingWithResponse request returning *DisableBlockingResponse
func (*ClientWithResponses) EnableBlockingWithResponse ¶
func (c *ClientWithResponses) EnableBlockingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*EnableBlockingResponse, error)
EnableBlockingWithResponse request returning *EnableBlockingResponse
func (*ClientWithResponses) ListRefreshWithResponse ¶
func (c *ClientWithResponses) ListRefreshWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListRefreshResponse, error)
ListRefreshWithResponse request returning *ListRefreshResponse
func (*ClientWithResponses) QueryWithBodyWithResponse ¶
func (c *ClientWithResponses) QueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryResponse, error)
QueryWithBodyWithResponse request with arbitrary body returning *QueryResponse
func (*ClientWithResponses) QueryWithResponse ¶
func (c *ClientWithResponses) QueryWithResponse(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// DisableBlockingWithResponse request
DisableBlockingWithResponse(ctx context.Context, params *DisableBlockingParams, reqEditors ...RequestEditorFn) (*DisableBlockingResponse, error)
// EnableBlockingWithResponse request
EnableBlockingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*EnableBlockingResponse, error)
// BlockingStatusWithResponse request
BlockingStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BlockingStatusResponse, error)
// CacheFlushWithResponse request
CacheFlushWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CacheFlushResponse, error)
// ListRefreshWithResponse request
ListRefreshWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListRefreshResponse, error)
// QueryWithBodyWithResponse request with any body
QueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryResponse, error)
QueryWithResponse(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DisableBlocking200Response ¶
type DisableBlocking200Response struct {
}
func (DisableBlocking200Response) VisitDisableBlockingResponse ¶
func (response DisableBlocking200Response) VisitDisableBlockingResponse(w http.ResponseWriter) error
type DisableBlocking400TextResponse ¶
type DisableBlocking400TextResponse string
func (DisableBlocking400TextResponse) VisitDisableBlockingResponse ¶
func (response DisableBlocking400TextResponse) VisitDisableBlockingResponse(w http.ResponseWriter) error
type DisableBlockingParams ¶
type DisableBlockingParams struct {
// Duration duration of blocking (Example: 300s, 5m, 1h, 5m30s)
Duration *string `form:"duration,omitempty" json:"duration,omitempty"`
// Groups groups to disable (comma separated). If empty, disable all groups
Groups *string `form:"groups,omitempty" json:"groups,omitempty"`
}
DisableBlockingParams defines parameters for DisableBlocking.
type DisableBlockingRequestObject ¶
type DisableBlockingRequestObject struct {
Params DisableBlockingParams
}
type DisableBlockingResponse ¶
func ParseDisableBlockingResponse ¶
func ParseDisableBlockingResponse(rsp *http.Response) (*DisableBlockingResponse, error)
ParseDisableBlockingResponse parses an HTTP response from a DisableBlockingWithResponse call
func (DisableBlockingResponse) Status ¶
func (r DisableBlockingResponse) Status() string
Status returns HTTPResponse.Status
func (DisableBlockingResponse) StatusCode ¶
func (r DisableBlockingResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DisableBlockingResponseObject ¶
type DisableBlockingResponseObject interface {
VisitDisableBlockingResponse(w http.ResponseWriter) error
}
type EnableBlocking200Response ¶
type EnableBlocking200Response struct {
}
func (EnableBlocking200Response) VisitEnableBlockingResponse ¶
func (response EnableBlocking200Response) VisitEnableBlockingResponse(w http.ResponseWriter) error
type EnableBlockingRequestObject ¶
type EnableBlockingRequestObject struct {
}
type EnableBlockingResponse ¶
func ParseEnableBlockingResponse ¶
func ParseEnableBlockingResponse(rsp *http.Response) (*EnableBlockingResponse, error)
ParseEnableBlockingResponse parses an HTTP response from a EnableBlockingWithResponse call
func (EnableBlockingResponse) Status ¶
func (r EnableBlockingResponse) Status() string
Status returns HTTPResponse.Status
func (EnableBlockingResponse) StatusCode ¶
func (r EnableBlockingResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EnableBlockingResponseObject ¶
type EnableBlockingResponseObject interface {
VisitEnableBlockingResponse(w http.ResponseWriter) error
}
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListRefresh200Response ¶
type ListRefresh200Response struct {
}
func (ListRefresh200Response) VisitListRefreshResponse ¶
func (response ListRefresh200Response) VisitListRefreshResponse(w http.ResponseWriter) error
type ListRefresh500TextResponse ¶
type ListRefresh500TextResponse string
func (ListRefresh500TextResponse) VisitListRefreshResponse ¶
func (response ListRefresh500TextResponse) VisitListRefreshResponse(w http.ResponseWriter) error
type ListRefreshRequestObject ¶
type ListRefreshRequestObject struct {
}
type ListRefreshResponse ¶
func ParseListRefreshResponse ¶
func ParseListRefreshResponse(rsp *http.Response) (*ListRefreshResponse, error)
ParseListRefreshResponse parses an HTTP response from a ListRefreshWithResponse call
func (ListRefreshResponse) Status ¶
func (r ListRefreshResponse) Status() string
Status returns HTTPResponse.Status
func (ListRefreshResponse) StatusCode ¶
func (r ListRefreshResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListRefreshResponseObject ¶
type ListRefreshResponseObject interface {
VisitListRefreshResponse(w http.ResponseWriter) error
}
type ListRefresher ¶
ListRefresher interface to control the list refresh
type OpenAPIInterfaceImpl ¶
type OpenAPIInterfaceImpl struct {
// contains filtered or unexported fields
}
func NewOpenAPIInterfaceImpl ¶
func NewOpenAPIInterfaceImpl(control BlockingControl, querier Querier, refresher ListRefresher, cacheControl CacheControl, ) *OpenAPIInterfaceImpl
func (*OpenAPIInterfaceImpl) BlockingStatus ¶
func (i *OpenAPIInterfaceImpl) BlockingStatus(_ context.Context, _ BlockingStatusRequestObject, ) (BlockingStatusResponseObject, error)
func (*OpenAPIInterfaceImpl) CacheFlush ¶
func (i *OpenAPIInterfaceImpl) CacheFlush(ctx context.Context, _ CacheFlushRequestObject, ) (CacheFlushResponseObject, error)
func (*OpenAPIInterfaceImpl) DisableBlocking ¶
func (i *OpenAPIInterfaceImpl) DisableBlocking(ctx context.Context, request DisableBlockingRequestObject, ) (DisableBlockingResponseObject, error)
func (*OpenAPIInterfaceImpl) EnableBlocking ¶
func (i *OpenAPIInterfaceImpl) EnableBlocking(ctx context.Context, _ EnableBlockingRequestObject, ) (EnableBlockingResponseObject, error)
func (*OpenAPIInterfaceImpl) ListRefresh ¶
func (i *OpenAPIInterfaceImpl) ListRefresh(ctx context.Context, _ ListRefreshRequestObject, ) (ListRefreshResponseObject, error)
func (*OpenAPIInterfaceImpl) Query ¶
func (i *OpenAPIInterfaceImpl) Query(ctx context.Context, request QueryRequestObject) (QueryResponseObject, error)
type Query200JSONResponse ¶
type Query200JSONResponse ApiQueryResult
func (Query200JSONResponse) VisitQueryResponse ¶
func (response Query200JSONResponse) VisitQueryResponse(w http.ResponseWriter) error
type Query400TextResponse ¶
type Query400TextResponse string
func (Query400TextResponse) VisitQueryResponse ¶
func (response Query400TextResponse) VisitQueryResponse(w http.ResponseWriter) error
type QueryJSONRequestBody ¶
type QueryJSONRequestBody = ApiQueryRequest
QueryJSONRequestBody defines body for Query for application/json ContentType.
type QueryRequestObject ¶
type QueryRequestObject struct {
Body *QueryJSONRequestBody
}
type QueryResponse ¶
type QueryResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ApiQueryResult
}
func ParseQueryResponse ¶
func ParseQueryResponse(rsp *http.Response) (*QueryResponse, error)
ParseQueryResponse parses an HTTP response from a QueryWithResponse call
func (QueryResponse) Status ¶
func (r QueryResponse) Status() string
Status returns HTTPResponse.Status
func (QueryResponse) StatusCode ¶
func (r QueryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type QueryResponseObject ¶
type QueryResponseObject interface {
VisitQueryResponse(w http.ResponseWriter) error
}
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServerInterface ¶
type ServerInterface interface {
// Disable blocking
// (GET /blocking/disable)
DisableBlocking(w http.ResponseWriter, r *http.Request, params DisableBlockingParams)
// Enable blocking
// (GET /blocking/enable)
EnableBlocking(w http.ResponseWriter, r *http.Request)
// Blocking status
// (GET /blocking/status)
BlockingStatus(w http.ResponseWriter, r *http.Request)
// Clears the DNS response cache
// (POST /cache/flush)
CacheFlush(w http.ResponseWriter, r *http.Request)
// List refresh
// (POST /lists/refresh)
ListRefresh(w http.ResponseWriter, r *http.Request)
// Performs DNS query
// (POST /query)
Query(w http.ResponseWriter, r *http.Request)
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
func NewStrictHandlerWithOptions ¶
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) BlockingStatus ¶
func (siw *ServerInterfaceWrapper) BlockingStatus(w http.ResponseWriter, r *http.Request)
BlockingStatus operation middleware
func (*ServerInterfaceWrapper) CacheFlush ¶
func (siw *ServerInterfaceWrapper) CacheFlush(w http.ResponseWriter, r *http.Request)
CacheFlush operation middleware
func (*ServerInterfaceWrapper) DisableBlocking ¶
func (siw *ServerInterfaceWrapper) DisableBlocking(w http.ResponseWriter, r *http.Request)
DisableBlocking operation middleware
func (*ServerInterfaceWrapper) EnableBlocking ¶
func (siw *ServerInterfaceWrapper) EnableBlocking(w http.ResponseWriter, r *http.Request)
EnableBlocking operation middleware
func (*ServerInterfaceWrapper) ListRefresh ¶
func (siw *ServerInterfaceWrapper) ListRefresh(w http.ResponseWriter, r *http.Request)
ListRefresh operation middleware
func (*ServerInterfaceWrapper) Query ¶
func (siw *ServerInterfaceWrapper) Query(w http.ResponseWriter, r *http.Request)
Query operation middleware
type StrictHTTPServerOptions ¶
type StrictHTTPServerOptions struct {
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Disable blocking
// (GET /blocking/disable)
DisableBlocking(ctx context.Context, request DisableBlockingRequestObject) (DisableBlockingResponseObject, error)
// Enable blocking
// (GET /blocking/enable)
EnableBlocking(ctx context.Context, request EnableBlockingRequestObject) (EnableBlockingResponseObject, error)
// Blocking status
// (GET /blocking/status)
BlockingStatus(ctx context.Context, request BlockingStatusRequestObject) (BlockingStatusResponseObject, error)
// Clears the DNS response cache
// (POST /cache/flush)
CacheFlush(ctx context.Context, request CacheFlushRequestObject) (CacheFlushResponseObject, error)
// List refresh
// (POST /lists/refresh)
ListRefresh(ctx context.Context, request ListRefreshRequestObject) (ListRefreshResponseObject, error)
// Performs DNS query
// (POST /query)
Query(ctx context.Context, request QueryRequestObject) (QueryResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) BlockingStatus ¶
func (_ Unimplemented) BlockingStatus(w http.ResponseWriter, r *http.Request)
Blocking status (GET /blocking/status)
func (Unimplemented) CacheFlush ¶
func (_ Unimplemented) CacheFlush(w http.ResponseWriter, r *http.Request)
Clears the DNS response cache (POST /cache/flush)
func (Unimplemented) DisableBlocking ¶
func (_ Unimplemented) DisableBlocking(w http.ResponseWriter, r *http.Request, params DisableBlockingParams)
Disable blocking (GET /blocking/disable)
func (Unimplemented) EnableBlocking ¶
func (_ Unimplemented) EnableBlocking(w http.ResponseWriter, r *http.Request)
Enable blocking (GET /blocking/enable)
func (Unimplemented) ListRefresh ¶
func (_ Unimplemented) ListRefresh(w http.ResponseWriter, r *http.Request)
List refresh (POST /lists/refresh)
func (Unimplemented) Query ¶
func (_ Unimplemented) Query(w http.ResponseWriter, r *http.Request)
Performs DNS query (POST /query)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error