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.4.1 DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- func NewGetApiSchemaJsonSchemaIdentifierChannelChannelRequest(server string, identifier string, channel string) (*http.Request, error)
- func NewGetApiSchemaJsonSchemaIdentifierLatestRequest(server string, identifier string) (*http.Request, error)
- func NewGetApiSchemaJsonSchemaIdentifierLatestVersionRequest(server string, identifier string) (*http.Request, error)
- func NewGetApiSchemaJsonSchemaIdentifierRequest(server string, identifier string) (*http.Request, error)
- func NewGetApiSchemaJsonSchemaIdentifierVersionVersionRequest(server string, identifier string, version string) (*http.Request, error)
- func NewGetApiSpecYmlRequest(server string) (*http.Request, error)
- func NewGetUiConfigRequest(server string) (*http.Request, error)
- func NewListJSONSchemasRequest(server string) (*http.Request, error)
- func NewPostApiSchemaJsonSchemaIdentifierVersionVersionRequest(server string, identifier string, version string, ...) (*http.Request, error)
- func NewPostApiSchemaJsonSchemaIdentifierVersionVersionRequestWithBody(server string, identifier string, version string, contentType string, ...) (*http.Request, error)
- func NewServeMux(ctx *SchemaNestApiContext) (*http.ServeMux, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func SendError(w http.ResponseWriter, status int, error string)
- type Client
- func (c *Client) GetApiSchemaJsonSchemaIdentifier(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetApiSchemaJsonSchemaIdentifierChannelChannel(ctx context.Context, identifier string, channel string, ...) (*http.Response, error)
- func (c *Client) GetApiSchemaJsonSchemaIdentifierLatest(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetApiSchemaJsonSchemaIdentifierLatestVersion(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetApiSchemaJsonSchemaIdentifierVersionVersion(ctx context.Context, identifier string, version string, ...) (*http.Response, error)
- func (c *Client) GetApiSpecYml(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetUiConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListJSONSchemas(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostApiSchemaJsonSchemaIdentifierVersionVersion(ctx context.Context, identifier string, version string, ...) (*http.Response, error)
- func (c *Client) PostApiSchemaJsonSchemaIdentifierVersionVersionWithBody(ctx context.Context, identifier string, version string, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierChannelChannelWithResponse(ctx context.Context, identifier string, channel string, ...) (*GetApiSchemaJsonSchemaIdentifierChannelChannelResponse, error)
- func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierLatestVersionWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierLatestVersionResponse, error)
- func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierLatestWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierLatestResponse, error)
- func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierVersionVersionWithResponse(ctx context.Context, identifier string, version string, ...) (*GetApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
- func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierResponse, error)
- func (c *ClientWithResponses) GetApiSpecYmlWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiSpecYmlResponse, error)
- func (c *ClientWithResponses) GetUiConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUiConfigResponse, error)
- func (c *ClientWithResponses) ListJSONSchemasWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListJSONSchemasResponse, error)
- func (c *ClientWithResponses) PostApiSchemaJsonSchemaIdentifierVersionVersionWithBodyWithResponse(ctx context.Context, identifier string, version string, contentType string, ...) (*PostApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
- func (c *ClientWithResponses) PostApiSchemaJsonSchemaIdentifierVersionVersionWithResponse(ctx context.Context, identifier string, version string, ...) (*PostApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
- type ClientWithResponsesInterface
- type Error
- type GetApiSchemaJsonSchemaIdentifierChannelChannelResponse
- type GetApiSchemaJsonSchemaIdentifierLatestResponse
- type GetApiSchemaJsonSchemaIdentifierLatestVersionResponse
- type GetApiSchemaJsonSchemaIdentifierResponse
- type GetApiSchemaJsonSchemaIdentifierVersionVersionResponse
- type GetApiSpecYmlResponse
- type GetUiConfigResponse
- type HttpRequestDoer
- type InvalidParamFormatError
- type JsonSchemaDetails
- type JsonSchemaInfo
- type JsonSchemaList
- type JsonSchemaVersion
- type JsonSchemaVersions
- type ListJSONSchemasResponse
- type MiddlewareFunc
- type PostApiSchemaJsonSchemaIdentifierVersionVersionJSONBody
- type PostApiSchemaJsonSchemaIdentifierVersionVersionJSONRequestBody
- type PostApiSchemaJsonSchemaIdentifierVersionVersionResponse
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type SchemaNestApi
- func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifier(w http.ResponseWriter, r *http.Request, identifier string)
- func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifierChannelChannel(w http.ResponseWriter, r *http.Request, identifier string, ...)
- func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifierLatest(w http.ResponseWriter, r *http.Request, identifier string)
- func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifierLatestVersion(w http.ResponseWriter, r *http.Request, identifier string)
- func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request, identifier string, version string)
- func (s *SchemaNestApi) GetApiSpecYml(w http.ResponseWriter, r *http.Request)
- func (s *SchemaNestApi) GetUiConfig(w http.ResponseWriter, r *http.Request)
- func (s *SchemaNestApi) ListJSONSchemas(w http.ResponseWriter, r *http.Request)
- func (s *SchemaNestApi) PostApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request, identifier string, version string)
- type SchemaNestApiContext
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifier(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierChannelChannel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierLatest(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierLatestVersion(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiSpecYml(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetUiConfig(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListJSONSchemas(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request)
- type StdHTTPServerOptions
- type TooManyValuesForParamError
- type UIConfig
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type VersionParts
Constants ¶
const (
ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewGetApiSchemaJsonSchemaIdentifierChannelChannelRequest ¶
func NewGetApiSchemaJsonSchemaIdentifierChannelChannelRequest(server string, identifier string, channel string) (*http.Request, error)
NewGetApiSchemaJsonSchemaIdentifierChannelChannelRequest generates requests for GetApiSchemaJsonSchemaIdentifierChannelChannel
func NewGetApiSchemaJsonSchemaIdentifierLatestRequest ¶
func NewGetApiSchemaJsonSchemaIdentifierLatestRequest(server string, identifier string) (*http.Request, error)
NewGetApiSchemaJsonSchemaIdentifierLatestRequest generates requests for GetApiSchemaJsonSchemaIdentifierLatest
func NewGetApiSchemaJsonSchemaIdentifierLatestVersionRequest ¶ added in v0.4.0
func NewGetApiSchemaJsonSchemaIdentifierLatestVersionRequest(server string, identifier string) (*http.Request, error)
NewGetApiSchemaJsonSchemaIdentifierLatestVersionRequest generates requests for GetApiSchemaJsonSchemaIdentifierLatestVersion
func NewGetApiSchemaJsonSchemaIdentifierRequest ¶
func NewGetApiSchemaJsonSchemaIdentifierRequest(server string, identifier string) (*http.Request, error)
NewGetApiSchemaJsonSchemaIdentifierRequest generates requests for GetApiSchemaJsonSchemaIdentifier
func NewGetApiSchemaJsonSchemaIdentifierVersionVersionRequest ¶
func NewGetApiSchemaJsonSchemaIdentifierVersionVersionRequest(server string, identifier string, version string) (*http.Request, error)
NewGetApiSchemaJsonSchemaIdentifierVersionVersionRequest generates requests for GetApiSchemaJsonSchemaIdentifierVersionVersion
func NewGetApiSpecYmlRequest ¶ added in v0.2.0
NewGetApiSpecYmlRequest generates requests for GetApiSpecYml
func NewGetUiConfigRequest ¶ added in v0.2.0
NewGetUiConfigRequest generates requests for GetUiConfig
func NewListJSONSchemasRequest ¶
NewListJSONSchemasRequest generates requests for ListJSONSchemas
func NewPostApiSchemaJsonSchemaIdentifierVersionVersionRequest ¶
func NewPostApiSchemaJsonSchemaIdentifierVersionVersionRequest(server string, identifier string, version string, body PostApiSchemaJsonSchemaIdentifierVersionVersionJSONRequestBody) (*http.Request, error)
NewPostApiSchemaJsonSchemaIdentifierVersionVersionRequest calls the generic PostApiSchemaJsonSchemaIdentifierVersionVersion builder with application/json body
func NewPostApiSchemaJsonSchemaIdentifierVersionVersionRequestWithBody ¶
func NewPostApiSchemaJsonSchemaIdentifierVersionVersionRequestWithBody(server string, identifier string, version string, contentType string, body io.Reader) (*http.Request, error)
NewPostApiSchemaJsonSchemaIdentifierVersionVersionRequestWithBody generates requests for PostApiSchemaJsonSchemaIdentifierVersionVersion with any type of body
func NewServeMux ¶
func NewServeMux(ctx *SchemaNestApiContext) (*http.ServeMux, error)
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
Types ¶
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) GetApiSchemaJsonSchemaIdentifier ¶
func (*Client) GetApiSchemaJsonSchemaIdentifierChannelChannel ¶
func (*Client) GetApiSchemaJsonSchemaIdentifierLatest ¶
func (*Client) GetApiSchemaJsonSchemaIdentifierLatestVersion ¶ added in v0.4.0
func (*Client) GetApiSchemaJsonSchemaIdentifierVersionVersion ¶
func (*Client) GetApiSpecYml ¶ added in v0.2.0
func (*Client) GetUiConfig ¶ added in v0.2.0
func (*Client) ListJSONSchemas ¶
func (*Client) PostApiSchemaJsonSchemaIdentifierVersionVersion ¶
func (c *Client) PostApiSchemaJsonSchemaIdentifierVersionVersion(ctx context.Context, identifier string, version string, body PostApiSchemaJsonSchemaIdentifierVersionVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// GetApiSpecYml request
GetApiSpecYml(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListJSONSchemas request
ListJSONSchemas(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetApiSchemaJsonSchemaIdentifier request
GetApiSchemaJsonSchemaIdentifier(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetApiSchemaJsonSchemaIdentifierChannelChannel request
GetApiSchemaJsonSchemaIdentifierChannelChannel(ctx context.Context, identifier string, channel string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetApiSchemaJsonSchemaIdentifierLatest request
GetApiSchemaJsonSchemaIdentifierLatest(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetApiSchemaJsonSchemaIdentifierLatestVersion request
GetApiSchemaJsonSchemaIdentifierLatestVersion(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetApiSchemaJsonSchemaIdentifierVersionVersion request
GetApiSchemaJsonSchemaIdentifierVersionVersion(ctx context.Context, identifier string, version string, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostApiSchemaJsonSchemaIdentifierVersionVersionWithBody request with any body
PostApiSchemaJsonSchemaIdentifierVersionVersionWithBody(ctx context.Context, identifier string, version string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostApiSchemaJsonSchemaIdentifierVersionVersion(ctx context.Context, identifier string, version string, body PostApiSchemaJsonSchemaIdentifierVersionVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetUiConfig request
GetUiConfig(ctx context.Context, 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) GetApiSchemaJsonSchemaIdentifierChannelChannelWithResponse ¶
func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierChannelChannelWithResponse(ctx context.Context, identifier string, channel string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierChannelChannelResponse, error)
GetApiSchemaJsonSchemaIdentifierChannelChannelWithResponse request returning *GetApiSchemaJsonSchemaIdentifierChannelChannelResponse
func (*ClientWithResponses) GetApiSchemaJsonSchemaIdentifierLatestVersionWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierLatestVersionWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierLatestVersionResponse, error)
GetApiSchemaJsonSchemaIdentifierLatestVersionWithResponse request returning *GetApiSchemaJsonSchemaIdentifierLatestVersionResponse
func (*ClientWithResponses) GetApiSchemaJsonSchemaIdentifierLatestWithResponse ¶
func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierLatestWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierLatestResponse, error)
GetApiSchemaJsonSchemaIdentifierLatestWithResponse request returning *GetApiSchemaJsonSchemaIdentifierLatestResponse
func (*ClientWithResponses) GetApiSchemaJsonSchemaIdentifierVersionVersionWithResponse ¶
func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierVersionVersionWithResponse(ctx context.Context, identifier string, version string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
GetApiSchemaJsonSchemaIdentifierVersionVersionWithResponse request returning *GetApiSchemaJsonSchemaIdentifierVersionVersionResponse
func (*ClientWithResponses) GetApiSchemaJsonSchemaIdentifierWithResponse ¶
func (c *ClientWithResponses) GetApiSchemaJsonSchemaIdentifierWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierResponse, error)
GetApiSchemaJsonSchemaIdentifierWithResponse request returning *GetApiSchemaJsonSchemaIdentifierResponse
func (*ClientWithResponses) GetApiSpecYmlWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) GetApiSpecYmlWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiSpecYmlResponse, error)
GetApiSpecYmlWithResponse request returning *GetApiSpecYmlResponse
func (*ClientWithResponses) GetUiConfigWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) GetUiConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUiConfigResponse, error)
GetUiConfigWithResponse request returning *GetUiConfigResponse
func (*ClientWithResponses) ListJSONSchemasWithResponse ¶
func (c *ClientWithResponses) ListJSONSchemasWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListJSONSchemasResponse, error)
ListJSONSchemasWithResponse request returning *ListJSONSchemasResponse
func (*ClientWithResponses) PostApiSchemaJsonSchemaIdentifierVersionVersionWithBodyWithResponse ¶
func (c *ClientWithResponses) PostApiSchemaJsonSchemaIdentifierVersionVersionWithBodyWithResponse(ctx context.Context, identifier string, version string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
PostApiSchemaJsonSchemaIdentifierVersionVersionWithBodyWithResponse request with arbitrary body returning *PostApiSchemaJsonSchemaIdentifierVersionVersionResponse
func (*ClientWithResponses) PostApiSchemaJsonSchemaIdentifierVersionVersionWithResponse ¶
func (c *ClientWithResponses) PostApiSchemaJsonSchemaIdentifierVersionVersionWithResponse(ctx context.Context, identifier string, version string, body PostApiSchemaJsonSchemaIdentifierVersionVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetApiSpecYmlWithResponse request
GetApiSpecYmlWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiSpecYmlResponse, error)
// ListJSONSchemasWithResponse request
ListJSONSchemasWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListJSONSchemasResponse, error)
// GetApiSchemaJsonSchemaIdentifierWithResponse request
GetApiSchemaJsonSchemaIdentifierWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierResponse, error)
// GetApiSchemaJsonSchemaIdentifierChannelChannelWithResponse request
GetApiSchemaJsonSchemaIdentifierChannelChannelWithResponse(ctx context.Context, identifier string, channel string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierChannelChannelResponse, error)
// GetApiSchemaJsonSchemaIdentifierLatestWithResponse request
GetApiSchemaJsonSchemaIdentifierLatestWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierLatestResponse, error)
// GetApiSchemaJsonSchemaIdentifierLatestVersionWithResponse request
GetApiSchemaJsonSchemaIdentifierLatestVersionWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierLatestVersionResponse, error)
// GetApiSchemaJsonSchemaIdentifierVersionVersionWithResponse request
GetApiSchemaJsonSchemaIdentifierVersionVersionWithResponse(ctx context.Context, identifier string, version string, reqEditors ...RequestEditorFn) (*GetApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
// PostApiSchemaJsonSchemaIdentifierVersionVersionWithBodyWithResponse request with any body
PostApiSchemaJsonSchemaIdentifierVersionVersionWithBodyWithResponse(ctx context.Context, identifier string, version string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
PostApiSchemaJsonSchemaIdentifierVersionVersionWithResponse(ctx context.Context, identifier string, version string, body PostApiSchemaJsonSchemaIdentifierVersionVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
// GetUiConfigWithResponse request
GetUiConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUiConfigResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Error ¶
type Error struct {
// Error Error message
Error string `json:"error"`
}
Error defines model for Error.
type GetApiSchemaJsonSchemaIdentifierChannelChannelResponse ¶
type GetApiSchemaJsonSchemaIdentifierChannelChannelResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
}
func ParseGetApiSchemaJsonSchemaIdentifierChannelChannelResponse ¶
func ParseGetApiSchemaJsonSchemaIdentifierChannelChannelResponse(rsp *http.Response) (*GetApiSchemaJsonSchemaIdentifierChannelChannelResponse, error)
ParseGetApiSchemaJsonSchemaIdentifierChannelChannelResponse parses an HTTP response from a GetApiSchemaJsonSchemaIdentifierChannelChannelWithResponse call
func (GetApiSchemaJsonSchemaIdentifierChannelChannelResponse) Status ¶
func (r GetApiSchemaJsonSchemaIdentifierChannelChannelResponse) Status() string
Status returns HTTPResponse.Status
func (GetApiSchemaJsonSchemaIdentifierChannelChannelResponse) StatusCode ¶
func (r GetApiSchemaJsonSchemaIdentifierChannelChannelResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetApiSchemaJsonSchemaIdentifierLatestResponse ¶
type GetApiSchemaJsonSchemaIdentifierLatestResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
}
func ParseGetApiSchemaJsonSchemaIdentifierLatestResponse ¶
func ParseGetApiSchemaJsonSchemaIdentifierLatestResponse(rsp *http.Response) (*GetApiSchemaJsonSchemaIdentifierLatestResponse, error)
ParseGetApiSchemaJsonSchemaIdentifierLatestResponse parses an HTTP response from a GetApiSchemaJsonSchemaIdentifierLatestWithResponse call
func (GetApiSchemaJsonSchemaIdentifierLatestResponse) Status ¶
func (r GetApiSchemaJsonSchemaIdentifierLatestResponse) Status() string
Status returns HTTPResponse.Status
func (GetApiSchemaJsonSchemaIdentifierLatestResponse) StatusCode ¶
func (r GetApiSchemaJsonSchemaIdentifierLatestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetApiSchemaJsonSchemaIdentifierLatestVersionResponse ¶ added in v0.4.0
type GetApiSchemaJsonSchemaIdentifierLatestVersionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *VersionParts
}
func ParseGetApiSchemaJsonSchemaIdentifierLatestVersionResponse ¶ added in v0.4.0
func ParseGetApiSchemaJsonSchemaIdentifierLatestVersionResponse(rsp *http.Response) (*GetApiSchemaJsonSchemaIdentifierLatestVersionResponse, error)
ParseGetApiSchemaJsonSchemaIdentifierLatestVersionResponse parses an HTTP response from a GetApiSchemaJsonSchemaIdentifierLatestVersionWithResponse call
func (GetApiSchemaJsonSchemaIdentifierLatestVersionResponse) Status ¶ added in v0.4.0
func (r GetApiSchemaJsonSchemaIdentifierLatestVersionResponse) Status() string
Status returns HTTPResponse.Status
func (GetApiSchemaJsonSchemaIdentifierLatestVersionResponse) StatusCode ¶ added in v0.4.0
func (r GetApiSchemaJsonSchemaIdentifierLatestVersionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetApiSchemaJsonSchemaIdentifierResponse ¶
type GetApiSchemaJsonSchemaIdentifierResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *JsonSchemaList
}
func ParseGetApiSchemaJsonSchemaIdentifierResponse ¶
func ParseGetApiSchemaJsonSchemaIdentifierResponse(rsp *http.Response) (*GetApiSchemaJsonSchemaIdentifierResponse, error)
ParseGetApiSchemaJsonSchemaIdentifierResponse parses an HTTP response from a GetApiSchemaJsonSchemaIdentifierWithResponse call
func (GetApiSchemaJsonSchemaIdentifierResponse) Status ¶
func (r GetApiSchemaJsonSchemaIdentifierResponse) Status() string
Status returns HTTPResponse.Status
func (GetApiSchemaJsonSchemaIdentifierResponse) StatusCode ¶
func (r GetApiSchemaJsonSchemaIdentifierResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetApiSchemaJsonSchemaIdentifierVersionVersionResponse ¶
type GetApiSchemaJsonSchemaIdentifierVersionVersionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
}
func ParseGetApiSchemaJsonSchemaIdentifierVersionVersionResponse ¶
func ParseGetApiSchemaJsonSchemaIdentifierVersionVersionResponse(rsp *http.Response) (*GetApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
ParseGetApiSchemaJsonSchemaIdentifierVersionVersionResponse parses an HTTP response from a GetApiSchemaJsonSchemaIdentifierVersionVersionWithResponse call
func (GetApiSchemaJsonSchemaIdentifierVersionVersionResponse) Status ¶
func (r GetApiSchemaJsonSchemaIdentifierVersionVersionResponse) Status() string
Status returns HTTPResponse.Status
func (GetApiSchemaJsonSchemaIdentifierVersionVersionResponse) StatusCode ¶
func (r GetApiSchemaJsonSchemaIdentifierVersionVersionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetApiSpecYmlResponse ¶ added in v0.2.0
func ParseGetApiSpecYmlResponse ¶ added in v0.2.0
func ParseGetApiSpecYmlResponse(rsp *http.Response) (*GetApiSpecYmlResponse, error)
ParseGetApiSpecYmlResponse parses an HTTP response from a GetApiSpecYmlWithResponse call
func (GetApiSpecYmlResponse) Status ¶ added in v0.2.0
func (r GetApiSpecYmlResponse) Status() string
Status returns HTTPResponse.Status
func (GetApiSpecYmlResponse) StatusCode ¶ added in v0.2.0
func (r GetApiSpecYmlResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetUiConfigResponse ¶ added in v0.2.0
func ParseGetUiConfigResponse ¶ added in v0.2.0
func ParseGetUiConfigResponse(rsp *http.Response) (*GetUiConfigResponse, error)
ParseGetUiConfigResponse parses an HTTP response from a GetUiConfigWithResponse call
func (GetUiConfigResponse) Status ¶ added in v0.2.0
func (r GetUiConfigResponse) Status() string
Status returns HTTPResponse.Status
func (GetUiConfigResponse) StatusCode ¶ added in v0.2.0
func (r GetUiConfigResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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 JsonSchemaDetails ¶ added in v0.1.0
type JsonSchemaDetails struct {
// Description Description for the
Description *string `json:"description,omitempty"`
Versions JsonSchemaVersions `json:"versions"`
}
JsonSchemaDetails defines model for JsonSchemaDetails.
type JsonSchemaInfo ¶
type JsonSchemaInfo struct {
// Description Description for the schema as set by the latest version
Description string `json:"description"`
// Identifier Identifier for the schema
Identifier string `json:"identifier"`
// LatestVersion Version seperated into its parts
LatestVersion VersionParts `json:"latestVersion"`
}
JsonSchemaInfo defines model for JsonSchemaInfo.
type JsonSchemaList ¶
type JsonSchemaList = []JsonSchemaInfo
JsonSchemaList defines model for JsonSchemaList.
type JsonSchemaVersion ¶
type JsonSchemaVersion struct {
Version string `json:"version"`
}
JsonSchemaVersion defines model for JsonSchemaVersion.
type JsonSchemaVersions ¶
type JsonSchemaVersions = []JsonSchemaVersion
JsonSchemaVersions defines model for JsonSchemaVersions.
type ListJSONSchemasResponse ¶
type ListJSONSchemasResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *JsonSchemaDetails
}
func ParseListJSONSchemasResponse ¶
func ParseListJSONSchemasResponse(rsp *http.Response) (*ListJSONSchemasResponse, error)
ParseListJSONSchemasResponse parses an HTTP response from a ListJSONSchemasWithResponse call
func (ListJSONSchemasResponse) Status ¶
func (r ListJSONSchemasResponse) Status() string
Status returns HTTPResponse.Status
func (ListJSONSchemasResponse) StatusCode ¶
func (r ListJSONSchemasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostApiSchemaJsonSchemaIdentifierVersionVersionJSONBody ¶
type PostApiSchemaJsonSchemaIdentifierVersionVersionJSONBody = map[string]interface{}
PostApiSchemaJsonSchemaIdentifierVersionVersionJSONBody defines parameters for PostApiSchemaJsonSchemaIdentifierVersionVersion.
type PostApiSchemaJsonSchemaIdentifierVersionVersionJSONRequestBody ¶
type PostApiSchemaJsonSchemaIdentifierVersionVersionJSONRequestBody = PostApiSchemaJsonSchemaIdentifierVersionVersionJSONBody
PostApiSchemaJsonSchemaIdentifierVersionVersionJSONRequestBody defines body for PostApiSchemaJsonSchemaIdentifierVersionVersion for application/json ContentType.
type PostApiSchemaJsonSchemaIdentifierVersionVersionResponse ¶
type PostApiSchemaJsonSchemaIdentifierVersionVersionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON409 *Error
}
func ParsePostApiSchemaJsonSchemaIdentifierVersionVersionResponse ¶
func ParsePostApiSchemaJsonSchemaIdentifierVersionVersionResponse(rsp *http.Response) (*PostApiSchemaJsonSchemaIdentifierVersionVersionResponse, error)
ParsePostApiSchemaJsonSchemaIdentifierVersionVersionResponse parses an HTTP response from a PostApiSchemaJsonSchemaIdentifierVersionVersionWithResponse call
func (PostApiSchemaJsonSchemaIdentifierVersionVersionResponse) Status ¶
func (r PostApiSchemaJsonSchemaIdentifierVersionVersionResponse) Status() string
Status returns HTTPResponse.Status
func (PostApiSchemaJsonSchemaIdentifierVersionVersionResponse) StatusCode ¶
func (r PostApiSchemaJsonSchemaIdentifierVersionVersionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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 SchemaNestApi ¶
type SchemaNestApi struct {
// contains filtered or unexported fields
}
func NewSchemaNestApi ¶
func NewSchemaNestApi(ctx *SchemaNestApiContext) *SchemaNestApi
func (*SchemaNestApi) GetApiSchemaJsonSchemaIdentifier ¶
func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifier(w http.ResponseWriter, r *http.Request, identifier string)
func (*SchemaNestApi) GetApiSchemaJsonSchemaIdentifierChannelChannel ¶
func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifierChannelChannel(w http.ResponseWriter, r *http.Request, identifier string, channelIdentifier string)
func (*SchemaNestApi) GetApiSchemaJsonSchemaIdentifierLatest ¶
func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifierLatest(w http.ResponseWriter, r *http.Request, identifier string)
func (*SchemaNestApi) GetApiSchemaJsonSchemaIdentifierLatestVersion ¶ added in v0.4.0
func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifierLatestVersion(w http.ResponseWriter, r *http.Request, identifier string)
func (*SchemaNestApi) GetApiSchemaJsonSchemaIdentifierVersionVersion ¶
func (s *SchemaNestApi) GetApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request, identifier string, version string)
func (*SchemaNestApi) GetApiSpecYml ¶ added in v0.2.0
func (s *SchemaNestApi) GetApiSpecYml(w http.ResponseWriter, r *http.Request)
func (*SchemaNestApi) GetUiConfig ¶ added in v0.2.0
func (s *SchemaNestApi) GetUiConfig(w http.ResponseWriter, r *http.Request)
func (*SchemaNestApi) ListJSONSchemas ¶
func (s *SchemaNestApi) ListJSONSchemas(w http.ResponseWriter, r *http.Request)
func (*SchemaNestApi) PostApiSchemaJsonSchemaIdentifierVersionVersion ¶
func (s *SchemaNestApi) PostApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request, identifier string, version string)
type SchemaNestApiContext ¶
type SchemaNestApiContext struct {
JsonSchemaRepository json_schema.JsonSchemaRepository
JsonSchemaVersionRepository json_schema.JsonSchemaVersionRepository
Config *config.Config
}
type ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
ServeHTTP(w http.ResponseWriter, r *http.Request)
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// (GET /api-spec.yml)
GetApiSpecYml(w http.ResponseWriter, r *http.Request)
// List all available JSON schemas
// (GET /api/schema/json-schema)
ListJSONSchemas(w http.ResponseWriter, r *http.Request)
// Get versions of a json schema
// (GET /api/schema/json-schema/{identifier})
GetApiSchemaJsonSchemaIdentifier(w http.ResponseWriter, r *http.Request, identifier string)
// Get latest version of a JSON schema for a channel
// (GET /api/schema/json-schema/{identifier}/channel/{channel})
GetApiSchemaJsonSchemaIdentifierChannelChannel(w http.ResponseWriter, r *http.Request, identifier string, channel string)
// Get latest version of a JSON schema
// (GET /api/schema/json-schema/{identifier}/latest)
GetApiSchemaJsonSchemaIdentifierLatest(w http.ResponseWriter, r *http.Request, identifier string)
// Get the version of the latest JSON Schema
// (GET /api/schema/json-schema/{identifier}/latest-version)
GetApiSchemaJsonSchemaIdentifierLatestVersion(w http.ResponseWriter, r *http.Request, identifier string)
// Get latest version of a JSON schema
// (GET /api/schema/json-schema/{identifier}/version/{version})
GetApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request, identifier string, version string)
// Create a new json schema for a version
// (POST /api/schema/json-schema/{identifier}/version/{version})
PostApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request, identifier string, version string)
// Get the UI configuration
// (GET /ui-config)
GetUiConfig(w http.ResponseWriter, r *http.Request)
}
ServerInterface represents all server handlers.
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) GetApiSchemaJsonSchemaIdentifier ¶
func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifier(w http.ResponseWriter, r *http.Request)
GetApiSchemaJsonSchemaIdentifier operation middleware
func (*ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierChannelChannel ¶
func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierChannelChannel(w http.ResponseWriter, r *http.Request)
GetApiSchemaJsonSchemaIdentifierChannelChannel operation middleware
func (*ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierLatest ¶
func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierLatest(w http.ResponseWriter, r *http.Request)
GetApiSchemaJsonSchemaIdentifierLatest operation middleware
func (*ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierLatestVersion ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierLatestVersion(w http.ResponseWriter, r *http.Request)
GetApiSchemaJsonSchemaIdentifierLatestVersion operation middleware
func (*ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierVersionVersion ¶
func (siw *ServerInterfaceWrapper) GetApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request)
GetApiSchemaJsonSchemaIdentifierVersionVersion operation middleware
func (*ServerInterfaceWrapper) GetApiSpecYml ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) GetApiSpecYml(w http.ResponseWriter, r *http.Request)
GetApiSpecYml operation middleware
func (*ServerInterfaceWrapper) GetUiConfig ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) GetUiConfig(w http.ResponseWriter, r *http.Request)
GetUiConfig operation middleware
func (*ServerInterfaceWrapper) ListJSONSchemas ¶
func (siw *ServerInterfaceWrapper) ListJSONSchemas(w http.ResponseWriter, r *http.Request)
ListJSONSchemas operation middleware
func (*ServerInterfaceWrapper) PostApiSchemaJsonSchemaIdentifierVersionVersion ¶
func (siw *ServerInterfaceWrapper) PostApiSchemaJsonSchemaIdentifierVersionVersion(w http.ResponseWriter, r *http.Request)
PostApiSchemaJsonSchemaIdentifierVersionVersion operation middleware
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UIConfig ¶ added in v0.2.0
type UIConfig struct {
// ApiKeyAuthEnabled Whether API Key authentication has been enabled
ApiKeyAuthEnabled bool `json:"apiKeyAuthEnabled"`
}
UIConfig defines model for UIConfig.
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type VersionParts ¶ added in v0.1.0
type VersionParts struct {
// Major Semantic major version
Major int `json:"major"`
// Minor Semantic minor version
Minor int `json:"minor"`
// Patch Semantic patch version
Patch int `json:"patch"`
}
VersionParts Version seperated into its parts