Documentation
¶
Overview ¶
Package mailbox provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- Constants
- func NewCreateRequestRequest(server string, params *CreateRequestParams, body CreateRequestJSONRequestBody) (*http.Request, error)
- func NewCreateRequestRequestWithBody(server string, params *CreateRequestParams, contentType string, body io.Reader) (*http.Request, error)
- func NewGetRequestRequest(server string, id openapi_types.UUID, params *GetRequestParams) (*http.Request, error)
- func NewGetResponseRequest(server string, id openapi_types.UUID, params *GetResponseParams) (*http.Request, error)
- func NewListRequestsRequest(server string, params *ListRequestsParams) (*http.Request, error)
- func NewPutResponseRequest(server string, id openapi_types.UUID, params *PutResponseParams, ...) (*http.Request, error)
- func NewPutResponseRequestWithBody(server string, id openapi_types.UUID, params *PutResponseParams, ...) (*http.Request, error)
- type BadRequest
- type Client
- func (c *Client) CreateRequest(ctx context.Context, params *CreateRequestParams, ...) (*http.Response, error)
- func (c *Client) CreateRequestWithBody(ctx context.Context, params *CreateRequestParams, contentType string, ...) (*http.Response, error)
- func (c *Client) GetRequest(ctx context.Context, id openapi_types.UUID, params *GetRequestParams, ...) (*http.Response, error)
- func (c *Client) GetResponse(ctx context.Context, id openapi_types.UUID, params *GetResponseParams, ...) (*http.Response, error)
- func (c *Client) ListRequests(ctx context.Context, params *ListRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PutResponse(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, ...) (*http.Response, error)
- func (c *Client) PutResponseWithBody(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateRequestWithBodyWithResponse(ctx context.Context, params *CreateRequestParams, contentType string, ...) (*CreateRequestResp, error)
- func (c *ClientWithResponses) CreateRequestWithResponse(ctx context.Context, params *CreateRequestParams, ...) (*CreateRequestResp, error)
- func (c *ClientWithResponses) GetRequestWithResponse(ctx context.Context, id openapi_types.UUID, params *GetRequestParams, ...) (*GetRequestResp, error)
- func (c *ClientWithResponses) GetResponseWithResponse(ctx context.Context, id openapi_types.UUID, params *GetResponseParams, ...) (*GetResponseResp, error)
- func (c *ClientWithResponses) ListRequestsWithResponse(ctx context.Context, params *ListRequestsParams, reqEditors ...RequestEditorFn) (*ListRequestsResp, error)
- func (c *ClientWithResponses) PutResponseWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, ...) (*PutResponseResp, error)
- func (c *ClientWithResponses) PutResponseWithResponse(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, ...) (*PutResponseResp, error)
- type ClientWithResponsesInterface
- type CreateRequestBody
- type CreateRequestJSONRequestBody
- type CreateRequestParams
- type CreateRequestResp
- type CreateRequestResponse
- type DPoPHeader
- type Forbidden
- type GetRequestParams
- type GetRequestResp
- type GetResponseParams
- type GetResponseResp
- type HttpRequestDoer
- type ListRequestsParams
- type ListRequestsParamsStatus
- type ListRequestsResp
- type NotFound
- type PayloadTooLarge
- type ProblemDetails
- type PutResponseBody
- type PutResponseJSONRequestBody
- type PutResponseParams
- type PutResponseResp
- type Request
- type RequestEditorFn
- type RequestList
- type RequestStatus
- type ResponseBody
- type TooManyRequests
- type Unauthorized
- type UnprocessableEntity
- type XRequestID
Constants ¶
const (
DPoPScopes dPoPContextKey = "DPoP.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewCreateRequestRequest ¶
func NewCreateRequestRequest(server string, params *CreateRequestParams, body CreateRequestJSONRequestBody) (*http.Request, error)
NewCreateRequestRequest calls the generic CreateRequest builder with application/json body
func NewCreateRequestRequestWithBody ¶
func NewCreateRequestRequestWithBody(server string, params *CreateRequestParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateRequestRequestWithBody generates requests for CreateRequest with any type of body
func NewGetRequestRequest ¶
func NewGetRequestRequest(server string, id openapi_types.UUID, params *GetRequestParams) (*http.Request, error)
NewGetRequestRequest generates requests for GetRequest
func NewGetResponseRequest ¶
func NewGetResponseRequest(server string, id openapi_types.UUID, params *GetResponseParams) (*http.Request, error)
NewGetResponseRequest generates requests for GetResponse
func NewListRequestsRequest ¶
func NewListRequestsRequest(server string, params *ListRequestsParams) (*http.Request, error)
NewListRequestsRequest generates requests for ListRequests
func NewPutResponseRequest ¶
func NewPutResponseRequest(server string, id openapi_types.UUID, params *PutResponseParams, body PutResponseJSONRequestBody) (*http.Request, error)
NewPutResponseRequest calls the generic PutResponse builder with application/json body
func NewPutResponseRequestWithBody ¶
func NewPutResponseRequestWithBody(server string, id openapi_types.UUID, params *PutResponseParams, contentType string, body io.Reader) (*http.Request, error)
NewPutResponseRequestWithBody generates requests for PutResponse 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) CreateRequest ¶
func (c *Client) CreateRequest(ctx context.Context, params *CreateRequestParams, body CreateRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateRequestWithBody ¶
func (*Client) GetRequest ¶
func (c *Client) GetRequest(ctx context.Context, id openapi_types.UUID, params *GetRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetResponse ¶
func (c *Client) GetResponse(ctx context.Context, id openapi_types.UUID, params *GetResponseParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListRequests ¶
func (c *Client) ListRequests(ctx context.Context, params *ListRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PutResponse ¶
func (c *Client) PutResponse(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, body PutResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PutResponseWithBody ¶
func (c *Client) PutResponseWithBody(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// ListRequests request
ListRequests(ctx context.Context, params *ListRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateRequestWithBody request with any body
CreateRequestWithBody(ctx context.Context, params *CreateRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateRequest(ctx context.Context, params *CreateRequestParams, body CreateRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetRequest request
GetRequest(ctx context.Context, id openapi_types.UUID, params *GetRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetResponse request
GetResponse(ctx context.Context, id openapi_types.UUID, params *GetResponseParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// PutResponseWithBody request with any body
PutResponseWithBody(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PutResponse(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, body PutResponseJSONRequestBody, 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) CreateRequestWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateRequestWithBodyWithResponse(ctx context.Context, params *CreateRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRequestResp, error)
CreateRequestWithBodyWithResponse request with arbitrary body returning *CreateRequestResp
func (*ClientWithResponses) CreateRequestWithResponse ¶
func (c *ClientWithResponses) CreateRequestWithResponse(ctx context.Context, params *CreateRequestParams, body CreateRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRequestResp, error)
func (*ClientWithResponses) GetRequestWithResponse ¶
func (c *ClientWithResponses) GetRequestWithResponse(ctx context.Context, id openapi_types.UUID, params *GetRequestParams, reqEditors ...RequestEditorFn) (*GetRequestResp, error)
GetRequestWithResponse request returning *GetRequestResp
func (*ClientWithResponses) GetResponseWithResponse ¶
func (c *ClientWithResponses) GetResponseWithResponse(ctx context.Context, id openapi_types.UUID, params *GetResponseParams, reqEditors ...RequestEditorFn) (*GetResponseResp, error)
GetResponseWithResponse request returning *GetResponseResp
func (*ClientWithResponses) ListRequestsWithResponse ¶
func (c *ClientWithResponses) ListRequestsWithResponse(ctx context.Context, params *ListRequestsParams, reqEditors ...RequestEditorFn) (*ListRequestsResp, error)
ListRequestsWithResponse request returning *ListRequestsResp
func (*ClientWithResponses) PutResponseWithBodyWithResponse ¶
func (c *ClientWithResponses) PutResponseWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutResponseResp, error)
PutResponseWithBodyWithResponse request with arbitrary body returning *PutResponseResp
func (*ClientWithResponses) PutResponseWithResponse ¶
func (c *ClientWithResponses) PutResponseWithResponse(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, body PutResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*PutResponseResp, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListRequestsWithResponse request
ListRequestsWithResponse(ctx context.Context, params *ListRequestsParams, reqEditors ...RequestEditorFn) (*ListRequestsResp, error)
// CreateRequestWithBodyWithResponse request with any body
CreateRequestWithBodyWithResponse(ctx context.Context, params *CreateRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRequestResp, error)
CreateRequestWithResponse(ctx context.Context, params *CreateRequestParams, body CreateRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRequestResp, error)
// GetRequestWithResponse request
GetRequestWithResponse(ctx context.Context, id openapi_types.UUID, params *GetRequestParams, reqEditors ...RequestEditorFn) (*GetRequestResp, error)
// GetResponseWithResponse request
GetResponseWithResponse(ctx context.Context, id openapi_types.UUID, params *GetResponseParams, reqEditors ...RequestEditorFn) (*GetResponseResp, error)
// PutResponseWithBodyWithResponse request with any body
PutResponseWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutResponseResp, error)
PutResponseWithResponse(ctx context.Context, id openapi_types.UUID, params *PutResponseParams, body PutResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*PutResponseResp, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateRequestBody ¶
type CreateRequestBody struct {
// LifespanSeconds Seconds until the request expires. Bounds 180–1800 (3–30 min).
// Default 900 (15 min). Token TTL matches.
LifespanSeconds *int `json:"lifespan_seconds,omitempty"`
// RequestPayload Base64-encoded request payload (≤ 1 MiB after decode).
RequestPayload []byte `json:"request_payload"`
}
CreateRequestBody defines model for CreateRequestBody.
type CreateRequestJSONRequestBody ¶
type CreateRequestJSONRequestBody = CreateRequestBody
CreateRequestJSONRequestBody defines body for CreateRequest for application/json ContentType.
type CreateRequestParams ¶
type CreateRequestParams struct {
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP RFC 9449 DPoP proof JWT.
DPoP DPoPHeader `json:"DPoP"`
}
CreateRequestParams defines parameters for CreateRequest.
type CreateRequestResp ¶
type CreateRequestResp struct {
Body []byte
HTTPResponse *http.Response
JSON201 *CreateRequestResponse
ApplicationproblemJSON400 *BadRequest
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON413 *PayloadTooLarge
ApplicationproblemJSON422 *UnprocessableEntity
ApplicationproblemJSON429 *TooManyRequests
ApplicationproblemJSON503 *ProblemDetails
}
func ParseCreateRequestResp ¶
func ParseCreateRequestResp(rsp *http.Response) (*CreateRequestResp, error)
ParseCreateRequestResp parses an HTTP response from a CreateRequestWithResponse call
func (CreateRequestResp) ContentType ¶ added in v0.20.0
func (r CreateRequestResp) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateRequestResp) Status ¶
func (r CreateRequestResp) Status() string
Status returns HTTPResponse.Status
func (CreateRequestResp) StatusCode ¶
func (r CreateRequestResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateRequestResponse ¶
type CreateRequestResponse struct {
ExpiresAt time.Time `json:"expires_at"`
Id openapi_types.UUID `json:"id"`
// ResponseToken Per-request short-TTL DPoP-bound JWT issued by auth. Clients should
// still treat it as an opaque secret and present it at
// `GET /api/v1/mailbox/requests/{id}/response`.
ResponseToken string `json:"response_token"`
}
CreateRequestResponse defines model for CreateRequestResponse.
type GetRequestParams ¶
type GetRequestParams struct {
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP RFC 9449 DPoP proof JWT.
DPoP DPoPHeader `json:"DPoP"`
}
GetRequestParams defines parameters for GetRequest.
type GetRequestResp ¶
type GetRequestResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Request
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON404 *NotFound
ApplicationproblemJSON429 *TooManyRequests
}
func ParseGetRequestResp ¶
func ParseGetRequestResp(rsp *http.Response) (*GetRequestResp, error)
ParseGetRequestResp parses an HTTP response from a GetRequestWithResponse call
func (GetRequestResp) ContentType ¶ added in v0.20.0
func (r GetRequestResp) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetRequestResp) Status ¶
func (r GetRequestResp) Status() string
Status returns HTTPResponse.Status
func (GetRequestResp) StatusCode ¶
func (r GetRequestResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetResponseParams ¶
type GetResponseParams struct {
WaitSeconds *int `form:"wait_seconds,omitempty" json:"wait_seconds,omitempty"`
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP RFC 9449 DPoP proof JWT.
DPoP DPoPHeader `json:"DPoP"`
}
GetResponseParams defines parameters for GetResponse.
type GetResponseResp ¶
type GetResponseResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ResponseBody
ApplicationproblemJSON202 *ProblemDetails
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON404 *NotFound
ApplicationproblemJSON410 *ProblemDetails
ApplicationproblemJSON429 *TooManyRequests
}
func ParseGetResponseResp ¶
func ParseGetResponseResp(rsp *http.Response) (*GetResponseResp, error)
ParseGetResponseResp parses an HTTP response from a GetResponseWithResponse call
func (GetResponseResp) ContentType ¶ added in v0.20.0
func (r GetResponseResp) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetResponseResp) Status ¶
func (r GetResponseResp) Status() string
Status returns HTTPResponse.Status
func (GetResponseResp) StatusCode ¶
func (r GetResponseResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListRequestsParams ¶
type ListRequestsParams struct {
Status *ListRequestsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
Since *time.Time `form:"since,omitempty" json:"since,omitempty"`
WaitSeconds *int `form:"wait_seconds,omitempty" json:"wait_seconds,omitempty"`
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP RFC 9449 DPoP proof JWT.
DPoP DPoPHeader `json:"DPoP"`
}
ListRequestsParams defines parameters for ListRequests.
type ListRequestsParamsStatus ¶
type ListRequestsParamsStatus string
ListRequestsParamsStatus defines parameters for ListRequests.
const ( ListRequestsParamsStatusExpired ListRequestsParamsStatus = "expired" ListRequestsParamsStatusPending ListRequestsParamsStatus = "pending" ListRequestsParamsStatusResponded ListRequestsParamsStatus = "responded" )
Defines values for ListRequestsParamsStatus.
func (ListRequestsParamsStatus) Valid ¶
func (e ListRequestsParamsStatus) Valid() bool
Valid indicates whether the value is a known member of the ListRequestsParamsStatus enum.
type ListRequestsResp ¶
type ListRequestsResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *RequestList
ApplicationproblemJSON400 *BadRequest
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON429 *TooManyRequests
}
func ParseListRequestsResp ¶
func ParseListRequestsResp(rsp *http.Response) (*ListRequestsResp, error)
ParseListRequestsResp parses an HTTP response from a ListRequestsWithResponse call
func (ListRequestsResp) ContentType ¶ added in v0.20.0
func (r ListRequestsResp) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListRequestsResp) Status ¶
func (r ListRequestsResp) Status() string
Status returns HTTPResponse.Status
func (ListRequestsResp) StatusCode ¶
func (r ListRequestsResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PayloadTooLarge ¶
type PayloadTooLarge = ProblemDetails
PayloadTooLarge RFC 9457 problem details object.
type ProblemDetails ¶
type ProblemDetails struct {
Detail *string `json:"detail,omitempty"`
Instance *string `json:"instance,omitempty"`
Status *int `json:"status,omitempty"`
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ProblemDetails RFC 9457 problem details object.
func (ProblemDetails) Get ¶
func (a ProblemDetails) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ProblemDetails. Returns the specified element and whether it was found
func (ProblemDetails) MarshalJSON ¶
func (a ProblemDetails) MarshalJSON() ([]byte, error)
Override default JSON handling for ProblemDetails to handle AdditionalProperties
func (*ProblemDetails) Set ¶
func (a *ProblemDetails) Set(fieldName string, value interface{})
Setter for additional properties for ProblemDetails
func (*ProblemDetails) UnmarshalJSON ¶
func (a *ProblemDetails) UnmarshalJSON(b []byte) error
Override default JSON handling for ProblemDetails to handle AdditionalProperties
type PutResponseBody ¶
type PutResponseBody struct {
// ResponsePayload Base64-encoded response payload (≤ 1 MiB after decode).
ResponsePayload []byte `json:"response_payload"`
}
PutResponseBody defines model for PutResponseBody.
type PutResponseJSONRequestBody ¶
type PutResponseJSONRequestBody = PutResponseBody
PutResponseJSONRequestBody defines body for PutResponse for application/json ContentType.
type PutResponseParams ¶
type PutResponseParams struct {
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP RFC 9449 DPoP proof JWT.
DPoP DPoPHeader `json:"DPoP"`
}
PutResponseParams defines parameters for PutResponse.
type PutResponseResp ¶
type PutResponseResp struct {
Body []byte
HTTPResponse *http.Response
ApplicationproblemJSON400 *BadRequest
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON404 *NotFound
ApplicationproblemJSON409 *ProblemDetails
ApplicationproblemJSON413 *PayloadTooLarge
ApplicationproblemJSON429 *TooManyRequests
}
func ParsePutResponseResp ¶
func ParsePutResponseResp(rsp *http.Response) (*PutResponseResp, error)
ParsePutResponseResp parses an HTTP response from a PutResponseWithResponse call
func (PutResponseResp) ContentType ¶ added in v0.20.0
func (r PutResponseResp) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PutResponseResp) Status ¶
func (r PutResponseResp) Status() string
Status returns HTTPResponse.Status
func (PutResponseResp) StatusCode ¶
func (r PutResponseResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Request ¶
type Request struct {
CreatedAt time.Time `json:"created_at"`
ExpiresAt time.Time `json:"expires_at"`
Id openapi_types.UUID `json:"id"`
// RequestPayload Base64-encoded opaque request payload.
RequestPayload *[]byte `json:"request_payload,omitempty"`
// RequesterClientId Verified OAuth `client_id` from the DPoP-bound access token that created the mailbox request. Approver clients can use this server-populated value for requester classification; it is never copied from `request_payload`.
RequesterClientId string `json:"requester_client_id"`
// RequesterOrigin Verified requester origin claim from the DPoP-bound access token that created the mailbox request. Omitted when the requester token has no origin, such as native/non-origin-bound clients. It is never copied from `request_payload`.
RequesterOrigin *string `json:"requester_origin,omitempty"`
// RequesterPairingId Auth pairing id that bound the requester KEM key used for this encrypted mailbox request. Present for mailbox-pairing requesters, including the reserved `naughtbot-core` first-party requester.
RequesterPairingId *openapi_types.UUID `json:"requester_pairing_id,omitempty"`
RespondedAt *time.Time `json:"responded_at,omitempty"`
// ResponsePayload Base64-encoded response payload (only populated on `responded`).
ResponsePayload *[]byte `json:"response_payload,omitempty"`
RetrievedAt *time.Time `json:"retrieved_at,omitempty"`
Status RequestStatus `json:"status"`
}
Request defines model for Request.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequestList ¶
type RequestList struct {
Requests []Request `json:"requests"`
}
RequestList defines model for RequestList.
type RequestStatus ¶
type RequestStatus string
RequestStatus defines model for Request.Status.
const ( RequestStatusExpired RequestStatus = "expired" RequestStatusPending RequestStatus = "pending" RequestStatusResponded RequestStatus = "responded" )
Defines values for RequestStatus.
func (RequestStatus) Valid ¶
func (e RequestStatus) Valid() bool
Valid indicates whether the value is a known member of the RequestStatus enum.
type ResponseBody ¶
type ResponseBody struct {
RequestId openapi_types.UUID `json:"request_id"`
RespondedAt time.Time `json:"responded_at"`
// ResponsePayload Base64-encoded response payload.
ResponsePayload []byte `json:"response_payload"`
RetrievedAt *time.Time `json:"retrieved_at,omitempty"`
}
ResponseBody defines model for ResponseBody.
type TooManyRequests ¶ added in v0.19.1
type TooManyRequests = ProblemDetails
TooManyRequests RFC 9457 problem details object.
type Unauthorized ¶
type Unauthorized = ProblemDetails
Unauthorized RFC 9457 problem details object.
type UnprocessableEntity ¶
type UnprocessableEntity = ProblemDetails
UnprocessableEntity RFC 9457 problem details object.