Documentation ¶
Index ¶
- Constants
- type Command
- func (o *Command) GeneratePresentation(rw io.Writer, req io.Reader) command.Error
- func (o *Command) GeneratePresentationByID(rw io.Writer, req io.Reader) command.Error
- func (o *Command) GetCredential(rw io.Writer, req io.Reader) command.Error
- func (o *Command) GetCredentialByName(rw io.Writer, req io.Reader) command.Error
- func (o *Command) GetCredentials(rw io.Writer, req io.Reader) command.Error
- func (o *Command) GetHandlers() []command.Handler
- func (o *Command) SaveCredential(rw io.Writer, req io.Reader) command.Error
- func (o *Command) ValidateCredential(rw io.Writer, req io.Reader) command.Error
- type Credential
- type CredentialExt
- type CredentialRecordResult
- type IDArg
- type NameArg
- type Presentation
Constants ¶
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 // GetCredentialErrorCode for get vc by name error GetCredentialByNameErrorCode // GeneratePresentationErrorCode for get generate vp error GeneratePresentationErrorCode // GeneratePresentationByIDErrorCode for get generate vp by vc id error GeneratePresentationByIDErrorCode )
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 (*Command) GeneratePresentation ¶
GeneratePresentation generates verifiable presentation from a verifiable credential.
func (*Command) GeneratePresentationByID ¶
GeneratePresentationByID generates verifiable presentation from a stored verifiable credential.
func (*Command) GetCredential ¶
GetCredential retrieves the verifiable credential from the store.
func (*Command) GetCredentialByName ¶
GetCredentialByName retrieves the verifiable credential by name from the store.
func (*Command) GetCredentials ¶
GetCredentials retrieves the verifiable credential records containing name and vcID.
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command.
func (*Command) SaveCredential ¶
SaveCredential saves the verifiable credential to the store.
type Credential ¶
type Credential struct {
VerifiableCredential string `json:"verifiableCredential,omitempty"`
}
Credential is model for verifiable credential.
type CredentialExt ¶
type CredentialExt struct { Credential Name string `json:"name,omitempty"` }
CredentialExt is model for verifiable credential with fields related to command features.
type CredentialRecordResult ¶
type CredentialRecordResult struct { // Result Result []*verifiable.CredentialRecord `json:"result,omitempty"` }
CredentialRecordResult holds the credential records.
type IDArg ¶
type IDArg struct { // ID ID string `json:"id"` }
IDArg model
This is used for querying/removing by ID from input json.
type NameArg ¶
type NameArg struct { // Name Name string `json:"name"` }
NameArg model
This is used for querying by name from input json.
type Presentation ¶
type Presentation struct {
VerifiablePresentation string `json:"verifiablePresentation,omitempty"`
}
Presentation is model for verifiable presentation.