Documentation ¶
Overview ¶
Package authorization provides primitives to interact the openapi HTTP API.
Code generated by go-sdk-codegen DO NOT EDIT.
Package authorization provides primitives to interact the openapi HTTP API.
Code generated by go-sdk-codegen DO NOT EDIT.
Index ¶
- func NewGetAuthorizationCodeRequest(endpoint string, params *GetAuthorizationCodeParams) (*http.Request, error)
- type AuthorizationCode
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type Error
- type ErrorList
- type GetAuthorizationCodeParams
- type GetAuthorizationCodeResp
- type GetAuthorizationCodeResponse
- type HttpRequestDoer
- type RequestBeforeFn
- type ResponseAfterFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetAuthorizationCodeRequest ¶
func NewGetAuthorizationCodeRequest(endpoint string, params *GetAuthorizationCodeParams) (*http.Request, error)
NewGetAuthorizationCodeRequest generates requests for GetAuthorizationCode
Types ¶
type AuthorizationCode ¶
type AuthorizationCode struct { // A Login with Amazon (LWA) authorization code that can be exchanged for a refresh token and access token that authorize you to make calls to a Selling Partner API. AuthorizationCode *string `json:"authorizationCode,omitempty"` }
AuthorizationCode defines model for AuthorizationCode.
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. Endpoint string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A callback for modifying requests which are generated before sending over // the network. RequestBefore RequestBeforeFn // A callback for modifying response which are generated before sending over // the network. ResponseAfter ResponseAfterFn // The user agent header identifies your application, its version number, and the platform and programming language you are using. // You must include a user agent header in each request submitted to the sales partner API. UserAgent string }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(endpoint string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetAuthorizationCode ¶
type ClientInterface ¶
type ClientInterface interface { // GetAuthorizationCode request GetAuthorizationCode(ctx context.Context, params *GetAuthorizationCodeParams) (*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 WithRequestBefore ¶
func WithRequestBefore(fn RequestBeforeFn) ClientOption
WithRequestBefore allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithResponseAfter ¶
func WithResponseAfter(fn ResponseAfterFn) ClientOption
WithResponseAfter allows setting up a callback function, which will be called right after get response the request. This can be used to log.
func WithUserAgent ¶
func WithUserAgent(userAgent string) ClientOption
WithUserAgent set up useragent add user agent to every request automatically
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(endpoint string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetAuthorizationCodeWithResponse ¶
func (c *ClientWithResponses) GetAuthorizationCodeWithResponse(ctx context.Context, params *GetAuthorizationCodeParams) (*GetAuthorizationCodeResp, error)
GetAuthorizationCodeWithResponse request returning *GetAuthorizationCodeResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetAuthorizationCode request GetAuthorizationCodeWithResponse(ctx context.Context, params *GetAuthorizationCodeParams) (*GetAuthorizationCodeResp, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Error ¶
type Error struct { // An error code that identifies the type of error that occurred. Code string `json:"code"` // Additional details that can help the caller understand or fix the issue. Details *string `json:"details,omitempty"` // A message that describes the error condition in a human-readable form. Message string `json:"message"` }
Error defines model for Error.
type GetAuthorizationCodeParams ¶
type GetAuthorizationCodeParams struct { // The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore. SellingPartnerId string `json:"sellingPartnerId"` // Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central. DeveloperId string `json:"developerId"` // The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore. MwsAuthToken string `json:"mwsAuthToken"` }
GetAuthorizationCodeParams defines parameters for GetAuthorizationCode.
type GetAuthorizationCodeResp ¶
type GetAuthorizationCodeResp struct { Body []byte HTTPResponse *http.Response Model *GetAuthorizationCodeResponse }
func ParseGetAuthorizationCodeResp ¶
func ParseGetAuthorizationCodeResp(rsp *http.Response) (*GetAuthorizationCodeResp, error)
ParseGetAuthorizationCodeResp parses an HTTP response from a GetAuthorizationCodeWithResponse call
func (GetAuthorizationCodeResp) Status ¶
func (r GetAuthorizationCodeResp) Status() string
Status returns HTTPResponse.Status
func (GetAuthorizationCodeResp) StatusCode ¶
func (r GetAuthorizationCodeResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAuthorizationCodeResponse ¶
type GetAuthorizationCodeResponse struct { // A list of error responses returned when a request is unsuccessful. Errors *ErrorList `json:"errors,omitempty"` // A Login with Amazon (LWA) authorization code. Payload *AuthorizationCode `json:"payload,omitempty"` }
GetAuthorizationCodeResponse defines model for GetAuthorizationCodeResponse.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type RequestBeforeFn ¶
RequestBeforeFn is the function signature for the RequestBefore callback function