Documentation
¶
Index ¶
- Constants
- func CheckErr(err error)
- func CobraAddCommand(cobraRootCmd, parentCmd, cobraCmd CobraCommand)
- func CobraInit(cobraRootCmd CobraCommand)
- func ConfigEdit()
- func ConfigInit(allowClobber bool) string
- func ConfigString(header bool) string
- func Confirm(prompt string) bool
- func Expand(pathname string) string
- func Fatal(err error) error
- func Fatalf(format string, args ...interface{}) error
- func FormatJSON(v any) string
- func HexDump(data []byte) string
- func Init(name, version, configFile string)
- func IsDir(path string) bool
- func IsFile(pathname string) bool
- func OptionKey(cobraCmd CobraCommand, key string) string
- func OptionString(cobraCmd CobraCommand, name, flag, defaultValue, description string)
- func OptionSwitch(cobraCmd CobraCommand, name, flag, description string)
- func ProgramName() string
- func ProgramVersion() string
- func Shutdown()
- func TildePath(path string) (string, error)
- func ViperGet(key string) any
- func ViperGetBool(key string) bool
- func ViperGetInt(key string) int
- func ViperGetInt64(key string) int64
- func ViperGetString(key string) string
- func ViperGetStringMapString(key string) map[string]string
- func ViperGetStringSlice(key string) []string
- func ViperKey(key string) string
- func ViperSet(key string, value any)
- func ViperSetDefault(key string, value any)
- func Warning(format string, args ...interface{})
- type APIClient
- type CobraCommand
- type Sendmail
- type WinexecClient
- func (c *WinexecClient) DirEntries(pathname string) (map[string]message.DirectoryEntry, error)
- func (c *WinexecClient) DirFiles(pathname string) ([]string, error)
- func (c *WinexecClient) DirSubs(pathname string) ([]string, error)
- func (c *WinexecClient) Download(dst, src string) error
- func (c *WinexecClient) Exec(command string, args []string, exitCode *int) (string, string, error)
- func (c *WinexecClient) GetConfig() map[string]any
- func (c *WinexecClient) GetISO(dst, url, ca, cert, key string) error
- func (c *WinexecClient) MkdirAll(pathname string, mode fs.FileMode) error
- func (c *WinexecClient) RemoveAll(pathname string) error
- func (c *WinexecClient) Spawn(command string, exitCode *int) error
- func (c *WinexecClient) Upload(dst, src string, force bool) error
- func (c *WinexecClient) WindowsPath(localPath string) string
Constants ¶
View Source
const Version = "1.1.17"
Variables ¶
This section is empty.
Functions ¶
func CobraAddCommand ¶
func CobraAddCommand(cobraRootCmd, parentCmd, cobraCmd CobraCommand)
func CobraInit ¶
func CobraInit(cobraRootCmd CobraCommand)
func ConfigEdit ¶
func ConfigEdit()
func ConfigInit ¶
func ConfigString ¶
func FormatJSON ¶
func OptionKey ¶
func OptionKey(cobraCmd CobraCommand, key string) string
func OptionString ¶
func OptionString(cobraCmd CobraCommand, name, flag, defaultValue, description string)
func OptionSwitch ¶
func OptionSwitch(cobraCmd CobraCommand, name, flag, description string)
func ProgramName ¶
func ProgramName() string
func ProgramVersion ¶
func ProgramVersion() string
func ViperGetBool ¶
func ViperGetInt ¶
func ViperGetInt64 ¶
func ViperGetString ¶
func ViperGetStringMapString ¶ added in v1.1.3
func ViperGetStringSlice ¶
func ViperSetDefault ¶
Types ¶
type APIClient ¶
type APIClient interface {
Close()
Get(path string, response interface{}) (string, error)
Post(path string, request, response interface{}, headers *map[string]string) (string, error)
Put(path string, request, response interface{}, headers *map[string]string) (string, error)
Delete(path string, response interface{}) (string, error)
}
type CobraCommand ¶
type CobraCommand interface {
}
type WinexecClient ¶ added in v1.1.6
type WinexecClient struct {
// contains filtered or unexported fields
}
func NewWinexecClient ¶ added in v1.1.6
func NewWinexecClient() (*WinexecClient, error)
func (*WinexecClient) DirEntries ¶ added in v1.1.10
func (c *WinexecClient) DirEntries(pathname string) (map[string]message.DirectoryEntry, error)
func (*WinexecClient) DirFiles ¶ added in v1.1.10
func (c *WinexecClient) DirFiles(pathname string) ([]string, error)
func (*WinexecClient) DirSubs ¶ added in v1.1.12
func (c *WinexecClient) DirSubs(pathname string) ([]string, error)
func (*WinexecClient) Download ¶ added in v1.1.6
func (c *WinexecClient) Download(dst, src string) error
func (*WinexecClient) GetConfig ¶ added in v1.1.6
func (c *WinexecClient) GetConfig() map[string]any
func (*WinexecClient) GetISO ¶ added in v1.1.6
func (c *WinexecClient) GetISO(dst, url, ca, cert, key string) error
func (*WinexecClient) MkdirAll ¶ added in v1.1.10
func (c *WinexecClient) MkdirAll(pathname string, mode fs.FileMode) error
func (*WinexecClient) RemoveAll ¶ added in v1.1.10
func (c *WinexecClient) RemoveAll(pathname string) error
func (*WinexecClient) Spawn ¶ added in v1.1.6
func (c *WinexecClient) Spawn(command string, exitCode *int) error
func (*WinexecClient) Upload ¶ added in v1.1.6
func (c *WinexecClient) Upload(dst, src string, force bool) error
func (*WinexecClient) WindowsPath ¶ added in v1.1.16
func (c *WinexecClient) WindowsPath(localPath string) string
convert a local path to a windows path
Click to show internal directories.
Click to hide internal directories.