storage

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

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresClient

type PostgresClient struct {
	Table       string
	Client      *sql.DB
	PutQuery    string
	GetQuery    string
	DeleteQuery string
	ListQuery   string
}

func (*PostgresClient) Close

func (c *PostgresClient) Close() error

func (*PostgresClient) CreateAdminUser

func (c *PostgresClient) CreateAdminUser(uid float64) error

func (*PostgresClient) DB

func (c *PostgresClient) DB() *sql.DB

func (*PostgresClient) GetQueryFromProjects

func (c *PostgresClient) GetQueryFromProjects(cols ...string) (*sql.Row, error)

func (*PostgresClient) IsHealthy

func (c *PostgresClient) IsHealthy() bool

func (*PostgresClient) Set

func (c *PostgresClient) Set(i interface{})

type StorageClient

type StorageClient interface {
	Close() error
	DB() *sql.DB
	IsHealthy() bool
	Set(interface{})
	CreateAdminUser(float64) error
}

func NewPostgresClient

func NewPostgresClient(username, password, database string) StorageClient

Jump to

Keyboard shortcuts

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