Documentation ¶
Index ¶
- func AddPortsToFirewall(ports []int)
- func ContainsStringInsensitive(list []string, search string) bool
- func DumpResponse(resp *http.Response) (header []byte, body []byte, err error)
- func EqualConfig(config1 any, config2 any) bool
- func GroupMinuteRanges(minutes []timeMinute) []timeMinuteRange
- func IP2Long(ip string) uint64
- func IsIPv6(ip string) bool
- func LimitString(s string, maxLength int) string
- func LookupCNAME(host string) (string, error)
- func LookupNS(host string) ([]string, error)
- func LookupTXT(host string) ([]string, error)
- func NewHTTPClient(timeout time.Duration) *http.Client
- func ParseDomainFromKey(key string) (domain string)
- func PrintError(err error)
- func RangeDays(dayFrom string, dayTo string) ([]string, error)
- func RangeHours(hourFrom string, hourTo string) ([]string, error)
- func RangeMinutes(toTime time.Time, count int, everyMinutes int64) []timeMinute
- func RangeMonths(dayFrom string, dayTo string) ([]string, error)
- func SetRLimit(limit uint64) error
- func SetSuitableRLimit()
- func Sha1RandomString() string
- func SharedHttpClient(timeout time.Duration) *http.Client
- func Similar(s1 string, s2 string) float32
- func SplitStrings(s string, glue string) []string
- func SystemMemoryGB() int
- func ValidateEmail(email string) bool
- func VersionToLong(version string) uint32
- type CacheMap
- type Progress
- 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 Ticker
- type Unzip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPortsToFirewall ¶
func AddPortsToFirewall(ports []int)
func ContainsStringInsensitive ¶
ContainsStringInsensitive 检查是否包含某个字符串,并且不区分大小写
func DumpResponse ¶
DumpResponse 导出响应
func EqualConfig ¶ added in v0.5.3
EqualConfig 使用JSON对比配置
func GroupMinuteRanges ¶ added in v0.4.9
func GroupMinuteRanges(minutes []timeMinute) []timeMinuteRange
GroupMinuteRanges 将时间点分组
func LimitString ¶ added in v0.5.2
LimitString 限制字符串长度
func LookupCNAME ¶ added in v0.5.3
LookupCNAME 查询CNAME记录 TODO 可以设置使用的DNS主机地址
func NewHTTPClient ¶
NewHTTPClient 获取一个新的Client
func ParseDomainFromKey ¶
ParseDomainFromKey 从Key中获取域名
func RangeHours ¶
RangeHours 计算小时之间的所有小时,格式为YYYYMMDDHH
func RangeMinutes ¶ added in v0.4.9
RangeMinutes 计算若干个时间点,返回结果为 [ [day1, minute1], [day2, minute2] ... ]
func RangeMonths ¶
RangeMonths 计算日期之间的所有月份,格式为YYYYMM
func Sha1RandomString ¶ added in v0.4.9
func Sha1RandomString() string
func SharedHttpClient ¶
SharedHttpClient 获取一个公用的Client
func SystemMemoryGB ¶ added in v0.4.9
func SystemMemoryGB() int
Types ¶
type CacheMap ¶
type CacheMap struct {
// contains filtered or unexported fields
}
func NewCacheMap ¶
func NewCacheMap() *CacheMap
type ServiceManager ¶
type ServiceManager struct { Name string Description string // contains filtered or unexported fields }
服务管理器
Source Files ¶
Click to show internal directories.
Click to hide internal directories.