simplessh

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(server Server, commands []CustomCmd, syncTasks []FileSync) error

Types

type CommandFunc

type CommandFunc func(args []string, client *sshclient.Client) error

type Config

type Config struct {
	Servers   []Server    `json:"servers"`
	Commands  []CustomCmd `json:"commands"`
	SyncTasks []FileSync  `json:"syncTasks"`
}

func LoadConfig

func LoadConfig(filepath string) (*Config, error)

type CustomCmd

type CustomCmd struct {
	Name string `json:"name"`
	Cmd  string `json:"cmd"`
	Desc string `json:"desc"`
}

type ExtendedCommand

type ExtendedCommand struct {
	// contains filtered or unexported fields
}

type FileSync added in v1.3.8

type FileSync struct {
	Name       string   `json:"name"`
	Desc       string   `json:"desc"`
	Ignore     []string `json:"ignore"`
	LocalPath  string   `json:"localPath"`
	RemotePath string   `json:"remotePath"`
}

type Server

type Server struct {
	Name     string `json:"name"`
	User     string `json:"user"`
	Host     string `json:"host"`
	Port     string `json:"port"`
	KeyPath  string `json:"keyPath"`
	Password string `json:"password"`
	Desc     string `json:"desc"`
}

type SyncManager added in v1.3.8

type SyncManager struct {
	// contains filtered or unexported fields
}

func (SyncManager) RunSyncTask added in v1.3.8

func (m SyncManager) RunSyncTask(name string, client *sshclient.Client) error

func (SyncManager) ShowTaskList added in v1.3.8

func (m SyncManager) ShowTaskList()

type SyncTask added in v1.3.8

type SyncTask struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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