Documentation ¶
Overview ¶
Package cpv1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.10.1 DO NOT EDIT.
Package cpv1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.10.1 DO NOT EDIT.
Index ¶
- func NewGetApiCredentialIntrospectionRequest(server string) (*http.Request, error)
- type ApiError
- type ApiErrorCode
- type ApiErrorType
- type ApiError_Params
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type CredentialIntrospectionResponse
- type CredentialIntrospectionResponseType
- type GetApiCredentialIntrospectionResponse
- type HttpRequestDoer
- type RequestEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApiError ¶
type ApiError struct { // An error code identifying the error Code *ApiErrorCode `json:"code,omitempty"` // A descriptive message about the error meant for developer consumption Message *string `json:"message,omitempty"` // Optional error specific attributes Params *ApiError_Params `json:"params,omitempty"` // An optional service or domain specific error group Type *ApiErrorType `json:"type,omitempty"` }
ApiError defines model for ApiError.
type ApiErrorCode ¶
type ApiErrorCode string
An error code identifying the error
const ( ApiErrorCodeApiGuardError ApiErrorCode = "api_guard_error" ApiErrorCodeApiGuardInvalidCredentials ApiErrorCode = "api_guard_invalid_credentials" ApiErrorCodeApiGuardRateLimitExceeded ApiErrorCode = "api_guard_rate_limit_exceeded" ApiErrorCodeAppFeatureNotEnabled ApiErrorCode = "app_feature_not_enabled" ApiErrorCodeAppGenericError ApiErrorCode = "app_generic_error" ApiErrorCodeAppInsufficientParameters ApiErrorCode = "app_insufficient_parameters" ApiErrorCodeAppPackageVersionNotFound ApiErrorCode = "app_package_version_not_found" ApiErrorCodeAppSecurityError ApiErrorCode = "app_security_error" )
Defines values for ApiErrorCode.
type ApiErrorType ¶
type ApiErrorType string
An optional service or domain specific error group
const ( ApiErrorTypeInternalError ApiErrorType = "internal_error" ApiErrorTypeInvalidRequest ApiErrorType = "invalid_request" ApiErrorTypeOperationFailed ApiErrorType = "operation_failed" )
Defines values for ApiErrorType.
type ApiError_Params ¶
type ApiError_Params struct { AdditionalProperties map[string]struct { Key *string `json:"key,omitempty"` Value *string `json:"value,omitempty"` } `json:"-"` }
Optional error specific attributes
func (ApiError_Params) Get ¶
func (a ApiError_Params) Get(fieldName string) (value struct { Key *string `json:"key,omitempty"` Value *string `json:"value,omitempty"` }, found bool)
Getter for additional properties for ApiError_Params. Returns the specified element and whether it was found
func (ApiError_Params) MarshalJSON ¶
func (a ApiError_Params) MarshalJSON() ([]byte, error)
Override default JSON handling for ApiError_Params to handle AdditionalProperties
func (*ApiError_Params) Set ¶
func (a *ApiError_Params) Set(fieldName string, value struct { Key *string `json:"key,omitempty"` Value *string `json:"value,omitempty"` })
Setter for additional properties for ApiError_Params
func (*ApiError_Params) UnmarshalJSON ¶
func (a *ApiError_Params) UnmarshalJSON(b []byte) error
Override default JSON handling for ApiError_Params to handle AdditionalProperties
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) GetApiCredentialIntrospection ¶
type ClientInterface ¶
type ClientInterface interface { // GetApiCredentialIntrospection request GetApiCredentialIntrospection(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) GetApiCredentialIntrospectionWithResponse ¶
func (c *ClientWithResponses) GetApiCredentialIntrospectionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiCredentialIntrospectionResponse, error)
GetApiCredentialIntrospectionWithResponse request returning *GetApiCredentialIntrospectionResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetApiCredentialIntrospection request GetApiCredentialIntrospectionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiCredentialIntrospectionResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CredentialIntrospectionResponse ¶
type CredentialIntrospectionResponse struct { // Expiry timestamp in RFC3399 format if expirable Expiry *string `json:"expiry,omitempty"` // The entity type to which this credential belongs to Type CredentialIntrospectionResponseType `json:"type"` }
CredentialIntrospectionResponse defines model for CredentialIntrospectionResponse.
type CredentialIntrospectionResponseType ¶
type CredentialIntrospectionResponseType string
The entity type to which this credential belongs to
const ( CredentialIntrospectionResponseTypeOrganization CredentialIntrospectionResponseType = "Organization" CredentialIntrospectionResponseTypeTeam CredentialIntrospectionResponseType = "Team" CredentialIntrospectionResponseTypeTrialUser CredentialIntrospectionResponseType = "TrialUser" CredentialIntrospectionResponseTypeUser CredentialIntrospectionResponseType = "User" )
Defines values for CredentialIntrospectionResponseType.
type GetApiCredentialIntrospectionResponse ¶
type GetApiCredentialIntrospectionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CredentialIntrospectionResponse JSON403 *ApiError JSON429 *ApiError JSON500 *ApiError }
func ParseGetApiCredentialIntrospectionResponse ¶
func ParseGetApiCredentialIntrospectionResponse(rsp *http.Response) (*GetApiCredentialIntrospectionResponse, error)
ParseGetApiCredentialIntrospectionResponse parses an HTTP response from a GetApiCredentialIntrospectionWithResponse call
func (GetApiCredentialIntrospectionResponse) Status ¶
func (r GetApiCredentialIntrospectionResponse) Status() string
Status returns HTTPResponse.Status
func (GetApiCredentialIntrospectionResponse) StatusCode ¶
func (r GetApiCredentialIntrospectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.