config

package
v0.0.0-...-92b599d Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Database = struct {
	Filename string
}{
	Filename: asString(withDefault("database.filename", "abigit.sqlite3.db")),
}
View Source
var Debug = struct {
	Enabled bool
}{
	Enabled: asBool(fetchFromFile("debug.enabled")),
}
View Source
var Git = struct {
	RepositoriesPath string
}{
	RepositoriesPath: func() string {
		const key = "git.repositoriesPath"
		x := asString(required("git.repositoriesPath"))
		x, err := filepath.Abs(x)
		if err != nil {
			log.Fatal().Err(err).Msgf("config problem: could not get absolute path of %s", key)
		}
		return x
	}(),
}
View Source
var HTTP = httpConfig{
	Host:        asString(withDefault("http.host", "0.0.0.0")),
	Port:        asInt(withDefault("http.port", 8080)),
	ExternalURL: strings.TrimSuffix(asString(required("http.externalURL")), "/"),
	// contains filtered or unexported fields
}
View Source
var OIDC = struct {
	ClientID     string
	ClientSecret string
	Issuer       string
}{
	ClientID:     asString(required("oidc.clientID")),
	ClientSecret: asString(required("oidc.clientSecret")),
	Issuer:       asString(required("oidc.issuer")),
}
View Source
var Platform = struct {
	Name string
}{
	Name: asString(withDefault("platform.name", "AbiGit")),
}
View Source
var SSH = struct {
	Host string
	User string
}{
	Host: asString(required("ssh.host")),
	User: asString(required("ssh.user")),
}

Functions

func InitLogging

func InitLogging()

Types

This section is empty.

Jump to

Keyboard shortcuts

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