v2

package
v6.2.13 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: 31 Imported by: 0

Documentation

Overview

Package v2 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 NewCreateVPRequest

func NewCreateVPRequest(server string, body CreateVPJSONRequestBody) (*http.Request, error)

NewCreateVPRequest calls the generic CreateVP builder with application/json body

func NewCreateVPRequestWithBody

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

NewCreateVPRequestWithBody generates requests for CreateVP with any type of body

func NewGetCredentialsInWalletRequest

func NewGetCredentialsInWalletRequest(server string, subjectID string) (*http.Request, error)

NewGetCredentialsInWalletRequest generates requests for GetCredentialsInWallet

func NewIssueVCRequest

func NewIssueVCRequest(server string, body IssueVCJSONRequestBody) (*http.Request, error)

NewIssueVCRequest calls the generic IssueVC builder with application/json body

func NewIssueVCRequestWithBody

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

NewIssueVCRequestWithBody generates requests for IssueVC with any type of body

func NewListTrustedRequest

func NewListTrustedRequest(server string, credentialType string) (*http.Request, error)

NewListTrustedRequest generates requests for ListTrusted

func NewListUntrustedRequest

func NewListUntrustedRequest(server string, credentialType string) (*http.Request, error)

NewListUntrustedRequest generates requests for ListUntrusted

func NewLoadVCRequest

func NewLoadVCRequest(server string, subjectID string, body LoadVCJSONRequestBody) (*http.Request, error)

NewLoadVCRequest calls the generic LoadVC builder with application/json body

func NewLoadVCRequestWithBody

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

NewLoadVCRequestWithBody generates requests for LoadVC with any type of body

func NewRemoveCredentialFromWalletRequest

func NewRemoveCredentialFromWalletRequest(server string, subjectID string, id string) (*http.Request, error)

NewRemoveCredentialFromWalletRequest generates requests for RemoveCredentialFromWallet

func NewResolveVCRequest

func NewResolveVCRequest(server string, id string) (*http.Request, error)

NewResolveVCRequest generates requests for ResolveVC

func NewRevokeVCRequest

func NewRevokeVCRequest(server string, id string) (*http.Request, error)

NewRevokeVCRequest generates requests for RevokeVC

func NewSearchCredentialsInWalletRequest

func NewSearchCredentialsInWalletRequest(server string, subjectID string) (*http.Request, error)

NewSearchCredentialsInWalletRequest generates requests for SearchCredentialsInWallet

func NewSearchIssuedVCsRequest

func NewSearchIssuedVCsRequest(server string, params *SearchIssuedVCsParams) (*http.Request, error)

NewSearchIssuedVCsRequest generates requests for SearchIssuedVCs

func NewSearchVCsRequest

func NewSearchVCsRequest(server string, body SearchVCsJSONRequestBody) (*http.Request, error)

NewSearchVCsRequest calls the generic SearchVCs builder with application/json body

func NewSearchVCsRequestWithBody

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

NewSearchVCsRequestWithBody generates requests for SearchVCs with any type of body

func NewTrustIssuerRequest

func NewTrustIssuerRequest(server string, body TrustIssuerJSONRequestBody) (*http.Request, error)

NewTrustIssuerRequest calls the generic TrustIssuer builder with application/json body

func NewTrustIssuerRequestWithBody

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

NewTrustIssuerRequestWithBody generates requests for TrustIssuer with any type of body

func NewUntrustIssuerRequest

func NewUntrustIssuerRequest(server string, body UntrustIssuerJSONRequestBody) (*http.Request, error)

NewUntrustIssuerRequest calls the generic UntrustIssuer builder with application/json body

func NewUntrustIssuerRequestWithBody

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

NewUntrustIssuerRequestWithBody generates requests for UntrustIssuer with any type of body

func NewVerifyVCRequest

func NewVerifyVCRequest(server string, body VerifyVCJSONRequestBody) (*http.Request, error)

NewVerifyVCRequest calls the generic VerifyVC builder with application/json body

func NewVerifyVCRequestWithBody

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

NewVerifyVCRequestWithBody generates requests for VerifyVC with any type of body

func NewVerifyVPRequest

func NewVerifyVPRequest(server string, body VerifyVPJSONRequestBody) (*http.Request, error)

NewVerifyVPRequest calls the generic VerifyVP builder with application/json body

func NewVerifyVPRequestWithBody

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

NewVerifyVPRequestWithBody generates requests for VerifyVP 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) CreateVP

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

func (*Client) CreateVPWithBody

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

func (*Client) GetCredentialsInWallet

func (c *Client) GetCredentialsInWallet(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) IssueVC

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

func (*Client) IssueVCWithBody

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

func (*Client) ListTrusted

func (c *Client) ListTrusted(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListUntrusted

func (c *Client) ListUntrusted(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) LoadVC

func (c *Client) LoadVC(ctx context.Context, subjectID string, body LoadVCJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) LoadVCWithBody

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

func (*Client) RemoveCredentialFromWallet

func (c *Client) RemoveCredentialFromWallet(ctx context.Context, subjectID string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ResolveVC

func (c *Client) ResolveVC(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RevokeVC

func (c *Client) RevokeVC(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchCredentialsInWallet

func (c *Client) SearchCredentialsInWallet(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchIssuedVCs

func (c *Client) SearchIssuedVCs(ctx context.Context, params *SearchIssuedVCsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchVCs

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

func (*Client) SearchVCsWithBody

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

func (*Client) TrustIssuer

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

func (*Client) TrustIssuerWithBody

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

func (*Client) UntrustIssuer

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

func (*Client) UntrustIssuerWithBody

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

func (*Client) VerifyVC

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

func (*Client) VerifyVCWithBody

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

func (*Client) VerifyVP

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

func (*Client) VerifyVPWithBody

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

type ClientInterface

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

	CreateVP(ctx context.Context, body CreateVPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCredentialsInWallet request
	GetCredentialsInWallet(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	LoadVC(ctx context.Context, subjectID string, body LoadVCJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SearchCredentialsInWallet request
	SearchCredentialsInWallet(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RemoveCredentialFromWallet request
	RemoveCredentialFromWallet(ctx context.Context, subjectID string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	IssueVC(ctx context.Context, body IssueVCJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SearchIssuedVCs request
	SearchIssuedVCs(ctx context.Context, params *SearchIssuedVCsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RevokeVC request
	RevokeVC(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SearchVCs(ctx context.Context, body SearchVCsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ResolveVC request
	ResolveVC(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	UntrustIssuer(ctx context.Context, body UntrustIssuerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	TrustIssuer(ctx context.Context, body TrustIssuerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	VerifyVC(ctx context.Context, body VerifyVCJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	VerifyVP(ctx context.Context, body VerifyVPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListTrusted request
	ListTrusted(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListUntrusted request
	ListUntrusted(ctx context.Context, credentialType string, 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) CreateVPWithBodyWithResponse

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

CreateVPWithBodyWithResponse request with arbitrary body returning *CreateVPResponse

func (*ClientWithResponses) CreateVPWithResponse

func (c *ClientWithResponses) CreateVPWithResponse(ctx context.Context, body CreateVPJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVPResponse, error)

func (*ClientWithResponses) GetCredentialsInWalletWithResponse

func (c *ClientWithResponses) GetCredentialsInWalletWithResponse(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*GetCredentialsInWalletResponse, error)

GetCredentialsInWalletWithResponse request returning *GetCredentialsInWalletResponse

func (*ClientWithResponses) IssueVCWithBodyWithResponse

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

IssueVCWithBodyWithResponse request with arbitrary body returning *IssueVCResponse

func (*ClientWithResponses) IssueVCWithResponse

func (c *ClientWithResponses) IssueVCWithResponse(ctx context.Context, body IssueVCJSONRequestBody, reqEditors ...RequestEditorFn) (*IssueVCResponse, error)

func (*ClientWithResponses) ListTrustedWithResponse

func (c *ClientWithResponses) ListTrustedWithResponse(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*ListTrustedResponse, error)

ListTrustedWithResponse request returning *ListTrustedResponse

func (*ClientWithResponses) ListUntrustedWithResponse

func (c *ClientWithResponses) ListUntrustedWithResponse(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*ListUntrustedResponse, error)

ListUntrustedWithResponse request returning *ListUntrustedResponse

func (*ClientWithResponses) LoadVCWithBodyWithResponse

func (c *ClientWithResponses) LoadVCWithBodyWithResponse(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoadVCResponse, error)

LoadVCWithBodyWithResponse request with arbitrary body returning *LoadVCResponse

func (*ClientWithResponses) LoadVCWithResponse

func (c *ClientWithResponses) LoadVCWithResponse(ctx context.Context, subjectID string, body LoadVCJSONRequestBody, reqEditors ...RequestEditorFn) (*LoadVCResponse, error)

func (*ClientWithResponses) RemoveCredentialFromWalletWithResponse

func (c *ClientWithResponses) RemoveCredentialFromWalletWithResponse(ctx context.Context, subjectID string, id string, reqEditors ...RequestEditorFn) (*RemoveCredentialFromWalletResponse, error)

RemoveCredentialFromWalletWithResponse request returning *RemoveCredentialFromWalletResponse

func (*ClientWithResponses) ResolveVCWithResponse

func (c *ClientWithResponses) ResolveVCWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ResolveVCResponse, error)

ResolveVCWithResponse request returning *ResolveVCResponse

func (*ClientWithResponses) RevokeVCWithResponse

func (c *ClientWithResponses) RevokeVCWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*RevokeVCResponse, error)

RevokeVCWithResponse request returning *RevokeVCResponse

func (*ClientWithResponses) SearchCredentialsInWalletWithResponse

func (c *ClientWithResponses) SearchCredentialsInWalletWithResponse(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*SearchCredentialsInWalletResponse, error)

SearchCredentialsInWalletWithResponse request returning *SearchCredentialsInWalletResponse

func (*ClientWithResponses) SearchIssuedVCsWithResponse

func (c *ClientWithResponses) SearchIssuedVCsWithResponse(ctx context.Context, params *SearchIssuedVCsParams, reqEditors ...RequestEditorFn) (*SearchIssuedVCsResponse, error)

SearchIssuedVCsWithResponse request returning *SearchIssuedVCsResponse

func (*ClientWithResponses) SearchVCsWithBodyWithResponse

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

SearchVCsWithBodyWithResponse request with arbitrary body returning *SearchVCsResponse

func (*ClientWithResponses) SearchVCsWithResponse

func (c *ClientWithResponses) SearchVCsWithResponse(ctx context.Context, body SearchVCsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchVCsResponse, error)

func (*ClientWithResponses) TrustIssuerWithBodyWithResponse

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

TrustIssuerWithBodyWithResponse request with arbitrary body returning *TrustIssuerResponse

func (*ClientWithResponses) TrustIssuerWithResponse

func (c *ClientWithResponses) TrustIssuerWithResponse(ctx context.Context, body TrustIssuerJSONRequestBody, reqEditors ...RequestEditorFn) (*TrustIssuerResponse, error)

func (*ClientWithResponses) UntrustIssuerWithBodyWithResponse

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

UntrustIssuerWithBodyWithResponse request with arbitrary body returning *UntrustIssuerResponse

func (*ClientWithResponses) UntrustIssuerWithResponse

func (c *ClientWithResponses) UntrustIssuerWithResponse(ctx context.Context, body UntrustIssuerJSONRequestBody, reqEditors ...RequestEditorFn) (*UntrustIssuerResponse, error)

func (*ClientWithResponses) VerifyVCWithBodyWithResponse

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

VerifyVCWithBodyWithResponse request with arbitrary body returning *VerifyVCResponse

func (*ClientWithResponses) VerifyVCWithResponse

func (c *ClientWithResponses) VerifyVCWithResponse(ctx context.Context, body VerifyVCJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyVCResponse, error)

func (*ClientWithResponses) VerifyVPWithBodyWithResponse

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

VerifyVPWithBodyWithResponse request with arbitrary body returning *VerifyVPResponse

func (*ClientWithResponses) VerifyVPWithResponse

func (c *ClientWithResponses) VerifyVPWithResponse(ctx context.Context, body VerifyVPJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyVPResponse, error)

type ClientWithResponsesInterface

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

	CreateVPWithResponse(ctx context.Context, body CreateVPJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVPResponse, error)

	// GetCredentialsInWalletWithResponse request
	GetCredentialsInWalletWithResponse(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*GetCredentialsInWalletResponse, error)

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

	LoadVCWithResponse(ctx context.Context, subjectID string, body LoadVCJSONRequestBody, reqEditors ...RequestEditorFn) (*LoadVCResponse, error)

	// SearchCredentialsInWalletWithResponse request
	SearchCredentialsInWalletWithResponse(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*SearchCredentialsInWalletResponse, error)

	// RemoveCredentialFromWalletWithResponse request
	RemoveCredentialFromWalletWithResponse(ctx context.Context, subjectID string, id string, reqEditors ...RequestEditorFn) (*RemoveCredentialFromWalletResponse, error)

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

	IssueVCWithResponse(ctx context.Context, body IssueVCJSONRequestBody, reqEditors ...RequestEditorFn) (*IssueVCResponse, error)

	// SearchIssuedVCsWithResponse request
	SearchIssuedVCsWithResponse(ctx context.Context, params *SearchIssuedVCsParams, reqEditors ...RequestEditorFn) (*SearchIssuedVCsResponse, error)

	// RevokeVCWithResponse request
	RevokeVCWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*RevokeVCResponse, error)

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

	SearchVCsWithResponse(ctx context.Context, body SearchVCsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchVCsResponse, error)

	// ResolveVCWithResponse request
	ResolveVCWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ResolveVCResponse, error)

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

	UntrustIssuerWithResponse(ctx context.Context, body UntrustIssuerJSONRequestBody, reqEditors ...RequestEditorFn) (*UntrustIssuerResponse, error)

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

	TrustIssuerWithResponse(ctx context.Context, body TrustIssuerJSONRequestBody, reqEditors ...RequestEditorFn) (*TrustIssuerResponse, error)

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

	VerifyVCWithResponse(ctx context.Context, body VerifyVCJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyVCResponse, error)

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

	VerifyVPWithResponse(ctx context.Context, body VerifyVPJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyVPResponse, error)

	// ListTrustedWithResponse request
	ListTrustedWithResponse(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*ListTrustedResponse, error)

	// ListUntrustedWithResponse request
	ListUntrustedWithResponse(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*ListUntrustedResponse, error)
}

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

type CreateVP200JSONResponse

type CreateVP200JSONResponse VerifiablePresentation

func (CreateVP200JSONResponse) MarshalJSON

func (r CreateVP200JSONResponse) MarshalJSON() ([]byte, error)

MarshalJSON forwards the call to the underlying VerifiableCredential to make sure the expected JSON-LD is returned.

func (CreateVP200JSONResponse) VisitCreateVPResponse

func (response CreateVP200JSONResponse) VisitCreateVPResponse(w http.ResponseWriter) error

type CreateVPJSONRequestBody

type CreateVPJSONRequestBody = CreateVPRequest

CreateVPJSONRequestBody defines body for CreateVP for application/json ContentType.

type CreateVPRequest

type CreateVPRequest struct {
	// Context Array of JSON-LD contexts, contain definitions of the given types.
	Context *[]string `json:"@context,omitempty"`

	// Challenge A random or pseudo-random value used by some authentication protocols to mitigate replay attacks.
	Challenge *string `json:"challenge,omitempty"`

	// Domain A string value that specifies the operational domain of a digital proof. This could be an Internet domain
	// name like example.com, an ad-hoc value such as mycorp-level3-access, or a very specific transaction value
	// like 8zF6T$mqP. A signer could include a domain in its digital proof to restrict its use to particular
	// target, identified by the specified domain.
	Domain *string `json:"domain,omitempty"`

	// Expires Date and time at which proof will expire. If omitted, the proof does not have an end date.
	Expires *string `json:"expires,omitempty"`

	// Format Proof format for the presentation (JSON-LD or JWT). If not set, it defaults to JSON-LD.
	Format *CreateVPRequestFormat `json:"format,omitempty"`

	// ProofPurpose The specific intent for the proof, the reason why an entity created it. Acts as a safeguard to prevent the
	// proof from being misused for a purpose other than the one it was intended for.
	ProofPurpose *CreateVPRequestProofPurpose `json:"proofPurpose,omitempty"`

	// SignerDID Specifies the DID of the signing party that must be used to create the digital signature.
	// If not specified, it is derived from the given Verifiable Credentials' subjectCredential ID.
	// It can only be derived if all given Verifiable Credentials have the same, single subjectCredential.
	SignerDID *string `json:"signerDID,omitempty"`

	// Type Array of VerifiablePresentation types that will be added next to the default type. Types must be available in the given context.
	Type                  *[]string              `json:"type,omitempty"`
	VerifiableCredentials []VerifiableCredential `json:"verifiableCredentials"`
}

CreateVPRequest A request for creating a new Verifiable Presentation for a set of Verifiable Credentials.

type CreateVPRequestFormat

type CreateVPRequestFormat string

CreateVPRequestFormat Proof format for the presentation (JSON-LD or JWT). If not set, it defaults to JSON-LD.

const (
	JwtVp CreateVPRequestFormat = "jwt_vp"
	LdpVp CreateVPRequestFormat = "ldp_vp"
)

Defines values for CreateVPRequestFormat.

type CreateVPRequestObject

type CreateVPRequestObject struct {
	Body *CreateVPJSONRequestBody
}

type CreateVPRequestProofPurpose

type CreateVPRequestProofPurpose string

CreateVPRequestProofPurpose The specific intent for the proof, the reason why an entity created it. Acts as a safeguard to prevent the proof from being misused for a purpose other than the one it was intended for.

const (
	AssertionMethod      CreateVPRequestProofPurpose = "assertionMethod"
	Authentication       CreateVPRequestProofPurpose = "authentication"
	CapabilityDelegation CreateVPRequestProofPurpose = "capabilityDelegation"
	CapabilityInvocation CreateVPRequestProofPurpose = "capabilityInvocation"
	KeyAgreement         CreateVPRequestProofPurpose = "keyAgreement"
)

Defines values for CreateVPRequestProofPurpose.

type CreateVPResponse

type CreateVPResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *VerifiablePresentation
	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 ParseCreateVPResponse

func ParseCreateVPResponse(rsp *http.Response) (*CreateVPResponse, error)

ParseCreateVPResponse parses an HTTP response from a CreateVPWithResponse call

func (CreateVPResponse) Status

func (r CreateVPResponse) Status() string

Status returns HTTPResponse.Status

func (CreateVPResponse) StatusCode

func (r CreateVPResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateVPResponseObject

type CreateVPResponseObject interface {
	VisitCreateVPResponse(w http.ResponseWriter) error
}

type CreateVPdefaultApplicationProblemPlusJSONResponse

type CreateVPdefaultApplicationProblemPlusJSONResponse 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 (CreateVPdefaultApplicationProblemPlusJSONResponse) VisitCreateVPResponse

type CredentialIssuer

type CredentialIssuer struct {
	// CredentialType a credential type
	CredentialType string `json:"credentialType"`

	// Issuer the DID of an issuer
	Issuer string `json:"issuer"`
}

CredentialIssuer defines model for CredentialIssuer.

type CredentialSubject

type CredentialSubject = interface{}

CredentialSubject is an alias to use from within the API

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 GetCredentialsInWallet200JSONResponse

type GetCredentialsInWallet200JSONResponse []VerifiableCredential

func (GetCredentialsInWallet200JSONResponse) VisitGetCredentialsInWalletResponse

func (response GetCredentialsInWallet200JSONResponse) VisitGetCredentialsInWalletResponse(w http.ResponseWriter) error

type GetCredentialsInWalletRequestObject

type GetCredentialsInWalletRequestObject struct {
	SubjectID string `json:"subjectID"`
}

type GetCredentialsInWalletResponse

type GetCredentialsInWalletResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *[]VerifiableCredential
	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 ParseGetCredentialsInWalletResponse

func ParseGetCredentialsInWalletResponse(rsp *http.Response) (*GetCredentialsInWalletResponse, error)

ParseGetCredentialsInWalletResponse parses an HTTP response from a GetCredentialsInWalletWithResponse call

func (GetCredentialsInWalletResponse) Status

Status returns HTTPResponse.Status

func (GetCredentialsInWalletResponse) StatusCode

func (r GetCredentialsInWalletResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCredentialsInWalletResponseObject

type GetCredentialsInWalletResponseObject interface {
	VisitGetCredentialsInWalletResponse(w http.ResponseWriter) error
}

type GetCredentialsInWalletdefaultApplicationProblemPlusJSONResponse

type GetCredentialsInWalletdefaultApplicationProblemPlusJSONResponse 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 (GetCredentialsInWalletdefaultApplicationProblemPlusJSONResponse) VisitGetCredentialsInWalletResponse

func (response GetCredentialsInWalletdefaultApplicationProblemPlusJSONResponse) VisitGetCredentialsInWalletResponse(w http.ResponseWriter) error

type HTTPClient

type HTTPClient struct {
	core.ClientConfig
	TokenGenerator core.AuthorizationTokenGenerator
}

HTTPClient holds the server address and other basic settings for the http client

func (HTTPClient) IssueVC

func (hb HTTPClient) IssueVC(request IssueVCRequest) (*VerifiableCredential, error)

IssueVC issues a new Verifiable Credential and returns it

func (HTTPClient) LoadVC

func (hb HTTPClient) LoadVC(holderSubjectID string, credential vc.VerifiableCredential) error

LoadVC loads the given Verifiable Credential into the holder's wallet.

func (HTTPClient) Trust

func (hb HTTPClient) Trust(credentialType string, issuer string) error

Trust sends a request to the node to trust a specific issuer for a credential type

func (HTTPClient) Trusted

func (hb HTTPClient) Trusted(credentialType string) ([]string, error)

Trusted lists the trusted issuers for the given credential type

func (HTTPClient) Untrust

func (hb HTTPClient) Untrust(credentialType string, issuer string) error

Untrust sends a request to the node to untrust a specific issuer for a credential type

func (HTTPClient) Untrusted

func (hb HTTPClient) Untrusted(credentialType string) ([]string, error)

Untrusted lists the untrusted issuers for the given credential type

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IssueVC200JSONResponse

type IssueVC200JSONResponse VerifiableCredential

func (IssueVC200JSONResponse) MarshalJSON

func (r IssueVC200JSONResponse) MarshalJSON() ([]byte, error)

MarshalJSON forwards the call to the underlying VerifiableCredential to make sure the credential is returned in the expected format (JSON-LD or JWT).

func (IssueVC200JSONResponse) VisitIssueVCResponse

func (response IssueVC200JSONResponse) VisitIssueVCResponse(w http.ResponseWriter) error

type IssueVCJSONRequestBody

type IssueVCJSONRequestBody = IssueVCRequest

IssueVCJSONRequestBody defines body for IssueVC for application/json ContentType.

type IssueVCRequest

type IssueVCRequest struct {
	// Context The resolvable context of the credentialSubject as URI. If omitted, the "https://nuts.nl/credentials/v1" context is used.
	// It always adds the "https://www.w3.org/2018/credentials/v1" context if not present.
	Context *IssueVCRequest_Context `json:"@context,omitempty"`

	// CredentialSubject Subject of a Verifiable Credential identifying the holder and expressing claims.
	CredentialSubject CredentialSubject `json:"credentialSubject"`

	// ExpirationDate RFC3339 time string until when the credential is valid.
	ExpirationDate *string `json:"expirationDate,omitempty"`

	// Format Proof format for the credential (ldp_vc for JSON-LD or jwt_vc for JWT). If not set, it defaults to JSON-LD.
	Format *IssueVCRequestFormat `json:"format,omitempty"`

	// Issuer DID according to Nuts specification.
	Issuer string `json:"issuer"`

	// PublishToNetwork If set, the node publishes this credential to the network. This is the default behaviour.
	// When set to false, the caller is responsible for distributing the VC to a holder. When the issuer is
	// also the holder, it then can be used to directly create a presentation (self issued).
	// Note: a not published credential can still be publicly revoked.
	// Only valid for did:nuts issuers.
	PublishToNetwork *bool `json:"publishToNetwork,omitempty"`

	// Type Type definition for the credential.
	Type IssueVCRequest_Type `json:"type"`

	// Visibility When publishToNetwork is true, the credential can be published publicly or privately to the holder.
	// This field is mandatory if publishToNetwork is true to prevent accidents. It defaults to "private".
	// Only valid for did:nuts issuers.
	Visibility *IssueVCRequestVisibility `json:"visibility,omitempty"`

	// WithStatusList2021Revocation Add a credentialStatus with statusPurpose 'revocation' to the issued credential. This allows a credential to
	// be revoked using the referenced StatusList2021Credential. StatusPurpose 'suspension' is not supported (yet).
	// See https://www.w3.org/TR/2023/WD-vc-status-list-20230427/
	//
	// Credentials with a short lifespan (expiry) are preferred over adding a credentialStatus.
	// This is a required field for credentials without an expirationDate.
	// Only valid for did:web issuers.
	WithStatusList2021Revocation *bool `json:"withStatusList2021Revocation,omitempty"`
}

IssueVCRequest A request for issuing a new Verifiable Credential.

type IssueVCRequestContext0

type IssueVCRequestContext0 = string

IssueVCRequestContext0 defines model for .

type IssueVCRequestContext1

type IssueVCRequestContext1 = []string

IssueVCRequestContext1 defines model for .

type IssueVCRequestFormat

type IssueVCRequestFormat string

IssueVCRequestFormat Proof format for the credential (ldp_vc for JSON-LD or jwt_vc for JWT). If not set, it defaults to JSON-LD.

const (
	JwtVc IssueVCRequestFormat = "jwt_vc"
	LdpVc IssueVCRequestFormat = "ldp_vc"
)

Defines values for IssueVCRequestFormat.

type IssueVCRequestObject

type IssueVCRequestObject struct {
	Body *IssueVCJSONRequestBody
}

type IssueVCRequestType0

type IssueVCRequestType0 = string

IssueVCRequestType0 defines model for .

type IssueVCRequestType1

type IssueVCRequestType1 = []string

IssueVCRequestType1 defines model for .

type IssueVCRequestVisibility

type IssueVCRequestVisibility string

IssueVCRequestVisibility When publishToNetwork is true, the credential can be published publicly or privately to the holder. This field is mandatory if publishToNetwork is true to prevent accidents. It defaults to "private". Only valid for did:nuts issuers.

const (
	Private IssueVCRequestVisibility = "private"
	Public  IssueVCRequestVisibility = "public"
)

Defines values for IssueVCRequestVisibility.

type IssueVCRequest_Context

type IssueVCRequest_Context struct {
	// contains filtered or unexported fields
}

IssueVCRequest_Context The resolvable context of the credentialSubject as URI. If omitted, the "https://nuts.nl/credentials/v1" context is used. It always adds the "https://www.w3.org/2018/credentials/v1" context if not present.

func (IssueVCRequest_Context) AsIssueVCRequestContext0

func (t IssueVCRequest_Context) AsIssueVCRequestContext0() (IssueVCRequestContext0, error)

AsIssueVCRequestContext0 returns the union data inside the IssueVCRequest_Context as a IssueVCRequestContext0

func (IssueVCRequest_Context) AsIssueVCRequestContext1

func (t IssueVCRequest_Context) AsIssueVCRequestContext1() (IssueVCRequestContext1, error)

AsIssueVCRequestContext1 returns the union data inside the IssueVCRequest_Context as a IssueVCRequestContext1

func (*IssueVCRequest_Context) FromIssueVCRequestContext0

func (t *IssueVCRequest_Context) FromIssueVCRequestContext0(v IssueVCRequestContext0) error

FromIssueVCRequestContext0 overwrites any union data inside the IssueVCRequest_Context as the provided IssueVCRequestContext0

func (*IssueVCRequest_Context) FromIssueVCRequestContext1

func (t *IssueVCRequest_Context) FromIssueVCRequestContext1(v IssueVCRequestContext1) error

FromIssueVCRequestContext1 overwrites any union data inside the IssueVCRequest_Context as the provided IssueVCRequestContext1

func (IssueVCRequest_Context) MarshalJSON

func (t IssueVCRequest_Context) MarshalJSON() ([]byte, error)

func (*IssueVCRequest_Context) MergeIssueVCRequestContext0

func (t *IssueVCRequest_Context) MergeIssueVCRequestContext0(v IssueVCRequestContext0) error

MergeIssueVCRequestContext0 performs a merge with any union data inside the IssueVCRequest_Context, using the provided IssueVCRequestContext0

func (*IssueVCRequest_Context) MergeIssueVCRequestContext1

func (t *IssueVCRequest_Context) MergeIssueVCRequestContext1(v IssueVCRequestContext1) error

MergeIssueVCRequestContext1 performs a merge with any union data inside the IssueVCRequest_Context, using the provided IssueVCRequestContext1

func (*IssueVCRequest_Context) UnmarshalJSON

func (t *IssueVCRequest_Context) UnmarshalJSON(b []byte) error

type IssueVCRequest_Type

type IssueVCRequest_Type struct {
	// contains filtered or unexported fields
}

IssueVCRequest_Type Type definition for the credential.

func (IssueVCRequest_Type) AsIssueVCRequestType0

func (t IssueVCRequest_Type) AsIssueVCRequestType0() (IssueVCRequestType0, error)

AsIssueVCRequestType0 returns the union data inside the IssueVCRequest_Type as a IssueVCRequestType0

func (IssueVCRequest_Type) AsIssueVCRequestType1

func (t IssueVCRequest_Type) AsIssueVCRequestType1() (IssueVCRequestType1, error)

AsIssueVCRequestType1 returns the union data inside the IssueVCRequest_Type as a IssueVCRequestType1

func (*IssueVCRequest_Type) FromIssueVCRequestType0

func (t *IssueVCRequest_Type) FromIssueVCRequestType0(v IssueVCRequestType0) error

FromIssueVCRequestType0 overwrites any union data inside the IssueVCRequest_Type as the provided IssueVCRequestType0

func (*IssueVCRequest_Type) FromIssueVCRequestType1

func (t *IssueVCRequest_Type) FromIssueVCRequestType1(v IssueVCRequestType1) error

FromIssueVCRequestType1 overwrites any union data inside the IssueVCRequest_Type as the provided IssueVCRequestType1

func (IssueVCRequest_Type) MarshalJSON

func (t IssueVCRequest_Type) MarshalJSON() ([]byte, error)

func (*IssueVCRequest_Type) MergeIssueVCRequestType0

func (t *IssueVCRequest_Type) MergeIssueVCRequestType0(v IssueVCRequestType0) error

MergeIssueVCRequestType0 performs a merge with any union data inside the IssueVCRequest_Type, using the provided IssueVCRequestType0

func (*IssueVCRequest_Type) MergeIssueVCRequestType1

func (t *IssueVCRequest_Type) MergeIssueVCRequestType1(v IssueVCRequestType1) error

MergeIssueVCRequestType1 performs a merge with any union data inside the IssueVCRequest_Type, using the provided IssueVCRequestType1

func (*IssueVCRequest_Type) UnmarshalJSON

func (t *IssueVCRequest_Type) UnmarshalJSON(b []byte) error

type IssueVCResponse

type IssueVCResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *VerifiableCredential
	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 ParseIssueVCResponse

func ParseIssueVCResponse(rsp *http.Response) (*IssueVCResponse, error)

ParseIssueVCResponse parses an HTTP response from a IssueVCWithResponse call

func (IssueVCResponse) Status

func (r IssueVCResponse) Status() string

Status returns HTTPResponse.Status

func (IssueVCResponse) StatusCode

func (r IssueVCResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type IssueVCResponseObject

type IssueVCResponseObject interface {
	VisitIssueVCResponse(w http.ResponseWriter) error
}

type IssueVCdefaultApplicationProblemPlusJSONResponse

type IssueVCdefaultApplicationProblemPlusJSONResponse 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 (IssueVCdefaultApplicationProblemPlusJSONResponse) VisitIssueVCResponse

type ListTrusted200JSONResponse

type ListTrusted200JSONResponse []string

func (ListTrusted200JSONResponse) VisitListTrustedResponse

func (response ListTrusted200JSONResponse) VisitListTrustedResponse(w http.ResponseWriter) error

type ListTrustedRequestObject

type ListTrustedRequestObject struct {
	CredentialType string `json:"credentialType"`
}

type ListTrustedResponse

type ListTrustedResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *[]string
	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 ParseListTrustedResponse

func ParseListTrustedResponse(rsp *http.Response) (*ListTrustedResponse, error)

ParseListTrustedResponse parses an HTTP response from a ListTrustedWithResponse call

func (ListTrustedResponse) Status

func (r ListTrustedResponse) Status() string

Status returns HTTPResponse.Status

func (ListTrustedResponse) StatusCode

func (r ListTrustedResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListTrustedResponseObject

type ListTrustedResponseObject interface {
	VisitListTrustedResponse(w http.ResponseWriter) error
}

type ListTrusteddefaultApplicationProblemPlusJSONResponse

type ListTrusteddefaultApplicationProblemPlusJSONResponse 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 (ListTrusteddefaultApplicationProblemPlusJSONResponse) VisitListTrustedResponse

type ListUntrusted200JSONResponse

type ListUntrusted200JSONResponse []string

func (ListUntrusted200JSONResponse) VisitListUntrustedResponse

func (response ListUntrusted200JSONResponse) VisitListUntrustedResponse(w http.ResponseWriter) error

type ListUntrustedRequestObject

type ListUntrustedRequestObject struct {
	CredentialType string `json:"credentialType"`
}

type ListUntrustedResponse

type ListUntrustedResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *[]string
	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 ParseListUntrustedResponse

func ParseListUntrustedResponse(rsp *http.Response) (*ListUntrustedResponse, error)

ParseListUntrustedResponse parses an HTTP response from a ListUntrustedWithResponse call

func (ListUntrustedResponse) Status

func (r ListUntrustedResponse) Status() string

Status returns HTTPResponse.Status

func (ListUntrustedResponse) StatusCode

func (r ListUntrustedResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListUntrustedResponseObject

type ListUntrustedResponseObject interface {
	VisitListUntrustedResponse(w http.ResponseWriter) error
}

type ListUntrusteddefaultApplicationProblemPlusJSONResponse

type ListUntrusteddefaultApplicationProblemPlusJSONResponse 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 (ListUntrusteddefaultApplicationProblemPlusJSONResponse) VisitListUntrustedResponse

type LoadVC204Response

type LoadVC204Response struct {
}

func (LoadVC204Response) VisitLoadVCResponse

func (response LoadVC204Response) VisitLoadVCResponse(w http.ResponseWriter) error

type LoadVCJSONRequestBody

type LoadVCJSONRequestBody = VerifiableCredential

LoadVCJSONRequestBody defines body for LoadVC for application/json ContentType.

type LoadVCRequestObject

type LoadVCRequestObject struct {
	SubjectID string `json:"subjectID"`
	Body      *LoadVCJSONRequestBody
}

type LoadVCResponse

type LoadVCResponse 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 ParseLoadVCResponse

func ParseLoadVCResponse(rsp *http.Response) (*LoadVCResponse, error)

ParseLoadVCResponse parses an HTTP response from a LoadVCWithResponse call

func (LoadVCResponse) Status

func (r LoadVCResponse) Status() string

Status returns HTTPResponse.Status

func (LoadVCResponse) StatusCode

func (r LoadVCResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LoadVCResponseObject

type LoadVCResponseObject interface {
	VisitLoadVCResponse(w http.ResponseWriter) error
}

type LoadVCdefaultApplicationProblemPlusJSONResponse

type LoadVCdefaultApplicationProblemPlusJSONResponse 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 (LoadVCdefaultApplicationProblemPlusJSONResponse) VisitLoadVCResponse

type RemoveCredentialFromWallet204Response

type RemoveCredentialFromWallet204Response struct {
}

func (RemoveCredentialFromWallet204Response) VisitRemoveCredentialFromWalletResponse

func (response RemoveCredentialFromWallet204Response) VisitRemoveCredentialFromWalletResponse(w http.ResponseWriter) error

type RemoveCredentialFromWalletRequestObject

type RemoveCredentialFromWalletRequestObject struct {
	SubjectID string `json:"subjectID"`
	Id        string `json:"id"`
}

type RemoveCredentialFromWalletResponse

type RemoveCredentialFromWalletResponse 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 ParseRemoveCredentialFromWalletResponse

func ParseRemoveCredentialFromWalletResponse(rsp *http.Response) (*RemoveCredentialFromWalletResponse, error)

ParseRemoveCredentialFromWalletResponse parses an HTTP response from a RemoveCredentialFromWalletWithResponse call

func (RemoveCredentialFromWalletResponse) Status

Status returns HTTPResponse.Status

func (RemoveCredentialFromWalletResponse) StatusCode

func (r RemoveCredentialFromWalletResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RemoveCredentialFromWalletResponseObject

type RemoveCredentialFromWalletResponseObject interface {
	VisitRemoveCredentialFromWalletResponse(w http.ResponseWriter) error
}

type RemoveCredentialFromWalletdefaultApplicationProblemPlusJSONResponse

type RemoveCredentialFromWalletdefaultApplicationProblemPlusJSONResponse 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 (RemoveCredentialFromWalletdefaultApplicationProblemPlusJSONResponse) VisitRemoveCredentialFromWalletResponse

func (response RemoveCredentialFromWalletdefaultApplicationProblemPlusJSONResponse) VisitRemoveCredentialFromWalletResponse(w http.ResponseWriter) error

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type ResolveVC200JSONResponse

type ResolveVC200JSONResponse VerifiableCredential

func (ResolveVC200JSONResponse) MarshalJSON

func (r ResolveVC200JSONResponse) MarshalJSON() ([]byte, error)

MarshalJSON forwards the call to the underlying VerifiableCredential to make sure the expected JSON-LD is returned.

func (ResolveVC200JSONResponse) VisitResolveVCResponse

func (response ResolveVC200JSONResponse) VisitResolveVCResponse(w http.ResponseWriter) error

type ResolveVCRequestObject

type ResolveVCRequestObject struct {
	Id string `json:"id"`
}

type ResolveVCResponse

type ResolveVCResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *VerifiableCredential
	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 ParseResolveVCResponse

func ParseResolveVCResponse(rsp *http.Response) (*ResolveVCResponse, error)

ParseResolveVCResponse parses an HTTP response from a ResolveVCWithResponse call

func (ResolveVCResponse) Status

func (r ResolveVCResponse) Status() string

Status returns HTTPResponse.Status

func (ResolveVCResponse) StatusCode

func (r ResolveVCResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ResolveVCResponseObject

type ResolveVCResponseObject interface {
	VisitResolveVCResponse(w http.ResponseWriter) error
}

type ResolveVCdefaultApplicationProblemPlusJSONResponse

type ResolveVCdefaultApplicationProblemPlusJSONResponse 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 (ResolveVCdefaultApplicationProblemPlusJSONResponse) VisitResolveVCResponse

type Revocation

type Revocation = credential.Revocation

Revocation is an alias to use from within the API

type RevokeVC200JSONResponse

type RevokeVC200JSONResponse Revocation

func (RevokeVC200JSONResponse) VisitRevokeVCResponse

func (response RevokeVC200JSONResponse) VisitRevokeVCResponse(w http.ResponseWriter) error

type RevokeVC204Response

type RevokeVC204Response struct {
}

func (RevokeVC204Response) VisitRevokeVCResponse

func (response RevokeVC204Response) VisitRevokeVCResponse(w http.ResponseWriter) error

type RevokeVCRequestObject

type RevokeVCRequestObject struct {
	Id string `json:"id"`
}

type RevokeVCResponse

type RevokeVCResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *Revocation
	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 ParseRevokeVCResponse

func ParseRevokeVCResponse(rsp *http.Response) (*RevokeVCResponse, error)

ParseRevokeVCResponse parses an HTTP response from a RevokeVCWithResponse call

func (RevokeVCResponse) Status

func (r RevokeVCResponse) Status() string

Status returns HTTPResponse.Status

func (RevokeVCResponse) StatusCode

func (r RevokeVCResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RevokeVCResponseObject

type RevokeVCResponseObject interface {
	VisitRevokeVCResponse(w http.ResponseWriter) error
}

type RevokeVCdefaultApplicationProblemPlusJSONResponse

type RevokeVCdefaultApplicationProblemPlusJSONResponse 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 (RevokeVCdefaultApplicationProblemPlusJSONResponse) VisitRevokeVCResponse

type SearchCredentialsInWallet200JSONResponse

type SearchCredentialsInWallet200JSONResponse SearchVCResults

func (SearchCredentialsInWallet200JSONResponse) VisitSearchCredentialsInWalletResponse

func (response SearchCredentialsInWallet200JSONResponse) VisitSearchCredentialsInWalletResponse(w http.ResponseWriter) error

type SearchCredentialsInWalletRequestObject

type SearchCredentialsInWalletRequestObject struct {
	SubjectID string `json:"subjectID"`
}

type SearchCredentialsInWalletResponse

type SearchCredentialsInWalletResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *SearchVCResults
	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 ParseSearchCredentialsInWalletResponse

func ParseSearchCredentialsInWalletResponse(rsp *http.Response) (*SearchCredentialsInWalletResponse, error)

ParseSearchCredentialsInWalletResponse parses an HTTP response from a SearchCredentialsInWalletWithResponse call

func (SearchCredentialsInWalletResponse) Status

Status returns HTTPResponse.Status

func (SearchCredentialsInWalletResponse) StatusCode

func (r SearchCredentialsInWalletResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SearchCredentialsInWalletResponseObject

type SearchCredentialsInWalletResponseObject interface {
	VisitSearchCredentialsInWalletResponse(w http.ResponseWriter) error
}

type SearchCredentialsInWalletdefaultApplicationProblemPlusJSONResponse

type SearchCredentialsInWalletdefaultApplicationProblemPlusJSONResponse 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 (SearchCredentialsInWalletdefaultApplicationProblemPlusJSONResponse) VisitSearchCredentialsInWalletResponse

func (response SearchCredentialsInWalletdefaultApplicationProblemPlusJSONResponse) VisitSearchCredentialsInWalletResponse(w http.ResponseWriter) error

type SearchIssuedVCs200JSONResponse

type SearchIssuedVCs200JSONResponse SearchVCResults

func (SearchIssuedVCs200JSONResponse) VisitSearchIssuedVCsResponse

func (response SearchIssuedVCs200JSONResponse) VisitSearchIssuedVCsResponse(w http.ResponseWriter) error

type SearchIssuedVCsParams

type SearchIssuedVCsParams struct {
	// CredentialType The type of the credential
	CredentialType string `form:"credentialType" json:"credentialType"`

	// Issuer the DID of the issuer
	Issuer string `form:"issuer" json:"issuer"`

	// Subject the URI which indicates the subject (usually a DID)
	Subject *string `form:"subject,omitempty" json:"subject,omitempty"`
}

SearchIssuedVCsParams defines parameters for SearchIssuedVCs.

type SearchIssuedVCsRequestObject

type SearchIssuedVCsRequestObject struct {
	Params SearchIssuedVCsParams
}

type SearchIssuedVCsResponse

type SearchIssuedVCsResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *SearchVCResults
	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 ParseSearchIssuedVCsResponse

func ParseSearchIssuedVCsResponse(rsp *http.Response) (*SearchIssuedVCsResponse, error)

ParseSearchIssuedVCsResponse parses an HTTP response from a SearchIssuedVCsWithResponse call

func (SearchIssuedVCsResponse) Status

func (r SearchIssuedVCsResponse) Status() string

Status returns HTTPResponse.Status

func (SearchIssuedVCsResponse) StatusCode

func (r SearchIssuedVCsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SearchIssuedVCsResponseObject

type SearchIssuedVCsResponseObject interface {
	VisitSearchIssuedVCsResponse(w http.ResponseWriter) error
}

type SearchIssuedVCsdefaultApplicationProblemPlusJSONResponse

type SearchIssuedVCsdefaultApplicationProblemPlusJSONResponse 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 (SearchIssuedVCsdefaultApplicationProblemPlusJSONResponse) VisitSearchIssuedVCsResponse

func (response SearchIssuedVCsdefaultApplicationProblemPlusJSONResponse) VisitSearchIssuedVCsResponse(w http.ResponseWriter) error

type SearchOptions

type SearchOptions struct {
	// AllowUntrustedIssuer If set to true, VCs from an untrusted issuer are returned.
	AllowUntrustedIssuer *bool `json:"allowUntrustedIssuer,omitempty"`
}

SearchOptions defines model for SearchOptions.

type SearchVCRequest

type SearchVCRequest struct {
	// Query A partial VerifiableCredential in JSON-LD format. Each field will be used to match credentials against. All fields MUST be present.
	Query         map[string]interface{} `json:"query"`
	SearchOptions *SearchOptions         `json:"searchOptions,omitempty"`
}

SearchVCRequest request body for searching VCs

type SearchVCResult

type SearchVCResult struct {
	// Revocation Credential revocation record
	Revocation           *Revocation          `json:"revocation,omitempty"`
	VerifiableCredential VerifiableCredential `json:"verifiableCredential"`
}

SearchVCResult Result of a Search operation. The revocation property is only present if a credential is revoked with a Verifiable Credential of type CredentialRevocation. The absence of a the revocation property does not indicate a valid credential, use the /internal/vcr/v2/verifier/vc API for this.

type SearchVCResults

type SearchVCResults struct {
	VerifiableCredentials []SearchVCResult `json:"verifiableCredentials"`
}

SearchVCResults result of a Search operation.

type SearchVCs200JSONResponse

type SearchVCs200JSONResponse SearchVCResults

func (SearchVCs200JSONResponse) VisitSearchVCsResponse

func (response SearchVCs200JSONResponse) VisitSearchVCsResponse(w http.ResponseWriter) error

type SearchVCsJSONRequestBody

type SearchVCsJSONRequestBody = SearchVCRequest

SearchVCsJSONRequestBody defines body for SearchVCs for application/json ContentType.

type SearchVCsRequestObject

type SearchVCsRequestObject struct {
	Body *SearchVCsJSONRequestBody
}

type SearchVCsResponse

type SearchVCsResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *SearchVCResults
	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 ParseSearchVCsResponse

func ParseSearchVCsResponse(rsp *http.Response) (*SearchVCsResponse, error)

ParseSearchVCsResponse parses an HTTP response from a SearchVCsWithResponse call

func (SearchVCsResponse) Status

func (r SearchVCsResponse) Status() string

Status returns HTTPResponse.Status

func (SearchVCsResponse) StatusCode

func (r SearchVCsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SearchVCsResponseObject

type SearchVCsResponseObject interface {
	VisitSearchVCsResponse(w http.ResponseWriter) error
}

type SearchVCsdefaultApplicationProblemPlusJSONResponse

type SearchVCsdefaultApplicationProblemPlusJSONResponse 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 (SearchVCsdefaultApplicationProblemPlusJSONResponse) VisitSearchVCsResponse

type ServerInterface

type ServerInterface interface {
	// Create a new Verifiable Presentation for a set of Verifiable Credentials.
	// (POST /internal/vcr/v2/holder/vp)
	CreateVP(ctx echo.Context) error
	// List all Verifiable Credentials in the holder's wallet. It will only return non-expired or non-revoked credentials. If you want to list all credentials regardless of their validity, use the search API.
	// (GET /internal/vcr/v2/holder/{subjectID}/vc)
	GetCredentialsInWallet(ctx echo.Context, subjectID string) error
	// Load a VerifiableCredential into the holders wallet.
	// (POST /internal/vcr/v2/holder/{subjectID}/vc)
	LoadVC(ctx echo.Context, subjectID string) error
	// Searches for verifiable credentials in the holder's wallet
	// (GET /internal/vcr/v2/holder/{subjectID}/vc/search)
	SearchCredentialsInWallet(ctx echo.Context, subjectID string) error
	// Remove a VerifiableCredential from the holders wallet.
	// (DELETE /internal/vcr/v2/holder/{subjectID}/vc/{id})
	RemoveCredentialFromWallet(ctx echo.Context, subjectID string, id string) error
	// Issues a new Verifiable Credential
	// (POST /internal/vcr/v2/issuer/vc)
	IssueVC(ctx echo.Context) error
	// Searches for verifiable credentials issued by this node which matches the search params
	// (GET /internal/vcr/v2/issuer/vc/search)
	SearchIssuedVCs(ctx echo.Context, params SearchIssuedVCsParams) error
	// Revoke an issued credential
	// (DELETE /internal/vcr/v2/issuer/vc/{id})
	RevokeVC(ctx echo.Context, id string) error
	// Searches for verifiable credentials that could be used for different use-cases.
	// (POST /internal/vcr/v2/search)
	SearchVCs(ctx echo.Context) error
	// Resolves a verifiable credential
	// (GET /internal/vcr/v2/vc/{id})
	ResolveVC(ctx echo.Context, id string) error
	// Remove trust in an issuer/credentialType combination
	// (DELETE /internal/vcr/v2/verifier/trust)
	UntrustIssuer(ctx echo.Context) error
	// Mark all the VCs of given type and issuer as 'trusted'.
	// (POST /internal/vcr/v2/verifier/trust)
	TrustIssuer(ctx echo.Context) error
	// Verifies a Verifiable Credential
	// (POST /internal/vcr/v2/verifier/vc)
	VerifyVC(ctx echo.Context) error
	// Verifies a Verifiable Presentation
	// (POST /internal/vcr/v2/verifier/vp)
	VerifyVP(ctx echo.Context) error
	// List all trusted issuers for a given credential type
	// (GET /internal/vcr/v2/verifier/{credentialType}/trusted)
	ListTrusted(ctx echo.Context, credentialType string) error
	// List all untrusted issuers for a given credential type
	// (GET /internal/vcr/v2/verifier/{credentialType}/untrusted)
	ListUntrusted(ctx echo.Context, credentialType string) 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) CreateVP

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

CreateVP converts echo context to params.

func (*ServerInterfaceWrapper) GetCredentialsInWallet

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

GetCredentialsInWallet converts echo context to params.

func (*ServerInterfaceWrapper) IssueVC

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

IssueVC converts echo context to params.

func (*ServerInterfaceWrapper) ListTrusted

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

ListTrusted converts echo context to params.

func (*ServerInterfaceWrapper) ListUntrusted

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

ListUntrusted converts echo context to params.

func (*ServerInterfaceWrapper) LoadVC

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

LoadVC converts echo context to params.

func (*ServerInterfaceWrapper) RemoveCredentialFromWallet

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

RemoveCredentialFromWallet converts echo context to params.

func (*ServerInterfaceWrapper) ResolveVC

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

ResolveVC converts echo context to params.

func (*ServerInterfaceWrapper) RevokeVC

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

RevokeVC converts echo context to params.

func (*ServerInterfaceWrapper) SearchCredentialsInWallet

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

SearchCredentialsInWallet converts echo context to params.

func (*ServerInterfaceWrapper) SearchIssuedVCs

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

SearchIssuedVCs converts echo context to params.

func (*ServerInterfaceWrapper) SearchVCs

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

SearchVCs converts echo context to params.

func (*ServerInterfaceWrapper) TrustIssuer

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

TrustIssuer converts echo context to params.

func (*ServerInterfaceWrapper) UntrustIssuer

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

UntrustIssuer converts echo context to params.

func (*ServerInterfaceWrapper) VerifyVC

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

VerifyVC converts echo context to params.

func (*ServerInterfaceWrapper) VerifyVP

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

VerifyVP converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Create a new Verifiable Presentation for a set of Verifiable Credentials.
	// (POST /internal/vcr/v2/holder/vp)
	CreateVP(ctx context.Context, request CreateVPRequestObject) (CreateVPResponseObject, error)
	// List all Verifiable Credentials in the holder's wallet. It will only return non-expired or non-revoked credentials. If you want to list all credentials regardless of their validity, use the search API.
	// (GET /internal/vcr/v2/holder/{subjectID}/vc)
	GetCredentialsInWallet(ctx context.Context, request GetCredentialsInWalletRequestObject) (GetCredentialsInWalletResponseObject, error)
	// Load a VerifiableCredential into the holders wallet.
	// (POST /internal/vcr/v2/holder/{subjectID}/vc)
	LoadVC(ctx context.Context, request LoadVCRequestObject) (LoadVCResponseObject, error)
	// Searches for verifiable credentials in the holder's wallet
	// (GET /internal/vcr/v2/holder/{subjectID}/vc/search)
	SearchCredentialsInWallet(ctx context.Context, request SearchCredentialsInWalletRequestObject) (SearchCredentialsInWalletResponseObject, error)
	// Remove a VerifiableCredential from the holders wallet.
	// (DELETE /internal/vcr/v2/holder/{subjectID}/vc/{id})
	RemoveCredentialFromWallet(ctx context.Context, request RemoveCredentialFromWalletRequestObject) (RemoveCredentialFromWalletResponseObject, error)
	// Issues a new Verifiable Credential
	// (POST /internal/vcr/v2/issuer/vc)
	IssueVC(ctx context.Context, request IssueVCRequestObject) (IssueVCResponseObject, error)
	// Searches for verifiable credentials issued by this node which matches the search params
	// (GET /internal/vcr/v2/issuer/vc/search)
	SearchIssuedVCs(ctx context.Context, request SearchIssuedVCsRequestObject) (SearchIssuedVCsResponseObject, error)
	// Revoke an issued credential
	// (DELETE /internal/vcr/v2/issuer/vc/{id})
	RevokeVC(ctx context.Context, request RevokeVCRequestObject) (RevokeVCResponseObject, error)
	// Searches for verifiable credentials that could be used for different use-cases.
	// (POST /internal/vcr/v2/search)
	SearchVCs(ctx context.Context, request SearchVCsRequestObject) (SearchVCsResponseObject, error)
	// Resolves a verifiable credential
	// (GET /internal/vcr/v2/vc/{id})
	ResolveVC(ctx context.Context, request ResolveVCRequestObject) (ResolveVCResponseObject, error)
	// Remove trust in an issuer/credentialType combination
	// (DELETE /internal/vcr/v2/verifier/trust)
	UntrustIssuer(ctx context.Context, request UntrustIssuerRequestObject) (UntrustIssuerResponseObject, error)
	// Mark all the VCs of given type and issuer as 'trusted'.
	// (POST /internal/vcr/v2/verifier/trust)
	TrustIssuer(ctx context.Context, request TrustIssuerRequestObject) (TrustIssuerResponseObject, error)
	// Verifies a Verifiable Credential
	// (POST /internal/vcr/v2/verifier/vc)
	VerifyVC(ctx context.Context, request VerifyVCRequestObject) (VerifyVCResponseObject, error)
	// Verifies a Verifiable Presentation
	// (POST /internal/vcr/v2/verifier/vp)
	VerifyVP(ctx context.Context, request VerifyVPRequestObject) (VerifyVPResponseObject, error)
	// List all trusted issuers for a given credential type
	// (GET /internal/vcr/v2/verifier/{credentialType}/trusted)
	ListTrusted(ctx context.Context, request ListTrustedRequestObject) (ListTrustedResponseObject, error)
	// List all untrusted issuers for a given credential type
	// (GET /internal/vcr/v2/verifier/{credentialType}/untrusted)
	ListUntrusted(ctx context.Context, request ListUntrustedRequestObject) (ListUntrustedResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TrustIssuer204Response

type TrustIssuer204Response struct {
}

func (TrustIssuer204Response) VisitTrustIssuerResponse

func (response TrustIssuer204Response) VisitTrustIssuerResponse(w http.ResponseWriter) error

type TrustIssuerJSONRequestBody

type TrustIssuerJSONRequestBody = CredentialIssuer

TrustIssuerJSONRequestBody defines body for TrustIssuer for application/json ContentType.

type TrustIssuerRequestObject

type TrustIssuerRequestObject struct {
	Body *TrustIssuerJSONRequestBody
}

type TrustIssuerResponse

type TrustIssuerResponse 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 ParseTrustIssuerResponse

func ParseTrustIssuerResponse(rsp *http.Response) (*TrustIssuerResponse, error)

ParseTrustIssuerResponse parses an HTTP response from a TrustIssuerWithResponse call

func (TrustIssuerResponse) Status

func (r TrustIssuerResponse) Status() string

Status returns HTTPResponse.Status

func (TrustIssuerResponse) StatusCode

func (r TrustIssuerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type TrustIssuerResponseObject

type TrustIssuerResponseObject interface {
	VisitTrustIssuerResponse(w http.ResponseWriter) error
}

type TrustIssuerdefaultApplicationProblemPlusJSONResponse

type TrustIssuerdefaultApplicationProblemPlusJSONResponse 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 (TrustIssuerdefaultApplicationProblemPlusJSONResponse) VisitTrustIssuerResponse

type UntrustIssuer204Response

type UntrustIssuer204Response struct {
}

func (UntrustIssuer204Response) VisitUntrustIssuerResponse

func (response UntrustIssuer204Response) VisitUntrustIssuerResponse(w http.ResponseWriter) error

type UntrustIssuerJSONRequestBody

type UntrustIssuerJSONRequestBody = CredentialIssuer

UntrustIssuerJSONRequestBody defines body for UntrustIssuer for application/json ContentType.

type UntrustIssuerRequestObject

type UntrustIssuerRequestObject struct {
	Body *UntrustIssuerJSONRequestBody
}

type UntrustIssuerResponse

type UntrustIssuerResponse 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 ParseUntrustIssuerResponse

func ParseUntrustIssuerResponse(rsp *http.Response) (*UntrustIssuerResponse, error)

ParseUntrustIssuerResponse parses an HTTP response from a UntrustIssuerWithResponse call

func (UntrustIssuerResponse) Status

func (r UntrustIssuerResponse) Status() string

Status returns HTTPResponse.Status

func (UntrustIssuerResponse) StatusCode

func (r UntrustIssuerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UntrustIssuerResponseObject

type UntrustIssuerResponseObject interface {
	VisitUntrustIssuerResponse(w http.ResponseWriter) error
}

type UntrustIssuerdefaultApplicationProblemPlusJSONResponse

type UntrustIssuerdefaultApplicationProblemPlusJSONResponse 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 (UntrustIssuerdefaultApplicationProblemPlusJSONResponse) VisitUntrustIssuerResponse

type VCVerificationOptions

type VCVerificationOptions struct {
	// AllowUntrustedIssuer If set to true, an untrusted credential issuer is allowed.
	// Deprecated:
	AllowUntrustedIssuer *bool `json:"allowUntrustedIssuer,omitempty"`
}

VCVerificationOptions defines model for VCVerificationOptions.

type VCVerificationRequest

type VCVerificationRequest struct {
	VerifiableCredential VerifiableCredential   `json:"verifiableCredential"`
	VerificationOptions  *VCVerificationOptions `json:"verificationOptions,omitempty"`
}

VCVerificationRequest defines model for VCVerificationRequest.

type VCVerificationResult

type VCVerificationResult struct {
	// Message Indicates what went wrong
	Message *string `json:"message,omitempty"`

	// Validity Indicates the validity of the signature, issuer and revocation state.
	Validity bool `json:"validity"`
}

VCVerificationResult Contains the verifiable credential verification result.

type VPVerificationRequest

type VPVerificationRequest struct {
	// ValidAt Date and time at which the VP should be valid. If not supplied, the current date/time is used.
	ValidAt                *string                `json:"validAt,omitempty"`
	VerifiablePresentation VerifiablePresentation `json:"verifiablePresentation"`

	// VerifyCredentials Indicates whether the Verifiable Credentials within the VP must be verified, default true.
	VerifyCredentials *bool `json:"verifyCredentials,omitempty"`
}

VPVerificationRequest defines model for VPVerificationRequest.

type VPVerificationResult

type VPVerificationResult struct {
	// Credentials If the VP is valid, it will contain the credentials inside the VP.
	Credentials *[]VerifiableCredential `json:"credentials,omitempty"`

	// Message Indicates what went wrong
	Message *string `json:"message,omitempty"`

	// Validity Indicates the validity of the signature, issuer and revocation state.
	Validity bool `json:"validity"`
}

VPVerificationResult Contains the verifiable presentation verification result.

type VerifiableCredential

type VerifiableCredential = vc.VerifiableCredential

VerifiableCredential is an alias to use from within the API

type VerifiablePresentation

type VerifiablePresentation = vc.VerifiablePresentation

VerifiablePresentation is an alias to use from within the API

type VerifyVC200JSONResponse

type VerifyVC200JSONResponse VCVerificationResult

func (VerifyVC200JSONResponse) VisitVerifyVCResponse

func (response VerifyVC200JSONResponse) VisitVerifyVCResponse(w http.ResponseWriter) error

type VerifyVCJSONRequestBody

type VerifyVCJSONRequestBody = VCVerificationRequest

VerifyVCJSONRequestBody defines body for VerifyVC for application/json ContentType.

type VerifyVCRequestObject

type VerifyVCRequestObject struct {
	Body *VerifyVCJSONRequestBody
}

type VerifyVCResponse

type VerifyVCResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *VCVerificationResult
	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 ParseVerifyVCResponse

func ParseVerifyVCResponse(rsp *http.Response) (*VerifyVCResponse, error)

ParseVerifyVCResponse parses an HTTP response from a VerifyVCWithResponse call

func (VerifyVCResponse) Status

func (r VerifyVCResponse) Status() string

Status returns HTTPResponse.Status

func (VerifyVCResponse) StatusCode

func (r VerifyVCResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type VerifyVCResponseObject

type VerifyVCResponseObject interface {
	VisitVerifyVCResponse(w http.ResponseWriter) error
}

type VerifyVCdefaultApplicationProblemPlusJSONResponse

type VerifyVCdefaultApplicationProblemPlusJSONResponse 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 (VerifyVCdefaultApplicationProblemPlusJSONResponse) VisitVerifyVCResponse

type VerifyVP200JSONResponse

type VerifyVP200JSONResponse VPVerificationResult

func (VerifyVP200JSONResponse) VisitVerifyVPResponse

func (response VerifyVP200JSONResponse) VisitVerifyVPResponse(w http.ResponseWriter) error

type VerifyVPJSONRequestBody

type VerifyVPJSONRequestBody = VPVerificationRequest

VerifyVPJSONRequestBody defines body for VerifyVP for application/json ContentType.

type VerifyVPRequestObject

type VerifyVPRequestObject struct {
	Body *VerifyVPJSONRequestBody
}

type VerifyVPResponse

type VerifyVPResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *VPVerificationResult
	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 ParseVerifyVPResponse

func ParseVerifyVPResponse(rsp *http.Response) (*VerifyVPResponse, error)

ParseVerifyVPResponse parses an HTTP response from a VerifyVPWithResponse call

func (VerifyVPResponse) Status

func (r VerifyVPResponse) Status() string

Status returns HTTPResponse.Status

func (VerifyVPResponse) StatusCode

func (r VerifyVPResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type VerifyVPResponseObject

type VerifyVPResponseObject interface {
	VisitVerifyVPResponse(w http.ResponseWriter) error
}

type VerifyVPdefaultApplicationProblemPlusJSONResponse

type VerifyVPdefaultApplicationProblemPlusJSONResponse 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 (VerifyVPdefaultApplicationProblemPlusJSONResponse) VisitVerifyVPResponse

type Wrapper

type Wrapper struct {
	ContextManager jsonld.JSONLD
	VCR            vcr.VCR
	SubjectManager didsubject.Manager
}

Wrapper implements the generated interface from oapi-codegen It parses and checks the params. Handles errors and returns the appropriate response.

func (*Wrapper) CreateVP

CreateVP handles API request to create a Verifiable Presentation for one or more Verifiable Credentials.

func (Wrapper) IssueVC

IssueVC handles the API request for credential issuing.

func (*Wrapper) ListTrusted

ListTrusted handles API request list all trusted issuers.

func (*Wrapper) ListUntrusted

ListUntrusted handles API request list all untrusted issuers, which have issued Verifiable Credentials.

func (*Wrapper) LoadVC

func (*Wrapper) ResolveStatusCode

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

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

func (*Wrapper) ResolveVC

ResolveVC handles the API request for resolving a VC

func (Wrapper) RevokeVC

RevokeVC handles the API request for revoking a credential.

func (*Wrapper) Routes

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

Routes registers the handler to the echo router

func (*Wrapper) SearchCredentialsInWallet

SearchCredentialsInWallet handles the API request for searching credentials in the holder's wallet

func (*Wrapper) SearchIssuedVCs

SearchIssuedVCs handles the API request for searching for issued VCs

func (*Wrapper) SearchVCs

SearchVCs checks the context used in the JSON-LD query, based on the contents it maps to a non-JSON-LD query After V1, this needs to be remapped to a DB search that supports native JSON-LD

func (*Wrapper) TrustIssuer

TrustIssuer handles API request to start trusting an issuer of a Verifiable Credential.

func (*Wrapper) UntrustIssuer

UntrustIssuer handles API request to stop trusting an issuer of a Verifiable Credential.

func (*Wrapper) VerifyVC

VerifyVC handles API request to verify a Verifiable Credential.

func (*Wrapper) VerifyVP

VerifyVP handles API request to verify a Verifiable Presentation.

Jump to

Keyboard shortcuts

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