Documentation
¶
Overview ¶
Package openapi 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, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- type Auth302Response
- type Auth302ResponseHeaders
- type AuthParams
- type AuthRequestObject
- type AuthResponseObject
- type AuthdefaultJSONResponse
- type Callback302Response
- type Callback302ResponseHeaders
- type Callback403JSONResponse
- type CallbackParams
- type CallbackRequestObject
- type CallbackResponseObject
- type CallbackdefaultJSONResponse
- type ErrorModel
- type InvalidParamFormatError
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- type StdHTTPServerOptions
- 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 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
Types ¶
type Auth302Response ¶
type Auth302Response struct {
Headers Auth302ResponseHeaders
}
func (Auth302Response) VisitAuthResponse ¶
func (response Auth302Response) VisitAuthResponse(w http.ResponseWriter) error
type Auth302ResponseHeaders ¶
type Auth302ResponseHeaders struct {
Location string
}
type AuthParams ¶
type AuthParams struct {
TenantID string `form:"tenant_id" json:"tenant_id"`
RequestURI string `form:"request_uri" json:"request_uri"`
}
AuthParams defines parameters for Auth.
type AuthRequestObject ¶
type AuthRequestObject struct {
Params AuthParams
}
type AuthResponseObject ¶
type AuthResponseObject interface {
VisitAuthResponse(w http.ResponseWriter) error
}
type AuthdefaultJSONResponse ¶
type AuthdefaultJSONResponse struct {
Body ErrorModel
StatusCode int
}
func (AuthdefaultJSONResponse) VisitAuthResponse ¶
func (response AuthdefaultJSONResponse) VisitAuthResponse(w http.ResponseWriter) error
type Callback302Response ¶ added in v0.1.0
type Callback302Response struct {
Headers Callback302ResponseHeaders
}
func (Callback302Response) VisitCallbackResponse ¶ added in v0.1.0
func (response Callback302Response) VisitCallbackResponse(w http.ResponseWriter) error
type Callback302ResponseHeaders ¶ added in v0.1.0
type Callback403JSONResponse ¶ added in v0.1.0
type Callback403JSONResponse ErrorModel
func (Callback403JSONResponse) VisitCallbackResponse ¶ added in v0.1.0
func (response Callback403JSONResponse) VisitCallbackResponse(w http.ResponseWriter) error
type CallbackParams ¶ added in v0.1.0
type CallbackParams struct {
Code string `form:"code" json:"code"`
State string `form:"state" json:"state"`
}
CallbackParams defines parameters for Callback.
type CallbackRequestObject ¶ added in v0.1.0
type CallbackRequestObject struct {
Params CallbackParams
}
type CallbackResponseObject ¶ added in v0.1.0
type CallbackResponseObject interface {
VisitCallbackResponse(w http.ResponseWriter) error
}
type CallbackdefaultJSONResponse ¶ added in v0.1.0
type CallbackdefaultJSONResponse struct {
Body ErrorModel
StatusCode int
}
func (CallbackdefaultJSONResponse) VisitCallbackResponse ¶ added in v0.1.0
func (response CallbackdefaultJSONResponse) VisitCallbackResponse(w http.ResponseWriter) error
type ErrorModel ¶
type ErrorModel struct {
ErrorCode *int `json:"error_code,omitempty"`
ErrorMsg *string `json:"error_msg,omitempty"`
}
ErrorModel defines model for ErrorModel.
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 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 /auth)
Auth(w http.ResponseWriter, r *http.Request, params AuthParams)
// (GET /callback)
Callback(w http.ResponseWriter, r *http.Request, params CallbackParams)
}
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) Auth ¶
func (siw *ServerInterfaceWrapper) Auth(w http.ResponseWriter, r *http.Request)
Auth operation middleware
func (*ServerInterfaceWrapper) Callback ¶ added in v0.1.0
func (siw *ServerInterfaceWrapper) Callback(w http.ResponseWriter, r *http.Request)
Callback operation middleware
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
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 /auth)
Auth(ctx context.Context, request AuthRequestObject) (AuthResponseObject, error)
// (GET /callback)
Callback(ctx context.Context, request CallbackRequestObject) (CallbackResponseObject, 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