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 NewGetHelpRequest(server string) (*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 GetAccountToken200ResponseHeaders
- type GetAccountToken304Response
- type GetAccountToken404Response
- type GetAccountTokenRequestObject
- type GetAccountTokenResponse
- type GetAccountTokenResponseObject
- type GetAccountTokendefaultResponse
- type GetHelp200Response
- type GetHelpRequestObject
- type GetHelpResponse
- type GetHelpResponseObject
- type GetHelpdefaultResponse
- 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 NewGetHelpRequest ¶ added in v0.1.47
NewGetHelpRequest generates requests for GetHelp
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 { // GetHelp request GetHelp(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // 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
func (*ClientWithResponses) GetHelpWithResponse ¶ added in v0.1.47
func (c *ClientWithResponses) GetHelpWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHelpResponse, error)
GetHelpWithResponse request returning *GetHelpResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetHelpWithResponse request GetHelpWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHelpResponse, error) // 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 ¶
type GetAccountToken200ApplicationjwtResponse struct { Body io.Reader Headers GetAccountToken200ResponseHeaders ContentLength int64 }
func (GetAccountToken200ApplicationjwtResponse) VisitGetAccountTokenResponse ¶
func (response GetAccountToken200ApplicationjwtResponse) VisitGetAccountTokenResponse(ctx *fiber.Ctx) error
type GetAccountToken200ResponseHeaders ¶ added in v0.1.48
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 GetHelp200Response ¶ added in v0.1.47
type GetHelp200Response struct { }
func (GetHelp200Response) VisitGetHelpResponse ¶ added in v0.1.47
func (response GetHelp200Response) VisitGetHelpResponse(ctx *fiber.Ctx) error
type GetHelpRequestObject ¶ added in v0.1.47
type GetHelpRequestObject struct { }
type GetHelpResponse ¶ added in v0.1.47
func ParseGetHelpResponse ¶ added in v0.1.47
func ParseGetHelpResponse(rsp *http.Response) (*GetHelpResponse, error)
ParseGetHelpResponse parses an HTTP response from a GetHelpWithResponse call
func (GetHelpResponse) Status ¶ added in v0.1.47
func (r GetHelpResponse) Status() string
Status returns HTTPResponse.Status
func (GetHelpResponse) StatusCode ¶ added in v0.1.47
func (r GetHelpResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetHelpResponseObject ¶ added in v0.1.47
type GetHelpResponseObject interface {
VisitGetHelpResponse(ctx *fiber.Ctx) error
}
type GetHelpdefaultResponse ¶ added in v0.1.47
type GetHelpdefaultResponse struct {
StatusCode int
}
func (GetHelpdefaultResponse) VisitGetHelpResponse ¶ added in v0.1.47
func (response GetHelpdefaultResponse) VisitGetHelpResponse(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 { // This is a test endpoint // (GET /accounts/) GetHelp(c *fiber.Ctx) error // 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
func (*ServerInterfaceWrapper) GetHelp ¶ added in v0.1.47
func (siw *ServerInterfaceWrapper) GetHelp(c *fiber.Ctx) error
GetHelp 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 { // This is a test endpoint // (GET /accounts/) GetHelp(ctx context.Context, request GetHelpRequestObject) (GetHelpResponseObject, error) // Get account information // (GET /accounts/{pubKey}) GetAccountToken(ctx context.Context, request GetAccountTokenRequestObject) (GetAccountTokenResponseObject, error) }
StrictServerInterface represents all server handlers.