model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agency

type Agency interface {
	Init(l Listener, agents []*Agent, config *utils.Configuration)
	AddAgent(agent *Agent) error

	Invite(a *Agent) (string, string, error)
	Connect(a *Agent, invitation string) (string, error)
	SendMessage(a *Agent, connectionID, message string) (string, error)

	ResumeCredentialOffer(a *Agent, job *JobInfo, accept bool) error
	ResumeProofRequest(a *Agent, job *JobInfo, accept bool) error
}

type Agent

type Agent struct {
	Label    string
	RawJWT   string
	TenantID string
	AgentID  string
}

type Connection

type Connection struct {
	OurDID, TheirDID, TheirEndpoint, TheirLabel string
}

type Credential

type Credential struct {
	Role                model.CredentialRole
	SchemaID, CredDefID string
	Attributes          []*model.CredentialValue
	InitiatedByUs       bool
}

type CredentialUpdate

type CredentialUpdate struct {
	ApprovedMs, IssuedMs, FailedMs *int64
}

type JobInfo

type JobInfo struct {
	TenantID     string
	JobID        string
	ConnectionID string
}

type Listener

type Listener interface {
	AddConnection(job *JobInfo, connection *Connection)

	AddMessage(job *JobInfo, message *Message)
	UpdateMessage(job *JobInfo, update *MessageUpdate)

	AddCredential(job *JobInfo, credential *Credential)
	UpdateCredential(job *JobInfo, update *CredentialUpdate)

	AddProof(job *JobInfo, proof *Proof)
	UpdateProof(job *JobInfo, update *ProofUpdate)
}

type Message

type Message struct {
	Message  string
	SentByMe bool
}

type MessageUpdate

type MessageUpdate struct {
	Delivered bool
}

type Proof

type Proof struct {
	Role          model.ProofRole
	Attributes    []*model.ProofAttribute
	InitiatedByUs bool
}

type ProofUpdate

type ProofUpdate struct {
	ApprovedMs, VerifiedMs, FailedMs *int64
}

Jump to

Keyboard shortcuts

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