cfg

package
v0.0.0-...-f7150f6 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INIT    = RunStatus("INIT")
	SUCCESS = RunStatus("SUCCESS")
	WARN    = RunStatus("WARN")
	ERROR   = RunStatus("ERROR")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonConfig

type CommonConfig struct {
	Url      string `toml:"url"`
	User     string `toml:"user"`
	Password string `toml:"password"`
	Level    int    `toml:"level"`
	Timeout  int    `toml:"timeout"`
	Server   string `toml:"server"`
}

func (*CommonConfig) Check

func (c *CommonConfig) Check() error

type ExportBase

type ExportBase struct {
	Home       string
	Template   string
	ConfigPath string
}

func (*ExportBase) Check

func (b *ExportBase) Check() error

type FilterConfig

type FilterConfig struct {
	KeywordServer   string
	KeywordTestItem string
}

type RetrieveConfig

type RetrieveConfig struct {
	FromUrl        string
	ClientCertPath string
	ClientKeyPath  string
	CaPath         string
}

type RunEnv

type RunEnv struct {
	Level     int
	DryRun    bool
	Send      bool
	Datastore string
	LocalExec bool
	Timeout   int
	LogLevel  int
	CurrTime  time.Time
	AgentHome string
	Retrieve  *RetrieveConfig
	Filter    *FilterConfig
	Status    RunStatus
	Messages  string
}

func (*RunEnv) Check

func (e *RunEnv) Check() error

func (*RunEnv) ErrorEnd

func (e *RunEnv) ErrorEnd(msg string)

func (*RunEnv) NormalEnd

func (e *RunEnv) NormalEnd(msg string)

func (*RunEnv) OpenLog

func (e *RunEnv) OpenLog(fileName string) (*os.File, error)

func (*RunEnv) OpenServerLog

func (e *RunEnv) OpenServerLog(server, fileName string) (*os.File, error)

func (*RunEnv) Result

func (e *RunEnv) Result() string

func (*RunEnv) WarningEnd

func (e *RunEnv) WarningEnd(msg string)

type RunStatus

type RunStatus string

Jump to

Keyboard shortcuts

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