Documentation
¶
Overview ¶
Package protecteddeliverytoken provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- Constants
- func NewGenerateTokenOpRequest(server string, params *GenerateTokenOpParams, ...) (*http.Request, error)
- func NewGenerateTokenOpRequestWithBody(server string, params *GenerateTokenOpParams, contentType string, ...) (*http.Request, error)
- func NewGetEPRACodeAndActionsRequest(server string, params *GetEPRACodeAndActionsParams) (*http.Request, error)
- func NewGetPinByTokenOpRequest(server string, params *GetPinByTokenOpParams) (*http.Request, error)
- func NewGetPinsForTrackingNumberListOpRequest(server string, params *GetPinsForTrackingNumberListOpParams, ...) (*http.Request, error)
- func NewGetPinsForTrackingNumberListOpRequestWithBody(server string, params *GetPinsForTrackingNumberListOpParams, ...) (*http.Request, error)
- type Client
- func (c *Client) GenerateTokenOp(ctx context.Context, params *GenerateTokenOpParams, ...) (*http.Response, error)
- func (c *Client) GenerateTokenOpWithBody(ctx context.Context, params *GenerateTokenOpParams, contentType string, ...) (*http.Response, error)
- func (c *Client) GetEPRACodeAndActions(ctx context.Context, params *GetEPRACodeAndActionsParams, ...) (*http.Response, error)
- func (c *Client) GetPinByTokenOp(ctx context.Context, params *GetPinByTokenOpParams, ...) (*http.Response, error)
- func (c *Client) GetPinsForTrackingNumberListOp(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, ...) (*http.Response, error)
- func (c *Client) GetPinsForTrackingNumberListOpWithBody(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GenerateTokenOpWithBodyWithResponse(ctx context.Context, params *GenerateTokenOpParams, contentType string, ...) (*GenerateTokenOpResponse, error)
- func (c *ClientWithResponses) GenerateTokenOpWithResponse(ctx context.Context, params *GenerateTokenOpParams, ...) (*GenerateTokenOpResponse, error)
- func (c *ClientWithResponses) GetEPRACodeAndActionsWithResponse(ctx context.Context, params *GetEPRACodeAndActionsParams, ...) (*GetEPRACodeAndActionsResponse, error)
- func (c *ClientWithResponses) GetPinByTokenOpWithResponse(ctx context.Context, params *GetPinByTokenOpParams, ...) (*GetPinByTokenOpResponse, error)
- func (c *ClientWithResponses) GetPinsForTrackingNumberListOpWithBodyWithResponse(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, ...) (*GetPinsForTrackingNumberListOpResponse, error)
- func (c *ClientWithResponses) GetPinsForTrackingNumberListOpWithResponse(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, ...) (*GetPinsForTrackingNumberListOpResponse, error)
- type ClientWithResponsesInterface
- type EpraElement
- type EpraResponse
- type Error
- type ErrorResponse
- type GenerateTokenOpJSONRequestBody
- type GenerateTokenOpParams
- type GenerateTokenOpResponse
- type GenerateTokenRequest
- type GenerateTokenResponse
- type GetEPRACodeAndActionsParams
- type GetEPRACodeAndActionsResponse
- type GetPinByTokenOpParams
- type GetPinByTokenOpResponse
- type GetPinByTokenResponse
- type GetPinsForTrackingNumberListOpJSONRequestBody
- type GetPinsForTrackingNumberListOpParams
- type GetPinsForTrackingNumberListOpResponse
- type GetPinsForTrackingNumberListRequest
- type GetPinsForTrackingNumberListResponse
- type HttpRequestDoer
- type RequestEditorFn
- type TransID
Constants ¶
const (
OAuth2Scopes = "OAuth2.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewGenerateTokenOpRequest ¶
func NewGenerateTokenOpRequest(server string, params *GenerateTokenOpParams, body GenerateTokenOpJSONRequestBody) (*http.Request, error)
NewGenerateTokenOpRequest calls the generic GenerateTokenOp builder with application/json body
func NewGenerateTokenOpRequestWithBody ¶
func NewGenerateTokenOpRequestWithBody(server string, params *GenerateTokenOpParams, contentType string, body io.Reader) (*http.Request, error)
NewGenerateTokenOpRequestWithBody generates requests for GenerateTokenOp with any type of body
func NewGetEPRACodeAndActionsRequest ¶
func NewGetEPRACodeAndActionsRequest(server string, params *GetEPRACodeAndActionsParams) (*http.Request, error)
NewGetEPRACodeAndActionsRequest generates requests for GetEPRACodeAndActions
func NewGetPinByTokenOpRequest ¶
func NewGetPinByTokenOpRequest(server string, params *GetPinByTokenOpParams) (*http.Request, error)
NewGetPinByTokenOpRequest generates requests for GetPinByTokenOp
func NewGetPinsForTrackingNumberListOpRequest ¶
func NewGetPinsForTrackingNumberListOpRequest(server string, params *GetPinsForTrackingNumberListOpParams, body GetPinsForTrackingNumberListOpJSONRequestBody) (*http.Request, error)
NewGetPinsForTrackingNumberListOpRequest calls the generic GetPinsForTrackingNumberListOp builder with application/json body
func NewGetPinsForTrackingNumberListOpRequestWithBody ¶
func NewGetPinsForTrackingNumberListOpRequestWithBody(server string, params *GetPinsForTrackingNumberListOpParams, contentType string, body io.Reader) (*http.Request, error)
NewGetPinsForTrackingNumberListOpRequestWithBody generates requests for GetPinsForTrackingNumberListOp with any type of body
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) GenerateTokenOp ¶
func (c *Client) GenerateTokenOp(ctx context.Context, params *GenerateTokenOpParams, body GenerateTokenOpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GenerateTokenOpWithBody ¶
func (*Client) GetEPRACodeAndActions ¶
func (c *Client) GetEPRACodeAndActions(ctx context.Context, params *GetEPRACodeAndActionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPinByTokenOp ¶
func (c *Client) GetPinByTokenOp(ctx context.Context, params *GetPinByTokenOpParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPinsForTrackingNumberListOp ¶
func (c *Client) GetPinsForTrackingNumberListOp(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, body GetPinsForTrackingNumberListOpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPinsForTrackingNumberListOpWithBody ¶
type ClientInterface ¶
type ClientInterface interface {
// GetEPRACodeAndActions request
GetEPRACodeAndActions(ctx context.Context, params *GetEPRACodeAndActionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPinsForTrackingNumberListOpWithBody request with any body
GetPinsForTrackingNumberListOpWithBody(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
GetPinsForTrackingNumberListOp(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, body GetPinsForTrackingNumberListOpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPinByTokenOp request
GetPinByTokenOp(ctx context.Context, params *GetPinByTokenOpParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GenerateTokenOpWithBody request with any body
GenerateTokenOpWithBody(ctx context.Context, params *GenerateTokenOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
GenerateTokenOp(ctx context.Context, params *GenerateTokenOpParams, body GenerateTokenOpJSONRequestBody, 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) GenerateTokenOpWithBodyWithResponse ¶
func (c *ClientWithResponses) GenerateTokenOpWithBodyWithResponse(ctx context.Context, params *GenerateTokenOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GenerateTokenOpResponse, error)
GenerateTokenOpWithBodyWithResponse request with arbitrary body returning *GenerateTokenOpResponse
func (*ClientWithResponses) GenerateTokenOpWithResponse ¶
func (c *ClientWithResponses) GenerateTokenOpWithResponse(ctx context.Context, params *GenerateTokenOpParams, body GenerateTokenOpJSONRequestBody, reqEditors ...RequestEditorFn) (*GenerateTokenOpResponse, error)
func (*ClientWithResponses) GetEPRACodeAndActionsWithResponse ¶
func (c *ClientWithResponses) GetEPRACodeAndActionsWithResponse(ctx context.Context, params *GetEPRACodeAndActionsParams, reqEditors ...RequestEditorFn) (*GetEPRACodeAndActionsResponse, error)
GetEPRACodeAndActionsWithResponse request returning *GetEPRACodeAndActionsResponse
func (*ClientWithResponses) GetPinByTokenOpWithResponse ¶
func (c *ClientWithResponses) GetPinByTokenOpWithResponse(ctx context.Context, params *GetPinByTokenOpParams, reqEditors ...RequestEditorFn) (*GetPinByTokenOpResponse, error)
GetPinByTokenOpWithResponse request returning *GetPinByTokenOpResponse
func (*ClientWithResponses) GetPinsForTrackingNumberListOpWithBodyWithResponse ¶
func (c *ClientWithResponses) GetPinsForTrackingNumberListOpWithBodyWithResponse(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetPinsForTrackingNumberListOpResponse, error)
GetPinsForTrackingNumberListOpWithBodyWithResponse request with arbitrary body returning *GetPinsForTrackingNumberListOpResponse
func (*ClientWithResponses) GetPinsForTrackingNumberListOpWithResponse ¶
func (c *ClientWithResponses) GetPinsForTrackingNumberListOpWithResponse(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, body GetPinsForTrackingNumberListOpJSONRequestBody, reqEditors ...RequestEditorFn) (*GetPinsForTrackingNumberListOpResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetEPRACodeAndActionsWithResponse request
GetEPRACodeAndActionsWithResponse(ctx context.Context, params *GetEPRACodeAndActionsParams, reqEditors ...RequestEditorFn) (*GetEPRACodeAndActionsResponse, error)
// GetPinsForTrackingNumberListOpWithBodyWithResponse request with any body
GetPinsForTrackingNumberListOpWithBodyWithResponse(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetPinsForTrackingNumberListOpResponse, error)
GetPinsForTrackingNumberListOpWithResponse(ctx context.Context, params *GetPinsForTrackingNumberListOpParams, body GetPinsForTrackingNumberListOpJSONRequestBody, reqEditors ...RequestEditorFn) (*GetPinsForTrackingNumberListOpResponse, error)
// GetPinByTokenOpWithResponse request
GetPinByTokenOpWithResponse(ctx context.Context, params *GetPinByTokenOpParams, reqEditors ...RequestEditorFn) (*GetPinByTokenOpResponse, error)
// GenerateTokenOpWithBodyWithResponse request with any body
GenerateTokenOpWithBodyWithResponse(ctx context.Context, params *GenerateTokenOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GenerateTokenOpResponse, error)
GenerateTokenOpWithResponse(ctx context.Context, params *GenerateTokenOpParams, body GenerateTokenOpJSONRequestBody, reqEditors ...RequestEditorFn) (*GenerateTokenOpResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type EpraElement ¶
type EpraElement struct {
EpraCode *string `json:"epraCode,omitempty"`
EpraKiala *string `json:"epraKiala,omitempty"`
EpraMatch *string `json:"epraMatch,omitempty"`
EpraRequired *string `json:"epraRequired,omitempty"`
}
EpraElement defines model for EpraElement.
type EpraResponse ¶
type EpraResponse struct {
Response EpraElement `json:"response"`
}
EpraResponse This response returns the EPRA release code and related actions for a given tracking number.
type Error ¶
type Error struct {
// Code Error code
Code string `json:"code"`
// Message Human-readable error message providing additional context about the error.
Message string `json:"message"`
}
Error This object represents an error, containing a standardized error code and a human-readable message.
type ErrorResponse ¶
type ErrorResponse struct {
// Errors Standardized error object for responses and callbacks.
Errors []Error `json:"errors"`
}
ErrorResponse This response is returned when an error occurs, containing a list of error objects with standardized error codes and messages.
type GenerateTokenOpJSONRequestBody ¶
type GenerateTokenOpJSONRequestBody = GenerateTokenRequest
GenerateTokenOpJSONRequestBody defines body for GenerateTokenOp for application/json ContentType.
type GenerateTokenOpParams ¶
type GenerateTokenOpParams struct {
// TransID Transaction ID
TransID TransID `json:"transID"`
}
GenerateTokenOpParams defines parameters for GenerateTokenOp.
type GenerateTokenOpResponse ¶
type GenerateTokenOpResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GenerateTokenResponse
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON404 *ErrorResponse
JSON415 *ErrorResponse
JSON429 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseGenerateTokenOpResponse ¶
func ParseGenerateTokenOpResponse(rsp *http.Response) (*GenerateTokenOpResponse, error)
ParseGenerateTokenOpResponse parses an HTTP response from a GenerateTokenOpWithResponse call
func (GenerateTokenOpResponse) Status ¶
func (r GenerateTokenOpResponse) Status() string
Status returns HTTPResponse.Status
func (GenerateTokenOpResponse) StatusCode ¶
func (r GenerateTokenOpResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GenerateTokenRequest ¶
type GenerateTokenRequest struct {
// Pin The Pin for which the token is generated (4 to 6 digits, leading zeros allowed; e.g., 0007).
Pin string `json:"pin"`
}
GenerateTokenRequest This request is sent to generate a token for a given Pin.
type GenerateTokenResponse ¶
type GenerateTokenResponse struct {
// Token The generated token for the given Pin.
Token string `json:"token"`
}
GenerateTokenResponse This response returns the generated token for the given Pin.
type GetEPRACodeAndActionsParams ¶
type GetEPRACodeAndActionsParams struct {
Action *string `form:"action,omitempty" json:"action,omitempty"`
TrackingNumber string `json:"trackingNumber"`
Epra *string `json:"epra,omitempty"`
Authorization string `json:"Authorization"`
// TransID Transaction ID
TransID TransID `json:"transID"`
}
GetEPRACodeAndActionsParams defines parameters for GetEPRACodeAndActions.
type GetEPRACodeAndActionsResponse ¶
type GetEPRACodeAndActionsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EpraResponse
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON404 *ErrorResponse
JSON429 *ErrorResponse
JSON500 *ErrorResponse
JSON501 *ErrorResponse
}
func ParseGetEPRACodeAndActionsResponse ¶
func ParseGetEPRACodeAndActionsResponse(rsp *http.Response) (*GetEPRACodeAndActionsResponse, error)
ParseGetEPRACodeAndActionsResponse parses an HTTP response from a GetEPRACodeAndActionsWithResponse call
func (GetEPRACodeAndActionsResponse) Status ¶
func (r GetEPRACodeAndActionsResponse) Status() string
Status returns HTTPResponse.Status
func (GetEPRACodeAndActionsResponse) StatusCode ¶
func (r GetEPRACodeAndActionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPinByTokenOpParams ¶
type GetPinByTokenOpParams struct {
// XUserToken Token generated by Generate Token API
XUserToken openapi_types.UUID `json:"X-UserToken"`
// TransID Transaction ID
TransID TransID `json:"transID"`
}
GetPinByTokenOpParams defines parameters for GetPinByTokenOp.
type GetPinByTokenOpResponse ¶
type GetPinByTokenOpResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetPinByTokenResponse
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON404 *ErrorResponse
JSON429 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseGetPinByTokenOpResponse ¶
func ParseGetPinByTokenOpResponse(rsp *http.Response) (*GetPinByTokenOpResponse, error)
ParseGetPinByTokenOpResponse parses an HTTP response from a GetPinByTokenOpWithResponse call
func (GetPinByTokenOpResponse) Status ¶
func (r GetPinByTokenOpResponse) Status() string
Status returns HTTPResponse.Status
func (GetPinByTokenOpResponse) StatusCode ¶
func (r GetPinByTokenOpResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPinByTokenResponse ¶
type GetPinByTokenResponse struct {
// Pin The Pin associated with the given token (4 to 6 digits, leading zeros allowed; e.g., 0007).
Pin string `json:"pin"`
}
GetPinByTokenResponse This response returns the Pin associated with the given token.
type GetPinsForTrackingNumberListOpJSONRequestBody ¶
type GetPinsForTrackingNumberListOpJSONRequestBody = GetPinsForTrackingNumberListRequest
GetPinsForTrackingNumberListOpJSONRequestBody defines body for GetPinsForTrackingNumberListOp for application/json ContentType.
type GetPinsForTrackingNumberListOpParams ¶
type GetPinsForTrackingNumberListOpParams struct {
// TransID Transaction ID
TransID TransID `json:"transID"`
}
GetPinsForTrackingNumberListOpParams defines parameters for GetPinsForTrackingNumberListOp.
type GetPinsForTrackingNumberListOpResponse ¶
type GetPinsForTrackingNumberListOpResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetPinsForTrackingNumberListResponse
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON404 *ErrorResponse
JSON415 *ErrorResponse
JSON429 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseGetPinsForTrackingNumberListOpResponse ¶
func ParseGetPinsForTrackingNumberListOpResponse(rsp *http.Response) (*GetPinsForTrackingNumberListOpResponse, error)
ParseGetPinsForTrackingNumberListOpResponse parses an HTTP response from a GetPinsForTrackingNumberListOpWithResponse call
func (GetPinsForTrackingNumberListOpResponse) Status ¶
func (r GetPinsForTrackingNumberListOpResponse) Status() string
Status returns HTTPResponse.Status
func (GetPinsForTrackingNumberListOpResponse) StatusCode ¶
func (r GetPinsForTrackingNumberListOpResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPinsForTrackingNumberListRequest ¶
type GetPinsForTrackingNumberListRequest struct {
// TrackingNumbers A list of tracking numbers for which the Pins are requested.
TrackingNumbers []string `json:"trackingNumbers"`
}
GetPinsForTrackingNumberListRequest This request is sent to retrieve Pins for a list of tracking numbers.
type GetPinsForTrackingNumberListResponse ¶
type GetPinsForTrackingNumberListResponse struct {
Results []struct {
// Pin The Pin associated with the given tracking number (4 to 6 digits, leading zeros allowed; e.g., 0007).
Pin string `json:"pin"`
// TrackingNumber The tracking number associated with the Pin.
TrackingNumber string `json:"trackingNumber"`
} `json:"results"`
}
GetPinsForTrackingNumberListResponse This response returns a list of tracking numbers and their associated Pins.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function