Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PersisterNameToType maps valid persister names to the types above PersisterNameToType = map[string]PersisterType{ "none": PersisterTypeNone, "postgresql": PersisterTypePostgresql, } )
Functions ¶
func OutputUsage ¶
OutputUsage is a generic function to output a list of available environment vars based on the given config struct.
func PopulateFromDotEnv ¶
PopulateFromDotEnv attempts to retrieve env vars from .env files to populate into the environment. envEnvVar passed in indicates the env var that specifies the environment to use "test", "development", "production" for the .env file
Types ¶
type PersisterConfig ¶
type PersisterConfig interface { PersistType() PersisterType Address() string Port() int Dbname() string User() string Password() string PoolMaxConns() *int PoolMaxIdleConns() *int PoolConnLifetimeSecs() *int DataVersion() string }
PersisterConfig defines the interfaces for persister-related configuration
type PersisterType ¶
type PersisterType int
PersisterType is the type of persister to use.
const ( // PersisterTypeInvalid is an invalid persister value PersisterTypeInvalid PersisterType = iota // PersisterTypeNone is a persister that does nothing but return default values PersisterTypeNone // PersisterTypePostgresql is a persister that uses PostgreSQL as the backend PersisterTypePostgresql )
func PersisterTypeFromName ¶
func PersisterTypeFromName(typeStr string) (PersisterType, error)
PersisterTypeFromName returns the correct persisterType from the string name
Click to show internal directories.
Click to hide internal directories.