Documentation
¶
Overview ¶
Package api provides primitives to interact the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Index ¶
- Variables
- func NewDecryptRequest(server string, body DecryptJSONRequestBody) (*http.Request, error)
- func NewDecryptRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewEncryptRequest(server string, body EncryptJSONRequestBody) (*http.Request, error)
- func NewEncryptRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewExternalIdRequest(server string, body ExternalIdJSONRequestBody) (*http.Request, error)
- func NewExternalIdRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGenerateKeyPairRequest(server string, params *GenerateKeyPairParams) (*http.Request, error)
- func NewGenerateVendorCACSRRequest(server string, params *GenerateVendorCACSRParams) (*http.Request, error)
- func NewPublicKeyRequest(server string, urn string) (*http.Request, error)
- func NewSelfSignVendorCACertificateRequest(server string, params *SelfSignVendorCACertificateParams) (*http.Request, error)
- func NewSignJwtRequest(server string, body SignJwtJSONRequestBody) (*http.Request, error)
- func NewSignJwtRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSignRequest(server string, body SignJSONRequestBody) (*http.Request, error)
- func NewSignRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSignTLSCertificateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewVerifyRequest(server string, body VerifyJSONRequestBody) (*http.Request, error)
- func NewVerifyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type Client
- func (c *Client) Decrypt(ctx context.Context, body DecryptJSONRequestBody) (*http.Response, error)
- func (c *Client) DecryptWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) Encrypt(ctx context.Context, body EncryptJSONRequestBody) (*http.Response, error)
- func (c *Client) EncryptWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) ExternalId(ctx context.Context, body ExternalIdJSONRequestBody) (*http.Response, error)
- func (c *Client) ExternalIdWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) GenerateKeyPair(ctx context.Context, params *GenerateKeyPairParams) (*http.Response, error)
- func (c *Client) GenerateVendorCACSR(ctx context.Context, params *GenerateVendorCACSRParams) (*http.Response, error)
- func (c *Client) PublicKey(ctx context.Context, urn string) (*http.Response, error)
- func (c *Client) SelfSignVendorCACertificate(ctx context.Context, params *SelfSignVendorCACertificateParams) (*http.Response, error)
- func (c *Client) Sign(ctx context.Context, body SignJSONRequestBody) (*http.Response, error)
- func (c *Client) SignJwt(ctx context.Context, body SignJwtJSONRequestBody) (*http.Response, error)
- func (c *Client) SignJwtWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) SignTLSCertificateWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) SignWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) Verify(ctx context.Context, body VerifyJSONRequestBody) (*http.Response, error)
- func (c *Client) VerifyWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DecryptWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*DecryptResponse, error)
- func (c *ClientWithResponses) DecryptWithResponse(ctx context.Context, body DecryptJSONRequestBody) (*DecryptResponse, error)
- func (c *ClientWithResponses) EncryptWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*EncryptResponse, error)
- func (c *ClientWithResponses) EncryptWithResponse(ctx context.Context, body EncryptJSONRequestBody) (*EncryptResponse, error)
- func (c *ClientWithResponses) ExternalIdWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*ExternalIdResponse, error)
- func (c *ClientWithResponses) ExternalIdWithResponse(ctx context.Context, body ExternalIdJSONRequestBody) (*ExternalIdResponse, error)
- func (c *ClientWithResponses) GenerateKeyPairWithResponse(ctx context.Context, params *GenerateKeyPairParams) (*GenerateKeyPairResponse, error)
- func (c *ClientWithResponses) GenerateVendorCACSRWithResponse(ctx context.Context, params *GenerateVendorCACSRParams) (*GenerateVendorCACSRResponse, error)
- func (c *ClientWithResponses) PublicKeyWithResponse(ctx context.Context, urn string) (*PublicKeyResponse, error)
- func (c *ClientWithResponses) SelfSignVendorCACertificateWithResponse(ctx context.Context, params *SelfSignVendorCACertificateParams) (*SelfSignVendorCACertificateResponse, error)
- func (c *ClientWithResponses) SignJwtWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SignJwtResponse, error)
- func (c *ClientWithResponses) SignJwtWithResponse(ctx context.Context, body SignJwtJSONRequestBody) (*SignJwtResponse, error)
- func (c *ClientWithResponses) SignTLSCertificateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SignTLSCertificateResponse, error)
- func (c *ClientWithResponses) SignWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SignResponse, error)
- func (c *ClientWithResponses) SignWithResponse(ctx context.Context, body SignJSONRequestBody) (*SignResponse, error)
- func (c *ClientWithResponses) VerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*VerifyResponse, error)
- func (c *ClientWithResponses) VerifyWithResponse(ctx context.Context, body VerifyJSONRequestBody) (*VerifyResponse, error)
- type ClientWithResponsesInterface
- type DecryptJSONBody
- type DecryptJSONRequestBody
- type DecryptRequest
- type DecryptResponse
- type EchoRouter
- type EncryptJSONBody
- type EncryptJSONRequestBody
- type EncryptRequest
- type EncryptRequestSubject
- type EncryptResponse
- type EncryptResponseEntry
- type EncryptedData
- type ExternalId
- type ExternalIdJSONBody
- type ExternalIdJSONRequestBody
- type ExternalIdRequest
- type ExternalIdResponse
- type GenerateKeyPairParams
- type GenerateKeyPairResponse
- type GenerateVendorCACSRParams
- type GenerateVendorCACSRResponse
- type HttpClient
- func (hb HttpClient) CalculateExternalId(subject string, actor string, key types.KeyIdentifier) ([]byte, error)
- func (hb HttpClient) DecryptKeyAndCipherText(cipherText types.DoubleEncryptedCipherText, key types.KeyIdentifier) ([]byte, error)
- func (hb HttpClient) EncryptKeyAndPlainText(plainText []byte, keys []jwk.Key) (types.DoubleEncryptedCipherText, error)
- func (hb HttpClient) GenerateKeyPair(key types.KeyIdentifier, overwrite bool) (crypto.PublicKey, error)
- func (hb HttpClient) GenerateVendorCACSR(name string) ([]byte, error)
- func (hb HttpClient) GetPrivateKey(key types.KeyIdentifier) (crypto.Signer, error)
- func (hb HttpClient) GetPublicKeyAsJWK(key types.KeyIdentifier) (jwk.Key, error)
- func (hb HttpClient) GetPublicKeyAsPEM(key types.KeyIdentifier) (string, error)
- func (hb HttpClient) GetSigningCertificate(entity types.LegalEntity) (*x509.Certificate, crypto.PrivateKey, error)
- func (hb HttpClient) GetTLSCertificate(entity types.LegalEntity) (*x509.Certificate, crypto.PrivateKey, error)
- func (hb HttpClient) PrivateKeyExists(key types.KeyIdentifier) bool
- func (hb HttpClient) RenewSigningCertificate(entity types.LegalEntity) (*x509.Certificate, crypto.PrivateKey, error)
- func (hb HttpClient) RenewTLSCertificate(entity types.LegalEntity) (*x509.Certificate, crypto.PrivateKey, error)
- func (hb HttpClient) SelfSignVendorCACertificate(name string) (*x509.Certificate, error)
- func (hb HttpClient) Sign(data []byte, key types.KeyIdentifier) ([]byte, error)
- func (hb HttpClient) SignCertificate(subjectKey types.KeyIdentifier, caKey types.KeyIdentifier, pkcs10 []byte, ...) ([]byte, error)
- func (hb HttpClient) SignJWS(payload []byte, key types.KeyIdentifier) ([]byte, error)
- func (hb HttpClient) SignJWSEphemeral(payload []byte, caKey types.KeyIdentifier, csr x509.CertificateRequest, ...) ([]byte, error)
- func (hb HttpClient) SignJWT(claims map[string]interface{}, key types.KeyIdentifier) (string, error)
- func (hb HttpClient) SignJWTRFC003(claims map[string]interface{}) (string, error)
- func (hb HttpClient) SignTLSCertificate(key crypto.PublicKey) (*x509.Certificate, error)
- func (hb HttpClient) StoreVendorCACertificate(certificate *x509.Certificate) error
- func (hb HttpClient) TrustStore() cert.TrustStore
- func (hb HttpClient) VerifyJWS(signature []byte, signingTime time.Time, certVerifier cert.Verifier) ([]byte, error)
- func (hb HttpClient) VerifyWith(data []byte, sig []byte, jwk jwk.Key) (bool, error)
- type HttpRequestDoer
- type Identifier
- type JWK
- type PlainText
- type PublicKey
- type PublicKeyResponse
- type RequestEditorFn
- type SelfSignVendorCACertificateParams
- type SelfSignVendorCACertificateResponse
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) Decrypt(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Encrypt(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ExternalId(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GenerateKeyPair(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GenerateVendorCACSR(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PublicKey(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SelfSignVendorCACertificate(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Sign(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SignJwt(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SignTLSCertificate(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Verify(ctx echo.Context) error
- type SignJSONBody
- type SignJSONRequestBody
- type SignJwtJSONBody
- type SignJwtJSONRequestBody
- type SignJwtRequest
- type SignJwtResponse
- type SignRequest
- type SignResponse
- type SignTLSCertificateResponse
- type Signature
- type Verification
- type VerifyJSONBody
- type VerifyJSONRequestBody
- type VerifyRequest
- type VerifyResponse
- type Wrapper
- func (w *Wrapper) Decrypt(ctx echo.Context) error
- func (w *Wrapper) Encrypt(ctx echo.Context) error
- func (w *Wrapper) ExternalId(ctx echo.Context) error
- func (w *Wrapper) GenerateKeyPair(ctx echo.Context, params GenerateKeyPairParams) error
- func (w *Wrapper) GenerateVendorCACSR(ctx echo.Context, params GenerateVendorCACSRParams) error
- func (w *Wrapper) PublicKey(ctx echo.Context, urn string) error
- func (w *Wrapper) SelfSignVendorCACertificate(ctx echo.Context, params SelfSignVendorCACertificateParams) error
- func (w *Wrapper) Sign(ctx echo.Context) error
- func (w *Wrapper) SignJwt(ctx echo.Context) error
- func (w *Wrapper) SignTLSCertificate(ctx echo.Context) error
- func (w *Wrapper) Verify(ctx echo.Context) error
Constants ¶
This section is empty.
Variables ¶
var ErrNotImplemented = errors.New("operation not implemented")
ErrNotImplemented indicates that this client API call is not implemented.
Functions ¶
func NewDecryptRequest ¶ added in v0.15.0
func NewDecryptRequest(server string, body DecryptJSONRequestBody) (*http.Request, error)
NewDecryptRequest calls the generic Decrypt builder with application/json body
func NewDecryptRequestWithBody ¶ added in v0.15.0
func NewDecryptRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewDecryptRequestWithBody generates requests for Decrypt with any type of body
func NewEncryptRequest ¶ added in v0.15.0
func NewEncryptRequest(server string, body EncryptJSONRequestBody) (*http.Request, error)
NewEncryptRequest calls the generic Encrypt builder with application/json body
func NewEncryptRequestWithBody ¶ added in v0.15.0
func NewEncryptRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewEncryptRequestWithBody generates requests for Encrypt with any type of body
func NewExternalIdRequest ¶ added in v0.15.0
func NewExternalIdRequest(server string, body ExternalIdJSONRequestBody) (*http.Request, error)
NewExternalIdRequest calls the generic ExternalId builder with application/json body
func NewExternalIdRequestWithBody ¶ added in v0.15.0
func NewExternalIdRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewExternalIdRequestWithBody generates requests for ExternalId with any type of body
func NewGenerateKeyPairRequest ¶ added in v0.15.0
func NewGenerateKeyPairRequest(server string, params *GenerateKeyPairParams) (*http.Request, error)
NewGenerateKeyPairRequest generates requests for GenerateKeyPair
func NewGenerateVendorCACSRRequest ¶ added in v0.15.0
func NewGenerateVendorCACSRRequest(server string, params *GenerateVendorCACSRParams) (*http.Request, error)
NewGenerateVendorCACSRRequest generates requests for GenerateVendorCACSR
func NewPublicKeyRequest ¶ added in v0.15.0
NewPublicKeyRequest generates requests for PublicKey
func NewSelfSignVendorCACertificateRequest ¶ added in v0.15.0
func NewSelfSignVendorCACertificateRequest(server string, params *SelfSignVendorCACertificateParams) (*http.Request, error)
NewSelfSignVendorCACertificateRequest generates requests for SelfSignVendorCACertificate
func NewSignJwtRequest ¶ added in v0.15.0
func NewSignJwtRequest(server string, body SignJwtJSONRequestBody) (*http.Request, error)
NewSignJwtRequest calls the generic SignJwt builder with application/json body
func NewSignJwtRequestWithBody ¶ added in v0.15.0
func NewSignJwtRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSignJwtRequestWithBody generates requests for SignJwt with any type of body
func NewSignRequest ¶ added in v0.15.0
func NewSignRequest(server string, body SignJSONRequestBody) (*http.Request, error)
NewSignRequest calls the generic Sign builder with application/json body
func NewSignRequestWithBody ¶ added in v0.15.0
func NewSignRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSignRequestWithBody generates requests for Sign with any type of body
func NewSignTLSCertificateRequestWithBody ¶ added in v0.16.0
func NewSignTLSCertificateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSignTLSCertificateRequestWithBody generates requests for SignTLSCertificate with any type of body
func NewVerifyRequest ¶ added in v0.15.0
func NewVerifyRequest(server string, body VerifyJSONRequestBody) (*http.Request, error)
NewVerifyRequest calls the generic Verify builder with application/json body
func NewVerifyRequestWithBody ¶ added in v0.15.0
func NewVerifyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewVerifyRequestWithBody generates requests for Verify with any type of body
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶ added in v0.16.0
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type Client ¶ added in v0.15.0
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 callback for modifying requests which are generated before sending over
// the network.
RequestEditor RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶ added in v0.15.0
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) DecryptWithBody ¶ added in v0.15.0
func (*Client) EncryptWithBody ¶ added in v0.15.0
func (*Client) ExternalId ¶ added in v0.15.0
func (*Client) ExternalIdWithBody ¶ added in v0.15.0
func (*Client) GenerateKeyPair ¶ added in v0.15.0
func (*Client) GenerateVendorCACSR ¶ added in v0.15.0
func (*Client) SelfSignVendorCACertificate ¶ added in v0.15.0
func (*Client) SignJwtWithBody ¶ added in v0.15.0
func (*Client) SignTLSCertificateWithBody ¶ added in v0.16.0
func (*Client) SignWithBody ¶ added in v0.15.0
type ClientInterface ¶ added in v0.15.0
type ClientInterface interface {
// SignTLSCertificate request with any body
SignTLSCertificateWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
// SelfSignVendorCACertificate request
SelfSignVendorCACertificate(ctx context.Context, params *SelfSignVendorCACertificateParams) (*http.Response, error)
// GenerateVendorCACSR request
GenerateVendorCACSR(ctx context.Context, params *GenerateVendorCACSRParams) (*http.Response, error)
// Decrypt request with any body
DecryptWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
Decrypt(ctx context.Context, body DecryptJSONRequestBody) (*http.Response, error)
// Encrypt request with any body
EncryptWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
Encrypt(ctx context.Context, body EncryptJSONRequestBody) (*http.Response, error)
// ExternalId request with any body
ExternalIdWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
ExternalId(ctx context.Context, body ExternalIdJSONRequestBody) (*http.Response, error)
// GenerateKeyPair request
GenerateKeyPair(ctx context.Context, params *GenerateKeyPairParams) (*http.Response, error)
// PublicKey request
PublicKey(ctx context.Context, urn string) (*http.Response, error)
// Sign request with any body
SignWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
Sign(ctx context.Context, body SignJSONRequestBody) (*http.Response, error)
// SignJwt request with any body
SignJwtWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
SignJwt(ctx context.Context, body SignJwtJSONRequestBody) (*http.Response, error)
// Verify request with any body
VerifyWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
Verify(ctx context.Context, body VerifyJSONRequestBody) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶ added in v0.15.0
ClientOption allows setting custom parameters during construction
func WithBaseURL ¶ added in v0.15.0
func WithBaseURL(baseURL string) ClientOption
WithBaseURL overrides the baseURL.
func WithHTTPClient ¶ added in v0.15.0
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 ¶ added in v0.15.0
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 ¶ added in v0.15.0
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶ added in v0.15.0
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) DecryptWithBodyWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) DecryptWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*DecryptResponse, error)
DecryptWithBodyWithResponse request with arbitrary body returning *DecryptResponse
func (*ClientWithResponses) DecryptWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) DecryptWithResponse(ctx context.Context, body DecryptJSONRequestBody) (*DecryptResponse, error)
func (*ClientWithResponses) EncryptWithBodyWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) EncryptWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*EncryptResponse, error)
EncryptWithBodyWithResponse request with arbitrary body returning *EncryptResponse
func (*ClientWithResponses) EncryptWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) EncryptWithResponse(ctx context.Context, body EncryptJSONRequestBody) (*EncryptResponse, error)
func (*ClientWithResponses) ExternalIdWithBodyWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) ExternalIdWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*ExternalIdResponse, error)
ExternalIdWithBodyWithResponse request with arbitrary body returning *ExternalIdResponse
func (*ClientWithResponses) ExternalIdWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) ExternalIdWithResponse(ctx context.Context, body ExternalIdJSONRequestBody) (*ExternalIdResponse, error)
func (*ClientWithResponses) GenerateKeyPairWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) GenerateKeyPairWithResponse(ctx context.Context, params *GenerateKeyPairParams) (*GenerateKeyPairResponse, error)
GenerateKeyPairWithResponse request returning *GenerateKeyPairResponse
func (*ClientWithResponses) GenerateVendorCACSRWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) GenerateVendorCACSRWithResponse(ctx context.Context, params *GenerateVendorCACSRParams) (*GenerateVendorCACSRResponse, error)
GenerateVendorCACSRWithResponse request returning *GenerateVendorCACSRResponse
func (*ClientWithResponses) PublicKeyWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) PublicKeyWithResponse(ctx context.Context, urn string) (*PublicKeyResponse, error)
PublicKeyWithResponse request returning *PublicKeyResponse
func (*ClientWithResponses) SelfSignVendorCACertificateWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) SelfSignVendorCACertificateWithResponse(ctx context.Context, params *SelfSignVendorCACertificateParams) (*SelfSignVendorCACertificateResponse, error)
SelfSignVendorCACertificateWithResponse request returning *SelfSignVendorCACertificateResponse
func (*ClientWithResponses) SignJwtWithBodyWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) SignJwtWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SignJwtResponse, error)
SignJwtWithBodyWithResponse request with arbitrary body returning *SignJwtResponse
func (*ClientWithResponses) SignJwtWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) SignJwtWithResponse(ctx context.Context, body SignJwtJSONRequestBody) (*SignJwtResponse, error)
func (*ClientWithResponses) SignTLSCertificateWithBodyWithResponse ¶ added in v0.16.0
func (c *ClientWithResponses) SignTLSCertificateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SignTLSCertificateResponse, error)
SignTLSCertificateWithBodyWithResponse request with arbitrary body returning *SignTLSCertificateResponse
func (*ClientWithResponses) SignWithBodyWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) SignWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SignResponse, error)
SignWithBodyWithResponse request with arbitrary body returning *SignResponse
func (*ClientWithResponses) SignWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) SignWithResponse(ctx context.Context, body SignJSONRequestBody) (*SignResponse, error)
func (*ClientWithResponses) VerifyWithBodyWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) VerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*VerifyResponse, error)
VerifyWithBodyWithResponse request with arbitrary body returning *VerifyResponse
func (*ClientWithResponses) VerifyWithResponse ¶ added in v0.15.0
func (c *ClientWithResponses) VerifyWithResponse(ctx context.Context, body VerifyJSONRequestBody) (*VerifyResponse, error)
type ClientWithResponsesInterface ¶ added in v0.16.0
type ClientWithResponsesInterface interface {
// SignTLSCertificate request with any body
SignTLSCertificateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SignTLSCertificateResponse, error)
// SelfSignVendorCACertificate request
SelfSignVendorCACertificateWithResponse(ctx context.Context, params *SelfSignVendorCACertificateParams) (*SelfSignVendorCACertificateResponse, error)
// GenerateVendorCACSR request
GenerateVendorCACSRWithResponse(ctx context.Context, params *GenerateVendorCACSRParams) (*GenerateVendorCACSRResponse, error)
// Decrypt request with any body
DecryptWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*DecryptResponse, error)
DecryptWithResponse(ctx context.Context, body DecryptJSONRequestBody) (*DecryptResponse, error)
// Encrypt request with any body
EncryptWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*EncryptResponse, error)
EncryptWithResponse(ctx context.Context, body EncryptJSONRequestBody) (*EncryptResponse, error)
// ExternalId request with any body
ExternalIdWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*ExternalIdResponse, error)
ExternalIdWithResponse(ctx context.Context, body ExternalIdJSONRequestBody) (*ExternalIdResponse, error)
// GenerateKeyPair request
GenerateKeyPairWithResponse(ctx context.Context, params *GenerateKeyPairParams) (*GenerateKeyPairResponse, error)
// PublicKey request
PublicKeyWithResponse(ctx context.Context, urn string) (*PublicKeyResponse, error)
// Sign request with any body
SignWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SignResponse, error)
SignWithResponse(ctx context.Context, body SignJSONRequestBody) (*SignResponse, error)
// SignJwt request with any body
SignJwtWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SignJwtResponse, error)
SignJwtWithResponse(ctx context.Context, body SignJwtJSONRequestBody) (*SignJwtResponse, error)
// Verify request with any body
VerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*VerifyResponse, error)
VerifyWithResponse(ctx context.Context, body VerifyJSONRequestBody) (*VerifyResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DecryptJSONBody ¶ added in v0.14.0
type DecryptJSONBody DecryptRequest
DecryptJSONBody defines parameters for Decrypt.
type DecryptJSONRequestBody ¶
type DecryptJSONRequestBody DecryptJSONBody
DecryptRequestBody defines body for Decrypt for application/json ContentType.
type DecryptRequest ¶
type DecryptRequest struct {
// Base64 encoded cipherText
CipherText string `json:"cipherText"`
// base64 encoded encrypted symmetric key
CipherTextKey string `json:"cipherTextKey"`
// Generic identifier used for representing BSN, agbcode, etc. It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN
LegalEntity Identifier `json:"legalEntity"`
// base64 encoded nonce
Nonce string `json:"nonce"`
}
DecryptRequest defines model for DecryptRequest.
type DecryptResponse ¶
func ParseDecryptResponse ¶ added in v0.15.0
func ParseDecryptResponse(rsp *http.Response) (*DecryptResponse, error)
ParseDecryptResponse parses an HTTP response from a DecryptWithResponse call
func (DecryptResponse) Status ¶ added in v0.16.0
func (r DecryptResponse) Status() string
Status returns HTTPResponse.Status
func (DecryptResponse) StatusCode ¶ added in v0.16.0
func (r DecryptResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EchoRouter ¶ added in v0.14.0
type EchoRouter interface {
CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type EncryptJSONBody ¶ added in v0.14.0
type EncryptJSONBody EncryptRequest
EncryptJSONBody defines parameters for Encrypt.
type EncryptJSONRequestBody ¶
type EncryptJSONRequestBody EncryptJSONBody
EncryptRequestBody defines body for Encrypt for application/json ContentType.
type EncryptRequest ¶
type EncryptRequest struct {
EncryptRequestSubjects []EncryptRequestSubject `json:"encryptRequestSubjects"`
// Base64 encoded binary data
PlainText string `json:"plainText"`
}
EncryptRequest defines model for EncryptRequest.
type EncryptRequestSubject ¶
type EncryptRequestSubject struct {
// as described by https://tools.ietf.org/html/rfc7517. Modelled as object so libraries can parse the tokens themselves.
Jwk *JWK `json:"jwk,omitempty"`
// Generic identifier used for representing BSN, agbcode, etc. It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN
LegalEntity Identifier `json:"legalEntity"`
// PEM encoded public key
PublicKey *PublicKey `json:"publicKey,omitempty"`
}
EncryptRequestSubject defines model for EncryptRequestSubject.
type EncryptResponse ¶
type EncryptResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EncryptedData
}
func ParseEncryptResponse ¶ added in v0.15.0
func ParseEncryptResponse(rsp *http.Response) (*EncryptResponse, error)
ParseEncryptResponse parses an HTTP response from a EncryptWithResponse call
func (EncryptResponse) Status ¶ added in v0.16.0
func (r EncryptResponse) Status() string
Status returns HTTPResponse.Status
func (EncryptResponse) StatusCode ¶ added in v0.16.0
func (r EncryptResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EncryptResponseEntry ¶
type EncryptResponseEntry struct {
// Base64 encoded encrypted key
CipherTextKey string `json:"cipherTextKey"`
// Generic identifier used for representing BSN, agbcode, etc. It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN
LegalEntity Identifier `json:"legalEntity"`
}
EncryptResponseEntry defines model for EncryptResponseEntry.
type EncryptedData ¶ added in v0.16.0
type EncryptedData struct {
// Base64 encoded encrypted text
CipherText string `json:"cipherText"`
EncryptResponseEntries []EncryptResponseEntry `json:"encryptResponseEntries"`
// Base64 encoded nonce
Nonce string `json:"nonce"`
}
EncryptedData defines model for EncryptedData.
type ExternalIdJSONBody ¶ added in v0.14.0
type ExternalIdJSONBody ExternalIdRequest
ExternalIdJSONBody defines parameters for ExternalId.
type ExternalIdJSONRequestBody ¶
type ExternalIdJSONRequestBody ExternalIdJSONBody
ExternalIdRequestBody defines body for ExternalId for application/json ContentType.
type ExternalIdRequest ¶
type ExternalIdRequest struct {
// Generic identifier used for representing BSN, agbcode, etc. It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN
Actor Identifier `json:"actor"`
// Generic identifier used for representing BSN, agbcode, etc. It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN
LegalEntity Identifier `json:"legalEntity"`
// Generic identifier used for representing BSN, agbcode, etc. It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN
Subject Identifier `json:"subject"`
}
ExternalIdRequest defines model for ExternalIdRequest.
type ExternalIdResponse ¶
type ExternalIdResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ExternalId
}
func ParseExternalIdResponse ¶ added in v0.15.0
func ParseExternalIdResponse(rsp *http.Response) (*ExternalIdResponse, error)
ParseExternalIdResponse parses an HTTP response from a ExternalIdWithResponse call
func (ExternalIdResponse) Status ¶ added in v0.16.0
func (r ExternalIdResponse) Status() string
Status returns HTTPResponse.Status
func (ExternalIdResponse) StatusCode ¶ added in v0.16.0
func (r ExternalIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GenerateKeyPairParams ¶
type GenerateKeyPairParams struct {
// URN identifying the legal entity
LegalEntity Identifier `json:"legalEntity"`
// Overwrite key if it already exists
Overwrite *bool `json:"overwrite,omitempty"`
}
GenerateKeyPairParams defines parameters for GenerateKeyPair.
type GenerateKeyPairResponse ¶ added in v0.16.0
func ParseGenerateKeyPairResponse ¶ added in v0.15.0
func ParseGenerateKeyPairResponse(rsp *http.Response) (*GenerateKeyPairResponse, error)
ParseGenerateKeyPairResponse parses an HTTP response from a GenerateKeyPairWithResponse call
func (GenerateKeyPairResponse) Status ¶ added in v0.16.0
func (r GenerateKeyPairResponse) Status() string
Status returns HTTPResponse.Status
func (GenerateKeyPairResponse) StatusCode ¶ added in v0.16.0
func (r GenerateKeyPairResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GenerateVendorCACSRParams ¶ added in v0.15.0
type GenerateVendorCACSRParams struct {
// Name of the vendor
Name string `json:"name"`
}
GenerateVendorCACSRParams defines parameters for GenerateVendorCACSR.
type GenerateVendorCACSRResponse ¶ added in v0.16.0
func ParseGenerateVendorCACSRResponse ¶ added in v0.15.0
func ParseGenerateVendorCACSRResponse(rsp *http.Response) (*GenerateVendorCACSRResponse, error)
ParseGenerateVendorCACSRResponse parses an HTTP response from a GenerateVendorCACSRWithResponse call
func (GenerateVendorCACSRResponse) Status ¶ added in v0.16.0
func (r GenerateVendorCACSRResponse) Status() string
Status returns HTTPResponse.Status
func (GenerateVendorCACSRResponse) StatusCode ¶ added in v0.16.0
func (r GenerateVendorCACSRResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpClient ¶ added in v0.15.0
HttpClient holds the server address and other basic settings for the http client
func (HttpClient) CalculateExternalId ¶ added in v0.15.0
func (hb HttpClient) CalculateExternalId(subject string, actor string, key types.KeyIdentifier) ([]byte, error)
func (HttpClient) DecryptKeyAndCipherText ¶ added in v0.15.0
func (hb HttpClient) DecryptKeyAndCipherText(cipherText types.DoubleEncryptedCipherText, key types.KeyIdentifier) ([]byte, error)
func (HttpClient) EncryptKeyAndPlainText ¶ added in v0.15.0
func (hb HttpClient) EncryptKeyAndPlainText(plainText []byte, keys []jwk.Key) (types.DoubleEncryptedCipherText, error)
func (HttpClient) GenerateKeyPair ¶ added in v0.15.0
func (hb HttpClient) GenerateKeyPair(key types.KeyIdentifier, overwrite bool) (crypto.PublicKey, error)
func (HttpClient) GenerateVendorCACSR ¶ added in v0.15.0
func (hb HttpClient) GenerateVendorCACSR(name string) ([]byte, error)
func (HttpClient) GetPrivateKey ¶ added in v0.15.0
func (hb HttpClient) GetPrivateKey(key types.KeyIdentifier) (crypto.Signer, error)
func (HttpClient) GetPublicKeyAsJWK ¶ added in v0.15.0
func (hb HttpClient) GetPublicKeyAsJWK(key types.KeyIdentifier) (jwk.Key, error)
func (HttpClient) GetPublicKeyAsPEM ¶ added in v0.15.0
func (hb HttpClient) GetPublicKeyAsPEM(key types.KeyIdentifier) (string, error)
func (HttpClient) GetSigningCertificate ¶ added in v0.15.0
func (hb HttpClient) GetSigningCertificate(entity types.LegalEntity) (*x509.Certificate, crypto.PrivateKey, error)
func (HttpClient) GetTLSCertificate ¶ added in v0.15.0
func (hb HttpClient) GetTLSCertificate(entity types.LegalEntity) (*x509.Certificate, crypto.PrivateKey, error)
func (HttpClient) PrivateKeyExists ¶ added in v0.15.0
func (hb HttpClient) PrivateKeyExists(key types.KeyIdentifier) bool
func (HttpClient) RenewSigningCertificate ¶ added in v0.15.0
func (hb HttpClient) RenewSigningCertificate(entity types.LegalEntity) (*x509.Certificate, crypto.PrivateKey, error)
func (HttpClient) RenewTLSCertificate ¶ added in v0.15.0
func (hb HttpClient) RenewTLSCertificate(entity types.LegalEntity) (*x509.Certificate, crypto.PrivateKey, error)
func (HttpClient) SelfSignVendorCACertificate ¶ added in v0.15.0
func (hb HttpClient) SelfSignVendorCACertificate(name string) (*x509.Certificate, error)
func (HttpClient) Sign ¶ added in v0.15.0
func (hb HttpClient) Sign(data []byte, key types.KeyIdentifier) ([]byte, error)
func (HttpClient) SignCertificate ¶ added in v0.15.0
func (hb HttpClient) SignCertificate(subjectKey types.KeyIdentifier, caKey types.KeyIdentifier, pkcs10 []byte, profile pkg.CertificateProfile) ([]byte, error)
func (HttpClient) SignJWS ¶ added in v0.15.0
func (hb HttpClient) SignJWS(payload []byte, key types.KeyIdentifier) ([]byte, error)
func (HttpClient) SignJWSEphemeral ¶ added in v0.15.0
func (hb HttpClient) SignJWSEphemeral(payload []byte, caKey types.KeyIdentifier, csr x509.CertificateRequest, signingTime time.Time) ([]byte, error)
func (HttpClient) SignJWT ¶ added in v0.15.0
func (hb HttpClient) SignJWT(claims map[string]interface{}, key types.KeyIdentifier) (string, error)
func (HttpClient) SignJWTRFC003 ¶ added in v0.16.0
func (hb HttpClient) SignJWTRFC003(claims map[string]interface{}) (string, error)
func (HttpClient) SignTLSCertificate ¶ added in v0.16.0
func (hb HttpClient) SignTLSCertificate(key crypto.PublicKey) (*x509.Certificate, error)
func (HttpClient) StoreVendorCACertificate ¶ added in v0.15.0
func (hb HttpClient) StoreVendorCACertificate(certificate *x509.Certificate) error
func (HttpClient) TrustStore ¶ added in v0.15.0
func (hb HttpClient) TrustStore() cert.TrustStore
func (HttpClient) VerifyWith ¶ added in v0.15.0
type HttpRequestDoer ¶ added in v0.15.0
Doer performs HTTP requests.
The standard http.Client implements this interface.
type PublicKeyResponse ¶ added in v0.16.0
func ParsePublicKeyResponse ¶ added in v0.15.0
func ParsePublicKeyResponse(rsp *http.Response) (*PublicKeyResponse, error)
ParsePublicKeyResponse parses an HTTP response from a PublicKeyWithResponse call
func (PublicKeyResponse) Status ¶ added in v0.16.0
func (r PublicKeyResponse) Status() string
Status returns HTTPResponse.Status
func (PublicKeyResponse) StatusCode ¶ added in v0.16.0
func (r PublicKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶ added in v0.15.0
RequestEditorFn is the function signature for the RequestEditor callback function
type SelfSignVendorCACertificateParams ¶ added in v0.15.0
type SelfSignVendorCACertificateParams struct {
// Name of the vendor
Name string `json:"name"`
}
SelfSignVendorCACertificateParams defines parameters for SelfSignVendorCACertificate.
type SelfSignVendorCACertificateResponse ¶ added in v0.16.0
func ParseSelfSignVendorCACertificateResponse ¶ added in v0.15.0
func ParseSelfSignVendorCACertificateResponse(rsp *http.Response) (*SelfSignVendorCACertificateResponse, error)
ParseSelfSignVendorCACertificateResponse parses an HTTP response from a SelfSignVendorCACertificateWithResponse call
func (SelfSignVendorCACertificateResponse) Status ¶ added in v0.16.0
func (r SelfSignVendorCACertificateResponse) Status() string
Status returns HTTPResponse.Status
func (SelfSignVendorCACertificateResponse) StatusCode ¶ added in v0.16.0
func (r SelfSignVendorCACertificateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ServerInterface ¶
type ServerInterface interface {
// Create a TLS client certificate given a public key
// (POST /crypto/certificate/tls)
SignTLSCertificate(ctx echo.Context) error
// Self-sign a vendor CA certificate.
// (POST /crypto/certificate/vendorca)
SelfSignVendorCACertificate(ctx echo.Context, params SelfSignVendorCACertificateParams) error
// Generate a CSR for requesting a vendor CA certificate.
// (POST /crypto/csr/vendorca)
GenerateVendorCACSR(ctx echo.Context, params GenerateVendorCACSRParams) error
// decrypt a cipherText for the given legalEntity
// (POST /crypto/decrypt)
Decrypt(ctx echo.Context) error
// encrypt a piece of data for a list of public keys/legalEntity's. A single symmetric keys will be used for all entries
// (POST /crypto/encrypt)
Encrypt(ctx echo.Context) error
// calculate an externalId for a (custodian, subject, actor) triple
// (POST /crypto/external_id)
ExternalId(ctx echo.Context) error
// Send a request for checking if the given combination has valid consent
// (POST /crypto/generate)
GenerateKeyPair(ctx echo.Context, params GenerateKeyPairParams) error
// get the public key for a given organization. It returns the key in PEM or JWK form. This depends on the accept header used (text/plain vs application/json)
// (GET /crypto/public_key/{urn})
PublicKey(ctx echo.Context, urn string) error
// sign a piece of data with the private key of the given legalEntity
// (POST /crypto/sign)
Sign(ctx echo.Context) error
// sign a JWT payload with the private key of the given legalEntity
// (POST /crypto/sign_jwt)
SignJwt(ctx echo.Context) error
// verify a signature given a public key, signature and the data
// (POST /crypto/verify)
Verify(ctx echo.Context) error
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) Decrypt ¶
func (w *ServerInterfaceWrapper) Decrypt(ctx echo.Context) error
Decrypt converts echo context to params.
func (*ServerInterfaceWrapper) Encrypt ¶
func (w *ServerInterfaceWrapper) Encrypt(ctx echo.Context) error
Encrypt converts echo context to params.
func (*ServerInterfaceWrapper) ExternalId ¶
func (w *ServerInterfaceWrapper) ExternalId(ctx echo.Context) error
ExternalId converts echo context to params.
func (*ServerInterfaceWrapper) GenerateKeyPair ¶
func (w *ServerInterfaceWrapper) GenerateKeyPair(ctx echo.Context) error
GenerateKeyPair converts echo context to params.
func (*ServerInterfaceWrapper) GenerateVendorCACSR ¶ added in v0.15.0
func (w *ServerInterfaceWrapper) GenerateVendorCACSR(ctx echo.Context) error
GenerateVendorCACSR converts echo context to params.
func (*ServerInterfaceWrapper) PublicKey ¶
func (w *ServerInterfaceWrapper) PublicKey(ctx echo.Context) error
PublicKey converts echo context to params.
func (*ServerInterfaceWrapper) SelfSignVendorCACertificate ¶ added in v0.15.0
func (w *ServerInterfaceWrapper) SelfSignVendorCACertificate(ctx echo.Context) error
SelfSignVendorCACertificate converts echo context to params.
func (*ServerInterfaceWrapper) Sign ¶
func (w *ServerInterfaceWrapper) Sign(ctx echo.Context) error
Sign converts echo context to params.
func (*ServerInterfaceWrapper) SignJwt ¶
func (w *ServerInterfaceWrapper) SignJwt(ctx echo.Context) error
SignJwt converts echo context to params.
func (*ServerInterfaceWrapper) SignTLSCertificate ¶ added in v0.16.0
func (w *ServerInterfaceWrapper) SignTLSCertificate(ctx echo.Context) error
SignTLSCertificate converts echo context to params.
type SignJSONBody ¶ added in v0.14.0
type SignJSONBody SignRequest
SignJSONBody defines parameters for Sign.
type SignJSONRequestBody ¶
type SignJSONRequestBody SignJSONBody
SignRequestBody defines body for Sign for application/json ContentType.
type SignJwtJSONBody ¶ added in v0.14.0
type SignJwtJSONBody SignJwtRequest
SignJwtJSONBody defines parameters for SignJwt.
type SignJwtJSONRequestBody ¶
type SignJwtJSONRequestBody SignJwtJSONBody
SignJwtRequestBody defines body for SignJwt for application/json ContentType.
type SignJwtRequest ¶
type SignJwtRequest struct {
Claims map[string]interface{} `json:"claims"`
// Generic identifier used for representing BSN, agbcode, etc. It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN
LegalEntity Identifier `json:"legalEntity"`
}
SignJwtRequest defines model for SignJwtRequest.
type SignJwtResponse ¶ added in v0.16.0
func ParseSignJwtResponse ¶ added in v0.15.0
func ParseSignJwtResponse(rsp *http.Response) (*SignJwtResponse, error)
ParseSignJwtResponse parses an HTTP response from a SignJwtWithResponse call
func (SignJwtResponse) Status ¶ added in v0.16.0
func (r SignJwtResponse) Status() string
Status returns HTTPResponse.Status
func (SignJwtResponse) StatusCode ¶ added in v0.16.0
func (r SignJwtResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SignRequest ¶
type SignRequest struct {
// Generic identifier used for representing BSN, agbcode, etc. It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN
LegalEntity Identifier `json:"legalEntity"`
// Base64 encoded data
PlainText string `json:"plainText"`
}
SignRequest defines model for SignRequest.
type SignResponse ¶
func ParseSignResponse ¶ added in v0.15.0
func ParseSignResponse(rsp *http.Response) (*SignResponse, error)
ParseSignResponse parses an HTTP response from a SignWithResponse call
func (SignResponse) Status ¶ added in v0.16.0
func (r SignResponse) Status() string
Status returns HTTPResponse.Status
func (SignResponse) StatusCode ¶ added in v0.16.0
func (r SignResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SignTLSCertificateResponse ¶ added in v0.16.0
func ParseSignTLSCertificateResponse ¶ added in v0.16.0
func ParseSignTLSCertificateResponse(rsp *http.Response) (*SignTLSCertificateResponse, error)
ParseSignTLSCertificateResponse parses an HTTP response from a SignTLSCertificateWithResponse call
func (SignTLSCertificateResponse) Status ¶ added in v0.16.0
func (r SignTLSCertificateResponse) Status() string
Status returns HTTPResponse.Status
func (SignTLSCertificateResponse) StatusCode ¶ added in v0.16.0
func (r SignTLSCertificateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Verification ¶ added in v0.16.0
type Verification struct {
// true or false
Outcome bool `json:"outcome"`
}
Verification defines model for Verification.
type VerifyJSONBody ¶ added in v0.14.0
type VerifyJSONBody VerifyRequest
VerifyJSONBody defines parameters for Verify.
type VerifyJSONRequestBody ¶
type VerifyJSONRequestBody VerifyJSONBody
VerifyRequestBody defines body for Verify for application/json ContentType.
type VerifyRequest ¶
type VerifyRequest struct {
// as described by https://tools.ietf.org/html/rfc7517. Modelled as object so libraries can parse the tokens themselves.
Jwk *JWK `json:"jwk,omitempty"`
// Base64 encoded binary data
PlainText string `json:"plainText"`
// PEM encoded public key
PublicKey *PublicKey `json:"publicKey,omitempty"`
// hex encoded signature
Signature string `json:"signature"`
}
VerifyRequest defines model for VerifyRequest.
type VerifyResponse ¶
type VerifyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Verification
}
func ParseVerifyResponse ¶ added in v0.15.0
func ParseVerifyResponse(rsp *http.Response) (*VerifyResponse, error)
ParseVerifyResponse parses an HTTP response from a VerifyWithResponse call
func (VerifyResponse) Status ¶ added in v0.16.0
func (r VerifyResponse) Status() string
Status returns HTTPResponse.Status
func (VerifyResponse) StatusCode ¶ added in v0.16.0
func (r VerifyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Wrapper ¶ added in v0.16.0
Wrapper implements the generated interface from oapi-codegen
func (*Wrapper) Decrypt ¶ added in v0.16.0
Decrypt is the API handler function for decrypting a piece of data.
func (*Wrapper) Encrypt ¶ added in v0.16.0
Encrypt is the implementation of the REST service call POST /crypto/encrypt
func (*Wrapper) ExternalId ¶ added in v0.16.0
ExternalId is the API handler function for generating a unique external identifier for a given identifier and legalEntity.
func (*Wrapper) GenerateKeyPair ¶ added in v0.16.0
func (w *Wrapper) GenerateKeyPair(ctx echo.Context, params GenerateKeyPairParams) error
GenerateKeyPair is the implementation of the REST service call POST /crypto/generate It returns the public key for the given legal entity in either PEM or JWK format depending on the accept-header. Default is PEM (backwards compatibility)
func (*Wrapper) GenerateVendorCACSR ¶ added in v0.16.0
func (w *Wrapper) GenerateVendorCACSR(ctx echo.Context, params GenerateVendorCACSRParams) error
func (*Wrapper) PublicKey ¶ added in v0.16.0
PublicKey returns a public key for the given urn. The urn represents a legal entity. The api returns the public key either in PEM or JWK format. It uses the accept header to determine this. Default is PEM (text/plain), only when application/json is requested will it return JWK.
func (*Wrapper) SelfSignVendorCACertificate ¶ added in v0.16.0
func (w *Wrapper) SelfSignVendorCACertificate(ctx echo.Context, params SelfSignVendorCACertificateParams) error
func (*Wrapper) SignTLSCertificate ¶ added in v0.16.0
SignTLSCertificate creates a TLS client certificate based on a PEM encoded public key. It uses the Vendor CA to sign.