schema

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certs

type Certs struct {
	Directory string
	Generate  bool
}

Certs .

type Command

type Command struct {
	Body        string   `toml:"body"`
	Expect      string   `toml:"expect"`
	MatchPrefix string   `toml:"match_prefix"`
	Match       string   `toml:"match"`
	Sleep       Duration `toml:"sleep"`

	Result string
}

Command specifies single command, expected (or not) comamnd's result and optional sleep time that should be performed after command execution.

type CustomSequence

type CustomSequence struct {
	Command []Command
}

type DBConfig

type DBConfig struct {
	Driver     string
	Params     string
	Connection interface{}
	IDserver   int `toml:"id_server"`
	Queries    DBQueries
}

DBConfig defines database connection settings.

type DBQueries

type DBQueries struct {
	GetDevices   string `toml:"get_devices"`
	UpdateDevice string `toml:"update_device"`
}

DBQueries defines list of database queries.

type Duration

type Duration struct {
	time.Duration
}

Duration type.

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText does unmarshal time duration format.

type Error

type Error struct {
	Host
	Message string
}

Error response from worker.

type GeneralConfig

type GeneralConfig struct {
	Version           string
	IgnoreErrors      bool
	Verbose           bool
	SkipSummary       bool
	SkipVersionCheck  bool
	Workers           int   `toml:"workers"`
	VerifySleep       int   `toml:"verify_check_sleep"`
	Certs             Certs `toml:"certificates_store"`
	Service           map[string]*Service
	ModeHandler       ModeHandlerFunc
	DB                DBConfig
	CustomSSHSequence *CustomSequence `toml:"custom-ssh"`
	CustomAPISequence *CustomSequence `toml:"custom-api"`
}

GeneralConfig main application configuration.

type Host

type Host struct {
	ID   int
	IP   string
	Port string
	User string
	Pass string
}

func HostParser

func HostParser(oldHost Host) (Host, error)

func (Host) String

func (h Host) String() string

type HostParserFunc

type HostParserFunc func(Host) (Host, error)

HostParserFunc ...

type HostsCleanerFunc

type HostsCleanerFunc func()

HostsCleanerFunc cleanups handlers, connections, open sockets, files etc. used by Loader/Saver/Parser.

type HostsLoaderFunc

type HostsLoaderFunc func(HostParserFunc) ([]Host, error)

HostsLoaderFunc ...

type ModeHandlerFunc

type ModeHandlerFunc func(context.Context, *GeneralConfig, Host) error

type Service

type Service struct {
	DefaultPort string `toml:"port"`
	DefaultUser string `toml:"user"`
	DefaultPass string `toml:"password"`
}

Service authentication parameters.

Jump to

Keyboard shortcuts

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