Versions in this module Expand all Collapse all v0 v0.0.1 Jan 1, 2026 Changes in this version + type CacheData struct + CreateAt time.Time + Data []byte + func NewCacheData(data []byte) *CacheData + func (cd *CacheData) IsTimeout() bool + type CliCmd struct + Force bool + func NewCliCmd(cmd, key string, timeout int, force bool) *CliCmd + func (cc *CliCmd) CacheData() *CacheData + func (cc *CliCmd) Cmd() string + func (cc *CliCmd) Id(ip string) string + func (cc *CliCmd) Ip() string + func (cc *CliCmd) Key() string + func (cc *CliCmd) Level() CommandLevel + func (cc *CliCmd) Msg() string + func (cc *CliCmd) Ok() bool + func (cc *CliCmd) SetCacheData(data *CacheData) + func (cc *CliCmd) Timeout() int + func (cc *CliCmd) WithIp(ip string) *CliCmd + func (cc *CliCmd) WithLevel(level CommandLevel) + func (cc *CliCmd) WithMsg(msg string) + func (cc *CliCmd) WithOk(ok bool) + type CliCmdList struct + Cmds []Command + Force bool + Ip string + func NewCliCmdList(ip string, force bool) *CliCmdList + func (cl *CliCmdList) Add(cmd, key string, timeout int, force bool) + func (cl *CliCmdList) AddCmd(cmd Command) + func (cl *CliCmdList) Assist() (cmdList []Command, total, success, failed int) + func (cl *CliCmdList) Cmd(key string) Command + func (cl *CliCmdList) Color() global.CmdExecuteStatusColor + func (cl *CliCmdList) Error() error + func (cl *CliCmdList) Get(key string) (cd *CacheData, err error) + func (cl *CliCmdList) Id(ip string) string + func (cl *CliCmdList) KeyExist(key string) bool + func (cl *CliCmdList) MainCmds() (cmdList []Command, total, success, failed int) + func (cl *CliCmdList) Table() *tools.Table + type CmdExecuteStatus interface + Assist func() (cmdList []Command, total, success, failed int) + Cmd func(key string) Command + Color func() global.CmdExecuteStatusColor + Error func() error + MainCmds func() (cmdList []Command, total, success, failed int) + type CmdList interface + AddCmd func(cmd Command) + Get func(key string) (cd *CacheData, err error) + Table func() *tools.Table + type Command interface + CacheData func() *CacheData + Cmd func() string + Id func(ip string) string + Key func() string + Level func() CommandLevel + Msg func() string + Ok func() bool + SetCacheData func(data *CacheData) + Timeout func() int + WithLevel func(CommandLevel) + WithMsg func(msg string) + WithOk func(bool) + type CommandLevel int + const MUST + const OPTION + type HttpCmd struct + Data []byte + Force bool + Ip string + Method string + Url string + func NewHttpCmd(method, url, key string, timeout int, force bool) *HttpCmd + func (cmd HttpCmd) MarshalJSON() ([]byte, error) + func (hc *HttpCmd) CacheData() *CacheData + func (hc *HttpCmd) Cmd() string + func (hc *HttpCmd) Id(ip string) string + func (hc *HttpCmd) Key() string + func (hc *HttpCmd) Level() CommandLevel + func (hc *HttpCmd) Msg() string + func (hc *HttpCmd) Ok() bool + func (hc *HttpCmd) SetCacheData(data *CacheData) + func (hc *HttpCmd) Timeout() int + func (hc *HttpCmd) WithData(data []byte) *HttpCmd + func (hc *HttpCmd) WithIp(ip string) *HttpCmd + func (hc *HttpCmd) WithLevel(level CommandLevel) + func (hc *HttpCmd) WithMsg(msg string) + func (hc *HttpCmd) WithOk(ok bool) + type HttpCmdList struct + Clis []string + Cmds []Command + Force bool + Ip string + func NewHttpCmdList(ip string, force bool) *HttpCmdList + func (cl *HttpCmdList) Add(method, url string, data []byte, timeout int, force bool) + func (cl *HttpCmdList) AddCli(cli string) + func (cl *HttpCmdList) AddCmd(cmd Command) + func (cl *HttpCmdList) Assist() (cmdList []Command, total, success, failed int) + func (cl *HttpCmdList) Cmd(key string) Command + func (cl *HttpCmdList) Color() global.CmdExecuteStatusColor + func (cl *HttpCmdList) Error() error + func (cl *HttpCmdList) Get(key string) (cd *CacheData, err error) + func (cl *HttpCmdList) Id(ip string) string + func (cl *HttpCmdList) MainCmds() (cmdList []Command, total, success, failed int) + func (cl *HttpCmdList) Table() *tools.Table + type NetconfCmd struct + Force bool + Ip string + Lock bool + func NewNetconfCmd(timeout int, lock bool, key string, force bool) *NetconfCmd + func (nc *NetconfCmd) AppendCustomAttrs(attr string, truncate bool) *NetconfCmd + func (nc *NetconfCmd) AppendMethod(method netconf.RawMethod, truncate bool) *NetconfCmd + func (nc *NetconfCmd) AppendXmlns(xmlns string, truncate bool) *NetconfCmd + func (nc *NetconfCmd) CacheData() *CacheData + func (nc *NetconfCmd) Cmd() string + func (nc *NetconfCmd) DisableHeader() *NetconfCmd + func (nc *NetconfCmd) Id(ip string) string + func (nc *NetconfCmd) Key() string + func (nc *NetconfCmd) Level() CommandLevel + func (nc *NetconfCmd) Msg() string + func (nc *NetconfCmd) Ok() bool + func (nc *NetconfCmd) SetCacheData(data *CacheData) + func (nc *NetconfCmd) Timeout() int + func (nc *NetconfCmd) WithInnerXML(xml []byte) *NetconfCmd + func (nc *NetconfCmd) WithLevel(level CommandLevel) + func (nc *NetconfCmd) WithMsg(msg string) + func (nc *NetconfCmd) WithOk(ok bool) + type SnmpCmd struct + Force bool + Ip string + Oid string + Plan *SnmpPlan + func NewSnmpCmd(oid, key string, timeout int, force bool) *SnmpCmd + func (sc *SnmpCmd) CacheData() *CacheData + func (sc *SnmpCmd) Cmd() string + func (sc *SnmpCmd) Id(ip string) string + func (sc *SnmpCmd) Key() string + func (sc *SnmpCmd) Level() CommandLevel + func (sc *SnmpCmd) Msg() string + func (sc *SnmpCmd) Ok() bool + func (sc *SnmpCmd) SetCacheData(data *CacheData) + func (sc *SnmpCmd) SetPlan(plan *SnmpPlan) *SnmpCmd + func (sc *SnmpCmd) Timeout() int + func (sc *SnmpCmd) WithLevel(level CommandLevel) + func (sc *SnmpCmd) WithMsg(msg string) + func (sc *SnmpCmd) WithOk(ok bool) + type SnmpPlan struct + Index []int + IndexCall func(string) (result string, err error) + Prefix []int + PrefixCallMap map[string]func(byte, string, interface{}) (result string, err error) + PrefixMap map[string]string + func NewSnmpPlan(index, prefix []int) *SnmpPlan + func (sp *SnmpPlan) WithIndexCall(indexCall func(string) (result string, err error)) *SnmpPlan + func (sp *SnmpPlan) WithPrefixCallMap(...) *SnmpPlan + func (sp *SnmpPlan) WithPrefixMap(prefixMap map[string]string) *SnmpPlan