Documentation ¶
Overview ¶
Package config provides configuration stuff
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Site []Site
}
Config is used to store all the sites in an array
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig returns a new default config
func ReadConfig ¶
ReadConfig reads a config from the given string
type Site ¶
type Site struct { Description string URL string Username string Password string LastCheck time.Time LastBytes int LastHash string }
Site is used to store information about the sites to check
type ThreadSafeConfigWrapper ¶
type ThreadSafeConfigWrapper struct {
// contains filtered or unexported fields
}
ThreadSafeConfigWrapper is a wrapper for reading and editing a configuration struct from multiple goroutines
func (*ThreadSafeConfigWrapper) Get ¶
func (t *ThreadSafeConfigWrapper) Get() Config
Get returns the stored config, threadsafe
func (*ThreadSafeConfigWrapper) Set ¶
func (t *ThreadSafeConfigWrapper) Set(c Config)
Set sets the config, threadsafe
func (*ThreadSafeConfigWrapper) SetSite ¶
func (t *ThreadSafeConfigWrapper) SetSite(pos int, s Site)
SetSite sets a specific site, threadsafe
Click to show internal directories.
Click to hide internal directories.