Documentation ¶
Index ¶
- type CRUDResult
- type Coffee
- type Connection
- type DB
- func (db *DB) AddCoffee(c Coffee) error
- func (db *DB) AllCoffee() ([]Coffee, error)
- func (db *DB) AllExtensions() ([]Extension, error)
- func (db *DB) CoffeeDeleteAll() error
- func (db *DB) Databases() ([]Database, error)
- func (db *DB) GetCoffee(name string) (Coffee, error)
- func (db *DB) InitDDL() error
- func (db *DB) InstalledExtensions() ([]Extension, error)
- func (db *DB) Replication() ([]Replication, error)
- func (db *DB) Roles() ([]Role, error)
- func (db *DB) RunCRUD() []CRUDResult
- func (db *DB) Settings() ([]Setting, error)
- type Database
- type Extension
- type Replication
- type Role
- type Setting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRUDResult ¶
CRUDResult is a data structure that holds the results of all the CRUD operations run against the database from the RunCRUD method.
type Connection ¶
type Connection struct { DBName string Host string Password string Port int SSL string User string }
Connection is a data structure that holds all the connection info for the database.
func (*Connection) NewDB ¶
func (c *Connection) NewDB() (*DB, error)
NewDB returns a new database entity.
type DB ¶
DB returns a pointer to a sql.DB entity.
func (*DB) AllExtensions ¶
/ AllExtensions method returns all extensions available.
func (*DB) CoffeeDeleteAll ¶
CoffeeDeleteAll method deletes all rows in the sample data table 'public.coffee'
func (*DB) InstalledExtensions ¶
InstalledExtensions method returns all installed extensions in the database currently being queried.
func (*DB) Replication ¶
func (db *DB) Replication() ([]Replication, error)
Replication returns the state of replicas from the primary.
func (*DB) RunCRUD ¶
func (db *DB) RunCRUD() []CRUDResult
RunCRUD is a wrapper function that tests the database via SQL.
type Database ¶
type Database struct {
Name string
}
Database is a structure that holds the name of databases.
type Extension ¶
Extension is a data structure that holds information about extensions found in the database.
type Replication ¶
Replication is a data structure that holds replication state queried from the primary database.