Documentation
¶
Index ¶
- func BootDeviceToPXEFromIpmitool(repo model.Repo, logger logger.Logger, ip string, username string, ...) error
- func CreateNewMacAddress() string
- func CreatePxeFile(dir string, file string, content string) error
- func CutArray(arr []string, length int) ([]string, []string, error)
- func EncodePassword(password string) (string, error)
- func ExecScript(script string) ([]byte, error)
- func FileExist(filename string) bool
- func FotmatNumberToGB(number float64, unit string) int
- func FotmatNumberToMB(number float64, unit string) int
- func GetCidrHostNum(maskLen int) uint
- func GetCidrInfo(network string, logger logger.Logger) (map[string]string, error)
- func GetCidrIpMask(maskLen int) string
- func GetCidrIpRange(cidr string) (string, string)
- func GetDevicePowerStatusFromIpmitool(repo model.Repo, logger logger.Logger, ip string, username string, ...) (string, error)
- func GetDeviceSnFromIpmitool(repo model.Repo, logger logger.Logger, ip string, username string, ...) (string, error)
- func GetIPListByMinAndMaxIP(min string, max string) ([]string, error)
- func GetIpSeg3Range(ipSegs []string, maskLen int) (int, int)
- func GetIpSeg4Range(ipSegs []string, maskLen int) (int, int)
- func GetIpSegRange(userSegIp, offset uint8) (int, int)
- func GetPxeFileNameByMac(mac string) string
- func IconvFile(filename string, fromCode string, toCode string, ctx context.Context) error
- func IsInArray(str string, arr []string) bool
- func PowerOffDeviceFromIpmitool(repo model.Repo, logger logger.Logger, ip string, username string, ...) error
- func PowerOnDeviceFromIpmitool(repo model.Repo, logger logger.Logger, ip string, username string, ...) error
- func RSADecrypt(privateKeyFile string, str string) (string, error)
- func RSAEncrypt(publicKeyFile string, str string) (string, error)
- func ReadBytes(path string) ([]byte, error)
- func ReadFile(path string) (string, error)
- func RestartDeviceFromIpmitool(repo model.Repo, logger logger.Logger, ip string, username string, ...) error
- func SubString(str string, begin int, length int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNewMacAddress ¶
func CreateNewMacAddress() string
func EncodePassword ¶
func FotmatNumberToGB ¶
func FotmatNumberToMB ¶
func GetCidrInfo ¶
func GetCidrIpRange ¶
func GetDeviceSnFromIpmitool ¶
func GetIpSeg3Range ¶
得到第三段IP的区间(第一片段.第二片段.第三片段.第四片段)
func GetIpSeg4Range ¶
得到第四段IP的区间(第一片段.第二片段.第三片段.第四片段)
func GetIpSegRange ¶
根据用户输入的基础IP地址和CIDR掩码计算一个IP片段的区间
func GetPxeFileNameByMac ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.