Documentation ¶
Index ¶
- Constants
- Variables
- func ColonEscape(s string) string
- func EnvKeyEscape(s string) string
- func GenHostsConfig(enabledHosts []*Host) ([]byte, error)
- func GetContentFromPath(shellPath string) ([]byte, error)
- func GetTags(hosts map[string]*Host) []string
- func HostnameAlignString(host *Host, hosts []*Host) func(string) string
- func InitLuaState(L *lua.LState)
- func Run(osArgs []string) (exitStatus int)
- func ShellEscape(s string) string
- func UpdateSSHConfig(outputConfig string, enabledHosts []*Host) ([]byte, error)
- type CallbackWriter
- type Driver
- type Group
- type GroupType
- type Host
- type HostQuery
- func (hostQuery *HostQuery) AppendFilter(filter string) *HostQuery
- func (hostQuery *HostQuery) AppendFilters(filters []string) *HostQuery
- func (hostQuery *HostQuery) AppendSelection(selection string) *HostQuery
- func (hostQuery *HostQuery) AppendSelections(selections []string) *HostQuery
- func (hostQuery *HostQuery) GetHosts() []*Host
- func (hostQuery *HostQuery) GetHostsOrderByName() []*Host
- func (hostQuery *HostQuery) SetDatasource(datasource map[string]*Host) *HostQuery
- type NameSortableHosts
- type NameSortableTasks
- type Registry
- type Task
- type TaskQuery
Constants ¶
View Source
const ( RegistryTypeGlobal = 0 RegistryTypeLocal = 1 )
View Source
const ( TASK_BACKEND_LOCAL = "local" TASK_BACKEND_REMOTE = "remote" )
View Source
const EnvironmentTemplate = `` /* 961-byte string literal not displayed */
View Source
const (
ExitErr = 1
)
View Source
const FunctionsTemplate = `` /* 157-byte string literal not displayed */
View Source
const LDriverClass = "Driver*"
View Source
const LGroupClass = "Group*"
View Source
const LHostClass = "Host*"
View Source
const LHostQueryClass = "HostQuery*"
View Source
const LRegistryClass = "Registry*"
View Source
const LTaskClass = "Task*"
Variables ¶
View Source
var ( UserConfigFile string UserOverrideConfigFile string UserDataDir string WorkingDirConfigFile string WorkingDirOverrideConfigFile string WorkingDataDir string WorkingDir string Executable string )
system configurations.
View Source
var ( DefaultPrefixLocal = `[local:{{.Host.Name}}]{{HostnameAlignString " "}}` DefaultPrefixRemote = `[remote:{{.Host.Name}}]{{HostnameAlignString " "}}` )
View Source
var ( CommitHash string = "unknown" Version string = "dev" )
View Source
var ALIASES_CODE = `` /* 289-byte string literal not displayed */
View Source
var BASH_COMPLETION = `` /* 4339-byte string literal not displayed */
View Source
var DefaultDriverName = "default"
View Source
var DefaultTaskName = "default"
View Source
var Drivers map[string]*Driver
View Source
var Hosts map[string]*Host
View Source
var (
SSHConfigFlag bool
)
flags
View Source
var Tasks map[string]*Task
View Source
var ZSH_COMPLETION = `` /* 7117-byte string literal not displayed */
Functions ¶
func ColonEscape ¶ added in v0.24.0
func EnvKeyEscape ¶ added in v0.17.0
func GenHostsConfig ¶
func GetContentFromPath ¶ added in v0.25.0
func HostnameAlignString ¶ added in v0.49.0
func InitLuaState ¶
func InitLuaState(L *lua.LState)
func ShellEscape ¶ added in v0.12.0
Types ¶
type CallbackWriter ¶ added in v0.12.0
type CallbackWriter struct {
Func func(data []byte)
}
type Driver ¶ added in v0.25.0
type Driver struct { Name string Props map[string]interface{} Engine func(*Driver) (string, error) Registry *Registry Group *Group LValues map[string]lua.LValue Parent *Driver Child *Driver }
var DefaultDriver *Driver
func (*Driver) GenerateRunnableContent ¶ added in v0.25.0
func (*Driver) MapLValuesToLTable ¶ added in v0.71.0
func (driver *Driver) MapLValuesToLTable(tb *lua.LTable)
type Group ¶ added in v0.85.0
type Group struct { Type GroupType Hosts map[string]*Host Tasks map[string]*Task Drivers map[string]*Driver LValues map[string]lua.LValue }
func (*Group) RegisterDriver ¶ added in v0.85.0
func (*Group) RegisterHost ¶ added in v0.85.0
func (*Group) RegisterTask ¶ added in v0.85.0
type Host ¶
type Host struct { Name string Description string Props map[string]string HooksBeforeConnect []interface{} HooksAfterConnect []interface{} HooksAfterDisconnect []interface{} Hidden bool Tags []string SSHConfig map[string]string Registry *Registry Group *Group LValues map[string]lua.LValue // If you define same name hosts in multi time, stores it in layered structure that uses Parent and Child. Parent *Host Child *Host }
func (*Host) DescriptionOrDefault ¶ added in v0.31.0
func (*Host) MapLValuesToLTable ¶ added in v0.71.0
func (h *Host) MapLValuesToLTable(tb *lua.LTable)
func (*Host) SortedSSHConfig ¶ added in v0.43.0
type HostQuery ¶ added in v0.52.0
type HostQuery struct { Datasource map[string]*Host Selections []string Filters []string Hidden *bool }
func NewHostQuery ¶ added in v0.52.0
func NewHostQuery() *HostQuery
func (*HostQuery) AppendFilter ¶ added in v0.55.0
func (*HostQuery) AppendFilters ¶ added in v0.60.0
func (*HostQuery) AppendSelection ¶ added in v0.60.0
func (*HostQuery) AppendSelections ¶ added in v0.60.0
func (*HostQuery) GetHostsOrderByName ¶ added in v0.60.0
type NameSortableHosts ¶ added in v0.60.0
type NameSortableHosts []*Host
func (NameSortableHosts) Len ¶ added in v0.60.0
func (h NameSortableHosts) Len() int
func (NameSortableHosts) Less ¶ added in v0.60.0
func (h NameSortableHosts) Less(i, j int) bool
func (NameSortableHosts) Swap ¶ added in v0.60.0
func (h NameSortableHosts) Swap(i, j int)
type NameSortableTasks ¶ added in v0.68.0
type NameSortableTasks []*Task
func (NameSortableTasks) Len ¶ added in v0.68.0
func (t NameSortableTasks) Len() int
func (NameSortableTasks) Less ¶ added in v0.68.0
func (t NameSortableTasks) Less(i, j int) bool
func (NameSortableTasks) Swap ¶ added in v0.68.0
func (t NameSortableTasks) Swap(i, j int)
type Registry ¶ added in v0.44.0
var CurrentRegistry *Registry
var GlobalRegistry *Registry
var LocalRegistry *Registry
func NewRegistry ¶ added in v0.44.0
func (*Registry) TypeString ¶ added in v0.44.0
type Task ¶ added in v0.12.0
type Task struct { Name string Description string Props map[string]string Prepare func() error Driver string Pty bool Script []map[string]string File string Backend string Targets []string Filters []string Parallel bool Privileged bool User string SSHOptions []string // deprecated? use only hidden? Disabled bool Hidden bool Prefix string UsePrefix bool Registry *Registry Group *Group Args []string LValues map[string]lua.LValue Parent *Task Child *Task }
func GetEnabledTask ¶ added in v0.35.0
func (*Task) DescriptionOrDefault ¶ added in v0.31.0
func (*Task) FiltersSlice ¶ added in v0.60.0
func (*Task) IsRemoteTask ¶ added in v0.16.0
func (*Task) MapLValuesToLTable ¶ added in v0.71.0
func (t *Task) MapLValuesToLTable(tb *lua.LTable)
func (*Task) PublicName ¶ added in v0.68.0
func (*Task) TargetsSlice ¶ added in v0.35.0
type TaskQuery ¶ added in v0.68.0
func NewTaskQuery ¶ added in v0.68.0
func NewTaskQuery() *TaskQuery
func (*TaskQuery) GetTasksOrderByName ¶ added in v0.68.0
Click to show internal directories.
Click to hide internal directories.