v1

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: GPL-3.0 Imports: 20 Imported by: 1

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen version v1.8.2 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateRequest

func NewCreateRequest(server string, body CreateJSONRequestBody) (*http.Request, error)

NewCreateRequest calls the generic Create builder with application/json body

func NewCreateRequestWithBody

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

NewCreateRequestWithBody generates requests for Create with any type of body

func NewListTrustedRequest

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

NewListTrustedRequest generates requests for ListTrusted

func NewListUntrustedRequest

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

NewListUntrustedRequest generates requests for ListUntrusted

func NewResolveRequest

func NewResolveRequest(server string, id string, params *ResolveParams) (*http.Request, error)

NewResolveRequest generates requests for Resolve

func NewRevokeRequest

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

NewRevokeRequest generates requests for Revoke

func NewSearchRequest

func NewSearchRequest(server string, concept string, params *SearchParams, body SearchJSONRequestBody) (*http.Request, error)

NewSearchRequest calls the generic Search builder with application/json body

func NewSearchRequestWithBody

func NewSearchRequestWithBody(server string, concept string, params *SearchParams, contentType string, body io.Reader) (*http.Request, error)

NewSearchRequestWithBody generates requests for Search 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 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) Create

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

func (*Client) CreateWithBody

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

func (*Client) ListTrusted

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

func (*Client) ListUntrusted

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

func (*Client) Resolve

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

func (*Client) Revoke

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

func (*Client) Search

func (c *Client) Search(ctx context.Context, concept string, params *SearchParams, body SearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchWithBody

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

func (*Client) TrustIssuer

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

func (*Client) TrustIssuerWithBody

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

func (*Client) UntrustIssuer

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

func (*Client) UntrustIssuerWithBody

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

type ClientInterface

type ClientInterface interface {
	// UntrustIssuer 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)

	// TrustIssuer 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)

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

	Create(ctx context.Context, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

	// Search request with any body
	SearchWithBody(ctx context.Context, concept string, params *SearchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Search(ctx context.Context, concept string, params *SearchParams, body SearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateWithBodyWithResponse

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

CreateWithBodyWithResponse request with arbitrary body returning *CreateResponse

func (*ClientWithResponses) CreateWithResponse

func (c *ClientWithResponses) CreateWithResponse(ctx context.Context, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateResponse, 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) ResolveWithResponse

func (c *ClientWithResponses) ResolveWithResponse(ctx context.Context, id string, params *ResolveParams, reqEditors ...RequestEditorFn) (*ResolveResponse, error)

ResolveWithResponse request returning *ResolveResponse

func (*ClientWithResponses) RevokeWithResponse

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

RevokeWithResponse request returning *RevokeResponse

func (*ClientWithResponses) SearchWithBodyWithResponse

func (c *ClientWithResponses) SearchWithBodyWithResponse(ctx context.Context, concept string, params *SearchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchResponse, error)

SearchWithBodyWithResponse request with arbitrary body returning *SearchResponse

func (*ClientWithResponses) SearchWithResponse

func (c *ClientWithResponses) SearchWithResponse(ctx context.Context, concept string, params *SearchParams, body SearchJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchResponse, 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)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// UntrustIssuer 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)

	// TrustIssuer 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)

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

	CreateWithResponse(ctx context.Context, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateResponse, error)

	// Revoke request
	RevokeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*RevokeResponse, error)

	// Resolve request
	ResolveWithResponse(ctx context.Context, id string, params *ResolveParams, reqEditors ...RequestEditorFn) (*ResolveResponse, error)

	// Search request with any body
	SearchWithBodyWithResponse(ctx context.Context, concept string, params *SearchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchResponse, error)

	SearchWithResponse(ctx context.Context, concept string, params *SearchParams, body SearchJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchResponse, error)

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

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

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

type CreateJSONBody

type CreateJSONBody IssueVCRequest

CreateJSONBody defines parameters for Create.

type CreateJSONRequestBody

type CreateJSONRequestBody CreateJSONBody

CreateJSONRequestBody defines body for Create for application/json ContentType.

type CreateResponse

type CreateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseCreateResponse

func ParseCreateResponse(rsp *http.Response) (*CreateResponse, error)

ParseCreateResponse parses an HTTP response from a CreateWithResponse call

func (CreateResponse) Status

func (r CreateResponse) Status() string

Status returns HTTPResponse.Status

func (CreateResponse) StatusCode

func (r CreateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CredentialIssuer

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

	// 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 DID

type DID string

DID according to Nuts specification

type EchoRouter

type EchoRouter interface {
	Add(method string, 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 ErrorStatusCodeResolver

type ErrorStatusCodeResolver interface {
	ResolveStatusCode(err error) int
}

type HTTPClient

type HTTPClient struct {
	ServerAddress string
	Timeout       time.Duration
}

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

func (HTTPClient) Trust

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

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

func (HTTPClient) Trusted

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

Trusted lists the trusted issuers for the given credential type

func (HTTPClient) Untrust

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

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

func (HTTPClient) Untrusted

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

Untrusted lists the untrusted issuers for the given credential type

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IssueVCRequest

type IssueVCRequest = vc.VerifiableCredential

IssueVCRequest is an alias to use from within the API for issuing VCs.

type KeyValuePair

type KeyValuePair struct {
	// Fields from VCs to search on. Concept specific keys must be prepended with the concept name and a '.'. Default fields like: issuer, subject, type do not require a prefix since they are a mandatory part of each VC.
	Key   string `json:"key"`
	Value string `json:"value"`
}

used search params

type ListTrustedResponse

type ListTrustedResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]DID
}

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 ListUntrustedResponse

type ListUntrustedResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]DID
}

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 Preprocessor

type Preprocessor interface {
	Preprocess(operationID string, context echo.Context)
}

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type ResolutionResult

type ResolutionResult struct {
	// Only credentials with with "trusted" state are valid. If a revoked credential is also untrusted, revoked will be returned.
	CurrentStatus ResolutionResultCurrentStatus `json:"currentStatus"`

	// A credential according to the W3C and Nuts specs.
	VerifiableCredential VerifiableCredential `json:"verifiableCredential"`
}

result of a Resolve operation.

type ResolutionResultCurrentStatus

type ResolutionResultCurrentStatus string

Only credentials with with "trusted" state are valid. If a revoked credential is also untrusted, revoked will be returned.

const (
	ResolutionResultCurrentStatusRevoked ResolutionResultCurrentStatus = "revoked"

	ResolutionResultCurrentStatusTrusted ResolutionResultCurrentStatus = "trusted"

	ResolutionResultCurrentStatusUntrusted ResolutionResultCurrentStatus = "untrusted"
)

Defines values for ResolutionResultCurrentStatus.

type ResolveParams

type ResolveParams struct {
	// a rfc3339 time string for resolving a VC at a specific moment in time
	ResolveTime *string `json:"resolveTime,omitempty"`
}

ResolveParams defines parameters for Resolve.

type ResolveResponse

type ResolveResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseResolveResponse

func ParseResolveResponse(rsp *http.Response) (*ResolveResponse, error)

ParseResolveResponse parses an HTTP response from a ResolveWithResponse call

func (ResolveResponse) Status

func (r ResolveResponse) Status() string

Status returns HTTPResponse.Status

func (ResolveResponse) StatusCode

func (r ResolveResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Revocation

type Revocation = credential.Revocation

Revocation is an alias to use from within the API

type RevokeResponse

type RevokeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseRevokeResponse

func ParseRevokeResponse(rsp *http.Response) (*RevokeResponse, error)

ParseRevokeResponse parses an HTTP response from a RevokeWithResponse call

func (RevokeResponse) Status

func (r RevokeResponse) Status() string

Status returns HTTPResponse.Status

func (RevokeResponse) StatusCode

func (r RevokeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SearchJSONBody

type SearchJSONBody SearchRequest

SearchJSONBody defines parameters for Search.

type SearchJSONRequestBody

type SearchJSONRequestBody SearchJSONBody

SearchJSONRequestBody defines body for Search for application/json ContentType.

type SearchParams

type SearchParams struct {
	// when true, the search also returns untrusted credentials. Default false
	Untrusted *bool `json:"untrusted,omitempty"`
}

SearchParams defines parameters for Search.

type SearchRequest

type SearchRequest struct {
	// limit number of return values to x, default 10
	Limit *float32 `json:"limit,omitempty"`

	// skips first x results, default 0
	Offset *float32 `json:"offset,omitempty"`

	// key/value pairs
	Params []KeyValuePair `json:"params"`
}

Input for a search call. Parameters are entered as key/value pairs. Concept specific query params need to be prepended with the concept name.

type SearchResponse

type SearchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]map[string]interface{}
}

func ParseSearchResponse

func ParseSearchResponse(rsp *http.Response) (*SearchResponse, error)

ParseSearchResponse parses an HTTP response from a SearchWithResponse call

func (SearchResponse) Status

func (r SearchResponse) Status() string

Status returns HTTPResponse.Status

func (SearchResponse) StatusCode

func (r SearchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ServerInterface

type ServerInterface interface {
	// Remove trust in an issuer/credentialType combination
	// (DELETE /internal/vcr/v1/trust)
	UntrustIssuer(ctx echo.Context) error
	// Mark all the VCs of given type and issuer as 'trusted'.
	// (POST /internal/vcr/v1/trust)
	TrustIssuer(ctx echo.Context) error
	// Creates a new Verifiable Credential
	// (POST /internal/vcr/v1/vc)
	Create(ctx echo.Context) error
	// Revoke a credential
	// (DELETE /internal/vcr/v1/vc/{id})
	Revoke(ctx echo.Context, id string) error
	// Resolves a verifiable credential
	// (GET /internal/vcr/v1/vc/{id})
	Resolve(ctx echo.Context, id string, params ResolveParams) error
	// Search for a concept. A concept is backed by 1 or more VCs
	// (POST /internal/vcr/v1/{concept})
	Search(ctx echo.Context, concept string, params SearchParams) error
	// List all trusted issuers for a given credential type
	// (GET /internal/vcr/v1/{credentialType}/trusted)
	ListTrusted(ctx echo.Context, credentialType string) error
	// List all untrusted issuers for a given credential type
	// (GET /internal/vcr/v1/{credentialType}/untrusted)
	ListUntrusted(ctx echo.Context, credentialType string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) Create

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

Create 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) Resolve

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

Resolve converts echo context to params.

func (*ServerInterfaceWrapper) Revoke

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

Revoke converts echo context to params.

func (*ServerInterfaceWrapper) Search

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

Search 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 TrustIssuerJSONBody

type TrustIssuerJSONBody CredentialIssuer

TrustIssuerJSONBody defines parameters for TrustIssuer.

type TrustIssuerJSONRequestBody

type TrustIssuerJSONRequestBody TrustIssuerJSONBody

TrustIssuerJSONRequestBody defines body for TrustIssuer for application/json ContentType.

type TrustIssuerResponse

type TrustIssuerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

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 UntrustIssuerJSONBody

type UntrustIssuerJSONBody CredentialIssuer

UntrustIssuerJSONBody defines parameters for UntrustIssuer.

type UntrustIssuerJSONRequestBody

type UntrustIssuerJSONRequestBody UntrustIssuerJSONBody

UntrustIssuerJSONRequestBody defines body for UntrustIssuer for application/json ContentType.

type UntrustIssuerResponse

type UntrustIssuerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

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 VerifiableCredential

type VerifiableCredential = vc.VerifiableCredential

VerifiableCredential is an alias to use from within the API

type Wrapper

type Wrapper struct {
	VCR           vcr.VCR
	ConceptReader concept.Reader
}

Wrapper implements the generated interface from oapi-codegen

func (*Wrapper) Create

func (w *Wrapper) Create(ctx echo.Context) error

Create a Verifiable credential

func (*Wrapper) ListTrusted

func (w *Wrapper) ListTrusted(ctx echo.Context, credentialType string) error

func (*Wrapper) ListUntrusted

func (w *Wrapper) ListUntrusted(ctx echo.Context, credentialType string) error

func (*Wrapper) Preprocess

func (w *Wrapper) Preprocess(operationID string, context echo.Context)

Preprocess is called just before the API operation itself is invoked.

func (*Wrapper) Resolve

func (w *Wrapper) Resolve(ctx echo.Context, id string, params ResolveParams) error

func (*Wrapper) ResolveStatusCode

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

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

func (*Wrapper) Revoke

func (w *Wrapper) Revoke(ctx echo.Context, id string) error

Revoke a credential

func (*Wrapper) Routes

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

Routes registers the handler to the echo router

func (*Wrapper) Search

func (w *Wrapper) Search(ctx echo.Context, conceptName string, requestParams SearchParams) error

Search finds concepts. Concepts are mapped to VCs. This is primarily used for finding DIDs.

func (*Wrapper) TrustIssuer

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

func (*Wrapper) UntrustIssuer

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

Jump to

Keyboard shortcuts

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