sql

package
v0.0.0-...-c5ab296 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MPL-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	DatabaseType string // sqlite3 / postgres
	URI          string // path or conn string
}

type SQLStore

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

func New

func New(opts Opts) (*SQLStore, error)

func (*SQLStore) AuditLogsCount

func (s *SQLStore) AuditLogsCount(query *types.AuditLogQuery) (int, error)

func (*SQLStore) AuditStatistics

func (s *SQLStore) AuditStatistics(query *types.AuditLogStatsQuery) ([]types.AuditLogStats, error)

func (*SQLStore) Close

func (s *SQLStore) Close() error

Close - closes database connection

func (*SQLStore) CreateApproval

func (s *SQLStore) CreateApproval(approval *types.Approval) (*types.Approval, error)

func (*SQLStore) CreateAuditLog

func (s *SQLStore) CreateAuditLog(entry *types.AuditLog) (id string, err error)

CreateAuditLog - create new audit log entry

func (*SQLStore) DeleteApproval

func (s *SQLStore) DeleteApproval(approval *types.Approval) error

func (*SQLStore) GetApproval

func (s *SQLStore) GetApproval(q *types.GetApprovalQuery) (*types.Approval, error)

func (*SQLStore) GetAuditLogs

func (s *SQLStore) GetAuditLogs(query *types.AuditLogQuery) (logs []*types.AuditLog, err error)

func (*SQLStore) ListApprovals

func (s *SQLStore) ListApprovals(q *types.GetApprovalQuery) ([]*types.Approval, error)

func (*SQLStore) OK

func (s *SQLStore) OK() bool

func (*SQLStore) UpdateApproval

func (s *SQLStore) UpdateApproval(approval *types.Approval) error

Jump to

Keyboard shortcuts

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