config

package
v0.0.0-...-b45fbc0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIG_MANAGER_ID = "ConfigManager"

Variables

This section is empty.

Functions

func GetByPath

func GetByPath(c *Config, section string, name string) string

func GetValuePtrByPath

func GetValuePtrByPath(c *Config, section string, name string) *string

func SetByPath

func SetByPath(c *Config, section string, name string, value string)

Types

type Config

type Config struct {
	Main     Main     `toml:"Main"`
	Mailer   Mailer   `toml:"Mailer"`
	Netmail  Netmail  `toml:"Netmail"`
	Echomail Echomail `toml:"Echomail"`
}

type ConfigManager

type ConfigManager struct {
	// contains filtered or unexported fields
}

func NewConfigManager

func NewConfigManager(r *registry.Container) *ConfigManager

func RestoreConfigManager

func RestoreConfigManager(r *registry.Container) *ConfigManager

func (*ConfigManager) GetConfig

func (self *ConfigManager) GetConfig() *Config

func (*ConfigManager) Restore

func (self *ConfigManager) Restore() (*Config, error)

func (*ConfigManager) Store

func (self *ConfigManager) Store(c *Config) error

type Echomail

type Echomail struct {
	Charset string
}

type Mailer

type Mailer struct {
	Interval string
}

type Main

type Main struct {
	NetAddr     string
	Password    string
	Address     string /* Point FTN address */
	Country     string
	City        string
	RealName    string
	StationName string
	Link        string /* Boss FTN address */
	TearLine    string /* Message TearLine */
	Origin      string /* Message Origin */
}

type Netmail

type Netmail struct {
	Charset string
}

type Param

type Param struct {
	Section string
	Name    string
	Prt     *string
}

func GetParams

func GetParams() []Param

Jump to

Keyboard shortcuts

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