config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// A long and random secret string used for authorization.
	SecretKey string `required:"true"`
	// Path to the sqlite database.
	DBPath string `required:"true"`

	LogLevel string `default:"warning"`

	// Allows you to skip authorization if the "Remote-User" header is specified.
	// Don't use it if you don't know why you need it.
	HeaderAuth bool `default:"false"`

	// Data for the first user.
	// Optional, the site also allows you to create the first user.
	DefaultUsername string
	DefaultPassword string

	// Controls the "secure" option for a token cookie.
	SecureCookie bool `default:"true"`

	// Site title.
	Title string `default:"Phoenix"`
	// Any supported css value, embedded directly into every page.
	FontFamily string `default:"sans-serif"`
}
var Cfg Config

func GetConfig

func GetConfig() (*Config, error)

func (*Config) GetLogLevel

func (cfg *Config) GetLogLevel() logrus.Level

Jump to

Keyboard shortcuts

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