model

package
v0.1.167 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 6 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 {
	Base
	AgentID      string `faker:"agentId"`
	Label        string `faker:"first_name"`
	RawJWT       string `faker:"-"`
	LastAccessed time.Time
}

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 Base added in v0.1.19

type Base struct {
	ID       string `faker:"uuid_hyphenated"`
	TenantID string
	Cursor   uint64
	Created  time.Time
}

type Connection

type Connection struct {
	Base
	OurDid        string
	TheirDid      string
	TheirEndpoint string `faker:"url"`
	TheirLabel    string `faker:"organisationLabel"`
	Invited       bool
	Approved      time.Time `faker:"-"`
	Archived      time.Time `faker:"-"`
}

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 {
	Base
	ConnectionID string
	Role         model.CredentialRole `faker:"oneof: HOLDER, HOLDER"`
	SchemaID     string
	CredDefID    string `faker:"oneof: credDefId1, credDefId2, credDefId3"`
	// TODO: can we avoid pointers with slices in gql interface?
	Attributes    []*model.CredentialValue `faker:"credentialAttributes"`
	InitiatedByUs bool
	Approved      time.Time `faker:"-"`
	Issued        time.Time `faker:"-"`
	Failed        time.Time `faker:"-"`
	Archived      time.Time `faker:"-"`
}

func (*Credential) Description

func (c *Credential) Description() string

func (*Credential) IsIssued added in v0.1.19

func (c *Credential) IsIssued() bool

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 {
	Base
	Read         bool    `faker:"-"`
	Description  string  `faker:"sentence"`
	JobID        *string `faker:"-"`
	ConnectionID *string `faker:"-"`
}

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 {
	Base
	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
}

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 {
	Base
	ConnectionID string
	Message      string `faker:"sentence"`
	SentByMe     bool
	Delivered    bool
	Archived     time.Time `faker:"-"`
}

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 {
	Base
	ConnectionID  string
	Role          model.ProofRole         `faker:"oneof: PROVER, PROVER"`
	Attributes    []*model.ProofAttribute `faker:"proofAttributes"`
	Values        []*model.ProofValue     `faker:"-"`
	InitiatedByUs bool
	Result        bool
	Provable      time.Time `faker:"-"`
	Approved      time.Time `faker:"-"`
	Verified      time.Time `faker:"-"`
	Failed        time.Time `faker:"-"`
	Archived      time.Time `faker:"-"`
}

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