sriracha/cmd/sriracha/config.go

28 lines
1000 B
Go

package main
// AppConfig defines the database configuration. All other configuration
// options are stored within the database.
type AppConfig struct {
// Driver specifies the database driver to use. By default, the "sqlite"
// and "pq" (PostgreSQL) drivers are available. Sriracha may be compiled
// with support for any other database driver by adding it to the imports.
Driver string
// DataSource defines the where and how to interface with the database. Its
// contents depend on which database driver is in use.
//
// When using the "sqlite" driver, Datasource may be set to a file path,
// typically ending in ".db".
//
// See https://pkg.go.dev/modernc.org/sqlite#Driver.Open for a full list of options.
//
// When using the "pq" driver, DataSource may be set as follows:
//
// postgres://username:password@localhost:5432/database?sslmode=disable
//
// See https://pkg.go.dev/github.com/lib/pq for a full list of options.
DataSource string
}
var config = &AppConfig{}