parser

package
v0.0.0-...-9e24235 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig() error

Types

type DownloadAction

type DownloadAction struct {
	Local  string `json:"local,omitempty" mapstructure:"local"`
	Remote string `json:"remote,omitempty" mapstructure:"remote"`
}

type ServerInfo

type ServerInfo struct {
	Host     string `json:"host,omitempty" mapstructure:"host"`
	User     string `json:"user,omitempty" mapstructure:"user"`
	Port     int    `json:"port,omitempty" mapstructure:"port"`
	Password string `json:"password,omitempty" mapstructure:"password"`
	SSHKey   string `json:"ssh_key,omitempty" mapstructure:"ssh_key"`
}

type Servers

type Servers map[string]ServerInfo
var ServerConfig Servers

func (*Servers) Parse

func (s *Servers) Parse() error

type Task

type Task []TaskAction

type TaskAction

type TaskAction struct {
	LocalShell  string         `json:"local_shell,omitempty" mapstructure:"local_shell"`
	RemoteShell string         `json:"remote_shell,omitempty" mapstructure:"remote_shell"`
	Upload      UploadAction   `json:"upload,omitempty"`
	Download    DownloadAction `json:"download,omitempty"`
	Run         []string       `json:"run,omitempty"`
}

type Tasks

type Tasks map[string]Task
var TaskConfig Tasks

func (*Tasks) Parse

func (t *Tasks) Parse() error

type UploadAction

type UploadAction struct {
	Local  string `json:"local,omitempty" mapstructure:"local"`
	Remote string `json:"remote,omitempty" mapstructure:"remote"`
}

Jump to

Keyboard shortcuts

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