config

package
v0.0.0-...-4d10510 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeQuiet

func BeQuiet()

BeQuiet instruct this package to be more frugal with logging/printing info.

Types

type Config

type Config struct {
	AppPath      string
	Host         string
	Port         int
	HTTP         httpRec
	LiveMode     bool
	DevelMode    bool
	Session      session
	Registration struct{ Allowed bool }
	Logger       struct {
		JSON bool
		Fmt  string
	}
	Init initialiser
	// Mailer is currently a noop.
	Mailer mailer
}

Config represents the Dhall configuration schema, https://git.dotya.ml/mirre-mt/pcmt-config-schema/ for reference.

func Load

func Load(conf string, isPath bool) (*Config, error)

Load attempts to parse the Dhall configuration, returns (nil, err) on error.

func (*Config) SessionSecretsAreHex

func (c *Config) SessionSecretsAreHex() (bool, bool)

SessionSecretsAreHex returns whether session secrets are hex-encoded.

Jump to

Keyboard shortcuts

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