Documentation ¶
Index ¶
- Constants
- func DBConnect() (db.DB, error)
- func DBDSN() string
- func DBHost() string
- func DBName() string
- func DBPassword() string
- func DBPort() int
- func DBRetryAttempts() int
- func DBRetryInterval() int
- func DBRetryJitter() int
- func DBSSLMode() bool
- func DBType() string
- func DBUser() string
- func FarmDefault() string
- func FarmVersion() string
- func GitToken() string
- func LoadDefaults()
- func LogFormat() string
- func LogLevel() string
- func LoggerConfig(logger *log.Logger)
- func LoggerConfigDefault()
Constants ¶
const ENV_PREFIX = "tr"
Variables ¶
This section is empty.
Functions ¶
func DBConnect ¶
DBConnect establishes a connection to the database using the connection parameters from the environment.
func DBDSN ¶
func DBDSN() string
DB_DSN returns the SQLite Data Source Name. Default is "embedded.db"
func DBRetryAttempts ¶
func DBRetryAttempts() int
DBRetryAttempts returns the max number of re-ties on DB connection request failure
func DBRetryInterval ¶
func DBRetryInterval() int
DBRetryInterval returns interval to wait for before retrying. (in seconds)
func DBRetryJitter ¶
func DBRetryJitter() int
DBRetryInterval returns additional random time (in seconds) between 0 and this, to be added to the wait time.
func LoadDefaults ¶
func LoadDefaults()
func LogLevel ¶
func LogLevel() string
LogLevel one of: "fatal", "error", "warn", "info", "debug" (case sensitive)
func LoggerConfig ¶
LoggerConfig sets up the given charmbracelet/log.Logger with defined configuration.
Example: To update standard logger configuration, do this:
LoggerConfig(log.Default())
func LoggerConfigDefault ¶
func LoggerConfigDefault()
LoggerConfigDefault sets up the default loggers with defined configuration.
Types ¶
This section is empty.