config

package
v0.0.0-...-dbfa471 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SentryDsnProd = "https://3e125fd192c34979b2f1a4a5ceb9abd6@o292308.ingest.sentry.io/6224206"
View Source
const SkipArgFlagCheckEnv = "WEBHOOKDB_SKIP_ARG_FLAG_CHECK"
View Source
const UnknownVersion = "?.?.?"

Variables

View Source
var BuildSha = "0000000000000000000000000000000000000000"
View Source
var BuildShaShort = ""
View Source
var BuildTime = "1970-01-01T00:00:00Z"
View Source
var Repo = "webhookdb/webhookdb-cli"
View Source
var Version = UnknownVersion

Functions

func MustEnvStr

func MustEnvStr(k string) string

func MustSetEnv

func MustSetEnv(k string, v interface{})

Types

type Config

type Config struct {
	// ApiHost is the URL of the service, like
	// https://api.production.webhookdb.com, or http://localhost:1234.
	ApiHost string
	// Use a non-empty environment variable value to enable debug mode,
	// which uses debug-level logging and may change other behaviors.
	Debug     bool
	LogFile   string
	LogFormat string
	LogLevel  string
	// PrefsNamespace is used to namespace different environments
	// in the .webhookdb prefs file.
	// It defaults to API_HOST but you can set it to something else
	// so multiple api hosts can use the same prefs,
	// like if they are backed by the same DB.
	PrefsNamespace   string
	Privacy          bool
	SentryDsn        string
	SkipArgFlagCheck bool
}

func LoadConfig

func LoadConfig(filenames ...string) Config

Jump to

Keyboard shortcuts

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