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.3.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type Client
- type ClientAndMaybeIdentity
- func (t ClientAndMaybeIdentity) AsClient() (Client, error)
- func (t ClientAndMaybeIdentity) AsIdentity() (Identity, error)
- func (t *ClientAndMaybeIdentity) FromClient(v Client) error
- func (t *ClientAndMaybeIdentity) FromIdentity(v Identity) error
- func (t ClientAndMaybeIdentity) MarshalJSON() ([]byte, error)
- func (t *ClientAndMaybeIdentity) MergeClient(v Client) error
- func (t *ClientAndMaybeIdentity) MergeIdentity(v Identity) error
- func (t *ClientAndMaybeIdentity) UnmarshalJSON(b []byte) error
- type ClientWithId
- type CustomServer
- func (cs *CustomServer) GetClientAndMaybeIdentity(ctx context.Context, request GetClientAndMaybeIdentityRequestObject) (GetClientAndMaybeIdentityResponseObject, error)
- func (cs *CustomServer) GetClientWithId(ctx context.Context, request GetClientWithIdRequestObject) (GetClientWithIdResponseObject, error)
- func (cs *CustomServer) GetIdentityWithDuplicateField(ctx context.Context, request GetIdentityWithDuplicateFieldRequestObject) (GetIdentityWithDuplicateFieldResponseObject, error)
- type GetClientAndMaybeIdentity200JSONResponse
- type GetClientAndMaybeIdentityRequestObject
- type GetClientAndMaybeIdentityResponseObject
- type GetClientWithId200JSONResponse
- type GetClientWithIdRequestObject
- type GetClientWithIdResponseObject
- type GetIdentityWithDuplicateField200JSONResponse
- type GetIdentityWithDuplicateFieldRequestObject
- type GetIdentityWithDuplicateFieldResponseObject
- type GorillaServerOptions
- type Identity
- type IdentityWithDuplicateField
- type InvalidParamFormatError
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
Constants ¶
This section is empty.
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, r *mux.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type ClientAndMaybeIdentity ¶
type ClientAndMaybeIdentity struct {
// contains filtered or unexported fields
}
ClientAndMaybeIdentity defines model for ClientAndMaybeIdentity.
func (ClientAndMaybeIdentity) AsClient ¶
func (t ClientAndMaybeIdentity) AsClient() (Client, error)
AsClient returns the union data inside the ClientAndMaybeIdentity as a Client
func (ClientAndMaybeIdentity) AsIdentity ¶
func (t ClientAndMaybeIdentity) AsIdentity() (Identity, error)
AsIdentity returns the union data inside the ClientAndMaybeIdentity as a Identity
func (*ClientAndMaybeIdentity) FromClient ¶
func (t *ClientAndMaybeIdentity) FromClient(v Client) error
FromClient overwrites any union data inside the ClientAndMaybeIdentity as the provided Client
func (*ClientAndMaybeIdentity) FromIdentity ¶
func (t *ClientAndMaybeIdentity) FromIdentity(v Identity) error
FromIdentity overwrites any union data inside the ClientAndMaybeIdentity as the provided Identity
func (ClientAndMaybeIdentity) MarshalJSON ¶
func (t ClientAndMaybeIdentity) MarshalJSON() ([]byte, error)
func (*ClientAndMaybeIdentity) MergeClient ¶
func (t *ClientAndMaybeIdentity) MergeClient(v Client) error
MergeClient performs a merge with any union data inside the ClientAndMaybeIdentity, using the provided Client
func (*ClientAndMaybeIdentity) MergeIdentity ¶
func (t *ClientAndMaybeIdentity) MergeIdentity(v Identity) error
MergeIdentity performs a merge with any union data inside the ClientAndMaybeIdentity, using the provided Identity
func (*ClientAndMaybeIdentity) UnmarshalJSON ¶
func (t *ClientAndMaybeIdentity) UnmarshalJSON(b []byte) error
type ClientWithId ¶
ClientWithId defines model for ClientWithId.
type CustomServer ¶
func NewCustomServer ¶
func NewCustomServer() *CustomServer
func (*CustomServer) GetClientAndMaybeIdentity ¶
func (cs *CustomServer) GetClientAndMaybeIdentity(ctx context.Context, request GetClientAndMaybeIdentityRequestObject) (GetClientAndMaybeIdentityResponseObject, error)
GET /client-and-maybe-identity
func (*CustomServer) GetClientWithId ¶
func (cs *CustomServer) GetClientWithId(ctx context.Context, request GetClientWithIdRequestObject) (GetClientWithIdResponseObject, error)
GET /client-with-id
func (*CustomServer) GetIdentityWithDuplicateField ¶
func (cs *CustomServer) GetIdentityWithDuplicateField(ctx context.Context, request GetIdentityWithDuplicateFieldRequestObject) (GetIdentityWithDuplicateFieldResponseObject, error)
GET /identity-with-duplicate-field
type GetClientAndMaybeIdentity200JSONResponse ¶
type GetClientAndMaybeIdentity200JSONResponse ClientAndMaybeIdentity
func (GetClientAndMaybeIdentity200JSONResponse) VisitGetClientAndMaybeIdentityResponse ¶
func (response GetClientAndMaybeIdentity200JSONResponse) VisitGetClientAndMaybeIdentityResponse(w http.ResponseWriter) error
type GetClientAndMaybeIdentityRequestObject ¶
type GetClientAndMaybeIdentityRequestObject struct { }
type GetClientAndMaybeIdentityResponseObject ¶
type GetClientAndMaybeIdentityResponseObject interface {
VisitGetClientAndMaybeIdentityResponse(w http.ResponseWriter) error
}
type GetClientWithId200JSONResponse ¶
type GetClientWithId200JSONResponse ClientWithId
func (GetClientWithId200JSONResponse) VisitGetClientWithIdResponse ¶
func (response GetClientWithId200JSONResponse) VisitGetClientWithIdResponse(w http.ResponseWriter) error
type GetClientWithIdRequestObject ¶
type GetClientWithIdRequestObject struct { }
type GetClientWithIdResponseObject ¶
type GetClientWithIdResponseObject interface {
VisitGetClientWithIdResponse(w http.ResponseWriter) error
}
type GetIdentityWithDuplicateField200JSONResponse ¶
type GetIdentityWithDuplicateField200JSONResponse IdentityWithDuplicateField
func (GetIdentityWithDuplicateField200JSONResponse) VisitGetIdentityWithDuplicateFieldResponse ¶
func (response GetIdentityWithDuplicateField200JSONResponse) VisitGetIdentityWithDuplicateFieldResponse(w http.ResponseWriter) error
type GetIdentityWithDuplicateFieldRequestObject ¶
type GetIdentityWithDuplicateFieldRequestObject struct { }
type GetIdentityWithDuplicateFieldResponseObject ¶
type GetIdentityWithDuplicateFieldResponseObject interface {
VisitGetIdentityWithDuplicateFieldResponse(w http.ResponseWriter) error
}
type GorillaServerOptions ¶
type GorillaServerOptions struct { BaseURL string BaseRouter *mux.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type Identity ¶
type Identity struct {
Issuer string `json:"issuer"`
}
Identity defines model for Identity.
type IdentityWithDuplicateField ¶
type IdentityWithDuplicateField struct { Issuer struct { Name string `json:"name"` } `json:"issuer"` }
IdentityWithDuplicateField defines model for IdentityWithDuplicateField.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
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 { // Get identity-with-duplicate-field // (GET /client-and-maybe-identity) GetClientAndMaybeIdentity(w http.ResponseWriter, r *http.Request) // Get client-with-id // (GET /client-with-id) GetClientWithId(w http.ResponseWriter, r *http.Request) // Get identity-with-duplicate-field // (GET /identity-with-duplicate-field) GetIdentityWithDuplicateField(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) GetClientAndMaybeIdentity ¶
func (siw *ServerInterfaceWrapper) GetClientAndMaybeIdentity(w http.ResponseWriter, r *http.Request)
GetClientAndMaybeIdentity operation middleware
func (*ServerInterfaceWrapper) GetClientWithId ¶
func (siw *ServerInterfaceWrapper) GetClientWithId(w http.ResponseWriter, r *http.Request)
GetClientWithId operation middleware
func (*ServerInterfaceWrapper) GetIdentityWithDuplicateField ¶
func (siw *ServerInterfaceWrapper) GetIdentityWithDuplicateField(w http.ResponseWriter, r *http.Request)
GetIdentityWithDuplicateField 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 { // Get identity-with-duplicate-field // (GET /client-and-maybe-identity) GetClientAndMaybeIdentity(ctx context.Context, request GetClientAndMaybeIdentityRequestObject) (GetClientAndMaybeIdentityResponseObject, error) // Get client-with-id // (GET /client-with-id) GetClientWithId(ctx context.Context, request GetClientWithIdRequestObject) (GetClientWithIdResponseObject, error) // Get identity-with-duplicate-field // (GET /identity-with-duplicate-field) GetIdentityWithDuplicateField(ctx context.Context, request GetIdentityWithDuplicateFieldRequestObject) (GetIdentityWithDuplicateFieldResponseObject, 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 UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error