v1

package
v5.4.40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2026 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	JwtBearerAuthScopes = "jwtBearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewDecryptJweRequest

func NewDecryptJweRequest(server string, body DecryptJweJSONRequestBody) (*http.Request, error)

NewDecryptJweRequest calls the generic DecryptJwe builder with application/json body

func NewDecryptJweRequestWithBody

func NewDecryptJweRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewDecryptJweRequestWithBody generates requests for DecryptJwe with any type of body

func NewEncryptJweRequest

func NewEncryptJweRequest(server string, body EncryptJweJSONRequestBody) (*http.Request, error)

NewEncryptJweRequest calls the generic EncryptJwe builder with application/json body

func NewEncryptJweRequestWithBody

func NewEncryptJweRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewEncryptJweRequestWithBody generates requests for EncryptJwe with any type of body

func NewSignJwsRequest

func NewSignJwsRequest(server string, body SignJwsJSONRequestBody) (*http.Request, error)

NewSignJwsRequest calls the generic SignJws builder with application/json body

func NewSignJwsRequestWithBody

func NewSignJwsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSignJwsRequestWithBody generates requests for SignJws with any type of body

func NewSignJwtRequest

func NewSignJwtRequest(server string, body SignJwtJSONRequestBody) (*http.Request, error)

NewSignJwtRequest calls the generic SignJwt builder with application/json body

func NewSignJwtRequestWithBody

func NewSignJwtRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSignJwtRequestWithBody generates requests for SignJwt with any type of body

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

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

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) DecryptJwe

func (c *Client) DecryptJwe(ctx context.Context, body DecryptJweJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DecryptJweWithBody

func (c *Client) DecryptJweWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EncryptJwe

func (c *Client) EncryptJwe(ctx context.Context, body EncryptJweJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EncryptJweWithBody

func (c *Client) EncryptJweWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SignJws

func (c *Client) SignJws(ctx context.Context, body SignJwsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SignJwsWithBody

func (c *Client) SignJwsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SignJwt

func (c *Client) SignJwt(ctx context.Context, body SignJwtJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SignJwtWithBody

func (c *Client) SignJwtWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// DecryptJweWithBody request with any body
	DecryptJweWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DecryptJwe(ctx context.Context, body DecryptJweJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// EncryptJweWithBody request with any body
	EncryptJweWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	EncryptJwe(ctx context.Context, body EncryptJweJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SignJwsWithBody request with any body
	SignJwsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SignJws(ctx context.Context, body SignJwsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SignJwtWithBody request with any body
	SignJwtWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SignJwt(ctx context.Context, body SignJwtJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) DecryptJweWithBodyWithResponse

func (c *ClientWithResponses) DecryptJweWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DecryptJweResponse, error)

DecryptJweWithBodyWithResponse request with arbitrary body returning *DecryptJweResponse

func (*ClientWithResponses) DecryptJweWithResponse

func (c *ClientWithResponses) DecryptJweWithResponse(ctx context.Context, body DecryptJweJSONRequestBody, reqEditors ...RequestEditorFn) (*DecryptJweResponse, error)

func (*ClientWithResponses) EncryptJweWithBodyWithResponse

func (c *ClientWithResponses) EncryptJweWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EncryptJweResponse, error)

EncryptJweWithBodyWithResponse request with arbitrary body returning *EncryptJweResponse

func (*ClientWithResponses) EncryptJweWithResponse

func (c *ClientWithResponses) EncryptJweWithResponse(ctx context.Context, body EncryptJweJSONRequestBody, reqEditors ...RequestEditorFn) (*EncryptJweResponse, error)

func (*ClientWithResponses) SignJwsWithBodyWithResponse

func (c *ClientWithResponses) SignJwsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignJwsResponse, error)

SignJwsWithBodyWithResponse request with arbitrary body returning *SignJwsResponse

func (*ClientWithResponses) SignJwsWithResponse

func (c *ClientWithResponses) SignJwsWithResponse(ctx context.Context, body SignJwsJSONRequestBody, reqEditors ...RequestEditorFn) (*SignJwsResponse, error)

func (*ClientWithResponses) SignJwtWithBodyWithResponse

func (c *ClientWithResponses) SignJwtWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignJwtResponse, error)

SignJwtWithBodyWithResponse request with arbitrary body returning *SignJwtResponse

func (*ClientWithResponses) SignJwtWithResponse

func (c *ClientWithResponses) SignJwtWithResponse(ctx context.Context, body SignJwtJSONRequestBody, reqEditors ...RequestEditorFn) (*SignJwtResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// DecryptJweWithBodyWithResponse request with any body
	DecryptJweWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DecryptJweResponse, error)

	DecryptJweWithResponse(ctx context.Context, body DecryptJweJSONRequestBody, reqEditors ...RequestEditorFn) (*DecryptJweResponse, error)

	// EncryptJweWithBodyWithResponse request with any body
	EncryptJweWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EncryptJweResponse, error)

	EncryptJweWithResponse(ctx context.Context, body EncryptJweJSONRequestBody, reqEditors ...RequestEditorFn) (*EncryptJweResponse, error)

	// SignJwsWithBodyWithResponse request with any body
	SignJwsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignJwsResponse, error)

	SignJwsWithResponse(ctx context.Context, body SignJwsJSONRequestBody, reqEditors ...RequestEditorFn) (*SignJwsResponse, error)

	// SignJwtWithBodyWithResponse request with any body
	SignJwtWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignJwtResponse, error)

	SignJwtWithResponse(ctx context.Context, body SignJwtJSONRequestBody, reqEditors ...RequestEditorFn) (*SignJwtResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type DecryptJwe200JSONResponse

type DecryptJwe200JSONResponse struct {
	// Body The decrypted body as Base64 encoded string.
	Body []byte `json:"body"`

	// Headers The message headers.
	Headers map[string]interface{} `json:"headers"`
}

func (DecryptJwe200JSONResponse) VisitDecryptJweResponse

func (response DecryptJwe200JSONResponse) VisitDecryptJweResponse(w http.ResponseWriter) error

type DecryptJweJSONRequestBody

type DecryptJweJSONRequestBody = DecryptJweRequest

DecryptJweJSONRequestBody defines body for DecryptJwe for application/json ContentType.

type DecryptJweRequest

type DecryptJweRequest struct {
	// Message The message to be decrypted as string in format aa==.bb==.cc==.dd==.ee==
	Message string `json:"message"`
}

DecryptJweRequest defines model for DecryptJweRequest.

type DecryptJweRequestObject

type DecryptJweRequestObject struct {
	Body *DecryptJweJSONRequestBody
}

type DecryptJweResponse

type DecryptJweResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Body The decrypted body as Base64 encoded string.
		Body []byte `json:"body"`

		// Headers The message headers.
		Headers map[string]interface{} `json:"headers"`
	}
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseDecryptJweResponse

func ParseDecryptJweResponse(rsp *http.Response) (*DecryptJweResponse, error)

ParseDecryptJweResponse parses an HTTP response from a DecryptJweWithResponse call

func (DecryptJweResponse) Status

func (r DecryptJweResponse) Status() string

Status returns HTTPResponse.Status

func (DecryptJweResponse) StatusCode

func (r DecryptJweResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DecryptJweResponseObject

type DecryptJweResponseObject interface {
	VisitDecryptJweResponse(w http.ResponseWriter) error
}

type DecryptJwedefaultApplicationProblemPlusJSONResponse added in v5.4.40

type DecryptJwedefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (DecryptJwedefaultApplicationProblemPlusJSONResponse) VisitDecryptJweResponse added in v5.4.40

type EchoRouter

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 EncryptJwe200TextResponse

type EncryptJwe200TextResponse string

func (EncryptJwe200TextResponse) VisitEncryptJweResponse

func (response EncryptJwe200TextResponse) VisitEncryptJweResponse(w http.ResponseWriter) error

type EncryptJweJSONRequestBody

type EncryptJweJSONRequestBody = EncryptJweRequest

EncryptJweJSONRequestBody defines body for EncryptJwe for application/json ContentType.

type EncryptJweRequest

type EncryptJweRequest struct {
	// Headers The map of protected headers.
	// Note: The value of the kid header will be ignored and overwritten by the used receiver KID.
	Headers map[string]interface{} `json:"headers"`

	// Payload The payload to be signed as bytes. The bytes must be encoded with Base64 encoding.
	Payload []byte `json:"payload"`

	// Receiver The DID reference of the message receiver OR the KID of the message receiver.
	Receiver string `json:"receiver"`
}

EncryptJweRequest defines model for EncryptJweRequest.

type EncryptJweRequestObject

type EncryptJweRequestObject struct {
	Body *EncryptJweJSONRequestBody
}

type EncryptJweResponse

type EncryptJweResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseEncryptJweResponse

func ParseEncryptJweResponse(rsp *http.Response) (*EncryptJweResponse, error)

ParseEncryptJweResponse parses an HTTP response from a EncryptJweWithResponse call

func (EncryptJweResponse) Status

func (r EncryptJweResponse) Status() string

Status returns HTTPResponse.Status

func (EncryptJweResponse) StatusCode

func (r EncryptJweResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EncryptJweResponseObject

type EncryptJweResponseObject interface {
	VisitEncryptJweResponse(w http.ResponseWriter) error
}

type EncryptJwedefaultApplicationProblemPlusJSONResponse added in v5.4.40

type EncryptJwedefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (EncryptJwedefaultApplicationProblemPlusJSONResponse) VisitEncryptJweResponse added in v5.4.40

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ServerInterface

type ServerInterface interface {
	// Decrypt a payload with the private key related to the KeyID in the header
	// (POST /internal/crypto/v1/decrypt_jwe)
	DecryptJwe(ctx echo.Context) error
	// Encrypt a payload and headers with the public key of the given DID into a JWE object
	// (POST /internal/crypto/v1/encrypt_jwe)
	EncryptJwe(ctx echo.Context) error
	// sign a payload and headers with the private key of the given kid into a JWS object
	// (POST /internal/crypto/v1/sign_jws)
	SignJws(ctx echo.Context) error
	// sign a JWT payload with the private key of the given kid
	// (POST /internal/crypto/v1/sign_jwt)
	SignJwt(ctx echo.Context) error
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) DecryptJwe

func (w *ServerInterfaceWrapper) DecryptJwe(ctx echo.Context) error

DecryptJwe converts echo context to params.

func (*ServerInterfaceWrapper) EncryptJwe

func (w *ServerInterfaceWrapper) EncryptJwe(ctx echo.Context) error

EncryptJwe converts echo context to params.

func (*ServerInterfaceWrapper) SignJws

func (w *ServerInterfaceWrapper) SignJws(ctx echo.Context) error

SignJws converts echo context to params.

func (*ServerInterfaceWrapper) SignJwt

func (w *ServerInterfaceWrapper) SignJwt(ctx echo.Context) error

SignJwt converts echo context to params.

type SignJws200TextResponse

type SignJws200TextResponse string

func (SignJws200TextResponse) VisitSignJwsResponse

func (response SignJws200TextResponse) VisitSignJwsResponse(w http.ResponseWriter) error

type SignJwsJSONRequestBody

type SignJwsJSONRequestBody = SignJwsRequest

SignJwsJSONRequestBody defines body for SignJws for application/json ContentType.

type SignJwsRequest

type SignJwsRequest struct {
	// Detached In detached mode the payload is signed but NOT included in the returned JWS object. Instead, the space between the first and second dot is empty, like this: "<header>..<signature>" Defaults to false.
	Detached *bool `json:"detached,omitempty"`

	// Headers The map of protected headers
	Headers map[string]interface{} `json:"headers"`

	// Kid Reference to the key ID used for signing the JWS.
	Kid string `json:"kid"`

	// Payload The payload to be signed as bytes. The bytes must be encoded with Base64 encoding.
	Payload []byte `json:"payload"`
}

SignJwsRequest defines model for SignJwsRequest.

type SignJwsRequestObject

type SignJwsRequestObject struct {
	Body *SignJwsJSONRequestBody
}

type SignJwsResponse

type SignJwsResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseSignJwsResponse

func ParseSignJwsResponse(rsp *http.Response) (*SignJwsResponse, error)

ParseSignJwsResponse parses an HTTP response from a SignJwsWithResponse call

func (SignJwsResponse) Status

func (r SignJwsResponse) Status() string

Status returns HTTPResponse.Status

func (SignJwsResponse) StatusCode

func (r SignJwsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SignJwsResponseObject

type SignJwsResponseObject interface {
	VisitSignJwsResponse(w http.ResponseWriter) error
}

type SignJwsdefaultApplicationProblemPlusJSONResponse added in v5.4.40

type SignJwsdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (SignJwsdefaultApplicationProblemPlusJSONResponse) VisitSignJwsResponse added in v5.4.40

type SignJwt200TextResponse

type SignJwt200TextResponse string

func (SignJwt200TextResponse) VisitSignJwtResponse

func (response SignJwt200TextResponse) VisitSignJwtResponse(w http.ResponseWriter) error

type SignJwtJSONRequestBody

type SignJwtJSONRequestBody = SignJwtRequest

SignJwtJSONRequestBody defines body for SignJwt for application/json ContentType.

type SignJwtRequest

type SignJwtRequest struct {
	Claims map[string]interface{} `json:"claims"`
	Kid    string                 `json:"kid"`
}

SignJwtRequest defines model for SignJwtRequest.

type SignJwtRequestObject

type SignJwtRequestObject struct {
	Body *SignJwtJSONRequestBody
}

type SignJwtResponse

type SignJwtResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseSignJwtResponse

func ParseSignJwtResponse(rsp *http.Response) (*SignJwtResponse, error)

ParseSignJwtResponse parses an HTTP response from a SignJwtWithResponse call

func (SignJwtResponse) Status

func (r SignJwtResponse) Status() string

Status returns HTTPResponse.Status

func (SignJwtResponse) StatusCode

func (r SignJwtResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SignJwtResponseObject

type SignJwtResponseObject interface {
	VisitSignJwtResponse(w http.ResponseWriter) error
}

type SignJwtdefaultApplicationProblemPlusJSONResponse added in v5.4.40

type SignJwtdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (SignJwtdefaultApplicationProblemPlusJSONResponse) VisitSignJwtResponse added in v5.4.40

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Decrypt a payload with the private key related to the KeyID in the header
	// (POST /internal/crypto/v1/decrypt_jwe)
	DecryptJwe(ctx context.Context, request DecryptJweRequestObject) (DecryptJweResponseObject, error)
	// Encrypt a payload and headers with the public key of the given DID into a JWE object
	// (POST /internal/crypto/v1/encrypt_jwe)
	EncryptJwe(ctx context.Context, request EncryptJweRequestObject) (EncryptJweResponseObject, error)
	// sign a payload and headers with the private key of the given kid into a JWS object
	// (POST /internal/crypto/v1/sign_jws)
	SignJws(ctx context.Context, request SignJwsRequestObject) (SignJwsResponseObject, error)
	// sign a JWT payload with the private key of the given kid
	// (POST /internal/crypto/v1/sign_jwt)
	SignJwt(ctx context.Context, request SignJwtRequestObject) (SignJwtResponseObject, error)
}

StrictServerInterface represents all server handlers.

type Wrapper

type Wrapper struct {
	C crypto.KeyStore
	K types.KeyResolver
}

Wrapper implements the generated interface from oapi-codegen

func (*Wrapper) DecryptJwe

DecryptJwe handles api calls for decrypting JWE messages

func (*Wrapper) EncryptJwe

EncryptJwe handles api calls for encrypting JWE messages

func (*Wrapper) ResolveStatusCode

func (w *Wrapper) ResolveStatusCode(err error) int

ResolveStatusCode maps errors returned by this API to specific HTTP status codes.

func (*Wrapper) Routes

func (w *Wrapper) Routes(router core.EchoRouter)

func (*Wrapper) SignJws

SignJws handles api calls for signing a JWS

func (*Wrapper) SignJwt

func (w *Wrapper) SignJwt(ctx context.Context, signRequest SignJwtRequestObject) (SignJwtResponseObject, error)

SignJwt handles api calls for signing a Jwt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL