vdri

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InvalidRequestErrorCode is typically a code for invalid requests
	InvalidRequestErrorCode = command.Code(iota + command.VDRI)

	// CreatePublicDIDError is for failures while creating public DIDs
	CreatePublicDIDError

	// SaveDIDErrorCode for save did error
	SaveDIDErrorCode

	// GetDIDErrorCode for get did error
	GetDIDErrorCode

	// ResolveDIDErrorCode for get did error
	ResolveDIDErrorCode
)

Error codes

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

Command contains command operations provided by vdri controller

func New

func New(ctx provider) (*Command, error)

New returns new vdri controller command instance

func (*Command) CreatePublicDID

func (o *Command) CreatePublicDID(rw io.Writer, req io.Reader) command.Error

CreatePublicDID creates new public DID using agent VDRI

func (*Command) GetDID added in v0.1.3

func (o *Command) GetDID(rw io.Writer, req io.Reader) command.Error

GetDID retrieves the did from the store.

func (*Command) GetDIDRecords added in v0.1.3

func (o *Command) GetDIDRecords(rw io.Writer, req io.Reader) command.Error

GetDIDRecords retrieves the did doc containing name and didID. //TODO Add pagination feature #1566

func (*Command) GetHandlers

func (o *Command) GetHandlers() []command.Handler

GetHandlers returns list of all commands supported by this controller command

func (*Command) ResolveDID added in v0.1.3

func (o *Command) ResolveDID(rw io.Writer, req io.Reader) command.Error

ResolveDID resolve did

func (*Command) SaveDID added in v0.1.3

func (o *Command) SaveDID(rw io.Writer, req io.Reader) command.Error

SaveDID saves the did doc to the store

type CreatePublicDIDArgs

type CreatePublicDIDArgs struct {
	// Params for creating public DID
	Method string `json:"method"`

	// RequestHeader to be included while submitting request to http binding URL
	RequestHeader string `json:"header"`
}

CreatePublicDIDArgs contains parameters for creating new public DID

type CreatePublicDIDResponse

type CreatePublicDIDResponse struct {
	DID json.RawMessage `json:"did"`
}

CreatePublicDIDResponse for returning public DID created

type DIDArgs added in v0.1.3

type DIDArgs struct {
	Document
	Name string `json:"name,omitempty"`
}

DIDArgs is model for did doc with fields related to command features.

type DIDRecordResult added in v0.1.3

type DIDRecordResult struct {
	// Result
	Result []*storeDID.Record `json:"result,omitempty"`
}

DIDRecordResult holds the did doc records.

type Document added in v0.1.3

type Document struct {
	DID json.RawMessage `json:"did,omitempty"`
}

Document is model for did document.

type IDArg added in v0.1.3

type IDArg struct {
	// DidID
	ID string `json:"id"`
}

IDArg model

This is used for querying/removing by did ID from input json.

type NameArg added in v0.1.3

type NameArg struct {
	// Name
	Name string `json:"name"`
}

NameArg model

This is used for querying by did name from input json.

Jump to

Keyboard shortcuts

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