locations

package
v1.26.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MPL-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(location LocationEnum) string

func GetBaseDir

func GetBaseDir(baseDir BaseDirEnum) string

func GetTimestamped

func GetTimestamped(key LocationEnum) string

func ListExpandedPaths added in v1.21.0

func ListExpandedPaths() map[string]string

ListExpandedPaths returns a machine-readable mapping of the currently configured locations.

func PrettyPaths added in v1.21.0

func PrettyPaths() string

PrettyPaths returns a nicely formatted, human-readable listing

func Set added in v1.21.0

func Set(locationName LocationEnum, path string) error

Set overrides a location to the given path, making sure to it points to an absolute path first. Only the special "-" value will be used verbatim.

func SetBaseDir

func SetBaseDir(baseDirName BaseDirEnum, path string) error

Types

type BaseDirEnum

type BaseDirEnum string
const (
	// Overridden by --home flag
	ConfigBaseDir BaseDirEnum = "config"
	DataBaseDir   BaseDirEnum = "data"
	// User's home directory, *not* --home flag
	UserHomeBaseDir BaseDirEnum = "userHome"

	LevelDBDir = "index-v0.14.0.db"
)

type LocationEnum

type LocationEnum string
const (
	ConfigFile    LocationEnum = "config"
	CertFile      LocationEnum = "certFile"
	KeyFile       LocationEnum = "keyFile"
	HTTPSCertFile LocationEnum = "httpsCertFile"
	HTTPSKeyFile  LocationEnum = "httpsKeyFile"
	Database      LocationEnum = "database"
	LogFile       LocationEnum = "logFile"
	CsrfTokens    LocationEnum = "csrfTokens"
	PanicLog      LocationEnum = "panicLog"
	AuditLog      LocationEnum = "auditLog"
	GUIAssets     LocationEnum = "guiAssets"
	DefFolder     LocationEnum = "defFolder"
)

Use strings as keys to make printout and serialization of the locations map more meaningful.

Jump to

Keyboard shortcuts

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