config

package
v0.0.0-...-ec7abc8 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsPath

func AbsPath(inPath string) string

AbsPath returns an absolute path, with ~ and $VAR expanded.

func CleanupTests

func CleanupTests() error

CleanupTests can be used to clean all the CouchDB databases used for tests.

func GetSpaces

func GetSpaces() []string

func GetVirtualSpace

func GetVirtualSpace(spaceName string) (*base.VirtualSpace, error)

func GetVirtualSpaces

func GetVirtualSpaces() []string

func IsVirtualSpace

func IsVirtualSpace(spaceName string) bool

IsVirtualSpace returns true if the given space name matches a virtual space.

func PrepareSpaces

func PrepareSpaces(initStorage bool) error

PrepareSpaces makes sure that the CouchDB databases and Swift containers for the spaces exist and have their index/views.

func ReadFile

func ReadFile(file, defaultFile string) error

ReadFile reads the config file, parses it, and loads the values in viper.

func SetDefaults

func SetDefaults()

SetDefaults configures a few default values in viper.

func SetupForTests

func SetupForTests() error

SetupForTests can be used to setup the services with in-memory implementations for tests.

func SetupLogger

func SetupLogger(opts LoggerOptions)

SetupLogger configures the logger.

func SetupServices

func SetupServices() error

SetupServices connects the cache, database and storage services.

func Validate

func Validate() error

Validate the config items loaded in viper requiring validation.

Types

type LoggerOptions

type LoggerOptions struct {
	Syslog bool
}

LoggerOptions is a struct with the options for initializing the logger.

Jump to

Keyboard shortcuts

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