config

package
v0.0.0-...-7b190fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ENV_PREFIX = "tr"

Variables

This section is empty.

Functions

func DBConnect

func DBConnect() (db.DB, error)

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 DBHost

func DBHost() string

DBHost returns the database host

func DBName

func DBName() string

DBName returns the database name

func DBPassword

func DBPassword() string

DBPassword returns the database password

func DBPort

func DBPort() int

DBPort returns the database port

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 DBSSLMode

func DBSSLMode() bool

DBSSLMode returns the database SSL mode.

func DBType

func DBType() string

DBType returns the database type chosen. Default is postgres

func DBUser

func DBUser() string

DBUser returns the database user

func FarmDefault

func FarmDefault() string

FarmDefault link of the farm repo to use by default

func FarmVersion

func FarmVersion() string

FarmVersion version of the farm repo to use by default

func GitToken

func GitToken() string

func LoadDefaults

func LoadDefaults()

func LogFormat

func LogFormat() string

LogFormat JSON or TEXT (case insensitive)

func LogLevel

func LogLevel() string

LogLevel one of: "fatal", "error", "warn", "info", "debug" (case sensitive)

func LoggerConfig

func LoggerConfig(logger *log.Logger)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL