verifiable

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 10 Imported by: 9

Documentation

Index

Constants

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

	// ValidateCredential for validate vc error
	ValidateCredentialErrorCode

	// SaveCredentialErrorCode for save vc error
	SaveCredentialErrorCode

	// GetCredentialErrorCode for get vc error
	GetCredentialErrorCode
)

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 verifiable credential controller.

func New

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

New returns new verifiable credential controller command instance.

func (*Command) GetCredential

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

GetCredential retrives the verifiable credential from the store.

func (*Command) GetHandlers

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

GetHandlers returns list of all commands supported by this controller command.

func (*Command) SaveCredential

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

SaveCredential saves the verifiable credential to the store.

func (*Command) ValidateCredential

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

ValidateCredential validates the verifiable credential.

type Credential

type Credential struct {
	VC string `json:"vc,omitempty"`
}

Credential is model for verifiable credential.

type IDArg

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

IDArg model

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

Jump to

Keyboard shortcuts

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