config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Config

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

func (*Config) AddSection

func (c *Config) AddSection(section, typ string) error

func (*Config) Del

func (c *Config) Del(section, option string) error

func (*Config) DelSection

func (c *Config) DelSection(section string) error

func (*Config) Dependencies

func (c *Config) Dependencies() instance.Dependencies

func (*Config) Get

func (c *Config) Get(section, option string) ([]string, bool, error)

func (*Config) GetBool

func (c *Config) GetBool(section, option string) (bool, bool, error)

func (*Config) GetBoolDefault

func (c *Config) GetBoolDefault(section, option string, def bool) (bool, error)

func (*Config) GetDependentInstance

func (c *Config) GetDependentInstance(_ instance.ID) instance.DependencyInstance

In theory an instance could call this method with an suspicious argument. Currently this is not dangerous because all instances that have access to an filesystem instance have the same rights

func (*Config) GetInt

func (c *Config) GetInt(section, option string) (int, bool, error)

func (*Config) GetIntDefault

func (c *Config) GetIntDefault(section, option string, def int) (int, error)

func (*Config) GetIntList

func (c *Config) GetIntList(section, option string) ([]int, bool, error)

func (*Config) GetLast

func (c *Config) GetLast(section, option string) (string, bool, error)

func (*Config) GetSections

func (c *Config) GetSections(secType string) ([]string, bool, error)

func (*Config) GetStringDefault

func (c *Config) GetStringDefault(section, option string, def string) (string, error)

func (*Config) ID

func (c *Config) ID() instance.ID

func (*Config) OnServiceListChanged

func (c *Config) OnServiceListChanged()

func (*Config) Set

func (c *Config) Set(section, option string, values ...string) (bool, error)

func (*Config) SetDependenciesChangedHandler

func (c *Config) SetDependenciesChangedHandler(_ func())

func (*Config) SetDependency

func (c *Config) SetDependency(i instance.DependencyInstance)

func (*Config) SetServiceListGetter

func (c *Config) SetServiceListGetter(_ func() []string)

func (*Config) Start

func (c *Config) Start()

func (*Config) Stop

func (c *Config) Stop()

func (*Config) UnsetDependency

func (c *Config) UnsetDependency(id instance.ID)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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