Documentation ¶
Overview ¶
Package token provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.1-0.20240123090344-d326c01d279a DO NOT EDIT.
Index ¶
- func GetKinOpenApi3Document() (*openapi3.T, error)
- func GetKinOpenApi3DocumentMust() *openapi3.T
- func NewAccessTokenRequestRequestWithBody(server string, params *AccessTokenRequestParams, contentType string, ...) (*http.Request, error)
- func NewAccessTokenRequestRequestWithFormdataBody(server string, params *AccessTokenRequestParams, ...) (*http.Request, error)
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type AccessTokenRequest200JSONResponse
- type AccessTokenRequest200ResponseHeaders
- type AccessTokenRequest307JSONResponse
- type AccessTokenRequest307ResponseHeaders
- type AccessTokenRequest308JSONResponse
- type AccessTokenRequest308ResponseHeaders
- type AccessTokenRequest400ApplicationProblemPlusJSONResponse
- type AccessTokenRequest400JSONResponse
- type AccessTokenRequest400ResponseHeaders
- type AccessTokenRequest401ApplicationProblemPlusJSONResponse
- type AccessTokenRequest403ApplicationProblemPlusJSONResponse
- type AccessTokenRequest404ApplicationProblemPlusJSONResponse
- type AccessTokenRequest411ApplicationProblemPlusJSONResponse
- type AccessTokenRequest413ApplicationProblemPlusJSONResponse
- type AccessTokenRequest415ApplicationProblemPlusJSONResponse
- type AccessTokenRequest429ApplicationProblemPlusJSONResponse
- type AccessTokenRequest500ApplicationProblemPlusJSONResponse
- type AccessTokenRequest501ApplicationProblemPlusJSONResponse
- type AccessTokenRequest503ApplicationProblemPlusJSONResponse
- type AccessTokenRequestFormdataRequestBody
- type AccessTokenRequestParams
- type AccessTokenRequestRequestObject
- type AccessTokenRequestResponse
- type AccessTokenRequestResponseObject
- type AccessTokenRequestdefaultApplicationProblemPlusJSONResponse
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AccessTokenRequestWithBodyWithResponse(ctx context.Context, params *AccessTokenRequestParams, contentType string, ...) (*AccessTokenRequestResponse, error)
- func (c *ClientWithResponses) AccessTokenRequestWithFormdataBodyWithResponse(ctx context.Context, params *AccessTokenRequestParams, ...) (*AccessTokenRequestResponse, error)
- type ClientWithResponsesInterface
- type GinServerOptions
- type HttpRequestDoer
- type MiddlewareFunc
- type RequestEditorFn
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKinOpenApi3Document ¶
func NewAccessTokenRequestRequestWithBody ¶
func NewAccessTokenRequestRequestWithBody(server string, params *AccessTokenRequestParams, contentType string, body io.Reader) (*http.Request, error)
NewAccessTokenRequestRequestWithBody generates requests for AccessTokenRequest with any type of body
func NewAccessTokenRequestRequestWithFormdataBody ¶
func NewAccessTokenRequestRequestWithFormdataBody(server string, params *AccessTokenRequestParams, body AccessTokenRequestFormdataRequestBody) (*http.Request, error)
NewAccessTokenRequestRequestWithFormdataBody calls the generic AccessTokenRequest builder with application/x-www-form-urlencoded body
func RegisterHandlers ¶
func RegisterHandlers(router gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type AccessTokenRequest200JSONResponse ¶
type AccessTokenRequest200JSONResponse struct { Body externalRef0.AccessTokenRsp Headers AccessTokenRequest200ResponseHeaders }
func (AccessTokenRequest200JSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest200JSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest307JSONResponse ¶
type AccessTokenRequest307JSONResponse struct { Body externalRef0.RedirectResponse Headers AccessTokenRequest307ResponseHeaders }
func (AccessTokenRequest307JSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest307JSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest307ResponseHeaders ¶
type AccessTokenRequest307ResponseHeaders struct {
Location string
}
type AccessTokenRequest308JSONResponse ¶
type AccessTokenRequest308JSONResponse struct { Body externalRef0.RedirectResponse Headers AccessTokenRequest308ResponseHeaders }
func (AccessTokenRequest308JSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest308JSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest308ResponseHeaders ¶
type AccessTokenRequest308ResponseHeaders struct {
Location string
}
type AccessTokenRequest400ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest400ApplicationProblemPlusJSONResponse struct { Body externalRef0.ProblemDetails Headers AccessTokenRequest400ResponseHeaders }
func (AccessTokenRequest400ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest400ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest400JSONResponse ¶
type AccessTokenRequest400JSONResponse struct { Body externalRef0.AccessTokenErr Headers AccessTokenRequest400ResponseHeaders }
func (AccessTokenRequest400JSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest400JSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest401ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest401ApplicationProblemPlusJSONResponse struct {
externalRef0.N401ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest401ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest401ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest403ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest403ApplicationProblemPlusJSONResponse struct {
externalRef0.N403ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest403ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest403ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest404ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest404ApplicationProblemPlusJSONResponse struct {
externalRef0.N404ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest404ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest404ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest411ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest411ApplicationProblemPlusJSONResponse struct {
externalRef0.N411ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest411ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest411ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest413ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest413ApplicationProblemPlusJSONResponse struct {
externalRef0.N413ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest413ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest413ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest415ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest415ApplicationProblemPlusJSONResponse struct {
externalRef0.N415ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest415ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest415ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest429ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest429ApplicationProblemPlusJSONResponse struct {
externalRef0.N429ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest429ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest429ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest500ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest500ApplicationProblemPlusJSONResponse struct {
externalRef0.N500ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest500ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest500ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest501ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest501ApplicationProblemPlusJSONResponse struct {
externalRef0.N501ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest501ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest501ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequest503ApplicationProblemPlusJSONResponse ¶
type AccessTokenRequest503ApplicationProblemPlusJSONResponse struct {
externalRef0.N503ApplicationProblemPlusJSONResponse
}
func (AccessTokenRequest503ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequest503ApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) error
type AccessTokenRequestFormdataRequestBody ¶
type AccessTokenRequestFormdataRequestBody = externalRef0.AccessTokenReq
AccessTokenRequestFormdataRequestBody defines body for AccessTokenRequest for application/x-www-form-urlencoded ContentType.
type AccessTokenRequestParams ¶
type AccessTokenRequestParams struct { // ContentEncoding Content-Encoding, described in IETF RFC 7231 ContentEncoding *string `json:"Content-Encoding,omitempty"` // AcceptEncoding Accept-Encoding, described in IETF RFC 7231 AcceptEncoding *string `json:"Accept-Encoding,omitempty"` }
AccessTokenRequestParams defines parameters for AccessTokenRequest.
type AccessTokenRequestRequestObject ¶
type AccessTokenRequestRequestObject struct { Params AccessTokenRequestParams Body *AccessTokenRequestFormdataRequestBody }
type AccessTokenRequestResponse ¶
type AccessTokenRequestResponse struct { Body []byte HTTPResponse *http.Response JSON200 *externalRef0.AccessTokenRsp JSON307 *externalRef0.RedirectResponse JSON308 *externalRef0.RedirectResponse JSON400 *externalRef0.AccessTokenErr ApplicationproblemJSON400 *externalRef0.ProblemDetails ApplicationproblemJSON401 *externalRef0.N401 ApplicationproblemJSON403 *externalRef0.N403 ApplicationproblemJSON404 *externalRef0.N404 ApplicationproblemJSON411 *externalRef0.N411 ApplicationproblemJSON413 *externalRef0.N413 ApplicationproblemJSON415 *externalRef0.N415 ApplicationproblemJSON429 *externalRef0.N429 ApplicationproblemJSON500 *externalRef0.N500 ApplicationproblemJSON501 *externalRef0.N501 ApplicationproblemJSON503 *externalRef0.N503 ApplicationproblemJSONDefault *externalRef0.Default }
func ParseAccessTokenRequestResponse ¶
func ParseAccessTokenRequestResponse(rsp *http.Response) (*AccessTokenRequestResponse, error)
ParseAccessTokenRequestResponse parses an HTTP response from a AccessTokenRequestWithResponse call
func (AccessTokenRequestResponse) Status ¶
func (r AccessTokenRequestResponse) Status() string
Status returns HTTPResponse.Status
func (AccessTokenRequestResponse) StatusCode ¶
func (r AccessTokenRequestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AccessTokenRequestResponseObject ¶
type AccessTokenRequestResponseObject interface {
VisitAccessTokenRequestResponse(w http.ResponseWriter) error
}
type AccessTokenRequestdefaultApplicationProblemPlusJSONResponse ¶
type AccessTokenRequestdefaultApplicationProblemPlusJSONResponse struct { Body externalRef0.ProblemDetails StatusCode int }
func (AccessTokenRequestdefaultApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse ¶
func (response AccessTokenRequestdefaultApplicationProblemPlusJSONResponse) VisitAccessTokenRequestResponse(w http.ResponseWriter) 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) AccessTokenRequestWithBody ¶
func (*Client) AccessTokenRequestWithFormdataBody ¶
func (c *Client) AccessTokenRequestWithFormdataBody(ctx context.Context, params *AccessTokenRequestParams, body AccessTokenRequestFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // AccessTokenRequestWithBody request with any body AccessTokenRequestWithBody(ctx context.Context, params *AccessTokenRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) AccessTokenRequestWithFormdataBody(ctx context.Context, params *AccessTokenRequestParams, body AccessTokenRequestFormdataRequestBody, 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) AccessTokenRequestWithBodyWithResponse ¶
func (c *ClientWithResponses) AccessTokenRequestWithBodyWithResponse(ctx context.Context, params *AccessTokenRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AccessTokenRequestResponse, error)
AccessTokenRequestWithBodyWithResponse request with arbitrary body returning *AccessTokenRequestResponse
func (*ClientWithResponses) AccessTokenRequestWithFormdataBodyWithResponse ¶
func (c *ClientWithResponses) AccessTokenRequestWithFormdataBodyWithResponse(ctx context.Context, params *AccessTokenRequestParams, body AccessTokenRequestFormdataRequestBody, reqEditors ...RequestEditorFn) (*AccessTokenRequestResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // AccessTokenRequestWithBodyWithResponse request with any body AccessTokenRequestWithBodyWithResponse(ctx context.Context, params *AccessTokenRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AccessTokenRequestResponse, error) AccessTokenRequestWithFormdataBodyWithResponse(ctx context.Context, params *AccessTokenRequestParams, body AccessTokenRequestFormdataRequestBody, reqEditors ...RequestEditorFn) (*AccessTokenRequestResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
GinServerOptions provides options for the Gin server.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type MiddlewareFunc ¶
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServerInterface ¶
type ServerInterface interface { // Access Token Request // (POST /oauth2/token) AccessTokenRequest(c *gin.Context, params AccessTokenRequestParams) }
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) AccessTokenRequest ¶
func (siw *ServerInterfaceWrapper) AccessTokenRequest(c *gin.Context)
AccessTokenRequest operation middleware
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictgin.StrictGinHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictgin.StrictGinMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface { // Access Token Request // (POST /oauth2/token) AccessTokenRequest(ctx context.Context, request AccessTokenRequestRequestObject) (AccessTokenRequestResponseObject, error) }
StrictServerInterface represents all server handlers.