Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigDatabase ¶
type ConfigDatabase struct {
Type TypeDatabase `json:"type"`
FileDataSource string `json:"file_data_source"`
Debug bool `json:"debug"`
Migration bool `json:"migration"`
Options map[string]interface{}
}
func (ConfigDatabase) Postgrest ¶
func (c ConfigDatabase) Postgrest(name string) (pg *PostgrestConfig, err error)
func (ConfigDatabase) Sqlite ¶
func (c ConfigDatabase) Sqlite() (source string, err error)
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func NewDatabase(config *ConfigDatabase) *Database
type PostgrestConfig ¶
type TypeDatabase ¶
type TypeDatabase string
const ( SqliteType TypeDatabase = "sqlite" PostgrestType TypeDatabase = "postgres" PostgrestClusterType TypeDatabase = "postgres_cluster" )
Click to show internal directories.
Click to hide internal directories.