config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.0.3

type Config struct {
	LogLevel LogLevel `default:"info" split_words:"true"`
	LogFile  string   `split_words:"true"`

	ServerAddress string `default:":5050" split_words:"true"`

	TLSCertFile string `split_words:"true" required:"true"`
	TLSKeyFile  string `split_words:"true" required:"true"`

	MeshCentralURL         string `split_words:"true" required:"true"`
	MeshCentralURLParsed   *url.URL
	MeshCentralGroupPrefix string `split_words:"true" default:"plexus"`
	MeshCentralUser        string `split_words:"true" required:"true"`
	MeshCentralPass        string `split_words:"true" required:"true"`
	MeshCentralDomain      string `split_words:"true" default:"control"`

	PathPrefix string `split_words:"true" default:"/"`

	ExternalHost string `split_words:"true"`

	AuthUser string `split_words:"true"`
	AuthPass string `split_words:"true"`

	PairingURL  string `split_words:"true"`
	PairingTTL  int    `split_words:"true"`
	CompanyName string `split_words:"true"`
}

Config represents the application configuration.

func Get added in v0.0.3

func Get(file string) (Config, []futureLog)

Get loads the application config.

func (*Config) AsControlConfig added in v0.0.5

func (s *Config) AsControlConfig() *control.Config

func (*Config) AsPairingConfig added in v0.0.6

func (s *Config) AsPairingConfig() *PairingConfig

func (*Config) MeshCentralAgentURL added in v0.0.3

func (s *Config) MeshCentralAgentURL() string

func (*Config) MeshCentralControlURL added in v0.0.3

func (s *Config) MeshCentralControlURL() string

func (*Config) MeshRelayURL added in v0.0.3

func (s *Config) MeshRelayURL() string

type LogLevel added in v0.0.3

type LogLevel zerolog.Level

LogLevel type that provides helper methods for decoding.

func (LogLevel) AsZeroLogLevel added in v0.0.3

func (ll LogLevel) AsZeroLogLevel() zerolog.Level

AsZeroLogLevel converts the LogLevel to a zerolog.Level.

func (*LogLevel) Decode added in v0.0.3

func (ll *LogLevel) Decode(value string) error

Decode decodes a string to a log level.

type PairingConfig added in v0.0.6

type PairingConfig struct {
	PairingURL  string
	PairingTTL  int
	CompanyName string
}

Jump to

Keyboard shortcuts

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