model

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimeToCursor

func TimeToCursor(t *time.Time) uint64

Types

type Agent

type Agent struct {
	AgentID      string  `faker:"agentId"`
	Label        string  `faker:"first_name"`
	RawJWT       *string `faker:"-"`
	LastAccessed time.Time
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent(a *Agent) *Agent

func (*Agent) IsNewOnboard

func (a *Agent) IsNewOnboard() bool

func (*Agent) ToNode

func (a *Agent) ToNode() *model.User

type Agents

type Agents struct {
	Agents          []*Agent
	HasNextPage     bool
	HasPreviousPage bool
}

type Connection

type Connection struct {
	OurDid        string
	TheirDid      string
	TheirEndpoint string `faker:"url"`
	TheirLabel    string `faker:"organisationLabel"`
	Invited       bool
	Approved      *time.Time `faker:"-"`
	Archived      *time.Time `faker:"-"`
	// contains filtered or unexported fields
}

func EmptyConnection

func EmptyConnection() *Connection

func NewConnection

func NewConnection(id, tenantID string, c *Connection) *Connection

func (*Connection) ToEdge

func (c *Connection) ToEdge() *model.PairwiseEdge

func (*Connection) ToNode

func (c *Connection) ToNode() *model.Pairwise

type Connections

type Connections struct {
	Connections     []*Connection
	HasNextPage     bool
	HasPreviousPage bool
}

func (*Connections) ToConnection

func (c *Connections) ToConnection() *model.PairwiseConnection

type Credential

type Credential struct {
	ConnectionID  string
	Role          model.CredentialRole `faker:"oneof: HOLDER, HOLDER"`
	SchemaID      string
	CredDefID     string                   `faker:"oneof: credDefId1, credDefId2, credDefId3"`
	Attributes    []*model.CredentialValue `faker:"credentialAttributes"`
	InitiatedByUs bool
	Approved      *time.Time `faker:"-"`
	Issued        *time.Time `faker:"-"`
	Failed        *time.Time `faker:"-"`
	Archived      *time.Time `faker:"-"`
	// contains filtered or unexported fields
}

func NewCredential

func NewCredential(tenantID string, c *Credential) *Credential

func (*Credential) Description

func (c *Credential) Description() string

func (*Credential) ToEdge

func (c *Credential) ToEdge() *model.CredentialEdge

func (*Credential) ToNode

func (c *Credential) ToNode() *model.Credential

type Credentials

type Credentials struct {
	Credentials     []*Credential
	HasNextPage     bool
	HasPreviousPage bool
}

func (*Credentials) ToConnection

func (c *Credentials) ToConnection(id *string) *model.CredentialConnection

type Event

type Event struct {
	Read         bool    `faker:"-"`
	Description  string  `faker:"sentence"`
	JobID        *string `faker:"-"`
	ConnectionID *string `faker:"-"`
	// contains filtered or unexported fields
}

func NewEvent

func NewEvent(tenantID string, e *Event) *Event

func (*Event) ToEdge

func (e *Event) ToEdge() *model.EventEdge

func (*Event) ToNode

func (e *Event) ToNode() *model.Event

type Events

type Events struct {
	Events          []*Event
	HasNextPage     bool
	HasPreviousPage bool
}

func (*Events) ToConnection

func (e *Events) ToConnection(id *string) *model.EventConnection

type Job

type Job struct {
	ProtocolType         model.ProtocolType `faker:"oneof: NONE,NONE"`
	ProtocolConnectionID *string            `faker:"-"`
	ProtocolCredentialID *string            `faker:"-"`
	ProtocolProofID      *string            `faker:"-"`
	ProtocolMessageID    *string            `faker:"-"`
	ConnectionID         *string            `faker:"-"`
	Status               model.JobStatus    `faker:"oneof: COMPLETE,COMPLETE"`
	Result               model.JobResult    `faker:"oneof: SUCCESS,SUCCESS"`
	InitiatedByUs        bool
	Updated              time.Time
	// contains filtered or unexported fields
}

func NewJob

func NewJob(id, tenantID string, j *Job) *Job

func (*Job) ToEdge

func (j *Job) ToEdge() *model.JobEdge

func (*Job) ToNode

func (j *Job) ToNode() *model.Job

type JobOutput

type JobOutput struct {
	Connection *Connection
	Credential *Credential
	Proof      *Proof
	Message    *Message
}

func (*JobOutput) ToEdges

func (j *JobOutput) ToEdges() *model.JobOutput

type Jobs

type Jobs struct {
	Jobs            []*Job
	HasNextPage     bool
	HasPreviousPage bool
}

func (*Jobs) ToConnection

func (j *Jobs) ToConnection(id *string, completed *bool) *model.JobConnection

type Message

type Message struct {
	ConnectionID string
	Message      string `faker:"sentence"`
	SentByMe     bool
	Delivered    *bool
	Archived     *time.Time `faker:"-"`
	// contains filtered or unexported fields
}

func NewMessage

func NewMessage(tenantID string, m *Message) *Message

func (*Message) Description

func (m *Message) Description() string

func (*Message) ToEdge

func (m *Message) ToEdge() *model.BasicMessageEdge

func (*Message) ToNode

func (m *Message) ToNode() *model.BasicMessage

type Messages

type Messages struct {
	Messages        []*Message
	HasNextPage     bool
	HasPreviousPage bool
}

func (*Messages) ToConnection

func (m *Messages) ToConnection(id *string) *model.BasicMessageConnection

type Proof

type Proof struct {
	ConnectionID  string
	Role          model.ProofRole         `faker:"oneof: PROVER, PROVER"`
	Attributes    []*model.ProofAttribute `faker:"proofAttributes"`
	Values        []*model.ProofValue     `faker:"-"`
	InitiatedByUs bool
	Result        bool
	Approved      *time.Time `faker:"-"`
	Verified      *time.Time `faker:"-"`
	Failed        *time.Time `faker:"-"`
	Archived      *time.Time `faker:"-"`
	// contains filtered or unexported fields
}

func NewProof

func NewProof(tenantID string, p *Proof) *Proof

func (*Proof) Description

func (p *Proof) Description() string

func (*Proof) ToEdge

func (p *Proof) ToEdge() *model.ProofEdge

func (*Proof) ToNode

func (p *Proof) ToNode() *model.Proof

type Proofs

type Proofs struct {
	Proofs          []*Proof
	HasNextPage     bool
	HasPreviousPage bool
}

func (*Proofs) ToConnection

func (p *Proofs) ToConnection(id *string) *model.ProofConnection

Jump to

Keyboard shortcuts

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