Documentation
¶
Index ¶
- type CacheData
- type 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
- 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
- type CmdList
- type Command
- type CommandLevel
- type HttpCmd
- 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 (cmd HttpCmd) MarshalJSON() ([]byte, error)
- 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
- 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
- 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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheData ¶
func NewCacheData ¶
type CliCmd ¶
type CliCmd struct {
Force bool
// contains filtered or unexported fields
}
func (*CliCmd) Level ¶
func (cc *CliCmd) Level() CommandLevel
func (*CliCmd) SetCacheData ¶
func (*CliCmd) WithLevel ¶
func (cc *CliCmd) WithLevel(level CommandLevel)
type CliCmdList ¶
type CliCmdList struct {
Cmds []Command `json:"Cmds"`
Ip string `json:"Ip"`
Force bool `json:"Force"`
}
func NewCliCmdList ¶
func NewCliCmdList(ip string, force bool) *CliCmdList
func (*CliCmdList) AddCmd ¶
func (cl *CliCmdList) AddCmd(cmd Command)
func (*CliCmdList) Assist ¶
func (cl *CliCmdList) Assist() (cmdList []Command, total, success, failed int)
func (*CliCmdList) Cmd ¶
func (cl *CliCmdList) Cmd(key string) Command
func (*CliCmdList) Color ¶
func (cl *CliCmdList) Color() global.CmdExecuteStatusColor
func (*CliCmdList) Error ¶
func (cl *CliCmdList) Error() error
func (*CliCmdList) Id ¶
func (cl *CliCmdList) Id(ip string) string
func (*CliCmdList) KeyExist ¶
func (cl *CliCmdList) KeyExist(key string) bool
func (*CliCmdList) MainCmds ¶
func (cl *CliCmdList) MainCmds() (cmdList []Command, total, success, failed int)
func (*CliCmdList) Table ¶
func (cl *CliCmdList) Table() *tools.Table
type CmdExecuteStatus ¶
type HttpCmd ¶
type HttpCmd struct {
Method string
Ip string
Url string
Data []byte
Force bool
// contains filtered or unexported fields
}
func (*HttpCmd) Level ¶
func (hc *HttpCmd) Level() CommandLevel
func (HttpCmd) MarshalJSON ¶
func (*HttpCmd) SetCacheData ¶
func (*HttpCmd) WithLevel ¶
func (hc *HttpCmd) WithLevel(level CommandLevel)
type HttpCmdList ¶
type HttpCmdList struct {
Clis []string `json:"clis"`
Cmds []Command `json:"Cmds"`
Ip string `json:"Ip"`
Force bool `json:"Force"`
}
func NewHttpCmdList ¶
func NewHttpCmdList(ip string, force bool) *HttpCmdList
func (*HttpCmdList) Add ¶
func (cl *HttpCmdList) Add(method, url string, data []byte, timeout int, force bool)
func (*HttpCmdList) AddCli ¶
func (cl *HttpCmdList) AddCli(cli string)
func (*HttpCmdList) AddCmd ¶
func (cl *HttpCmdList) AddCmd(cmd Command)
func (*HttpCmdList) Assist ¶
func (cl *HttpCmdList) Assist() (cmdList []Command, total, success, failed int)
func (*HttpCmdList) Cmd ¶
func (cl *HttpCmdList) Cmd(key string) Command
func (*HttpCmdList) Color ¶
func (cl *HttpCmdList) Color() global.CmdExecuteStatusColor
func (*HttpCmdList) Error ¶
func (cl *HttpCmdList) Error() error
func (*HttpCmdList) Id ¶
func (cl *HttpCmdList) Id(ip string) string
func (*HttpCmdList) MainCmds ¶
func (cl *HttpCmdList) MainCmds() (cmdList []Command, total, success, failed int)
func (*HttpCmdList) Table ¶
func (cl *HttpCmdList) Table() *tools.Table
type NetconfCmd ¶
type NetconfCmd struct {
netconf.RPCMessage
Ip string
Lock bool
Force bool
// contains filtered or unexported fields
}
func NewNetconfCmd ¶
func NewNetconfCmd(timeout int, lock bool, key string, force bool) *NetconfCmd
func (*NetconfCmd) AppendCustomAttrs ¶
func (nc *NetconfCmd) AppendCustomAttrs(attr string, truncate bool) *NetconfCmd
func (*NetconfCmd) AppendMethod ¶
func (nc *NetconfCmd) AppendMethod(method netconf.RawMethod, truncate bool) *NetconfCmd
func (*NetconfCmd) AppendXmlns ¶
func (nc *NetconfCmd) AppendXmlns(xmlns string, truncate bool) *NetconfCmd
func (*NetconfCmd) CacheData ¶
func (nc *NetconfCmd) CacheData() *CacheData
func (*NetconfCmd) Cmd ¶
func (nc *NetconfCmd) Cmd() string
func (*NetconfCmd) DisableHeader ¶
func (nc *NetconfCmd) DisableHeader() *NetconfCmd
func (*NetconfCmd) Id ¶
func (nc *NetconfCmd) Id(ip string) string
func (*NetconfCmd) Key ¶
func (nc *NetconfCmd) Key() string
func (*NetconfCmd) Level ¶
func (nc *NetconfCmd) Level() CommandLevel
func (*NetconfCmd) Msg ¶
func (nc *NetconfCmd) Msg() string
func (*NetconfCmd) Ok ¶
func (nc *NetconfCmd) Ok() bool
func (*NetconfCmd) SetCacheData ¶
func (nc *NetconfCmd) SetCacheData(data *CacheData)
func (*NetconfCmd) Timeout ¶
func (nc *NetconfCmd) Timeout() int
func (*NetconfCmd) WithInnerXML ¶
func (nc *NetconfCmd) WithInnerXML(xml []byte) *NetconfCmd
func (*NetconfCmd) WithLevel ¶
func (nc *NetconfCmd) WithLevel(level CommandLevel)
func (*NetconfCmd) WithMsg ¶
func (nc *NetconfCmd) WithMsg(msg string)
func (*NetconfCmd) WithOk ¶
func (nc *NetconfCmd) WithOk(ok bool)
type SnmpCmd ¶
type SnmpCmd struct {
Oid string
Ip string
Force bool
Plan *SnmpPlan
// contains filtered or unexported fields
}
func (*SnmpCmd) Level ¶
func (sc *SnmpCmd) Level() CommandLevel
func (*SnmpCmd) SetCacheData ¶
func (*SnmpCmd) WithLevel ¶
func (sc *SnmpCmd) WithLevel(level CommandLevel)
type SnmpPlan ¶
type SnmpPlan struct {
Index []int
Prefix []int
PrefixMap map[string]string
PrefixCallMap map[string]func(byte, string, interface{}) (result string, err error)
IndexCall func(string) (result string, err error)
}
func NewSnmpPlan ¶
func (*SnmpPlan) WithIndexCall ¶
func (*SnmpPlan) WithPrefixCallMap ¶
Click to show internal directories.
Click to hide internal directories.