postgres

package
v0.0.0-...-9b2646f Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConnectionDSN

func BuildConnectionDSN() string

Types

type PostgresStore

type PostgresStore struct {
	Q *pgmodel.Queries
	// contains filtered or unexported fields
}

func NewPostgresStore

func NewPostgresStore() *PostgresStore

func (*PostgresStore) CountKVEntries

func (s *PostgresStore) CountKVEntries(ctx context.Context, guildID string) (int, error)

func (*PostgresStore) DeleteKVEntry

func (s *PostgresStore) DeleteKVEntry(ctx context.Context, guildID string, key string) (model.KVEntry, error)

func (*PostgresStore) GetKVEntry

func (s *PostgresStore) GetKVEntry(ctx context.Context, guildID string, key string) (model.KVEntry, error)

func (*PostgresStore) GetMigrater

func (pgs *PostgresStore) GetMigrater() (*PostgresStoreMigrater, error)

func (*PostgresStore) IncreaseKVEntry

func (s *PostgresStore) IncreaseKVEntry(ctx context.Context, params model.KVEntryIncreaseParams) (model.KVEntry, error)

func (*PostgresStore) SearchKVEntries

func (s *PostgresStore) SearchKVEntries(ctx context.Context, guildID string, pattern string) ([]model.KVEntry, error)

func (*PostgresStore) SetKVEntry

func (s *PostgresStore) SetKVEntry(ctx context.Context, entry model.KVEntry) error

type PostgresStoreMigrater

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

func (*PostgresStoreMigrater) Close

func (mig *PostgresStoreMigrater) Close() error

func (*PostgresStoreMigrater) Down

func (mig *PostgresStoreMigrater) Down() error

func (*PostgresStoreMigrater) Force

func (mig *PostgresStoreMigrater) Force(version int) error

func (*PostgresStoreMigrater) List

func (mig *PostgresStoreMigrater) List() ([]string, error)

func (*PostgresStoreMigrater) SetLogger

func (mig *PostgresStoreMigrater) SetLogger(logger migrate.Logger)

func (*PostgresStoreMigrater) To

func (mig *PostgresStoreMigrater) To(version uint) error

func (*PostgresStoreMigrater) Up

func (mig *PostgresStoreMigrater) Up() error

func (*PostgresStoreMigrater) Version

func (mig *PostgresStoreMigrater) Version() (uint, bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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