conf

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 10 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 {
	General           general                          `toml:"general" json:"general"`
	Management        Management                       `toml:"mgmt_cfg" json:"mgmt_cfg"`
	PfSenseInterfaces *collect.PfSenseTranslationTable `toml:"pfsense_interfaces" json:"pfsense_interfaces"`

	Log         *log.Entry              `toml:"-" json:"-"`
	PfSenseMode bool                    `toml:"-" json:"-"`
	PfSense     *pfconf.Configuration   `toml:"-" json:"-"`
	SpeedTest   *inform.SpeedTestStatus `toml:"last_speedtest,omitempty" json:"last_speedtest,omitempty"`
	Lock        sync.Mutex              `toml:"-" json:"-"`
	// contains filtered or unexported fields
}

func New

func New(path string, jsonFormat bool) (*Config, error)

func (*Config) Read

func (c *Config) Read() error

func (*Config) Write

func (c *Config) Write() error

type Management

type Management struct {
	Version   string `toml:"configversion" json:"configversion"`
	UseAesGcm bool   `toml:"use_aes_gcm" json:"use_aes_gcm"`
	Key       string `toml:"authkey" json:"authkey"`
}

func (Management) GetCryptoMode

func (m Management) GetCryptoMode() int

func (Management) GetKey

func (m Management) GetKey() inform.Key

Jump to

Keyboard shortcuts

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