options

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFile string

Functions

This section is empty.

Types

type Options

type Options struct {
	Addr    string        `toml:"addr"`
	Sock    string        `toml:"sock"`
	Logfile string        `toml:"logfile"`
	Quiet   bool          `toml:"quiet"`
	EOL     string        `toml:"eol"`
	TLS     TLSOptions    `toml:"tls"`
	Server  ServerOptions `toml:"server"`
}

func LoadConfig

func LoadConfig() (*Options, error)

func (*Options) AbsPaths

func (o *Options) AbsPaths()

func (*Options) Address

func (o *Options) Address() string

func (*Options) Clone

func (o *Options) Clone() *Options

func (*Options) EOLCode

func (o *Options) EOLCode() string

func (*Options) Fill

func (o *Options) Fill(other *Options)

func (*Options) NetAddr

func (o *Options) NetAddr() (net.Addr, error)

func (*Options) Network

func (o *Options) Network() string

type ServerOptions

type ServerOptions struct {
	Daemon    bool     `toml:"daemon"`
	AllowCmds []string `toml:"allow-commands"`
}

func (*ServerOptions) AllowCommands

func (o *ServerOptions) AllowCommands() []string

func (*ServerOptions) Clone

func (o *ServerOptions) Clone() *ServerOptions

func (*ServerOptions) Fill

func (o *ServerOptions) Fill(other *ServerOptions)

type TLSOptions

type TLSOptions struct {
	CertFile   string `toml:"cert"`
	KeyFile    string `toml:"key"`
	CAFile     string `toml:"ca"`
	ServerName string `toml:"server-name"`
	Insecure   bool   `toml:"insecure"`
}

func (*TLSOptions) AbsPaths

func (o *TLSOptions) AbsPaths()

func (*TLSOptions) Clone

func (o *TLSOptions) Clone() *TLSOptions

func (*TLSOptions) Fill

func (o *TLSOptions) Fill(other *TLSOptions)

Jump to

Keyboard shortcuts

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