config

package
v0.0.0-...-71a597d Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandPath

func ExpandPath(s string) string

func GetConfigPath

func GetConfigPath() string

Attempt to find config path

Types

type Config

type Config struct {
	Receiver ReceiverConfig
	Sender   SenderConfig
	Targets  map[string]Target
}

Struct for unmarshaling of opensend TOML configs

func NewConfig

func NewConfig(path string) *Config

Create new config object using values from given path

func (*Config) SetDefaults

func (config *Config) SetDefaults()

Set config defaults

type ReceiverConfig

type ReceiverConfig struct {
	DestDir      string `toml:"destinationDirectory"`
	SkipZeroconf bool
	WorkDir      string `toml:"workingDirectory"`
}

Config section for receiver

type SenderConfig

type SenderConfig struct {
	WorkDir string `toml:"workingDirectory"`
}

Config section for sender

type Target

type Target struct {
	IP string
}

Jump to

Keyboard shortcuts

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