config

package
v0.0.0-...-2ddcf66 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: AGPL-3.0 Imports: 5 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 {
	BillingRedirect string
	Environment     string
	Mode            string
	Version         string
}

Config holds the configuration for the application.

func New

func New(version string) (*Config, error)

New initialises a new Config struct.

func (*Config) Flags

func (c *Config) Flags() []cli.Flag

Flags returns CLI flags for the application, that map to the Config struct.

func (Config) Validate

func (c Config) Validate() error

Validate checks that all flag values are valid. Most of the time this can be done within the Action() function of the flag, but sometimes it's necessary to validate based on the state of other flags.

type Environment

type Environment string

Environment is an enum for the different environments the application can run in.

type Mode

type Mode string

Mode is an enum for the different modes the application can run in.

const (
	EnvironmentDocker Mode = "docker"
	EnvironmentLocal  Mode = "local"
)
const (
	ModeBridge     Mode = "bridge"
	ModeStandalone Mode = "standalone"
)

Jump to

Keyboard shortcuts

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