Documentation ¶
Index ¶
- func InitDB(migratePath, host, password string, port int, reset bool) store.DB
- type Database
- func (pg *Database) AddAgent(a *model.Agent) (n *model.Agent, err error)
- func (pg *Database) AddConnection(c *model.Connection) (n *model.Connection, err error)
- func (pg *Database) AddCredential(c *model.Credential) (n *model.Credential, err error)
- func (pg *Database) AddEvent(e *model.Event) (n *model.Event, err error)
- func (pg *Database) AddJob(j *model.Job) (n *model.Job, err error)
- func (pg *Database) AddMessage(arg *model.Message) (n *model.Message, err error)
- func (pg *Database) AddProof(p *model.Proof) (n *model.Proof, err error)
- func (pg *Database) Close()
- func (pg *Database) GetAgent(id, agentID *string) (a *model.Agent, err error)
- func (pg *Database) GetConnection(id, tenantID string) (c *model.Connection, err error)
- func (pg *Database) GetConnectionCount(tenantID string) (count int, err error)
- func (pg *Database) GetConnectionForCredential(id, tenantID string) (*model.Connection, error)
- func (pg *Database) GetConnectionForEvent(id, tenantID string) (*model.Connection, error)
- func (pg *Database) GetConnectionForJob(id, tenantID string) (*model.Connection, error)
- func (pg *Database) GetConnectionForMessage(id, tenantID string) (*model.Connection, error)
- func (pg *Database) GetConnectionForProof(id, tenantID string) (*model.Connection, error)
- func (pg *Database) GetConnections(info *paginator.BatchInfo, tenantID string) (c *model.Connections, err error)
- func (pg *Database) GetCredential(id, tenantID string) (c *model.Credential, err error)
- func (pg *Database) GetCredentialCount(tenantID string, connectionID *string) (count int, err error)
- func (pg *Database) GetCredentials(info *paginator.BatchInfo, tenantID string, connectionID *string) (c *model.Credentials, err error)
- func (pg *Database) GetEvent(id, tenantID string) (e *model.Event, err error)
- func (pg *Database) GetEventCount(tenantID string, connectionID *string) (count int, err error)
- func (pg *Database) GetEvents(info *paginator.BatchInfo, tenantID string, connectionID *string) (c *model.Events, err error)
- func (pg *Database) GetJob(id, tenantID string) (job *model.Job, err error)
- func (pg *Database) GetJobCount(tenantID string, connectionID *string, completed *bool) (count int, err error)
- func (pg *Database) GetJobForEvent(id, tenantID string) (*model.Job, error)
- func (pg *Database) GetJobOutput(id, tenantID string, protocolType graph.ProtocolType) (output *model.JobOutput, err error)
- func (pg *Database) GetJobs(info *paginator.BatchInfo, tenantID string, connectionID *string, ...) (c *model.Jobs, err error)
- func (pg *Database) GetListenerAgents(info *paginator.BatchInfo) (a *model.Agents, err error)
- func (pg *Database) GetMessage(id, tenantID string) (m *model.Message, err error)
- func (pg *Database) GetMessageCount(tenantID string, connectionID *string) (count int, err error)
- func (pg *Database) GetMessages(info *paginator.BatchInfo, tenantID string, connectionID *string) (m *model.Messages, err error)
- func (pg *Database) GetProof(id, tenantID string) (p *model.Proof, err error)
- func (pg *Database) GetProofCount(tenantID string, connectionID *string) (count int, err error)
- func (pg *Database) GetProofs(info *paginator.BatchInfo, tenantID string, connectionID *string) (c *model.Proofs, err error)
- func (pg *Database) MarkEventRead(id, tenantID string) (e *model.Event, err error)
- func (pg *Database) UpdateCredential(c *model.Credential) (n *model.Credential, err error)
- func (pg *Database) UpdateJob(arg *model.Job) (j *model.Job, err error)
- func (pg *Database) UpdateMessage(arg *model.Message) (m *model.Message, err error)
- func (pg *Database) UpdateProof(p *model.Proof) (n *model.Proof, err error)
- type PostgresError
- type PostgresErrorCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
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) AddMessage ¶
func (*Database) GetConnection ¶
func (pg *Database) GetConnection(id, tenantID string) (c *model.Connection, err error)
func (*Database) GetConnectionCount ¶
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 (*Database) GetCredential ¶
func (pg *Database) GetCredential(id, tenantID string) (c *model.Credential, err error)
func (*Database) GetCredentialCount ¶
func (*Database) GetCredentials ¶
func (*Database) GetEventCount ¶
func (*Database) GetJobCount ¶
func (*Database) GetJobForEvent ¶
func (*Database) GetJobOutput ¶
func (*Database) GetListenerAgents ¶
func (*Database) GetMessage ¶
func (*Database) GetMessageCount ¶
func (*Database) GetMessages ¶
func (*Database) GetProofCount ¶
func (*Database) MarkEventRead ¶
func (*Database) UpdateCredential ¶
func (pg *Database) UpdateCredential(c *model.Credential) (n *model.Credential, err error)
func (*Database) UpdateMessage ¶
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"
)
Click to show internal directories.
Click to hide internal directories.