model

package
v0.1.42 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 3 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, archiver Archiver, config *utils.Configuration)
	AddAgent(agent *Agent) error

	Invite(a *Agent) (*InvitationData, 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 ArchiveInfo added in v0.1.3

type ArchiveInfo struct {
	AgentID       string
	JobID         string
	ConnectionID  string
	InitiatedByUs bool
}

type Archiver added in v0.1.3

type Archiver interface {
	ArchiveConnection(info *ArchiveInfo, connection *Connection)
	ArchiveMessage(info *ArchiveInfo, message *Message)
	ArchiveCredential(info *ArchiveInfo, credential *Credential)
	ArchiveProof(info *ArchiveInfo, proof *Proof)
}

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 InvitationData added in v0.1.26

type InvitationData struct {
	Raw  string
	ID   string
	Data didexchange.Invitation
}

type JobInfo

type JobInfo struct {
	TenantID     string
	JobID        string
	ConnectionID string
}

type Listener

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

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

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

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

	FailJob(job *JobInfo) error
}

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