pg

package
v0.1.133 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(config *utils.Configuration, reset, createDB bool) store.DB

Types

type Database

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

func (*Database) AddAgent

func (pg *Database) AddAgent(a *model.Agent) (newAgent *model.Agent, err error)

func (*Database) AddConnection

func (pg *Database) AddConnection(c *model.Connection) (newConnection *model.Connection, err error)

func (*Database) AddCredential

func (pg *Database) AddCredential(c *model.Credential) (cred *model.Credential, err error)

func (*Database) AddEvent

func (pg *Database) AddEvent(e *model.Event) (event *model.Event, err error)

func (*Database) AddJob

func (pg *Database) AddJob(j *model.Job) (job *model.Job, err error)

func (*Database) AddMessage

func (pg *Database) AddMessage(arg *model.Message) (msg *model.Message, err error)

func (*Database) AddProof

func (pg *Database) AddProof(p *model.Proof) (proof *model.Proof, err error)

func (*Database) ArchiveConnection added in v0.1.3

func (pg *Database) ArchiveConnection(id, tenantID string) (err error)

func (*Database) ArchiveCredential added in v0.1.3

func (pg *Database) ArchiveCredential(id, tenantID string) (err error)

func (*Database) ArchiveMessage added in v0.1.3

func (pg *Database) ArchiveMessage(id, tenantID string) (err error)

func (*Database) ArchiveProof added in v0.1.3

func (pg *Database) ArchiveProof(id, tenantID string) (err error)

func (*Database) Close

func (pg *Database) Close()

func (*Database) GetAgent

func (pg *Database) GetAgent(id, agentID *string) (a *model.Agent, err error)

func (*Database) GetConnection

func (pg *Database) GetConnection(id, tenantID string) (c *model.Connection, err error)

func (*Database) GetConnectionCount

func (pg *Database) GetConnectionCount(tenantID string) (count int, err error)

func (*Database) GetConnectionForCredential

func (pg *Database) GetConnectionForCredential(id, tenantID string) (*model.Connection, error)

func (*Database) GetConnectionForEvent

func (pg *Database) GetConnectionForEvent(id, tenantID string) (*model.Connection, error)

func (*Database) GetConnectionForJob

func (pg *Database) GetConnectionForJob(id, tenantID string) (*model.Connection, error)

func (*Database) GetConnectionForMessage

func (pg *Database) GetConnectionForMessage(id, tenantID string) (*model.Connection, error)

func (*Database) GetConnectionForProof

func (pg *Database) GetConnectionForProof(id, tenantID string) (*model.Connection, error)

func (*Database) GetConnections

func (pg *Database) GetConnections(info *paginator.BatchInfo, tenantID string) (c *model.Connections, err error)

func (*Database) GetCredential

func (pg *Database) GetCredential(id, tenantID string) (cred *model.Credential, err error)

func (*Database) GetCredentialCount

func (pg *Database) GetCredentialCount(tenantID string, connectionID *string) (count int, err error)

func (*Database) GetCredentials

func (pg *Database) GetCredentials(info *paginator.BatchInfo, tenantID string, connectionID *string) (c *model.Credentials, err error)

func (*Database) GetEvent

func (pg *Database) GetEvent(id, tenantID string) (event *model.Event, err error)

func (*Database) GetEventCount

func (pg *Database) GetEventCount(tenantID string, connectionID *string) (count int, err error)

func (*Database) GetEvents

func (pg *Database) GetEvents(info *paginator.BatchInfo, tenantID string, connectionID *string) (c *model.Events, err error)

func (*Database) GetJob

func (pg *Database) GetJob(id, tenantID string) (job *model.Job, err error)

func (*Database) GetJobCount

func (pg *Database) GetJobCount(tenantID string, connectionID *string, completed *bool) (count int, err error)

func (*Database) GetJobForEvent

func (pg *Database) GetJobForEvent(id, tenantID string) (*model.Job, error)

func (*Database) GetJobOutput

func (pg *Database) GetJobOutput(id, tenantID string, protocolType graph.ProtocolType) (output *model.JobOutput, err error)

func (*Database) GetJobs

func (pg *Database) GetJobs(info *paginator.BatchInfo, tenantID string, connectionID *string, completed *bool) (c *model.Jobs, err error)

func (*Database) GetListenerAgents

func (pg *Database) GetListenerAgents(info *paginator.BatchInfo) (a *model.Agents, err error)

func (*Database) GetMessage

func (pg *Database) GetMessage(id, tenantID string) (m *model.Message, err error)

func (*Database) GetMessageCount

func (pg *Database) GetMessageCount(tenantID string, connectionID *string) (count int, err error)

func (*Database) GetMessages

func (pg *Database) GetMessages(info *paginator.BatchInfo, tenantID string, connectionID *string) (m *model.Messages, err error)

func (*Database) GetOpenProofJobs added in v0.1.17

func (pg *Database) GetOpenProofJobs(tenantID string, proofAttributes []*graph.ProofAttribute) (jobs []*model.Job, err error)

func (*Database) GetProof

func (pg *Database) GetProof(id, tenantID string) (p *model.Proof, err error)

func (*Database) GetProofCount

func (pg *Database) GetProofCount(tenantID string, connectionID *string) (count int, err error)

func (*Database) GetProofs

func (pg *Database) GetProofs(info *paginator.BatchInfo, tenantID string, connectionID *string) (c *model.Proofs, err error)

func (*Database) MarkEventRead

func (pg *Database) MarkEventRead(id, tenantID string) (event *model.Event, err error)

func (*Database) SearchCredentials added in v0.1.3

func (pg *Database) SearchCredentials(
	tenantID string,
	proofAttributes []*graph.ProofAttribute,
) (res []*graph.ProvableAttribute, err error)

func (*Database) UpdateCredential

func (pg *Database) UpdateCredential(c *model.Credential) (n *model.Credential, err error)

func (*Database) UpdateJob

func (pg *Database) UpdateJob(arg *model.Job) (j *model.Job, err error)

func (*Database) UpdateMessage

func (pg *Database) UpdateMessage(arg *model.Message) (m *model.Message, err error)

func (*Database) UpdateProof

func (pg *Database) UpdateProof(p *model.Proof) (n *model.Proof, err error)

Jump to

Keyboard shortcuts

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