postgresql

package
v0.0.0-...-b1b3351 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDatabaseConnection is returned when server fails to connect to
	// the database.
	ErrDatabaseConnection = errors.New("database connection error")
	// ErrDatabasePing is returned when server fails to ping the
	// database.
	ErrDatabasePing = errors.New("database ping error")
	// ErrPreparingStmt is returned when server fails to prepare
	// a prepared statement.
	ErrPreparingStmt = errors.New("error executing prepared statement")
	// ErrExecutingPreparedStmt is returned when server fails to execute
	// a query with a prepared statement.
	ErrExecutingPreparedStmt = errors.New("error executing prepared statement")
	// ErrScanningRows is returned when server fails to scan the rows
	// returned by a query.
	ErrScanningRows = errors.New("error trying to scan result rows")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	User     string
	Password string
	DBName   string
	IdleConn int
	MaxConn  int
}

type StatsService

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

func NewStatsService

func NewStatsService(config Config) (StatsService, error)

func (StatsService) GetByID

func (s StatsService) GetByID(statsDescriptorID string) (benchttp.Stats, error)

func (StatsService) ListAvailable

func (s StatsService) ListAvailable(userID string) ([]benchttp.StatsDescriptor, error)

Jump to

Keyboard shortcuts

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