Help us shape the future of Go! Take the 2026 Go Developer Survey

rfc0593

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// BadRequestErrorCode is typically a code for validation errors
	// for invalid issue credential controller requests.
	BadRequestErrorCode = command.Code(iota + command.RFC0593)
	// RFC0593NotApplicableErrorCode indicates the message does not apply for RFC0593.
	RFC0593NotApplicableErrorCode
	// UnableToIssueCredentialErrorCode is a generic error code.
	UnableToIssueCredentialErrorCode
)
View Source
const (
	// CommandName is the name of this command.
	CommandName = "RFC0593"

	// GetCredentialSpec is the name of the command that extracts credential specifications.
	GetCredentialSpec = "GetCredentialSpec"
	// IssueCredential is the name of the command that issues a credential based on specifications.
	IssueCredential = "IssueCredential"
	// VerifyCredential is the name of the command that verifies a credential against specifications.
	VerifyCredential = "VerifyCredential"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

Command exposes RFC0593 commands.

func New

func New(p rfc0593.Provider) *Command

New returns a new Command.

func (*Command) GetCredentialSpec

func (c *Command) GetCredentialSpec(w io.Writer, r io.Reader) command.Error

GetCredentialSpec extracts the credential specification.

func (*Command) GetHandlers

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

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

func (*Command) IssueCredential

func (c *Command) IssueCredential(w io.Writer, r io.Reader) command.Error

IssueCredential issues a credential based on a credential spec.

func (*Command) VerifyCredential

func (c *Command) VerifyCredential(w io.Writer, r io.Reader) command.Error

VerifyCredential verifies a credential against a spec.

type GetCredentialSpecArgs

type GetCredentialSpecArgs struct {
	Message json.RawMessage `json:"message"`
}

GetCredentialSpecArgs model.

type GetCredentialSpecResponse

type GetCredentialSpecResponse struct {
	Spec *rfc0593.CredentialSpec `json:"spec"`
}

GetCredentialSpecResponse model.

type IssueCredentialArgs

type IssueCredentialArgs struct {
	Spec rfc0593.CredentialSpec `json:"spec"`
}

IssueCredentialArgs model.

type IssueCredentialResponse

type IssueCredentialResponse struct {
	IssueCredential *issuecredential.IssueCredentialV2 `json:"issue_credential"`
}

IssueCredentialResponse model.

type VerifyCredentialArgs

type VerifyCredentialArgs struct {
	Credential json.RawMessage        `json:"credential"`
	Spec       rfc0593.CredentialSpec `json:"spec"`
}

VerifyCredentialArgs model.

Jump to

Keyboard shortcuts

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