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
- func NewCreateVPRequest(server string, body CreateVPJSONRequestBody) (*http.Request, error)
- func NewCreateVPRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetCredentialsInWalletRequest(server string, subjectID string) (*http.Request, error)
- func NewIssueVCRequest(server string, body IssueVCJSONRequestBody) (*http.Request, error)
- func NewIssueVCRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewListTrustedRequest(server string, credentialType string) (*http.Request, error)
- func NewListUntrustedRequest(server string, credentialType string) (*http.Request, error)
- func NewLoadVCRequest(server string, subjectID string, body LoadVCJSONRequestBody) (*http.Request, error)
- func NewLoadVCRequestWithBody(server string, subjectID string, contentType string, body io.Reader) (*http.Request, error)
- func NewRemoveCredentialFromWalletRequest(server string, subjectID string, id string) (*http.Request, error)
- func NewResolveVCRequest(server string, id string) (*http.Request, error)
- func NewRevokeVCRequest(server string, id string) (*http.Request, error)
- func NewSearchCredentialsInWalletRequest(server string, subjectID string) (*http.Request, error)
- func NewSearchIssuedVCsRequest(server string, params *SearchIssuedVCsParams) (*http.Request, error)
- func NewSearchVCsRequest(server string, body SearchVCsJSONRequestBody) (*http.Request, error)
- func NewSearchVCsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewTrustIssuerRequest(server string, body TrustIssuerJSONRequestBody) (*http.Request, error)
- func NewTrustIssuerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUntrustIssuerRequest(server string, body UntrustIssuerJSONRequestBody) (*http.Request, error)
- func NewUntrustIssuerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewVerifyVCRequest(server string, body VerifyVCJSONRequestBody) (*http.Request, error)
- func NewVerifyVCRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewVerifyVPRequest(server string, body VerifyVPJSONRequestBody) (*http.Request, error)
- func NewVerifyVPRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type Client
- func (c *Client) CreateVP(ctx context.Context, body CreateVPJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateVPWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetCredentialsInWallet(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) IssueVC(ctx context.Context, body IssueVCJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) IssueVCWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ListTrusted(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListUntrusted(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) LoadVC(ctx context.Context, subjectID string, body LoadVCJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) LoadVCWithBody(ctx context.Context, subjectID string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) RemoveCredentialFromWallet(ctx context.Context, subjectID string, id string, ...) (*http.Response, error)
- func (c *Client) ResolveVC(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RevokeVC(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SearchCredentialsInWallet(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SearchIssuedVCs(ctx context.Context, params *SearchIssuedVCsParams, ...) (*http.Response, error)
- func (c *Client) SearchVCs(ctx context.Context, body SearchVCsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SearchVCsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) TrustIssuer(ctx context.Context, body TrustIssuerJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) TrustIssuerWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UntrustIssuer(ctx context.Context, body UntrustIssuerJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UntrustIssuerWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) VerifyVC(ctx context.Context, body VerifyVCJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) VerifyVCWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) VerifyVP(ctx context.Context, body VerifyVPJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) VerifyVPWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateVPWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateVPResponse, error)
- func (c *ClientWithResponses) CreateVPWithResponse(ctx context.Context, body CreateVPJSONRequestBody, ...) (*CreateVPResponse, error)
- func (c *ClientWithResponses) GetCredentialsInWalletWithResponse(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*GetCredentialsInWalletResponse, error)
- func (c *ClientWithResponses) IssueVCWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*IssueVCResponse, error)
- func (c *ClientWithResponses) IssueVCWithResponse(ctx context.Context, body IssueVCJSONRequestBody, ...) (*IssueVCResponse, error)
- func (c *ClientWithResponses) ListTrustedWithResponse(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*ListTrustedResponse, error)
- func (c *ClientWithResponses) ListUntrustedWithResponse(ctx context.Context, credentialType string, reqEditors ...RequestEditorFn) (*ListUntrustedResponse, error)
- func (c *ClientWithResponses) LoadVCWithBodyWithResponse(ctx context.Context, subjectID string, contentType string, body io.Reader, ...) (*LoadVCResponse, error)
- func (c *ClientWithResponses) LoadVCWithResponse(ctx context.Context, subjectID string, body LoadVCJSONRequestBody, ...) (*LoadVCResponse, error)
- func (c *ClientWithResponses) RemoveCredentialFromWalletWithResponse(ctx context.Context, subjectID string, id string, ...) (*RemoveCredentialFromWalletResponse, error)
- func (c *ClientWithResponses) ResolveVCWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ResolveVCResponse, error)
- func (c *ClientWithResponses) RevokeVCWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*RevokeVCResponse, error)
- func (c *ClientWithResponses) SearchCredentialsInWalletWithResponse(ctx context.Context, subjectID string, reqEditors ...RequestEditorFn) (*SearchCredentialsInWalletResponse, error)
- func (c *ClientWithResponses) SearchIssuedVCsWithResponse(ctx context.Context, params *SearchIssuedVCsParams, ...) (*SearchIssuedVCsResponse, error)
- func (c *ClientWithResponses) SearchVCsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SearchVCsResponse, error)
- func (c *ClientWithResponses) SearchVCsWithResponse(ctx context.Context, body SearchVCsJSONRequestBody, ...) (*SearchVCsResponse, error)
- func (c *ClientWithResponses) TrustIssuerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*TrustIssuerResponse, error)
- func (c *ClientWithResponses) TrustIssuerWithResponse(ctx context.Context, body TrustIssuerJSONRequestBody, ...) (*TrustIssuerResponse, error)
- func (c *ClientWithResponses) UntrustIssuerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*UntrustIssuerResponse, error)
- func (c *ClientWithResponses) UntrustIssuerWithResponse(ctx context.Context, body UntrustIssuerJSONRequestBody, ...) (*UntrustIssuerResponse, error)
- func (c *ClientWithResponses) VerifyVCWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*VerifyVCResponse, error)
- func (c *ClientWithResponses) VerifyVCWithResponse(ctx context.Context, body VerifyVCJSONRequestBody, ...) (*VerifyVCResponse, error)
- func (c *ClientWithResponses) VerifyVPWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*VerifyVPResponse, error)
- func (c *ClientWithResponses) VerifyVPWithResponse(ctx context.Context, body VerifyVPJSONRequestBody, ...) (*VerifyVPResponse, error)
- type ClientWithResponsesInterface
- type CreateVP200JSONResponse
- type CreateVPJSONRequestBody
- type CreateVPRequest
- type CreateVPRequestFormat
- type CreateVPRequestObject
- type CreateVPRequestProofPurpose
- type CreateVPResponse
- type CreateVPResponseObject
- type CreateVPdefaultApplicationProblemPlusJSONResponse
- type CredentialIssuer
- type CredentialSubject
- type EchoRouter
- type GetCredentialsInWallet200JSONResponse
- type GetCredentialsInWalletRequestObject
- type GetCredentialsInWalletResponse
- type GetCredentialsInWalletResponseObject
- type GetCredentialsInWalletdefaultApplicationProblemPlusJSONResponse
- type HTTPClient
- func (hb HTTPClient) IssueVC(request IssueVCRequest) (*VerifiableCredential, error)
- func (hb HTTPClient) LoadVC(holderSubjectID string, credential vc.VerifiableCredential) error
- func (hb HTTPClient) Trust(credentialType string, issuer string) error
- func (hb HTTPClient) Trusted(credentialType string) ([]string, error)
- func (hb HTTPClient) Untrust(credentialType string, issuer string) error
- func (hb HTTPClient) Untrusted(credentialType string) ([]string, error)
- type HttpRequestDoer
- type IssueVC200JSONResponse
- type IssueVCJSONRequestBody
- type IssueVCRequest
- type IssueVCRequestContext0
- type IssueVCRequestContext1
- type IssueVCRequestFormat
- type IssueVCRequestObject
- type IssueVCRequestType0
- type IssueVCRequestType1
- type IssueVCRequestVisibility
- type IssueVCRequest_Context
- func (t IssueVCRequest_Context) AsIssueVCRequestContext0() (IssueVCRequestContext0, error)
- func (t IssueVCRequest_Context) AsIssueVCRequestContext1() (IssueVCRequestContext1, error)
- func (t *IssueVCRequest_Context) FromIssueVCRequestContext0(v IssueVCRequestContext0) error
- func (t *IssueVCRequest_Context) FromIssueVCRequestContext1(v IssueVCRequestContext1) error
- func (t IssueVCRequest_Context) MarshalJSON() ([]byte, error)
- func (t *IssueVCRequest_Context) MergeIssueVCRequestContext0(v IssueVCRequestContext0) error
- func (t *IssueVCRequest_Context) MergeIssueVCRequestContext1(v IssueVCRequestContext1) error
- func (t *IssueVCRequest_Context) UnmarshalJSON(b []byte) error
- type IssueVCRequest_Type
- func (t IssueVCRequest_Type) AsIssueVCRequestType0() (IssueVCRequestType0, error)
- func (t IssueVCRequest_Type) AsIssueVCRequestType1() (IssueVCRequestType1, error)
- func (t *IssueVCRequest_Type) FromIssueVCRequestType0(v IssueVCRequestType0) error
- func (t *IssueVCRequest_Type) FromIssueVCRequestType1(v IssueVCRequestType1) error
- func (t IssueVCRequest_Type) MarshalJSON() ([]byte, error)
- func (t *IssueVCRequest_Type) MergeIssueVCRequestType0(v IssueVCRequestType0) error
- func (t *IssueVCRequest_Type) MergeIssueVCRequestType1(v IssueVCRequestType1) error
- func (t *IssueVCRequest_Type) UnmarshalJSON(b []byte) error
- type IssueVCResponse
- type IssueVCResponseObject
- type IssueVCdefaultApplicationProblemPlusJSONResponse
- type ListTrusted200JSONResponse
- type ListTrustedRequestObject
- type ListTrustedResponse
- type ListTrustedResponseObject
- type ListTrusteddefaultApplicationProblemPlusJSONResponse
- type ListUntrusted200JSONResponse
- type ListUntrustedRequestObject
- type ListUntrustedResponse
- type ListUntrustedResponseObject
- type ListUntrusteddefaultApplicationProblemPlusJSONResponse
- type LoadVC204Response
- type LoadVCJSONRequestBody
- type LoadVCRequestObject
- type LoadVCResponse
- type LoadVCResponseObject
- type LoadVCdefaultApplicationProblemPlusJSONResponse
- type RemoveCredentialFromWallet204Response
- type RemoveCredentialFromWalletRequestObject
- type RemoveCredentialFromWalletResponse
- type RemoveCredentialFromWalletResponseObject
- type RemoveCredentialFromWalletdefaultApplicationProblemPlusJSONResponse
- type RequestEditorFn
- type ResolveVC200JSONResponse
- type ResolveVCRequestObject
- type ResolveVCResponse
- type ResolveVCResponseObject
- type ResolveVCdefaultApplicationProblemPlusJSONResponse
- type Revocation
- type RevokeVC200JSONResponse
- type RevokeVC204Response
- type RevokeVCRequestObject
- type RevokeVCResponse
- type RevokeVCResponseObject
- type RevokeVCdefaultApplicationProblemPlusJSONResponse
- type SearchCredentialsInWallet200JSONResponse
- type SearchCredentialsInWalletRequestObject
- type SearchCredentialsInWalletResponse
- type SearchCredentialsInWalletResponseObject
- type SearchCredentialsInWalletdefaultApplicationProblemPlusJSONResponse
- type SearchIssuedVCs200JSONResponse
- type SearchIssuedVCsParams
- type SearchIssuedVCsRequestObject
- type SearchIssuedVCsResponse
- type SearchIssuedVCsResponseObject
- type SearchIssuedVCsdefaultApplicationProblemPlusJSONResponse
- type SearchOptions
- type SearchVCRequest
- type SearchVCResult
- type SearchVCResults
- type SearchVCs200JSONResponse
- type SearchVCsJSONRequestBody
- type SearchVCsRequestObject
- type SearchVCsResponse
- type SearchVCsResponseObject
- type SearchVCsdefaultApplicationProblemPlusJSONResponse
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CreateVP(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetCredentialsInWallet(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) IssueVC(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ListTrusted(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ListUntrusted(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) LoadVC(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) RemoveCredentialFromWallet(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ResolveVC(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) RevokeVC(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SearchCredentialsInWallet(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SearchIssuedVCs(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SearchVCs(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TrustIssuer(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UntrustIssuer(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) VerifyVC(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) VerifyVP(ctx echo.Context) error
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TrustIssuer204Response
- type TrustIssuerJSONRequestBody
- type TrustIssuerRequestObject
- type TrustIssuerResponse
- type TrustIssuerResponseObject
- type TrustIssuerdefaultApplicationProblemPlusJSONResponse
- type UntrustIssuer204Response
- type UntrustIssuerJSONRequestBody
- type UntrustIssuerRequestObject
- type UntrustIssuerResponse
- type UntrustIssuerResponseObject
- type UntrustIssuerdefaultApplicationProblemPlusJSONResponse
- type VCVerificationOptions
- type VCVerificationRequest
- type VCVerificationResult
- type VPVerificationRequest
- type VPVerificationResult
- type VerifiableCredential
- type VerifiablePresentation
- type VerifyVC200JSONResponse
- type VerifyVCJSONRequestBody
- type VerifyVCRequestObject
- type VerifyVCResponse
- type VerifyVCResponseObject
- type VerifyVCdefaultApplicationProblemPlusJSONResponse
- type VerifyVP200JSONResponse
- type VerifyVPJSONRequestBody
- type VerifyVPRequestObject
- type VerifyVPResponse
- type VerifyVPResponseObject
- type VerifyVPdefaultApplicationProblemPlusJSONResponse
- type Wrapper
- func (w *Wrapper) CreateVP(ctx context.Context, request CreateVPRequestObject) (CreateVPResponseObject, error)
- func (w *Wrapper) GetCredentialsInWallet(ctx context.Context, request GetCredentialsInWalletRequestObject) (GetCredentialsInWalletResponseObject, error)
- func (w Wrapper) IssueVC(ctx context.Context, request IssueVCRequestObject) (IssueVCResponseObject, error)
- func (w *Wrapper) ListTrusted(ctx context.Context, request ListTrustedRequestObject) (ListTrustedResponseObject, error)
- func (w *Wrapper) ListUntrusted(ctx context.Context, request ListUntrustedRequestObject) (ListUntrustedResponseObject, error)
- func (w *Wrapper) LoadVC(ctx context.Context, request LoadVCRequestObject) (LoadVCResponseObject, error)
- func (w *Wrapper) RemoveCredentialFromWallet(ctx context.Context, request RemoveCredentialFromWalletRequestObject) (RemoveCredentialFromWalletResponseObject, error)
- func (w *Wrapper) ResolveStatusCode(err error) int
- func (w *Wrapper) ResolveVC(ctx context.Context, request ResolveVCRequestObject) (ResolveVCResponseObject, error)
- func (w Wrapper) RevokeVC(ctx context.Context, request RevokeVCRequestObject) (RevokeVCResponseObject, error)
- func (w *Wrapper) Routes(router core.EchoRouter)
- func (w *Wrapper) SearchCredentialsInWallet(ctx context.Context, request SearchCredentialsInWalletRequestObject) (SearchCredentialsInWalletResponseObject, error)
- func (w *Wrapper) SearchIssuedVCs(ctx context.Context, request SearchIssuedVCsRequestObject) (SearchIssuedVCsResponseObject, error)
- func (w *Wrapper) SearchVCs(ctx context.Context, request SearchVCsRequestObject) (SearchVCsResponseObject, error)
- func (w *Wrapper) TrustIssuer(ctx context.Context, request TrustIssuerRequestObject) (TrustIssuerResponseObject, error)
- func (w *Wrapper) UntrustIssuer(ctx context.Context, request UntrustIssuerRequestObject) (UntrustIssuerResponseObject, error)
- func (w *Wrapper) VerifyVC(ctx context.Context, request VerifyVCRequestObject) (VerifyVCResponseObject, error)
- func (w *Wrapper) VerifyVP(ctx context.Context, request VerifyVPRequestObject) (VerifyVPResponseObject, error)
Constants ¶
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 ¶
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 ¶
NewListTrustedRequest generates requests for ListTrusted
func NewListUntrustedRequest ¶
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 ¶
NewResolveVCRequest generates requests for ResolveVC
func NewRevokeVCRequest ¶
NewRevokeVCRequest generates requests for RevokeVC
func NewSearchCredentialsInWalletRequest ¶
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 (*Client) GetCredentialsInWallet ¶
func (*Client) IssueVC ¶
func (c *Client) IssueVC(ctx context.Context, body IssueVCJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) IssueVCWithBody ¶
func (*Client) ListTrusted ¶
func (*Client) ListUntrusted ¶
func (*Client) LoadVC ¶
func (c *Client) LoadVC(ctx context.Context, subjectID string, body LoadVCJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) LoadVCWithBody ¶
func (*Client) RemoveCredentialFromWallet ¶
func (*Client) SearchCredentialsInWallet ¶
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 (*Client) TrustIssuer ¶
func (c *Client) TrustIssuer(ctx context.Context, body TrustIssuerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) TrustIssuerWithBody ¶
func (*Client) UntrustIssuer ¶
func (c *Client) UntrustIssuer(ctx context.Context, body UntrustIssuerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UntrustIssuerWithBody ¶
func (*Client) VerifyVC ¶
func (c *Client) VerifyVC(ctx context.Context, body VerifyVCJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) VerifyVCWithBody ¶
func (*Client) VerifyVP ¶
func (c *Client) VerifyVP(ctx context.Context, body VerifyVPJSONRequestBody, 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 ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) 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 ¶
func (response CreateVPdefaultApplicationProblemPlusJSONResponse) VisitCreateVPResponse(w http.ResponseWriter) error
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 ¶
func (r GetCredentialsInWalletResponse) Status() string
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
type HttpRequestDoer ¶
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 ¶
func (response IssueVCdefaultApplicationProblemPlusJSONResponse) VisitIssueVCResponse(w http.ResponseWriter) error
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 ¶
func (response ListTrusteddefaultApplicationProblemPlusJSONResponse) VisitListTrustedResponse(w http.ResponseWriter) error
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 ¶
func (response ListUntrusteddefaultApplicationProblemPlusJSONResponse) VisitListUntrustedResponse(w http.ResponseWriter) error
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 ¶
func (response LoadVCdefaultApplicationProblemPlusJSONResponse) VisitLoadVCResponse(w http.ResponseWriter) error
type RemoveCredentialFromWallet204Response ¶
type RemoveCredentialFromWallet204Response struct {
}
func (RemoveCredentialFromWallet204Response) VisitRemoveCredentialFromWalletResponse ¶
func (response RemoveCredentialFromWallet204Response) VisitRemoveCredentialFromWalletResponse(w http.ResponseWriter) error
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 ¶
func (r RemoveCredentialFromWalletResponse) Status() string
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 ¶
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 ¶
func (response ResolveVCdefaultApplicationProblemPlusJSONResponse) VisitResolveVCResponse(w http.ResponseWriter) error
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 ¶
func (response RevokeVCdefaultApplicationProblemPlusJSONResponse) VisitRevokeVCResponse(w http.ResponseWriter) error
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 ¶
func (r SearchCredentialsInWalletResponse) Status() string
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 ¶
func (response SearchVCsdefaultApplicationProblemPlusJSONResponse) VisitSearchVCsResponse(w http.ResponseWriter) error
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.
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 ¶
func (response TrustIssuerdefaultApplicationProblemPlusJSONResponse) VisitTrustIssuerResponse(w http.ResponseWriter) error
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 ¶
func (response UntrustIssuerdefaultApplicationProblemPlusJSONResponse) VisitUntrustIssuerResponse(w http.ResponseWriter) error
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 ¶
func (response VerifyVCdefaultApplicationProblemPlusJSONResponse) VisitVerifyVCResponse(w http.ResponseWriter) error
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 ¶
func (response VerifyVPdefaultApplicationProblemPlusJSONResponse) VisitVerifyVPResponse(w http.ResponseWriter) error
type Wrapper ¶
Wrapper implements the generated interface from oapi-codegen It parses and checks the params. Handles errors and returns the appropriate response.
func (*Wrapper) CreateVP ¶
func (w *Wrapper) CreateVP(ctx context.Context, request CreateVPRequestObject) (CreateVPResponseObject, error)
CreateVP handles API request to create a Verifiable Presentation for one or more Verifiable Credentials.
func (*Wrapper) GetCredentialsInWallet ¶
func (w *Wrapper) GetCredentialsInWallet(ctx context.Context, request GetCredentialsInWalletRequestObject) (GetCredentialsInWalletResponseObject, error)
func (Wrapper) IssueVC ¶
func (w Wrapper) IssueVC(ctx context.Context, request IssueVCRequestObject) (IssueVCResponseObject, error)
IssueVC handles the API request for credential issuing.
func (*Wrapper) ListTrusted ¶
func (w *Wrapper) ListTrusted(ctx context.Context, request ListTrustedRequestObject) (ListTrustedResponseObject, error)
ListTrusted handles API request list all trusted issuers.
func (*Wrapper) ListUntrusted ¶
func (w *Wrapper) ListUntrusted(ctx context.Context, request ListUntrustedRequestObject) (ListUntrustedResponseObject, error)
ListUntrusted handles API request list all untrusted issuers, which have issued Verifiable Credentials.
func (*Wrapper) LoadVC ¶
func (w *Wrapper) LoadVC(ctx context.Context, request LoadVCRequestObject) (LoadVCResponseObject, error)
func (*Wrapper) RemoveCredentialFromWallet ¶
func (w *Wrapper) RemoveCredentialFromWallet(ctx context.Context, request RemoveCredentialFromWalletRequestObject) (RemoveCredentialFromWalletResponseObject, error)
func (*Wrapper) ResolveStatusCode ¶
ResolveStatusCode maps errors returned by this API to specific HTTP status codes.
func (*Wrapper) ResolveVC ¶
func (w *Wrapper) ResolveVC(ctx context.Context, request ResolveVCRequestObject) (ResolveVCResponseObject, error)
ResolveVC handles the API request for resolving a VC
func (Wrapper) RevokeVC ¶
func (w Wrapper) RevokeVC(ctx context.Context, request RevokeVCRequestObject) (RevokeVCResponseObject, error)
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 ¶
func (w *Wrapper) SearchCredentialsInWallet(ctx context.Context, request SearchCredentialsInWalletRequestObject) (SearchCredentialsInWalletResponseObject, error)
SearchCredentialsInWallet handles the API request for searching credentials in the holder's wallet
func (*Wrapper) SearchIssuedVCs ¶
func (w *Wrapper) SearchIssuedVCs(ctx context.Context, request SearchIssuedVCsRequestObject) (SearchIssuedVCsResponseObject, error)
SearchIssuedVCs handles the API request for searching for issued VCs
func (*Wrapper) SearchVCs ¶
func (w *Wrapper) SearchVCs(ctx context.Context, request SearchVCsRequestObject) (SearchVCsResponseObject, error)
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 ¶
func (w *Wrapper) TrustIssuer(ctx context.Context, request TrustIssuerRequestObject) (TrustIssuerResponseObject, error)
TrustIssuer handles API request to start trusting an issuer of a Verifiable Credential.
func (*Wrapper) UntrustIssuer ¶
func (w *Wrapper) UntrustIssuer(ctx context.Context, request UntrustIssuerRequestObject) (UntrustIssuerResponseObject, error)
UntrustIssuer handles API request to stop trusting an issuer of a Verifiable Credential.
func (*Wrapper) VerifyVC ¶
func (w *Wrapper) VerifyVC(ctx context.Context, request VerifyVCRequestObject) (VerifyVCResponseObject, error)
VerifyVC handles API request to verify a Verifiable Credential.
func (*Wrapper) VerifyVP ¶
func (w *Wrapper) VerifyVP(ctx context.Context, request VerifyVPRequestObject) (VerifyVPResponseObject, error)
VerifyVP handles API request to verify a Verifiable Presentation.