Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionDetails ¶
type Postgre ¶
type Postgre struct { Database *sql.DB ConnectionDetails }
Postgre is a provider that uses PostgreSQL as the underlying database.
type Provider ¶
type Provider interface { io.Closer Balance(UUID string) (uint64, error) Set(UUID string, value uint64) error Close() error }
Provider is an interface that defines the methods that a provider must implement.
type SQLite ¶
SQLite is a provider that uses SQLite as the underlying database.
func NewPostgre ¶
func NewPostgre(c ConnectionDetails) (*SQLite, error)
NewPostgre creates a new Postgre provider and opens the database. If the economy database does not exist, it will be created.
func NewSQLite ¶
NewSQLite creates a new SQLite provider and opens the database. If the economy database does not exist, it will be created.
Click to show internal directories.
Click to hide internal directories.