Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDbSchemaCurrent = errors.New("Database schema is up to date")
ErrDbSchemaCurrent is the error returned when no schema updates are needed.
View Source
var Migrations = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo{ name: "/", modTime: time.Date(2020, 8, 7, 21, 44, 38, 734522581, time.UTC), }, "/001_create_schema.sql": &vfsgen۰CompressedFileInfo{ name: "001_create_schema.sql", modTime: time.Date(2020, 8, 9, 17, 56, 53, 444422435, time.UTC), uncompressedSize: 405, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x6c\xd0\xbd\x6a\xeb\x30\x18\xc6\xf1\x5d\x57\xf1\x8c\x09\x1c\x73\x68\x87\x2e\x99\x14\xfb\x4d\x2b\xea\xaf\xca\x32\x24\x5d\x8a\x12\xab\x45\xe0\x58\xc6\x72\x1c\xe8\xd5\x17\xbb\x4e\x69\x68\xb4\xfe\x7f\x3c\x88\x37\x94\xc4\x15\x41\xf1\x75\x4c\x38\x79\xd3\x79\x2c\x18\x00\x5b\xe1\xf2\xc2\x27\x2e\x17\xf7\x0f\x4b\xe4\x52\x24\x5c\xee\xf0\x4c\xbb\x7f\xa3\x19\x4c\xe7\xad\x6b\x46\x23\x52\x45\x8f\x24\x91\x66\x0a\x69\x19\xc7\x88\x68\xc3\xcb\x58\xe1\x6e\x92\xe6\xa8\x6d\xfd\xbd\xa6\x68\xab\x50\xa6\xe2\xa5\xa4\x1f\x3d\x99\x56\x7b\x7f\x76\x5d\x75\x31\x57\xb1\xb7\x47\xf3\xe9\x1a\x73\x33\xea\x43\x6f\x07\x33\xad\xaf\xb3\x2c\x26\x9e\xfe\xfd\xc7\xbb\xae\xbd\x99\xf4\xa1\x33\xba\x37\xd5\x9b\xee\xa1\x44\x42\x85\xe2\x49\xae\x5e\xaf\x17\x4f\x6d\x75\xc3\x4c\xa9\x76\x1f\xb6\x19\x03\x7e\x27\xb6\x5c\x31\x16\x04\x41\x30\xcf\x43\xef\xdd\x60\xf0\x1f\x55\xe7\x5a\xec\x4d\xed\xce\x18\x33\x63\x91\xcc\xf2\xf9\xdc\x62\x03\xda\x8a\x42\x15\xf3\xe1\x43\x5e\x84\x3c\xa2\x15\xfb\x0a\x00\x00\xff\xff\x45\xcf\x9b\x7e\x95\x01\x00\x00"), }, } fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/001_create_schema.sql"].(os.FileInfo), } return fs }()
Migrations are database schema migrations, embedded by vfsgen.
View Source
var Version = "v1"
Version is the current application version. Replaced at build time.
Functions ¶
func CreateConfig ¶
CreateConfig creates a config file with the given filename.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application represents the application.
func (*Application) Shutdown ¶
func (app *Application) Shutdown() error
Shutdown shuts down the application.
func (*Application) UpdateDB ¶
func (app *Application) UpdateDB() error
UpdateDB applies database schema updates.
type Config ¶
type Config struct { Server struct { Listen string TLSListen string `toml:"tls_listen"` TLSCert string `toml:"tls_cert"` TLSKey string `toml:"tls_key"` } Database struct { URL string } Log struct { Format string Level string } }
Config represents the app configuration.
func ReadConfig ¶
ReadConfig reads a config file with the given filename.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
internal
|
|
pkg
|
|
log
Package log provides logging helpers.
|
Package log provides logging helpers. |
timezone
Package timezone provides a list of timezones.
|
Package timezone provides a list of timezones. |
validation
Package validation provides validation helpers.
|
Package validation provides validation helpers. |
Click to show internal directories.
Click to hide internal directories.