Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadInput = errors.New("provided input is invalid") ErrNotFound = errors.New("resource not found") ErrDuplicate = errors.New("resource is not unique") ErrDatabaseError = errors.New("database error") )
View Source
var Version string
Version can now be provided on build using -ldflags "-X github.com/dmitry-kostin/go-rest/src/pkg.Version=1.0.0"
Functions ¶
func AnnotateError ¶
func AnnotateErrorWithDetail ¶
Types ¶
type Config ¶
type Config struct { AppHostName string `env:"APP_HOST_NAME" envDefault:"127.0.0.1"` AppEnv string `env:"APP_ENV" envDefault:"LOCAL"` AppPort string `env:"APP_PORT" envDefault:"3001"` DatabaseName string `env:"DB_APP_NAME"` DatabaseUser string `env:"DB_APP_USER"` DatabasePassword string `env:"DB_APP_PASSWORD"` DatabaseHostname string `env:"DB_APP_HOSTNAME" envDefault:"127.0.0.1"` AppAPIKeys []string `env:"APP_API_KEYS" envDefault:""` Version string `envDefault:"-"` }
Click to show internal directories.
Click to hide internal directories.