Documentation
¶
Overview ¶
Package backup_code provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- Constants
- func NewDeleteMeBackupCodesRequest(server string) (*http.Request, error)
- func NewGetMeBackupCodesRequest(server string) (*http.Request, error)
- func NewPostMeBackupCodesRequest(server string) (*http.Request, error)
- type BackupCodeResponse
- type Client
- func (c *Client) DeleteMeBackupCodes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetMeBackupCodes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostMeBackupCodes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DeleteMeBackupCodesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteMeBackupCodesResponse, error)
- func (c *ClientWithResponses) GetMeBackupCodesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeBackupCodesResponse, error)
- func (c *ClientWithResponses) PostMeBackupCodesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostMeBackupCodesResponse, error)
- type ClientWithResponsesInterface
- type DeleteMeBackupCodesResponse
- type Error
- type GetMeBackupCodesResponse
- type HttpRequestDoer
- type PostMeBackupCodesResponse
- type RemainingBackupCodeResponse
- type RequestEditorFn
Constants ¶
const ( BasicAuthScopes = "BasicAuth.Scopes" OAuth2Scopes = "OAuth2.Scopes" )
Variables ¶
This section is empty.
Functions ¶
func NewDeleteMeBackupCodesRequest ¶
NewDeleteMeBackupCodesRequest generates requests for DeleteMeBackupCodes
func NewGetMeBackupCodesRequest ¶
NewGetMeBackupCodesRequest generates requests for GetMeBackupCodes
Types ¶
type BackupCodeResponse ¶
type BackupCodeResponse struct {
// BackupCodes Backup codes of the authenticated user.
BackupCodes *[]string `json:"backupCodes,omitempty"`
}
BackupCodeResponse Backup code response.
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) DeleteMeBackupCodes ¶
func (*Client) GetMeBackupCodes ¶
func (*Client) PostMeBackupCodes ¶
type ClientInterface ¶
type ClientInterface interface {
// DeleteMeBackupCodes request
DeleteMeBackupCodes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetMeBackupCodes request
GetMeBackupCodes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostMeBackupCodes request
PostMeBackupCodes(ctx context.Context, 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) DeleteMeBackupCodesWithResponse ¶
func (c *ClientWithResponses) DeleteMeBackupCodesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteMeBackupCodesResponse, error)
DeleteMeBackupCodesWithResponse request returning *DeleteMeBackupCodesResponse
func (*ClientWithResponses) GetMeBackupCodesWithResponse ¶
func (c *ClientWithResponses) GetMeBackupCodesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeBackupCodesResponse, error)
GetMeBackupCodesWithResponse request returning *GetMeBackupCodesResponse
func (*ClientWithResponses) PostMeBackupCodesWithResponse ¶
func (c *ClientWithResponses) PostMeBackupCodesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostMeBackupCodesResponse, error)
PostMeBackupCodesWithResponse request returning *PostMeBackupCodesResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// DeleteMeBackupCodesWithResponse request
DeleteMeBackupCodesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteMeBackupCodesResponse, error)
// GetMeBackupCodesWithResponse request
GetMeBackupCodesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeBackupCodesResponse, error)
// PostMeBackupCodesWithResponse request
PostMeBackupCodesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostMeBackupCodesResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DeleteMeBackupCodesResponse ¶
func ParseDeleteMeBackupCodesResponse ¶
func ParseDeleteMeBackupCodesResponse(rsp *http.Response) (*DeleteMeBackupCodesResponse, error)
ParseDeleteMeBackupCodesResponse parses an HTTP response from a DeleteMeBackupCodesWithResponse call
func (DeleteMeBackupCodesResponse) Status ¶
func (r DeleteMeBackupCodesResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteMeBackupCodesResponse) StatusCode ¶
func (r DeleteMeBackupCodesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Error ¶
type Error struct {
// Code Error code.
Code string `json:"code"`
// Description Error description.
Description *string `json:"description,omitempty"`
// Message Error message.
Message string `json:"message"`
// TraceId Error trace id.
TraceId string `json:"traceId"`
}
Error Backup code error.
type GetMeBackupCodesResponse ¶
type GetMeBackupCodesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *RemainingBackupCodeResponse
JSON500 *Error
}
func ParseGetMeBackupCodesResponse ¶
func ParseGetMeBackupCodesResponse(rsp *http.Response) (*GetMeBackupCodesResponse, error)
ParseGetMeBackupCodesResponse parses an HTTP response from a GetMeBackupCodesWithResponse call
func (GetMeBackupCodesResponse) Status ¶
func (r GetMeBackupCodesResponse) Status() string
Status returns HTTPResponse.Status
func (GetMeBackupCodesResponse) StatusCode ¶
func (r GetMeBackupCodesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type PostMeBackupCodesResponse ¶
type PostMeBackupCodesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *BackupCodeResponse
JSON500 *Error
}
func ParsePostMeBackupCodesResponse ¶
func ParsePostMeBackupCodesResponse(rsp *http.Response) (*PostMeBackupCodesResponse, error)
ParsePostMeBackupCodesResponse parses an HTTP response from a PostMeBackupCodesWithResponse call
func (PostMeBackupCodesResponse) Status ¶
func (r PostMeBackupCodesResponse) Status() string
Status returns HTTPResponse.Status
func (PostMeBackupCodesResponse) StatusCode ¶
func (r PostMeBackupCodesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RemainingBackupCodeResponse ¶
type RemainingBackupCodeResponse struct {
// RemainingBackupCodesCount Remaining backup codes of the authenticated user.
RemainingBackupCodesCount *int `json:"remainingBackupCodesCount,omitempty"`
}
RemainingBackupCodeResponse Remaining backup code response.