Documentation ¶
Index ¶
- Constants
- Variables
- func ArrayUnique(arr []int) []int
- func FilterPort(str string) (int, error)
- func HttpCli(method, path, body string, headers map[string]string) (int, interface{})
- func IsCIDR(str string) bool
- func IsDNS(str string) bool
- func IsIP(str string) bool
- func ParseCIDR(cidr string) ([]string, error)
- func ParseDNS(domain string) (string, error)
- func SizeFmt(n int64) string
- type OssCli
- func (oc *OssCli) Download(obj, to string) error
- func (oc *OssCli) GetMeta(obj string) (map[string][]string, error)
- func (oc *OssCli) Init() error
- func (oc *OssCli) ListObjects(prefix, marker string, maxKeys int) (oss.ListObjectsResult, error)
- func (oc *OssCli) Move(from, to string) error
- func (oc *OssCli) Reconnect() error
- func (oc *OssCli) SetMeta(obj string, meta map[string]string) error
- func (oc *OssCli) Stat() string
- func (oc *OssCli) Upload(from, to string) error
Constants ¶
View Source
const (
DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$`
)
Variables ¶
View Source
var ( ErrOssFileTooLarge = errors.New(`oss file too large`) DefaultPartSize = int64(32 * 1024 * 1024) // 32MB DefaultTimeout = uint(30) // seconds DefaultWorkers = 8 )
Functions ¶
func FilterPort ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.