pg

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(migratePath, host, password string, port int, reset bool) store.DB

Types

type Database

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

func (*Database) AddAgent

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

func (*Database) AddConnection

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

func (*Database) AddCredential

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

func (*Database) AddEvent

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

func (*Database) AddJob

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

func (*Database) AddMessage

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

func (*Database) AddProof

func (pg *Database) AddProof(p *model.Proof) (n *model.Proof, 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) (c *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) (e *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) 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) (e *model.Event, 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)

type PostgresError

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

func (*PostgresError) Error

func (e *PostgresError) Error() string

type PostgresErrorCode

type PostgresErrorCode string
const (
	PostgresErrorUniqueViolation PostgresErrorCode = "unique_violation"
)

Jump to

Keyboard shortcuts

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