Documentation
¶
Index ¶
- type AccessTokenBadRequest
- func (o *AccessTokenBadRequest) Code() int
- func (o *AccessTokenBadRequest) Error() string
- func (o *AccessTokenBadRequest) GetPayload() interface{}
- func (o *AccessTokenBadRequest) IsClientError() bool
- func (o *AccessTokenBadRequest) IsCode(code int) bool
- func (o *AccessTokenBadRequest) IsRedirect() bool
- func (o *AccessTokenBadRequest) IsServerError() bool
- func (o *AccessTokenBadRequest) IsSuccess() bool
- func (o *AccessTokenBadRequest) String() string
- type AccessTokenInternalServerError
- func (o *AccessTokenInternalServerError) Code() int
- func (o *AccessTokenInternalServerError) Error() string
- func (o *AccessTokenInternalServerError) GetPayload() interface{}
- func (o *AccessTokenInternalServerError) IsClientError() bool
- func (o *AccessTokenInternalServerError) IsCode(code int) bool
- func (o *AccessTokenInternalServerError) IsRedirect() bool
- func (o *AccessTokenInternalServerError) IsServerError() bool
- func (o *AccessTokenInternalServerError) IsSuccess() bool
- func (o *AccessTokenInternalServerError) String() string
- type AccessTokenOK
- func (o *AccessTokenOK) Code() int
- func (o *AccessTokenOK) Error() string
- func (o *AccessTokenOK) GetPayload() *models.AccessTokenResponse
- func (o *AccessTokenOK) IsClientError() bool
- func (o *AccessTokenOK) IsCode(code int) bool
- func (o *AccessTokenOK) IsRedirect() bool
- func (o *AccessTokenOK) IsServerError() bool
- func (o *AccessTokenOK) IsSuccess() bool
- func (o *AccessTokenOK) String() string
- type AccessTokenParams
- func (o *AccessTokenParams) SetContext(ctx context.Context)
- func (o *AccessTokenParams) SetDefaults()
- func (o *AccessTokenParams) SetHTTPClient(client *http.Client)
- func (o *AccessTokenParams) SetRequest(request *models.PartnerAccessTokenRequest)
- func (o *AccessTokenParams) SetTimeout(timeout time.Duration)
- func (o *AccessTokenParams) SetXCLIENTKEY(xCLIENTKEY string)
- func (o *AccessTokenParams) SetXSIGNATURE(xSIGNATURE string)
- func (o *AccessTokenParams) SetXTIMESTAMP(xTIMESTAMP string)
- func (o *AccessTokenParams) WithContext(ctx context.Context) *AccessTokenParams
- func (o *AccessTokenParams) WithDefaults() *AccessTokenParams
- func (o *AccessTokenParams) WithHTTPClient(client *http.Client) *AccessTokenParams
- func (o *AccessTokenParams) WithRequest(request *models.PartnerAccessTokenRequest) *AccessTokenParams
- func (o *AccessTokenParams) WithTimeout(timeout time.Duration) *AccessTokenParams
- func (o *AccessTokenParams) WithXCLIENTKEY(xCLIENTKEY string) *AccessTokenParams
- func (o *AccessTokenParams) WithXSIGNATURE(xSIGNATURE string) *AccessTokenParams
- func (o *AccessTokenParams) WithXTIMESTAMP(xTIMESTAMP string) *AccessTokenParams
- func (o *AccessTokenParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type AccessTokenReader
- type AccessTokenUnauthorized
- func (o *AccessTokenUnauthorized) Code() int
- func (o *AccessTokenUnauthorized) Error() string
- func (o *AccessTokenUnauthorized) GetPayload() interface{}
- func (o *AccessTokenUnauthorized) IsClientError() bool
- func (o *AccessTokenUnauthorized) IsCode(code int) bool
- func (o *AccessTokenUnauthorized) IsRedirect() bool
- func (o *AccessTokenUnauthorized) IsServerError() bool
- func (o *AccessTokenUnauthorized) IsSuccess() bool
- func (o *AccessTokenUnauthorized) String() string
- type Client
- type ClientOption
- type ClientService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenBadRequest ¶
type AccessTokenBadRequest struct {
Payload interface{}
}
AccessTokenBadRequest describes a response with status code 400, with default header values.
Invalid request
func NewAccessTokenBadRequest ¶
func NewAccessTokenBadRequest() *AccessTokenBadRequest
NewAccessTokenBadRequest creates a AccessTokenBadRequest with default headers values
func (*AccessTokenBadRequest) Code ¶
func (o *AccessTokenBadRequest) Code() int
Code gets the status code for the access token bad request response
func (*AccessTokenBadRequest) Error ¶
func (o *AccessTokenBadRequest) Error() string
func (*AccessTokenBadRequest) GetPayload ¶
func (o *AccessTokenBadRequest) GetPayload() interface{}
func (*AccessTokenBadRequest) IsClientError ¶
func (o *AccessTokenBadRequest) IsClientError() bool
IsClientError returns true when this access token bad request response has a 4xx status code
func (*AccessTokenBadRequest) IsCode ¶
func (o *AccessTokenBadRequest) IsCode(code int) bool
IsCode returns true when this access token bad request response a status code equal to that given
func (*AccessTokenBadRequest) IsRedirect ¶
func (o *AccessTokenBadRequest) IsRedirect() bool
IsRedirect returns true when this access token bad request response has a 3xx status code
func (*AccessTokenBadRequest) IsServerError ¶
func (o *AccessTokenBadRequest) IsServerError() bool
IsServerError returns true when this access token bad request response has a 5xx status code
func (*AccessTokenBadRequest) IsSuccess ¶
func (o *AccessTokenBadRequest) IsSuccess() bool
IsSuccess returns true when this access token bad request response has a 2xx status code
func (*AccessTokenBadRequest) String ¶
func (o *AccessTokenBadRequest) String() string
type AccessTokenInternalServerError ¶
type AccessTokenInternalServerError struct {
Payload interface{}
}
AccessTokenInternalServerError describes a response with status code 500, with default header values.
Server error
func NewAccessTokenInternalServerError ¶
func NewAccessTokenInternalServerError() *AccessTokenInternalServerError
NewAccessTokenInternalServerError creates a AccessTokenInternalServerError with default headers values
func (*AccessTokenInternalServerError) Code ¶
func (o *AccessTokenInternalServerError) Code() int
Code gets the status code for the access token internal server error response
func (*AccessTokenInternalServerError) Error ¶
func (o *AccessTokenInternalServerError) Error() string
func (*AccessTokenInternalServerError) GetPayload ¶
func (o *AccessTokenInternalServerError) GetPayload() interface{}
func (*AccessTokenInternalServerError) IsClientError ¶
func (o *AccessTokenInternalServerError) IsClientError() bool
IsClientError returns true when this access token internal server error response has a 4xx status code
func (*AccessTokenInternalServerError) IsCode ¶
func (o *AccessTokenInternalServerError) IsCode(code int) bool
IsCode returns true when this access token internal server error response a status code equal to that given
func (*AccessTokenInternalServerError) IsRedirect ¶
func (o *AccessTokenInternalServerError) IsRedirect() bool
IsRedirect returns true when this access token internal server error response has a 3xx status code
func (*AccessTokenInternalServerError) IsServerError ¶
func (o *AccessTokenInternalServerError) IsServerError() bool
IsServerError returns true when this access token internal server error response has a 5xx status code
func (*AccessTokenInternalServerError) IsSuccess ¶
func (o *AccessTokenInternalServerError) IsSuccess() bool
IsSuccess returns true when this access token internal server error response has a 2xx status code
func (*AccessTokenInternalServerError) String ¶
func (o *AccessTokenInternalServerError) String() string
type AccessTokenOK ¶
type AccessTokenOK struct {
Payload *models.AccessTokenResponse
}
AccessTokenOK describes a response with status code 200, with default header values.
OK
func NewAccessTokenOK ¶
func NewAccessTokenOK() *AccessTokenOK
NewAccessTokenOK creates a AccessTokenOK with default headers values
func (*AccessTokenOK) Code ¶
func (o *AccessTokenOK) Code() int
Code gets the status code for the access token o k response
func (*AccessTokenOK) Error ¶
func (o *AccessTokenOK) Error() string
func (*AccessTokenOK) GetPayload ¶
func (o *AccessTokenOK) GetPayload() *models.AccessTokenResponse
func (*AccessTokenOK) IsClientError ¶
func (o *AccessTokenOK) IsClientError() bool
IsClientError returns true when this access token o k response has a 4xx status code
func (*AccessTokenOK) IsCode ¶
func (o *AccessTokenOK) IsCode(code int) bool
IsCode returns true when this access token o k response a status code equal to that given
func (*AccessTokenOK) IsRedirect ¶
func (o *AccessTokenOK) IsRedirect() bool
IsRedirect returns true when this access token o k response has a 3xx status code
func (*AccessTokenOK) IsServerError ¶
func (o *AccessTokenOK) IsServerError() bool
IsServerError returns true when this access token o k response has a 5xx status code
func (*AccessTokenOK) IsSuccess ¶
func (o *AccessTokenOK) IsSuccess() bool
IsSuccess returns true when this access token o k response has a 2xx status code
func (*AccessTokenOK) String ¶
func (o *AccessTokenOK) String() string
type AccessTokenParams ¶
type AccessTokenParams struct { /* Request. Access token request */ Request *models.PartnerAccessTokenRequest /* XCLIENTKEY. Client Key */ XCLIENTKEY string /* XSIGNATURE. Request signature */ XSIGNATURE string /* XTIMESTAMP. Request timestamp */ XTIMESTAMP string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
AccessTokenParams contains all the parameters to send to the API endpoint
for the access token operation. Typically these are written to a http.Request.
func NewAccessTokenParams ¶
func NewAccessTokenParams() *AccessTokenParams
NewAccessTokenParams creates a new AccessTokenParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewAccessTokenParamsWithContext ¶
func NewAccessTokenParamsWithContext(ctx context.Context) *AccessTokenParams
NewAccessTokenParamsWithContext creates a new AccessTokenParams object with the ability to set a context for a request.
func NewAccessTokenParamsWithHTTPClient ¶
func NewAccessTokenParamsWithHTTPClient(client *http.Client) *AccessTokenParams
NewAccessTokenParamsWithHTTPClient creates a new AccessTokenParams object with the ability to set a custom HTTPClient for a request.
func NewAccessTokenParamsWithTimeout ¶
func NewAccessTokenParamsWithTimeout(timeout time.Duration) *AccessTokenParams
NewAccessTokenParamsWithTimeout creates a new AccessTokenParams object with the ability to set a timeout on a request.
func (*AccessTokenParams) SetContext ¶
func (o *AccessTokenParams) SetContext(ctx context.Context)
SetContext adds the context to the access token params
func (*AccessTokenParams) SetDefaults ¶
func (o *AccessTokenParams) SetDefaults()
SetDefaults hydrates default values in the access token params (not the query body).
All values with no default are reset to their zero value.
func (*AccessTokenParams) SetHTTPClient ¶
func (o *AccessTokenParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the access token params
func (*AccessTokenParams) SetRequest ¶
func (o *AccessTokenParams) SetRequest(request *models.PartnerAccessTokenRequest)
SetRequest adds the request to the access token params
func (*AccessTokenParams) SetTimeout ¶
func (o *AccessTokenParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the access token params
func (*AccessTokenParams) SetXCLIENTKEY ¶
func (o *AccessTokenParams) SetXCLIENTKEY(xCLIENTKEY string)
SetXCLIENTKEY adds the xCLIENTKEY to the access token params
func (*AccessTokenParams) SetXSIGNATURE ¶
func (o *AccessTokenParams) SetXSIGNATURE(xSIGNATURE string)
SetXSIGNATURE adds the xSIGNATURE to the access token params
func (*AccessTokenParams) SetXTIMESTAMP ¶
func (o *AccessTokenParams) SetXTIMESTAMP(xTIMESTAMP string)
SetXTIMESTAMP adds the xTIMESTAMP to the access token params
func (*AccessTokenParams) WithContext ¶
func (o *AccessTokenParams) WithContext(ctx context.Context) *AccessTokenParams
WithContext adds the context to the access token params
func (*AccessTokenParams) WithDefaults ¶
func (o *AccessTokenParams) WithDefaults() *AccessTokenParams
WithDefaults hydrates default values in the access token params (not the query body).
All values with no default are reset to their zero value.
func (*AccessTokenParams) WithHTTPClient ¶
func (o *AccessTokenParams) WithHTTPClient(client *http.Client) *AccessTokenParams
WithHTTPClient adds the HTTPClient to the access token params
func (*AccessTokenParams) WithRequest ¶
func (o *AccessTokenParams) WithRequest(request *models.PartnerAccessTokenRequest) *AccessTokenParams
WithRequest adds the request to the access token params
func (*AccessTokenParams) WithTimeout ¶
func (o *AccessTokenParams) WithTimeout(timeout time.Duration) *AccessTokenParams
WithTimeout adds the timeout to the access token params
func (*AccessTokenParams) WithXCLIENTKEY ¶
func (o *AccessTokenParams) WithXCLIENTKEY(xCLIENTKEY string) *AccessTokenParams
WithXCLIENTKEY adds the xCLIENTKEY to the access token params
func (*AccessTokenParams) WithXSIGNATURE ¶
func (o *AccessTokenParams) WithXSIGNATURE(xSIGNATURE string) *AccessTokenParams
WithXSIGNATURE adds the xSIGNATURE to the access token params
func (*AccessTokenParams) WithXTIMESTAMP ¶
func (o *AccessTokenParams) WithXTIMESTAMP(xTIMESTAMP string) *AccessTokenParams
WithXTIMESTAMP adds the xTIMESTAMP to the access token params
func (*AccessTokenParams) WriteToRequest ¶
func (o *AccessTokenParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type AccessTokenReader ¶
type AccessTokenReader struct {
// contains filtered or unexported fields
}
AccessTokenReader is a Reader for the AccessToken structure.
func (*AccessTokenReader) ReadResponse ¶
func (o *AccessTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type AccessTokenUnauthorized ¶
type AccessTokenUnauthorized struct {
}AccessTokenUnauthorized describes a response with status code 401, with default header values.
Authentication failed
func NewAccessTokenUnauthorized ¶
func NewAccessTokenUnauthorized() *AccessTokenUnauthorized
NewAccessTokenUnauthorized creates a AccessTokenUnauthorized with default headers values
func (*AccessTokenUnauthorized) Code ¶
func (o *AccessTokenUnauthorized) Code() int
Code gets the status code for the access token unauthorized response
func (*AccessTokenUnauthorized) Error ¶
func (o *AccessTokenUnauthorized) Error() string
func (*AccessTokenUnauthorized) GetPayload ¶
func (o *AccessTokenUnauthorized) GetPayload() interface{}
func (*AccessTokenUnauthorized) IsClientError ¶
func (o *AccessTokenUnauthorized) IsClientError() bool
IsClientError returns true when this access token unauthorized response has a 4xx status code
func (*AccessTokenUnauthorized) IsCode ¶
func (o *AccessTokenUnauthorized) IsCode(code int) bool
IsCode returns true when this access token unauthorized response a status code equal to that given
func (*AccessTokenUnauthorized) IsRedirect ¶
func (o *AccessTokenUnauthorized) IsRedirect() bool
IsRedirect returns true when this access token unauthorized response has a 3xx status code
func (*AccessTokenUnauthorized) IsServerError ¶
func (o *AccessTokenUnauthorized) IsServerError() bool
IsServerError returns true when this access token unauthorized response has a 5xx status code
func (*AccessTokenUnauthorized) IsSuccess ¶
func (o *AccessTokenUnauthorized) IsSuccess() bool
IsSuccess returns true when this access token unauthorized response has a 2xx status code
func (*AccessTokenUnauthorized) String ¶
func (o *AccessTokenUnauthorized) String() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for authentication API
func (*Client) AccessToken ¶
func (a *Client) AccessToken(params *AccessTokenParams, opts ...ClientOption) (*AccessTokenOK, error)
AccessToken generates authentication token for b2 b partners
Generates an OAuth2 access token using client credentials grant type
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption may be used to customize the behavior of Client methods.
type ClientService ¶
type ClientService interface { AccessToken(params *AccessTokenParams, opts ...ClientOption) (*AccessTokenOK, error) SetTransport(transport runtime.ClientTransport) }
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new authentication API client.
func NewClientWithBasicAuth ¶
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService
New creates a new authentication API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.
func NewClientWithBearerToken ¶
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService
New creates a new authentication API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.