Documentation
¶
Index ¶
- func AddPortsToFirewall(ports []int)
- func ExtractIP(ipStrings string) ([]string, error)
- func FilterNotEmpty(item string) bool
- func FormatAddress(addr string) string
- func IsLocalIP(ip net.IP) bool
- func JSONClone(v interface{}) (interface{}, error)
- func JSONDecodeConfig(data []byte, ptr any) (encodeJSON []byte, err error)
- func JSONIsNull(jsonData []byte) bool
- func LookupCNAME(host string) (string, error)
- func MapAddPrefixFunc(prefix string) func(item string) string
- func NextIP(prevIP net.IP) net.IP
- func ParseIPValue(value string) (newValue string, ipFrom string, ipTo string, ok bool)
- func PrintError(err error)
- func RangeTimes(timeFrom string, timeTo string, everyMinutes int32) (result []string, err error)
- func Recover()
- func SplitNumbers(numbers string) (result []int64)
- func ValidateEmail(email string) bool
- type ServiceManager
- func (this *ServiceManager) Close() error
- func (this *ServiceManager) Install(exePath string, args []string) error
- func (this *ServiceManager) Log(msg string)
- func (this *ServiceManager) LogError(msg string)
- func (this *ServiceManager) PauseWindow()
- func (this *ServiceManager) Start() error
- func (this *ServiceManager) Uninstall() error
- type StringsStream
- type Ticker
- type Unzip
- type UpgradeFileWriter
- type UpgradeManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPortsToFirewall ¶
func AddPortsToFirewall(ports []int)
func FilterNotEmpty ¶
func JSONDecodeConfig ¶
JSONDecodeConfig 解码并重新编码 是为了去除原有JSON中不需要的数据
func MapAddPrefixFunc ¶
func ParseIPValue ¶
ParseIPValue 解析IP值
func PrintError ¶
func PrintError(err error)
func RangeTimes ¶
RangeTimes 计算时间点
Types ¶
type ServiceManager ¶
type ServiceManager struct {
Name string
Description string
// contains filtered or unexported fields
}
服务管理器
type StringsStream ¶
type StringsStream struct {
// contains filtered or unexported fields
}
func NewStringsStream ¶
func NewStringsStream(s []string) *StringsStream
func (*StringsStream) Filter ¶
func (this *StringsStream) Filter(f ...func(item string) bool) *StringsStream
func (*StringsStream) Map ¶
func (this *StringsStream) Map(f ...func(item string) string) *StringsStream
func (*StringsStream) Result ¶
func (this *StringsStream) Result() []string
func (*StringsStream) Unique ¶
func (this *StringsStream) Unique() *StringsStream
type UpgradeFileWriter ¶
type UpgradeFileWriter struct {
// contains filtered or unexported fields
}
func NewUpgradeFileWriter ¶
func NewUpgradeFileWriter(rawWriter io.Writer) *UpgradeFileWriter
func (*UpgradeFileWriter) TotalWritten ¶
func (this *UpgradeFileWriter) TotalWritten() int64
type UpgradeManager ¶
type UpgradeManager struct {
// contains filtered or unexported fields
}
func NewUpgradeManager ¶
func NewUpgradeManager(component string, downloadURL string) *UpgradeManager
func (*UpgradeManager) Cancel ¶
func (this *UpgradeManager) Cancel() error
func (*UpgradeManager) IsDownloading ¶
func (this *UpgradeManager) IsDownloading() bool
func (*UpgradeManager) NewVersion ¶
func (this *UpgradeManager) NewVersion() string
func (*UpgradeManager) Progress ¶
func (this *UpgradeManager) Progress() float32
func (*UpgradeManager) Start ¶
func (this *UpgradeManager) Start() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.