Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by unknown module path version unknown version DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by unknown module path version unknown version DO NOT EDIT.
Index ¶
- Constants
- func NewGetHealthcheckRequest(server string) (*http.Request, error)
- func NewPostAuthTokenRequest(server string, body PostAuthTokenJSONRequestBody) (*http.Request, error)
- func NewPostAuthTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostCertificateRenewalRequest(server string, isdNumber int, asNumber AS, ...) (*http.Request, error)
- func NewPostCertificateRenewalRequestWithBody(server string, isdNumber int, asNumber AS, contentType string, body io.Reader) (*http.Request, error)
- type AS
- type AccessCredentials
- type AccessToken
- type AccessTokenTokenType
- type CertificateChain
- type CertificateChainPKCS7
- type Client
- func (c *Client) GetHealthcheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostAuthToken(ctx context.Context, body PostAuthTokenJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostAuthTokenWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostCertificateRenewal(ctx context.Context, isdNumber int, asNumber AS, ...) (*http.Response, error)
- func (c *Client) PostCertificateRenewalWithBody(ctx context.Context, isdNumber int, asNumber AS, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetHealthcheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthcheckResponse, error)
- func (c *ClientWithResponses) PostAuthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostAuthTokenResponse, error)
- func (c *ClientWithResponses) PostAuthTokenWithResponse(ctx context.Context, body PostAuthTokenJSONRequestBody, ...) (*PostAuthTokenResponse, error)
- func (c *ClientWithResponses) PostCertificateRenewalWithBodyWithResponse(ctx context.Context, isdNumber int, asNumber AS, contentType string, ...) (*PostCertificateRenewalResponse, error)
- func (c *ClientWithResponses) PostCertificateRenewalWithResponse(ctx context.Context, isdNumber int, asNumber AS, ...) (*PostCertificateRenewalResponse, error)
- type ClientWithResponsesInterface
- type GetHealthcheckResponse
- type HealthCheckStatus
- type HealthCheckStatusStatus
- type HttpRequestDoer
- type N400BadRequest
- type N401UnauthorizedError
- type N404NotFound
- type N500InternalServerError
- type N503ServiceUnavailable
- type PostAuthTokenJSONRequestBody
- type PostAuthTokenResponse
- type PostCertificateRenewalJSONRequestBody
- type PostCertificateRenewalResponse
- type Problem
- type RenewalRequest
- type RenewalResponse
- type RenewalResponse_CertificateChain
- func (t RenewalResponse_CertificateChain) AsCertificateChain() (CertificateChain, error)
- func (t RenewalResponse_CertificateChain) AsCertificateChainPKCS7() (CertificateChainPKCS7, error)
- func (t *RenewalResponse_CertificateChain) FromCertificateChain(v CertificateChain) error
- func (t *RenewalResponse_CertificateChain) FromCertificateChainPKCS7(v CertificateChainPKCS7) error
- func (t RenewalResponse_CertificateChain) MarshalJSON() ([]byte, error)
- func (t *RenewalResponse_CertificateChain) MergeCertificateChain(v CertificateChain) error
- func (t *RenewalResponse_CertificateChain) MergeCertificateChainPKCS7(v CertificateChainPKCS7) error
- func (t *RenewalResponse_CertificateChain) UnmarshalJSON(b []byte) error
- type RequestEditorFn
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewGetHealthcheckRequest ¶
NewGetHealthcheckRequest generates requests for GetHealthcheck
func NewPostAuthTokenRequest ¶
func NewPostAuthTokenRequest(server string, body PostAuthTokenJSONRequestBody) (*http.Request, error)
NewPostAuthTokenRequest calls the generic PostAuthToken builder with application/json body
func NewPostAuthTokenRequestWithBody ¶
func NewPostAuthTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostAuthTokenRequestWithBody generates requests for PostAuthToken with any type of body
func NewPostCertificateRenewalRequest ¶
func NewPostCertificateRenewalRequest(server string, isdNumber int, asNumber AS, body PostCertificateRenewalJSONRequestBody) (*http.Request, error)
NewPostCertificateRenewalRequest calls the generic PostCertificateRenewal builder with application/json body
func NewPostCertificateRenewalRequestWithBody ¶
func NewPostCertificateRenewalRequestWithBody(server string, isdNumber int, asNumber AS, contentType string, body io.Reader) (*http.Request, error)
NewPostCertificateRenewalRequestWithBody generates requests for PostCertificateRenewal with any type of body
Types ¶
type AccessCredentials ¶
type AccessCredentials struct { // ClientId ID of the control service requesting authentication. ClientId string `json:"client_id"` // ClientSecret Secret that authenticates the control service. ClientSecret string `json:"client_secret"` }
AccessCredentials defines model for AccessCredentials.
type AccessToken ¶
type AccessToken struct { // AccessToken The encoded JWT token AccessToken string `json:"access_token"` // ExpiresIn Validity duration of this token in seconds. ExpiresIn int `json:"expires_in"` // TokenType Type of returned access token. Currently always Bearer. TokenType AccessTokenTokenType `json:"token_type"` }
AccessToken defines model for AccessToken.
type AccessTokenTokenType ¶
type AccessTokenTokenType string
AccessTokenTokenType Type of returned access token. Currently always Bearer.
const (
Bearer AccessTokenTokenType = "Bearer"
)
Defines values for AccessTokenTokenType.
type CertificateChain ¶
type CertificateChain struct { // AsCertificate Base64 encoded AS certificate. AsCertificate []byte `json:"as_certificate"` // CaCertificate Base64 encoded CA certificate. CaCertificate []byte `json:"ca_certificate"` }
CertificateChain defines model for CertificateChain.
type CertificateChainPKCS7 ¶
type CertificateChainPKCS7 = []byte
CertificateChainPKCS7 Certificate chain containing the the new AS certificate and the issuing CA certificate encoded in a degenerate PKCS#7 data structure.
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) GetHealthcheck ¶
func (*Client) PostAuthToken ¶
func (c *Client) PostAuthToken(ctx context.Context, body PostAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostAuthTokenWithBody ¶
func (*Client) PostCertificateRenewal ¶
func (c *Client) PostCertificateRenewal(ctx context.Context, isdNumber int, asNumber AS, body PostCertificateRenewalJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // PostAuthTokenWithBody request with any body PostAuthTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostAuthToken(ctx context.Context, body PostAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetHealthcheck request GetHealthcheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // PostCertificateRenewalWithBody request with any body PostCertificateRenewalWithBody(ctx context.Context, isdNumber int, asNumber AS, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostCertificateRenewal(ctx context.Context, isdNumber int, asNumber AS, body PostCertificateRenewalJSONRequestBody, 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) GetHealthcheckWithResponse ¶
func (c *ClientWithResponses) GetHealthcheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthcheckResponse, error)
GetHealthcheckWithResponse request returning *GetHealthcheckResponse
func (*ClientWithResponses) PostAuthTokenWithBodyWithResponse ¶
func (c *ClientWithResponses) PostAuthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAuthTokenResponse, error)
PostAuthTokenWithBodyWithResponse request with arbitrary body returning *PostAuthTokenResponse
func (*ClientWithResponses) PostAuthTokenWithResponse ¶
func (c *ClientWithResponses) PostAuthTokenWithResponse(ctx context.Context, body PostAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAuthTokenResponse, error)
func (*ClientWithResponses) PostCertificateRenewalWithBodyWithResponse ¶
func (c *ClientWithResponses) PostCertificateRenewalWithBodyWithResponse(ctx context.Context, isdNumber int, asNumber AS, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostCertificateRenewalResponse, error)
PostCertificateRenewalWithBodyWithResponse request with arbitrary body returning *PostCertificateRenewalResponse
func (*ClientWithResponses) PostCertificateRenewalWithResponse ¶
func (c *ClientWithResponses) PostCertificateRenewalWithResponse(ctx context.Context, isdNumber int, asNumber AS, body PostCertificateRenewalJSONRequestBody, reqEditors ...RequestEditorFn) (*PostCertificateRenewalResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // PostAuthTokenWithBodyWithResponse request with any body PostAuthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAuthTokenResponse, error) PostAuthTokenWithResponse(ctx context.Context, body PostAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAuthTokenResponse, error) // GetHealthcheckWithResponse request GetHealthcheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthcheckResponse, error) // PostCertificateRenewalWithBodyWithResponse request with any body PostCertificateRenewalWithBodyWithResponse(ctx context.Context, isdNumber int, asNumber AS, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostCertificateRenewalResponse, error) PostCertificateRenewalWithResponse(ctx context.Context, isdNumber int, asNumber AS, body PostCertificateRenewalJSONRequestBody, reqEditors ...RequestEditorFn) (*PostCertificateRenewalResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetHealthcheckResponse ¶
type GetHealthcheckResponse struct { Body []byte HTTPResponse *http.Response JSON200 *HealthCheckStatus ApplicationproblemJSON500 *N500InternalServerError ApplicationproblemJSON503 *N503ServiceUnavailable }
func ParseGetHealthcheckResponse ¶
func ParseGetHealthcheckResponse(rsp *http.Response) (*GetHealthcheckResponse, error)
ParseGetHealthcheckResponse parses an HTTP response from a GetHealthcheckWithResponse call
func (GetHealthcheckResponse) Status ¶
func (r GetHealthcheckResponse) Status() string
Status returns HTTPResponse.Status
func (GetHealthcheckResponse) StatusCode ¶
func (r GetHealthcheckResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HealthCheckStatus ¶
type HealthCheckStatus struct {
Status HealthCheckStatusStatus `json:"status"`
}
HealthCheckStatus defines model for HealthCheckStatus.
type HealthCheckStatusStatus ¶
type HealthCheckStatusStatus string
HealthCheckStatusStatus defines model for HealthCheckStatus.Status.
const ( Available HealthCheckStatusStatus = "available" Starting HealthCheckStatusStatus = "starting" Stopping HealthCheckStatusStatus = "stopping" )
Defines values for HealthCheckStatusStatus.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type N400BadRequest ¶ added in v0.10.0
type N400BadRequest = Problem
N400BadRequest Error message encoded as specified in [RFC7807](https://tools.ietf.org/html/rfc7807)
type N401UnauthorizedError ¶ added in v0.10.0
type N401UnauthorizedError = Problem
N401UnauthorizedError Error message encoded as specified in [RFC7807](https://tools.ietf.org/html/rfc7807)
type N404NotFound ¶ added in v0.10.0
type N404NotFound = Problem
N404NotFound Error message encoded as specified in [RFC7807](https://tools.ietf.org/html/rfc7807)
type N500InternalServerError ¶ added in v0.10.0
type N500InternalServerError = Problem
N500InternalServerError Error message encoded as specified in [RFC7807](https://tools.ietf.org/html/rfc7807)
type N503ServiceUnavailable ¶ added in v0.10.0
type N503ServiceUnavailable = Problem
N503ServiceUnavailable Error message encoded as specified in [RFC7807](https://tools.ietf.org/html/rfc7807)
type PostAuthTokenJSONRequestBody ¶
type PostAuthTokenJSONRequestBody = AccessCredentials
PostAuthTokenJSONRequestBody defines body for PostAuthToken for application/json ContentType.
type PostAuthTokenResponse ¶
type PostAuthTokenResponse struct { Body []byte HTTPResponse *http.Response JSON200 *AccessToken ApplicationproblemJSON400 *N400BadRequest ApplicationproblemJSON401 *N401UnauthorizedError ApplicationproblemJSON500 *N500InternalServerError ApplicationproblemJSON503 *N503ServiceUnavailable }
func ParsePostAuthTokenResponse ¶
func ParsePostAuthTokenResponse(rsp *http.Response) (*PostAuthTokenResponse, error)
ParsePostAuthTokenResponse parses an HTTP response from a PostAuthTokenWithResponse call
func (PostAuthTokenResponse) Status ¶
func (r PostAuthTokenResponse) Status() string
Status returns HTTPResponse.Status
func (PostAuthTokenResponse) StatusCode ¶
func (r PostAuthTokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostCertificateRenewalJSONRequestBody ¶
type PostCertificateRenewalJSONRequestBody = RenewalRequest
PostCertificateRenewalJSONRequestBody defines body for PostCertificateRenewal for application/json ContentType.
type PostCertificateRenewalResponse ¶
type PostCertificateRenewalResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RenewalResponse ApplicationproblemJSON400 *N400BadRequest ApplicationproblemJSON401 *N401UnauthorizedError ApplicationproblemJSON404 *N404NotFound ApplicationproblemJSON500 *N500InternalServerError ApplicationproblemJSON503 *N503ServiceUnavailable }
func ParsePostCertificateRenewalResponse ¶
func ParsePostCertificateRenewalResponse(rsp *http.Response) (*PostCertificateRenewalResponse, error)
ParsePostCertificateRenewalResponse parses an HTTP response from a PostCertificateRenewalWithResponse call
func (PostCertificateRenewalResponse) Status ¶
func (r PostCertificateRenewalResponse) Status() string
Status returns HTTPResponse.Status
func (PostCertificateRenewalResponse) StatusCode ¶
func (r PostCertificateRenewalResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Problem ¶
type Problem struct { // CorrelationId Identifier to correlate multiple error messages to the same case. CorrelationId *openapi_types.UUID `json:"correlation_id,omitempty"` // Detail A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. Detail *string `json:"detail,omitempty"` // Instance A URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. Instance *string `json:"instance,omitempty"` // Status The HTTP status code generated by the server for this occurrence of the problem. Status int `json:"status"` // Title A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. Title string `json:"title"` // Type A URI reference that uniquely identifies the problem type in the context of the provided API. Type string `json:"type"` }
Problem Error message encoded as specified in [RFC7807](https://tools.ietf.org/html/rfc7807)
type RenewalRequest ¶
type RenewalRequest struct { // Csr Base64 encoded renewal request as described below. // // The renewal requests consists of a CMS SignedData structure that // contains a PKCS#10 defining the parameters of the requested // certificate. // // The following must hold for the CMS structure: // // - The `certificates` field in `SignedData` MUST contain an existing // and verifiable certificate chain that authenticates the private // key that was used to sign the CMS structure. It MUST NOT contain // any other certificates. // // - The `eContentType` is set to `id-data`. The contents of `eContent` // is the ASN.1 DER encoded PKCS#10. This ensures backwards // compatibility with PKCS#7, as described in // [RFC5652](https://tools.ietf.org/html/rfc5652#section-5.2.1) // // - The `SignerIdentifier` MUST be the choice `IssuerAndSerialNumber`, // thus, `version` in `SignerInfo` must be 1, as required by // [RFC5652](https://tools.ietf.org/html/rfc5652#section-5.3) Csr []byte `json:"csr"` }
RenewalRequest defines model for RenewalRequest.
type RenewalResponse ¶
type RenewalResponse struct {
CertificateChain RenewalResponse_CertificateChain `json:"certificate_chain"`
}
RenewalResponse defines model for RenewalResponse.
type RenewalResponse_CertificateChain ¶ added in v0.9.0
type RenewalResponse_CertificateChain struct {
// contains filtered or unexported fields
}
RenewalResponse_CertificateChain defines model for RenewalResponse.CertificateChain.
func (RenewalResponse_CertificateChain) AsCertificateChain ¶ added in v0.9.0
func (t RenewalResponse_CertificateChain) AsCertificateChain() (CertificateChain, error)
AsCertificateChain returns the union data inside the RenewalResponse_CertificateChain as a CertificateChain
func (RenewalResponse_CertificateChain) AsCertificateChainPKCS7 ¶ added in v0.9.0
func (t RenewalResponse_CertificateChain) AsCertificateChainPKCS7() (CertificateChainPKCS7, error)
AsCertificateChainPKCS7 returns the union data inside the RenewalResponse_CertificateChain as a CertificateChainPKCS7
func (*RenewalResponse_CertificateChain) FromCertificateChain ¶ added in v0.9.0
func (t *RenewalResponse_CertificateChain) FromCertificateChain(v CertificateChain) error
FromCertificateChain overwrites any union data inside the RenewalResponse_CertificateChain as the provided CertificateChain
func (*RenewalResponse_CertificateChain) FromCertificateChainPKCS7 ¶ added in v0.9.0
func (t *RenewalResponse_CertificateChain) FromCertificateChainPKCS7(v CertificateChainPKCS7) error
FromCertificateChainPKCS7 overwrites any union data inside the RenewalResponse_CertificateChain as the provided CertificateChainPKCS7
func (RenewalResponse_CertificateChain) MarshalJSON ¶ added in v0.9.0
func (t RenewalResponse_CertificateChain) MarshalJSON() ([]byte, error)
func (*RenewalResponse_CertificateChain) MergeCertificateChain ¶ added in v0.9.0
func (t *RenewalResponse_CertificateChain) MergeCertificateChain(v CertificateChain) error
MergeCertificateChain performs a merge with any union data inside the RenewalResponse_CertificateChain, using the provided CertificateChain
func (*RenewalResponse_CertificateChain) MergeCertificateChainPKCS7 ¶ added in v0.9.0
func (t *RenewalResponse_CertificateChain) MergeCertificateChainPKCS7(v CertificateChainPKCS7) error
MergeCertificateChainPKCS7 performs a merge with any union data inside the RenewalResponse_CertificateChain, using the provided CertificateChainPKCS7
func (*RenewalResponse_CertificateChain) UnmarshalJSON ¶ added in v0.9.0
func (t *RenewalResponse_CertificateChain) UnmarshalJSON(b []byte) error