postgres

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthAuditPgRepository

type AuthAuditPgRepository struct {
	*repository.BaseCRUDRepository[*domain.AuthAudit, string]
}

func NewAuthAuditPgRepository

func NewAuthAuditPgRepository(executor db.Executor, errDecipher db.ErrorDecipher) (*AuthAuditPgRepository, error)

func (*AuthAuditPgRepository) GetTail

func (aa *AuthAuditPgRepository) GetTail(ctx context.Context, tailDate time.Time) ([]string, error)

func (*AuthAuditPgRepository) ListByPeriod

func (aa *AuthAuditPgRepository) ListByPeriod(ctx context.Context, from, till time.Time, limit, offset int) ([]*domain.AuthAudit, error)

func (*AuthAuditPgRepository) ListByUsername

func (aa *AuthAuditPgRepository) ListByUsername(ctx context.Context, username string, offset, limit int) ([]*domain.AuthAudit, error)

type DataAuditPgRepository

type DataAuditPgRepository struct {
	*repository.BaseCRUDRepository[*domain.DataAudit, string]
}

func NewDataAuditPgRepository

func NewDataAuditPgRepository(executor db.Executor, errDecipher db.ErrorDecipher) (*DataAuditPgRepository, error)

func (*DataAuditPgRepository) GetTail

func (da *DataAuditPgRepository) GetTail(ctx context.Context, tailDate time.Time) ([]string, error)

func (*DataAuditPgRepository) ListByInstance

func (da *DataAuditPgRepository) ListByInstance(ctx context.Context, typeName string, instanceID string, limit, offset int) ([]*domain.DataAudit, error)

func (*DataAuditPgRepository) ListByPeriod

func (da *DataAuditPgRepository) ListByPeriod(ctx context.Context, from, till time.Time, limit, offset int) ([]*domain.DataAudit, error)

type PgDB

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

func NewPgDB

func NewPgDB(conf *config.DBConfig) (*PgDB, error)

func NewPgDBTracing

func NewPgDBTracing(conf *config.DBConfig) (*PgDB, error)

func (*PgDB) Close

func (pgdb *PgDB) Close() error

func (*PgDB) GetDB

func (pgdb *PgDB) GetDB() *sql.DB

func (*PgDB) GetDSN

func (pgdb *PgDB) GetDSN() string

func (*PgDB) GetDriver

func (pgdb *PgDB) GetDriver() string

func (*PgDB) GetQuerier

func (pgdb *PgDB) GetQuerier(ctx context.Context) db.Querier

func (*PgDB) IsUniqueViolation

func (pgdb *PgDB) IsUniqueViolation(err error) bool

Jump to

Keyboard shortcuts

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