Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (swagger *openapi3.T, err error)
- 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 PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type APIKey
- type APIKeyInit
- type APIKeyInitBody
- type APIKeyResponse
- type APIKeyUpdate
- type APIKeyUpdateBody
- type ChiServerOptions
- type DeleteKeysParams
- type ErrorResponse
- type ExpectedError
- type GetCoveragePathParams
- type GetCoveragePathParamsFormat
- type GetKeysParams
- type HealthCheck
- type HealthCheckResponse
- type InvalidParamFormatError
- type MiddlewareFunc
- type PostCoveragePathJSONBody
- type PostCoveragePathJSONRequestBody
- type PostKeysJSONRequestBody
- type PostUsersSigninJSONRequestBody
- type PostUsersSignupJSONRequestBody
- type PutKeysJSONRequestBody
- type RequiredHeaderError
- type RequiredParamError
- type Server
- func (s Server) DeleteCoveragePath(w http.ResponseWriter, r *http.Request, path string)
- func (s Server) DeleteKeys(w http.ResponseWriter, r *http.Request, params DeleteKeysParams)
- func (s Server) GetCoveragePath(w http.ResponseWriter, r *http.Request, path string, ...)
- func (s Server) GetHealth(w http.ResponseWriter, r *http.Request)
- func (s Server) GetKeys(w http.ResponseWriter, r *http.Request, params GetKeysParams)
- func (s Server) PostCoveragePath(w http.ResponseWriter, r *http.Request, path string)
- func (s Server) PostKeys(w http.ResponseWriter, r *http.Request)
- func (s Server) PostUsersSignin(w http.ResponseWriter, r *http.Request)
- func (s Server) PostUsersSignout(w http.ResponseWriter, r *http.Request)
- func (s Server) PostUsersSignup(w http.ResponseWriter, r *http.Request)
- func (s Server) PutKeys(w http.ResponseWriter, r *http.Request)
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) DeleteCoveragePath(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteKeys(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCoveragePath(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetKeys(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostCoveragePath(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostKeys(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostUsersSignin(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostUsersSignout(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostUsersSignup(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutKeys(w http.ResponseWriter, r *http.Request)
- type SigninData
- type SigninDataBody
- type Success
- type SuccessResponse
- type SuccessfulSigninResponse
- type SuccessfulSignoutResponse
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) DeleteCoveragePath(w http.ResponseWriter, r *http.Request, path string)
- func (_ Unimplemented) DeleteKeys(w http.ResponseWriter, r *http.Request, params DeleteKeysParams)
- func (_ Unimplemented) GetCoveragePath(w http.ResponseWriter, r *http.Request, path string, ...)
- func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetKeys(w http.ResponseWriter, r *http.Request, params GetKeysParams)
- func (_ Unimplemented) PostCoveragePath(w http.ResponseWriter, r *http.Request, path string)
- func (_ Unimplemented) PostKeys(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostUsersSignin(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostUsersSignout(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostUsersSignup(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PutKeys(w http.ResponseWriter, r *http.Request)
- type UnmarshalingParamError
Constants ¶
const ( APIKeyAuthScopes = "APIKeyAuth.Scopes" CookieAuthScopes = "CookieAuth.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, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type APIKeyInit ¶
type APIKeyInit struct {
Scopes []string `json:"scopes"`
}
APIKeyInit defines model for APIKeyInit.
type APIKeyInitBody ¶
type APIKeyInitBody = APIKeyInit
APIKeyInitBody defines model for APIKeyInitBody.
type APIKeyUpdate ¶
APIKeyUpdate defines model for APIKeyUpdate.
type APIKeyUpdateBody ¶
type APIKeyUpdateBody = APIKeyUpdate
APIKeyUpdateBody defines model for APIKeyUpdateBody.
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type DeleteKeysParams ¶
type DeleteKeysParams struct {
Id int `form:"id" json:"id"`
}
DeleteKeysParams defines parameters for DeleteKeys.
type ErrorResponse ¶
type ErrorResponse = ExpectedError
ErrorResponse defines model for ErrorResponse.
type ExpectedError ¶
type ExpectedError struct { // Code the error code of the responses Code int `json:"code"` // Message Error message Message string `json:"message"` }
ExpectedError defines model for ExpectedError.
type GetCoveragePathParams ¶
type GetCoveragePathParams struct { // Format Specifies the desired format Format *GetCoveragePathParamsFormat `form:"format,omitempty" json:"format,omitempty"` }
GetCoveragePathParams defines parameters for GetCoveragePath.
type GetCoveragePathParamsFormat ¶
type GetCoveragePathParamsFormat string
GetCoveragePathParamsFormat defines parameters for GetCoveragePath.
const ( Raw GetCoveragePathParamsFormat = "raw" Svg GetCoveragePathParamsFormat = "svg" )
Defines values for GetCoveragePathParamsFormat.
type GetKeysParams ¶
type GetKeysParams struct {
Id int `form:"id" json:"id"`
}
GetKeysParams defines parameters for GetKeys.
type HealthCheckResponse ¶
type HealthCheckResponse = HealthCheck
HealthCheckResponse Information on the health of the service
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type PostCoveragePathJSONBody ¶
type PostCoveragePathJSONBody struct {
Cover string `json:"cover"`
}
PostCoveragePathJSONBody defines parameters for PostCoveragePath.
type PostCoveragePathJSONRequestBody ¶
type PostCoveragePathJSONRequestBody PostCoveragePathJSONBody
PostCoveragePathJSONRequestBody defines body for PostCoveragePath for application/json ContentType.
type PostKeysJSONRequestBody ¶
type PostKeysJSONRequestBody = APIKeyInit
PostKeysJSONRequestBody defines body for PostKeys for application/json ContentType.
type PostUsersSigninJSONRequestBody ¶
type PostUsersSigninJSONRequestBody = SigninData
PostUsersSigninJSONRequestBody defines body for PostUsersSignin for application/json ContentType.
type PostUsersSignupJSONRequestBody ¶
type PostUsersSignupJSONRequestBody = SigninData
PostUsersSignupJSONRequestBody defines body for PostUsersSignup for application/json ContentType.
type PutKeysJSONRequestBody ¶
type PutKeysJSONRequestBody = APIKeyUpdate
PutKeysJSONRequestBody defines body for PutKeys for application/json ContentType.
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 Server ¶
type Server struct{}
func (Server) DeleteCoveragePath ¶
func (Server) DeleteKeys ¶
func (s Server) DeleteKeys(w http.ResponseWriter, r *http.Request, params DeleteKeysParams)
func (Server) GetCoveragePath ¶
func (s Server) GetCoveragePath(w http.ResponseWriter, r *http.Request, path string, params GetCoveragePathParams)
func (Server) GetKeys ¶
func (s Server) GetKeys(w http.ResponseWriter, r *http.Request, params GetKeysParams)
func (Server) PostCoveragePath ¶
func (Server) PostUsersSignin ¶
func (s Server) PostUsersSignin(w http.ResponseWriter, r *http.Request)
func (Server) PostUsersSignout ¶
func (s Server) PostUsersSignout(w http.ResponseWriter, r *http.Request)
func (Server) PostUsersSignup ¶
func (s Server) PostUsersSignup(w http.ResponseWriter, r *http.Request)
type ServerInterface ¶
type ServerInterface interface { // (DELETE /coverage/{path}) DeleteCoveragePath(w http.ResponseWriter, r *http.Request, path string) // (GET /coverage/{path}) GetCoveragePath(w http.ResponseWriter, r *http.Request, path string, params GetCoveragePathParams) // (POST /coverage/{path}) PostCoveragePath(w http.ResponseWriter, r *http.Request, path string) // (GET /health) GetHealth(w http.ResponseWriter, r *http.Request) // (DELETE /keys) DeleteKeys(w http.ResponseWriter, r *http.Request, params DeleteKeysParams) // (GET /keys) GetKeys(w http.ResponseWriter, r *http.Request, params GetKeysParams) // (POST /keys) PostKeys(w http.ResponseWriter, r *http.Request) // (PUT /keys) PutKeys(w http.ResponseWriter, r *http.Request) // (POST /users/signin) PostUsersSignin(w http.ResponseWriter, r *http.Request) // (POST /users/signout) PostUsersSignout(w http.ResponseWriter, r *http.Request) // (POST /users/signup) PostUsersSignup(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) DeleteCoveragePath ¶
func (siw *ServerInterfaceWrapper) DeleteCoveragePath(w http.ResponseWriter, r *http.Request)
DeleteCoveragePath operation middleware
func (*ServerInterfaceWrapper) DeleteKeys ¶
func (siw *ServerInterfaceWrapper) DeleteKeys(w http.ResponseWriter, r *http.Request)
DeleteKeys operation middleware
func (*ServerInterfaceWrapper) GetCoveragePath ¶
func (siw *ServerInterfaceWrapper) GetCoveragePath(w http.ResponseWriter, r *http.Request)
GetCoveragePath operation middleware
func (*ServerInterfaceWrapper) GetHealth ¶
func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
GetHealth operation middleware
func (*ServerInterfaceWrapper) GetKeys ¶
func (siw *ServerInterfaceWrapper) GetKeys(w http.ResponseWriter, r *http.Request)
GetKeys operation middleware
func (*ServerInterfaceWrapper) PostCoveragePath ¶
func (siw *ServerInterfaceWrapper) PostCoveragePath(w http.ResponseWriter, r *http.Request)
PostCoveragePath operation middleware
func (*ServerInterfaceWrapper) PostKeys ¶
func (siw *ServerInterfaceWrapper) PostKeys(w http.ResponseWriter, r *http.Request)
PostKeys operation middleware
func (*ServerInterfaceWrapper) PostUsersSignin ¶
func (siw *ServerInterfaceWrapper) PostUsersSignin(w http.ResponseWriter, r *http.Request)
PostUsersSignin operation middleware
func (*ServerInterfaceWrapper) PostUsersSignout ¶
func (siw *ServerInterfaceWrapper) PostUsersSignout(w http.ResponseWriter, r *http.Request)
PostUsersSignout operation middleware
func (*ServerInterfaceWrapper) PostUsersSignup ¶
func (siw *ServerInterfaceWrapper) PostUsersSignup(w http.ResponseWriter, r *http.Request)
PostUsersSignup operation middleware
func (*ServerInterfaceWrapper) PutKeys ¶
func (siw *ServerInterfaceWrapper) PutKeys(w http.ResponseWriter, r *http.Request)
PutKeys operation middleware
type SigninData ¶
type SigninData struct { // Password Password used to sign in Password string `json:"password"` // Username Username used to sign in Username string `json:"username"` }
SigninData Data used to sign in
type SuccessfulSigninResponse ¶
type SuccessfulSigninResponse = Success
SuccessfulSigninResponse Operation was a success
type SuccessfulSignoutResponse ¶
type SuccessfulSignoutResponse = Success
SuccessfulSignoutResponse Operation was a success
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) DeleteCoveragePath ¶
func (_ Unimplemented) DeleteCoveragePath(w http.ResponseWriter, r *http.Request, path string)
(DELETE /coverage/{path})
func (Unimplemented) DeleteKeys ¶
func (_ Unimplemented) DeleteKeys(w http.ResponseWriter, r *http.Request, params DeleteKeysParams)
(DELETE /keys)
func (Unimplemented) GetCoveragePath ¶
func (_ Unimplemented) GetCoveragePath(w http.ResponseWriter, r *http.Request, path string, params GetCoveragePathParams)
(GET /coverage/{path})
func (Unimplemented) GetHealth ¶
func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
(GET /health)
func (Unimplemented) GetKeys ¶
func (_ Unimplemented) GetKeys(w http.ResponseWriter, r *http.Request, params GetKeysParams)
(GET /keys)
func (Unimplemented) PostCoveragePath ¶
func (_ Unimplemented) PostCoveragePath(w http.ResponseWriter, r *http.Request, path string)
(POST /coverage/{path})
func (Unimplemented) PostKeys ¶
func (_ Unimplemented) PostKeys(w http.ResponseWriter, r *http.Request)
(POST /keys)
func (Unimplemented) PostUsersSignin ¶
func (_ Unimplemented) PostUsersSignin(w http.ResponseWriter, r *http.Request)
(POST /users/signin)
func (Unimplemented) PostUsersSignout ¶
func (_ Unimplemented) PostUsersSignout(w http.ResponseWriter, r *http.Request)
(POST /users/signout)
func (Unimplemented) PostUsersSignup ¶
func (_ Unimplemented) PostUsersSignup(w http.ResponseWriter, r *http.Request)
(POST /users/signup)
func (Unimplemented) PutKeys ¶
func (_ Unimplemented) PutKeys(w http.ResponseWriter, r *http.Request)
(PUT /keys)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error