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 ¶
- func NewAddNewVerificationMethodRequest(server string, did string) (*http.Request, error)
- func NewConflictedDIDsRequest(server string) (*http.Request, error)
- func NewCreateDIDRequest(server string, body CreateDIDJSONRequestBody) (*http.Request, error)
- func NewCreateDIDRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeactivateDIDRequest(server string, did string) (*http.Request, error)
- func NewDeleteVerificationMethodRequest(server string, did string, kid string) (*http.Request, error)
- func NewGetDIDRequest(server string, did string, params *GetDIDParams) (*http.Request, error)
- func NewUpdateDIDRequest(server string, did string, body UpdateDIDJSONRequestBody) (*http.Request, error)
- func NewUpdateDIDRequestWithBody(server string, did string, contentType string, body io.Reader) (*http.Request, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type AddNewVerificationMethodResponse
- type Client
- func (c *Client) AddNewVerificationMethod(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ConflictedDIDs(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CreateDID(ctx context.Context, body CreateDIDJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateDIDWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeactivateDID(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteVerificationMethod(ctx context.Context, did string, kid string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetDID(ctx context.Context, did string, params *GetDIDParams, ...) (*http.Response, error)
- func (c *Client) UpdateDID(ctx context.Context, did string, body UpdateDIDJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateDIDWithBody(ctx context.Context, did string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AddNewVerificationMethodWithResponse(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*AddNewVerificationMethodResponse, error)
- func (c *ClientWithResponses) ConflictedDIDsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ConflictedDIDsResponse, error)
- func (c *ClientWithResponses) CreateDIDWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateDIDResponse, error)
- func (c *ClientWithResponses) CreateDIDWithResponse(ctx context.Context, body CreateDIDJSONRequestBody, ...) (*CreateDIDResponse, error)
- func (c *ClientWithResponses) DeactivateDIDWithResponse(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*DeactivateDIDResponse, error)
- func (c *ClientWithResponses) DeleteVerificationMethodWithResponse(ctx context.Context, did string, kid string, reqEditors ...RequestEditorFn) (*DeleteVerificationMethodResponse, error)
- func (c *ClientWithResponses) GetDIDWithResponse(ctx context.Context, did string, params *GetDIDParams, ...) (*GetDIDResponse, error)
- func (c *ClientWithResponses) UpdateDIDWithBodyWithResponse(ctx context.Context, did string, contentType string, body io.Reader, ...) (*UpdateDIDResponse, error)
- func (c *ClientWithResponses) UpdateDIDWithResponse(ctx context.Context, did string, body UpdateDIDJSONRequestBody, ...) (*UpdateDIDResponse, error)
- type ClientWithResponsesInterface
- type ConflictedDIDsResponse
- type CreateDIDJSONBody
- type CreateDIDJSONRequestBody
- type CreateDIDResponse
- type DIDCreateRequest
- type DIDDocument
- type DIDDocumentMetadata
- type DIDResolutionResult
- type DIDUpdateRequest
- type DeactivateDIDResponse
- type DeleteVerificationMethodResponse
- type EchoRouter
- type ErrorStatusCodeResolver
- type GetDIDParams
- type GetDIDResponse
- type HTTPClient
- func (hb HTTPClient) AddNewVerificationMethod(DID string) (*did.VerificationMethod, error)
- func (hb HTTPClient) ConflictedDIDs() ([]DIDResolutionResult, error)
- func (hb HTTPClient) Create(createRequest DIDCreateRequest) (*did.Document, error)
- func (hb HTTPClient) Deactivate(DID string) error
- func (hb HTTPClient) DeleteVerificationMethod(DID, kid string) error
- func (hb HTTPClient) Get(DID string) (*DIDDocument, *DIDDocumentMetadata, error)
- func (hb HTTPClient) Update(DID string, current string, next did.Document) (*did.Document, error)
- type HttpRequestDoer
- type Preprocessor
- type RequestEditorFn
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) AddNewVerificationMethod(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ConflictedDIDs(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) CreateDID(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeactivateDID(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteVerificationMethod(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetDID(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateDID(ctx echo.Context) error
- type UpdateDIDJSONBody
- type UpdateDIDJSONRequestBody
- type UpdateDIDResponse
- type Wrapper
- func (a *Wrapper) AddNewVerificationMethod(ctx echo.Context, id string) error
- func (a *Wrapper) ConflictedDIDs(ctx echo.Context) error
- func (a Wrapper) CreateDID(ctx echo.Context) error
- func (a *Wrapper) DeactivateDID(ctx echo.Context, targetDID string) error
- func (a *Wrapper) DeleteVerificationMethod(ctx echo.Context, didStr string, kidStr string) error
- func (a *Wrapper) GetDID(ctx echo.Context, targetDID string, params GetDIDParams) error
- func (a *Wrapper) Preprocess(operationID string, context echo.Context)
- func (a *Wrapper) ResolveStatusCode(err error) int
- func (a *Wrapper) Routes(router core.EchoRouter)
- func (a Wrapper) UpdateDID(ctx echo.Context, targetDID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAddNewVerificationMethodRequest ¶
NewAddNewVerificationMethodRequest generates requests for AddNewVerificationMethod
func NewConflictedDIDsRequest ¶
NewConflictedDIDsRequest generates requests for ConflictedDIDs
func NewCreateDIDRequest ¶
func NewCreateDIDRequest(server string, body CreateDIDJSONRequestBody) (*http.Request, error)
NewCreateDIDRequest calls the generic CreateDID builder with application/json body
func NewCreateDIDRequestWithBody ¶
func NewCreateDIDRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateDIDRequestWithBody generates requests for CreateDID with any type of body
func NewDeactivateDIDRequest ¶
NewDeactivateDIDRequest generates requests for DeactivateDID
func NewDeleteVerificationMethodRequest ¶
func NewDeleteVerificationMethodRequest(server string, did string, kid string) (*http.Request, error)
NewDeleteVerificationMethodRequest generates requests for DeleteVerificationMethod
func NewGetDIDRequest ¶
NewGetDIDRequest generates requests for GetDID
func NewUpdateDIDRequest ¶
func NewUpdateDIDRequest(server string, did string, body UpdateDIDJSONRequestBody) (*http.Request, error)
NewUpdateDIDRequest calls the generic UpdateDID builder with application/json body
func NewUpdateDIDRequestWithBody ¶
func NewUpdateDIDRequestWithBody(server string, did string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateDIDRequestWithBody generates requests for UpdateDID 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 AddNewVerificationMethodResponse ¶
func ParseAddNewVerificationMethodResponse ¶
func ParseAddNewVerificationMethodResponse(rsp *http.Response) (*AddNewVerificationMethodResponse, error)
ParseAddNewVerificationMethodResponse parses an HTTP response from a AddNewVerificationMethodWithResponse call
func (AddNewVerificationMethodResponse) Status ¶
func (r AddNewVerificationMethodResponse) Status() string
Status returns HTTPResponse.Status
func (AddNewVerificationMethodResponse) StatusCode ¶
func (r AddNewVerificationMethodResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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) AddNewVerificationMethod ¶
func (*Client) ConflictedDIDs ¶
func (*Client) CreateDID ¶
func (c *Client) CreateDID(ctx context.Context, body CreateDIDJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateDIDWithBody ¶
func (*Client) DeactivateDID ¶
func (*Client) DeleteVerificationMethod ¶
func (*Client) GetDID ¶
func (c *Client) GetDID(ctx context.Context, did string, params *GetDIDParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // CreateDID request with any body CreateDIDWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateDID(ctx context.Context, body CreateDIDJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ConflictedDIDs request ConflictedDIDs(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // DeactivateDID request DeactivateDID(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetDID request GetDID(ctx context.Context, did string, params *GetDIDParams, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateDID request with any body UpdateDIDWithBody(ctx context.Context, did string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateDID(ctx context.Context, did string, body UpdateDIDJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // AddNewVerificationMethod request AddNewVerificationMethod(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteVerificationMethod request DeleteVerificationMethod(ctx context.Context, did string, kid 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) AddNewVerificationMethodWithResponse ¶
func (c *ClientWithResponses) AddNewVerificationMethodWithResponse(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*AddNewVerificationMethodResponse, error)
AddNewVerificationMethodWithResponse request returning *AddNewVerificationMethodResponse
func (*ClientWithResponses) ConflictedDIDsWithResponse ¶
func (c *ClientWithResponses) ConflictedDIDsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ConflictedDIDsResponse, error)
ConflictedDIDsWithResponse request returning *ConflictedDIDsResponse
func (*ClientWithResponses) CreateDIDWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateDIDWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDIDResponse, error)
CreateDIDWithBodyWithResponse request with arbitrary body returning *CreateDIDResponse
func (*ClientWithResponses) CreateDIDWithResponse ¶
func (c *ClientWithResponses) CreateDIDWithResponse(ctx context.Context, body CreateDIDJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDIDResponse, error)
func (*ClientWithResponses) DeactivateDIDWithResponse ¶
func (c *ClientWithResponses) DeactivateDIDWithResponse(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*DeactivateDIDResponse, error)
DeactivateDIDWithResponse request returning *DeactivateDIDResponse
func (*ClientWithResponses) DeleteVerificationMethodWithResponse ¶
func (c *ClientWithResponses) DeleteVerificationMethodWithResponse(ctx context.Context, did string, kid string, reqEditors ...RequestEditorFn) (*DeleteVerificationMethodResponse, error)
DeleteVerificationMethodWithResponse request returning *DeleteVerificationMethodResponse
func (*ClientWithResponses) GetDIDWithResponse ¶
func (c *ClientWithResponses) GetDIDWithResponse(ctx context.Context, did string, params *GetDIDParams, reqEditors ...RequestEditorFn) (*GetDIDResponse, error)
GetDIDWithResponse request returning *GetDIDResponse
func (*ClientWithResponses) UpdateDIDWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateDIDWithBodyWithResponse(ctx context.Context, did string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDIDResponse, error)
UpdateDIDWithBodyWithResponse request with arbitrary body returning *UpdateDIDResponse
func (*ClientWithResponses) UpdateDIDWithResponse ¶
func (c *ClientWithResponses) UpdateDIDWithResponse(ctx context.Context, did string, body UpdateDIDJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDIDResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // CreateDID request with any body CreateDIDWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDIDResponse, error) CreateDIDWithResponse(ctx context.Context, body CreateDIDJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDIDResponse, error) // ConflictedDIDs request ConflictedDIDsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ConflictedDIDsResponse, error) // DeactivateDID request DeactivateDIDWithResponse(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*DeactivateDIDResponse, error) // GetDID request GetDIDWithResponse(ctx context.Context, did string, params *GetDIDParams, reqEditors ...RequestEditorFn) (*GetDIDResponse, error) // UpdateDID request with any body UpdateDIDWithBodyWithResponse(ctx context.Context, did string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDIDResponse, error) UpdateDIDWithResponse(ctx context.Context, did string, body UpdateDIDJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDIDResponse, error) // AddNewVerificationMethod request AddNewVerificationMethodWithResponse(ctx context.Context, did string, reqEditors ...RequestEditorFn) (*AddNewVerificationMethodResponse, error) // DeleteVerificationMethod request DeleteVerificationMethodWithResponse(ctx context.Context, did string, kid string, reqEditors ...RequestEditorFn) (*DeleteVerificationMethodResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ConflictedDIDsResponse ¶
type ConflictedDIDsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]DIDResolutionResult }
func ParseConflictedDIDsResponse ¶
func ParseConflictedDIDsResponse(rsp *http.Response) (*ConflictedDIDsResponse, error)
ParseConflictedDIDsResponse parses an HTTP response from a ConflictedDIDsWithResponse call
func (ConflictedDIDsResponse) Status ¶
func (r ConflictedDIDsResponse) Status() string
Status returns HTTPResponse.Status
func (ConflictedDIDsResponse) StatusCode ¶
func (r ConflictedDIDsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateDIDJSONBody ¶
type CreateDIDJSONBody DIDCreateRequest
CreateDIDJSONBody defines parameters for CreateDID.
type CreateDIDJSONRequestBody ¶
type CreateDIDJSONRequestBody CreateDIDJSONBody
CreateDIDJSONRequestBody defines body for CreateDID for application/json ContentType.
type CreateDIDResponse ¶
func ParseCreateDIDResponse ¶
func ParseCreateDIDResponse(rsp *http.Response) (*CreateDIDResponse, error)
ParseCreateDIDResponse parses an HTTP response from a CreateDIDWithResponse call
func (CreateDIDResponse) Status ¶
func (r CreateDIDResponse) Status() string
Status returns HTTPResponse.Status
func (CreateDIDResponse) StatusCode ¶
func (r CreateDIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DIDCreateRequest ¶
type DIDCreateRequest struct { // indicates if the generated key pair can be used for assertions. AssertionMethod *bool `json:"assertionMethod,omitempty"` // indicates if the generated key pair can be used for authentication. Authentication *bool `json:"authentication,omitempty"` // indicates if the generated key pair can be used for capability delegations. CapabilityDelegation *bool `json:"capabilityDelegation,omitempty"` // indicates if the generated key pair can be used for altering DID Documents. // In combination with selfControl = true, the key can be used to alter the new DID Document. // Defaults to true when not given. // default: true CapabilityInvocation *bool `json:"capabilityInvocation,omitempty"` // List of DIDs that can control the new DID Document. If selfControl = true and controllers is not empty, // the newly generated DID will be added to the list of controllers. Controllers *[]string `json:"controllers,omitempty"` // indicates if the generated key pair can be used for Key agreements. KeyAgreement *bool `json:"keyAgreement,omitempty"` // whether the generated DID Document can be altered with its own capabilityInvocation key. SelfControl *bool `json:"selfControl,omitempty"` }
DIDCreateRequest defines model for DIDCreateRequest.
type DIDDocumentMetadata ¶
type DIDDocumentMetadata = types.DocumentMetadata
DIDDocumentMetadata is an alias
type DIDResolutionResult ¶
type DIDResolutionResult struct { // A DID document according to the W3C spec following the Nuts Method rules as defined in [Nuts RFC006] Document DIDDocument `json:"document"` // The DID document metadata. DocumentMetadata DIDDocumentMetadata `json:"documentMetadata"` }
DIDResolutionResult defines model for DIDResolutionResult.
type DIDUpdateRequest ¶
type DIDUpdateRequest struct { // The hash of the document in hex format. CurrentHash string `json:"currentHash"` // A DID document according to the W3C spec following the Nuts Method rules as defined in [Nuts RFC006] Document DIDDocument `json:"document"` }
DIDUpdateRequest defines model for DIDUpdateRequest.
type DeactivateDIDResponse ¶
func ParseDeactivateDIDResponse ¶
func ParseDeactivateDIDResponse(rsp *http.Response) (*DeactivateDIDResponse, error)
ParseDeactivateDIDResponse parses an HTTP response from a DeactivateDIDWithResponse call
func (DeactivateDIDResponse) Status ¶
func (r DeactivateDIDResponse) Status() string
Status returns HTTPResponse.Status
func (DeactivateDIDResponse) StatusCode ¶
func (r DeactivateDIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteVerificationMethodResponse ¶
func ParseDeleteVerificationMethodResponse ¶
func ParseDeleteVerificationMethodResponse(rsp *http.Response) (*DeleteVerificationMethodResponse, error)
ParseDeleteVerificationMethodResponse parses an HTTP response from a DeleteVerificationMethodWithResponse call
func (DeleteVerificationMethodResponse) Status ¶
func (r DeleteVerificationMethodResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteVerificationMethodResponse) StatusCode ¶
func (r DeleteVerificationMethodResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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 GetDIDParams ¶
type GetDIDParams struct { // If a versionId parameter is provided, the DID resolution algorithm returns a specific version of the DID document. // The version is the Sha256 hash of the document. // The DID parameters versionId and versionTime are mutually exclusive. // // See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) VersionId *string `json:"versionId,omitempty"` // If a versionTime parameter is provided, the DID resolution algorithm returns a specific version of the DID document. // The DID parameters versionId and versionTime are mutually exclusive. // // See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) VersionTime *string `json:"versionTime,omitempty"` }
GetDIDParams defines parameters for GetDID.
type GetDIDResponse ¶
type GetDIDResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DIDResolutionResult }
func ParseGetDIDResponse ¶
func ParseGetDIDResponse(rsp *http.Response) (*GetDIDResponse, error)
ParseGetDIDResponse parses an HTTP response from a GetDIDWithResponse call
func (GetDIDResponse) Status ¶
func (r GetDIDResponse) Status() string
Status returns HTTPResponse.Status
func (GetDIDResponse) StatusCode ¶
func (r GetDIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HTTPClient ¶
HTTPClient holds the server address and other basic settings for the http client
func (HTTPClient) AddNewVerificationMethod ¶
func (hb HTTPClient) AddNewVerificationMethod(DID string) (*did.VerificationMethod, error)
AddNewVerificationMethod creates a new verificationMethod and adds it to the DID document It expects a status 200 response from the server, returns an error otherwise
func (HTTPClient) ConflictedDIDs ¶
func (hb HTTPClient) ConflictedDIDs() ([]DIDResolutionResult, error)
ConflictedDIDs returns the conflicted DID Documents and their metadata
func (HTTPClient) Create ¶
func (hb HTTPClient) Create(createRequest DIDCreateRequest) (*did.Document, error)
Create calls the server and creates a new DID Document
func (HTTPClient) Deactivate ¶
func (hb HTTPClient) Deactivate(DID string) error
Deactivate a DID Document given a DID. It expects a status 200 response from the server, returns an error otherwise.
func (HTTPClient) DeleteVerificationMethod ¶
func (hb HTTPClient) DeleteVerificationMethod(DID, kid string) error
DeleteVerificationMethod deletes a specified verificationMethod from the DID document It expects a status 204 response from the server, returns an error otherwise
func (HTTPClient) Get ¶
func (hb HTTPClient) Get(DID string) (*DIDDocument, *DIDDocumentMetadata, error)
Get returns a DID document and metadata based on a DID
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Preprocessor ¶
type Preprocessor interface {
Preprocess(operationID string, context echo.Context)
}
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServerInterface ¶
type ServerInterface interface { // Creates a new Nuts DID // (POST /internal/vdr/v1/did) CreateDID(ctx echo.Context) error // Retrieve the list of conflicted DID documents // (GET /internal/vdr/v1/did/conflicted) ConflictedDIDs(ctx echo.Context) error // Deactivates a Nuts DID document according to the specification. // (DELETE /internal/vdr/v1/did/{did}) DeactivateDID(ctx echo.Context, did string) error // Resolves a Nuts DID document // (GET /internal/vdr/v1/did/{did}) GetDID(ctx echo.Context, did string, params GetDIDParams) error // Updates a Nuts DID document. // (PUT /internal/vdr/v1/did/{did}) UpdateDID(ctx echo.Context, did string) error // Creates and adds a new verificationMethod to the DID document. // (POST /internal/vdr/v1/did/{did}/verificationmethod) AddNewVerificationMethod(ctx echo.Context, did string) error // Delete a specific verification method // (DELETE /internal/vdr/v1/did/{did}/verificationmethod/{kid}) DeleteVerificationMethod(ctx echo.Context, did string, kid string) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) AddNewVerificationMethod ¶
func (w *ServerInterfaceWrapper) AddNewVerificationMethod(ctx echo.Context) error
AddNewVerificationMethod converts echo context to params.
func (*ServerInterfaceWrapper) ConflictedDIDs ¶
func (w *ServerInterfaceWrapper) ConflictedDIDs(ctx echo.Context) error
ConflictedDIDs converts echo context to params.
func (*ServerInterfaceWrapper) CreateDID ¶
func (w *ServerInterfaceWrapper) CreateDID(ctx echo.Context) error
CreateDID converts echo context to params.
func (*ServerInterfaceWrapper) DeactivateDID ¶
func (w *ServerInterfaceWrapper) DeactivateDID(ctx echo.Context) error
DeactivateDID converts echo context to params.
func (*ServerInterfaceWrapper) DeleteVerificationMethod ¶
func (w *ServerInterfaceWrapper) DeleteVerificationMethod(ctx echo.Context) error
DeleteVerificationMethod converts echo context to params.
func (*ServerInterfaceWrapper) GetDID ¶
func (w *ServerInterfaceWrapper) GetDID(ctx echo.Context) error
GetDID converts echo context to params.
func (*ServerInterfaceWrapper) UpdateDID ¶
func (w *ServerInterfaceWrapper) UpdateDID(ctx echo.Context) error
UpdateDID converts echo context to params.
type UpdateDIDJSONBody ¶
type UpdateDIDJSONBody DIDUpdateRequest
UpdateDIDJSONBody defines parameters for UpdateDID.
type UpdateDIDJSONRequestBody ¶
type UpdateDIDJSONRequestBody UpdateDIDJSONBody
UpdateDIDJSONRequestBody defines body for UpdateDID for application/json ContentType.
type UpdateDIDResponse ¶
func ParseUpdateDIDResponse ¶
func ParseUpdateDIDResponse(rsp *http.Response) (*UpdateDIDResponse, error)
ParseUpdateDIDResponse parses an HTTP response from a UpdateDIDWithResponse call
func (UpdateDIDResponse) Status ¶
func (r UpdateDIDResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateDIDResponse) StatusCode ¶
func (r UpdateDIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Wrapper ¶
type Wrapper struct { VDR types.VDR DocManipulator types.DocManipulator DocResolver types.DocResolver }
Wrapper is needed to connect the implementation to the echo ServiceWrapper
func (*Wrapper) AddNewVerificationMethod ¶
AddNewVerificationMethod accepts a DID and adds a new VerificationMethod to that corresponding document.
func (*Wrapper) ConflictedDIDs ¶
func (*Wrapper) DeactivateDID ¶
DeactivateDID deactivates a DID Document given a DID. It returns a 200 and an empty body if the deactivation was successful.
func (*Wrapper) DeleteVerificationMethod ¶
DeleteVerificationMethod accepts a DID and a KeyIdentifier of a verificationMethod and calls the DocManipulator to remove the verificationMethod from the given document.
func (*Wrapper) GetDID ¶
func (a *Wrapper) GetDID(ctx echo.Context, targetDID string, params GetDIDParams) error
GetDID returns a DID document and DID document metadata based on a DID.
func (*Wrapper) Preprocess ¶
Preprocess is called just before the API operation itself is invoked.
func (*Wrapper) ResolveStatusCode ¶
ResolveStatusCode maps errors returned by this API to specific HTTP status codes.
func (*Wrapper) Routes ¶
func (a *Wrapper) Routes(router core.EchoRouter)