Documentation ¶
Overview ¶
Package accounts 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.
Package accounts 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.
Package accounts 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 NewGetAccountTokenRequest(server string, pubKey PubKey) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router fiber.Router, si ServerInterface)
- func RegisterHandlersWithOptions(router fiber.Router, si ServerInterface, options FiberServerOptions)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type FiberServerOptions
- type GetAccountToken200ApplicationjwtResponse
- type GetAccountToken304Response
- type GetAccountToken404Response
- type GetAccountTokenRequestObject
- type GetAccountTokenResponse
- type GetAccountTokenResponseObject
- type GetAccountTokendefaultResponse
- type HttpRequestDoer
- type JWT
- type MiddlewareFunc
- type PubKey
- type RequestEditorFn
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
Constants ¶
const ( ApiKeyScopes = "apiKey.Scopes" BearerAuthScopes = "bearerAuth.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 NewGetAccountTokenRequest ¶
NewGetAccountTokenRequest generates requests for GetAccountToken
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router fiber.Router, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router fiber.Router, si ServerInterface, options FiberServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
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) GetAccountToken ¶
type ClientInterface ¶
type ClientInterface interface { // GetAccountToken request GetAccountToken(ctx context.Context, pubKey PubKey, 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) GetAccountTokenWithResponse ¶
func (c *ClientWithResponses) GetAccountTokenWithResponse(ctx context.Context, pubKey PubKey, reqEditors ...RequestEditorFn) (*GetAccountTokenResponse, error)
GetAccountTokenWithResponse request returning *GetAccountTokenResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetAccountTokenWithResponse request GetAccountTokenWithResponse(ctx context.Context, pubKey PubKey, reqEditors ...RequestEditorFn) (*GetAccountTokenResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type FiberServerOptions ¶
type FiberServerOptions struct { BaseURL string Middlewares []MiddlewareFunc }
FiberServerOptions provides options for the Fiber server.
type GetAccountToken200ApplicationjwtResponse ¶
func (GetAccountToken200ApplicationjwtResponse) VisitGetAccountTokenResponse ¶
func (response GetAccountToken200ApplicationjwtResponse) VisitGetAccountTokenResponse(ctx *fiber.Ctx) error
type GetAccountToken304Response ¶
type GetAccountToken304Response struct { }
func (GetAccountToken304Response) VisitGetAccountTokenResponse ¶
func (response GetAccountToken304Response) VisitGetAccountTokenResponse(ctx *fiber.Ctx) error
type GetAccountToken404Response ¶
type GetAccountToken404Response struct { }
func (GetAccountToken404Response) VisitGetAccountTokenResponse ¶
func (response GetAccountToken404Response) VisitGetAccountTokenResponse(ctx *fiber.Ctx) error
type GetAccountTokenRequestObject ¶
type GetAccountTokenRequestObject struct {
PubKey PubKey `json:"pubKey"`
}
type GetAccountTokenResponse ¶
func ParseGetAccountTokenResponse ¶
func ParseGetAccountTokenResponse(rsp *http.Response) (*GetAccountTokenResponse, error)
ParseGetAccountTokenResponse parses an HTTP response from a GetAccountTokenWithResponse call
func (GetAccountTokenResponse) Status ¶
func (r GetAccountTokenResponse) Status() string
Status returns HTTPResponse.Status
func (GetAccountTokenResponse) StatusCode ¶
func (r GetAccountTokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAccountTokenResponseObject ¶
type GetAccountTokenResponseObject interface {
VisitGetAccountTokenResponse(ctx *fiber.Ctx) error
}
type GetAccountTokendefaultResponse ¶
type GetAccountTokendefaultResponse struct {
StatusCode int
}
func (GetAccountTokendefaultResponse) VisitGetAccountTokenResponse ¶
func (response GetAccountTokendefaultResponse) VisitGetAccountTokenResponse(ctx *fiber.Ctx) error
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type MiddlewareFunc ¶
type MiddlewareFunc fiber.Handler
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServerInterface ¶
type ServerInterface interface { // Get account information // (GET /accounts/{pubKey}) GetAccountToken(c *fiber.Ctx, pubKey PubKey) error }
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetAccountToken ¶
func (siw *ServerInterfaceWrapper) GetAccountToken(c *fiber.Ctx) error
GetAccountToken operation middleware
type StrictHandlerFunc ¶
type StrictHandlerFunc func(ctx *fiber.Ctx, args interface{}) (interface{}, error)
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface { // Get account information // (GET /accounts/{pubKey}) GetAccountToken(ctx context.Context, request GetAccountTokenRequestObject) (GetAccountTokenResponseObject, error) }
StrictServerInterface represents all server handlers.