Versions in this module Expand all Collapse all v0 v0.9.2 Jan 12, 2024 v0.9.1 Sep 12, 2023 v0.9.0 Sep 12, 2023 v0.8.8 Sep 9, 2023 v0.8.7 Sep 9, 2023 v0.8.5 Sep 9, 2023 v0.8.3 Sep 9, 2023 v0.8.2 Sep 8, 2023 v0.8.1 Sep 7, 2023 v0.8.0 Sep 7, 2023 v0.7.0 Sep 7, 2023 v0.5.0 Sep 7, 2023 v0.2.0 Sep 7, 2023 v0.1.0 Sep 7, 2023 Changes in this version + const DefaultAPIHost + const DefaultPubHost + const DefaultRsHost + const DefaultRsfHost + const ErrMaxUpRetry + const ErrNextReader + var UcHost = "" + func EncodedEntry(bucket, key string) string + type BucketManager struct + Cfg *Config + Client *clientv1.Client + Mac *auth.Credentials + func NewBucketManager(mac *auth.Credentials, cfg *Config) *BucketManager + func (m *BucketManager) Fetch(resURL, bucket, key string) (fetchRet FetchRet, err error) + func (m *BucketManager) IoReqHost(bucket string) (reqHost string, err error) + func (m *BucketManager) IovipHost(bucket string) (iovipHost string, err error) + func (m *BucketManager) ListBucket(bucket, prefix, delimiter, marker string) (retCh chan listFilesRet2, err error) + func (m *BucketManager) ListBucketContext(ctx context.Context, bucket, prefix, delimiter, marker string) (retCh chan listFilesRet2, err error) + func (m *BucketManager) ListFiles(bucket, prefix, delimiter, marker string, limit int) (entries []ListItem, commonPrefixes []string, nextMarker string, hasNext bool, ...) + func (m *BucketManager) ListFilesWithContext(ctx context.Context, bucket string, options ...ListInputOption) (ret *ListFilesRet, hasNext bool, err error) + func (m *BucketManager) RsfHost(bucket string) (rsfHost string, err error) + func (m *BucketManager) RsfReqHost(bucket string) (reqHost string, err error) + func (m *BucketManager) Zone(bucket string) (z *Zone, err error) + type BucketManagerOptions struct + HostFreezeDuration time.Duration + RetryMax int + type Config struct + ApiHost string + CentralRsHost string + IoHost string + Region *Region + RsHost string + RsfHost string + UpHost string + UseCdnDomains bool + UseHTTPS bool + Zone *Region + func (c *Config) GetRegion() *Region + type FetchRet struct + Fsize int64 + Hash string + Key string + MimeType string + type FormUploader struct + Cfg *Config + Client *client.Client + func NewFormUploader(cfg *Config) *FormUploader + func NewFormUploaderEx(cfg *Config, clt *client.Client) *FormUploader + func (p *FormUploader) Put(ctx context.Context, ret interface{}, uptoken, key string, data io.Reader, ...) (err error) + func (p *FormUploader) PutFile(ctx context.Context, ret interface{}, uptoken, key, localFile string, ...) (err error) + type ListFilesRet struct + CommonPrefixes []string + Items []ListItem + Marker string + type ListInputOption func(options *listInputOptions) + func ListInputOptionsDelimiter(delimiter string) ListInputOption + func ListInputOptionsLimit(limit int) ListInputOption + func ListInputOptionsMarker(marker string) ListInputOption + func ListInputOptionsPrefix(prefix string) ListInputOption + type ListItem struct + EndUser string + Fsize int64 + Hash string + Key string + Md5 string + MimeType string + PutTime int64 + Status int + Type int + func (l *ListItem) IsEmpty() (empty bool) + func (l *ListItem) String() string + type PutExtra struct + HostFreezeDuration time.Duration + MimeType string + OnProgress func(fsize, uploaded int64) + Params map[string]string + TryTimes int + UpHost string + type PutPolicy struct + CallbackBody string + CallbackBodyType string + CallbackFetchKey uint8 + CallbackHost string + CallbackURL string + DeleteAfterDays int + DetectMime uint8 + EndUser string + Expires uint64 + FileType int + ForceSaveKey bool + FsizeLimit int64 + FsizeMin int64 + InsertOnly uint16 + IsPrefixalScope int + MimeLimit string + PersistentNotifyURL string + PersistentOps string + PersistentPipeline string + ReturnBody string + ReturnURL string + SaveKey string + Scope string + func (p *PutPolicy) UploadToken(cred *auth.Credentials) string + type PutRet struct + Hash string + Key string + PersistentID string + type Region struct + ApiHost string + CdnUpHosts []string + IoSrcHost string + IovipHost string + RsHost string + RsfHost string + SrcUpHosts []string + func GetRegion(ak, bucket string) (*Region, error) + func GetRegionWithOptions(ak, bucket string, options UCApiOptions) (*Region, error) + func (r *Region) GetIoHost(useHttps bool) string + func (r *Region) GetRsfHost(useHttps bool) string + type UCApiOptions struct + HostFreezeDuration time.Duration + RetryMax int + UseHttps bool + func DefaultUCApiOptions() UCApiOptions + type UcQueryIo = UcQueryServerInfo + type UcQueryRet struct + ApiInfo map[string]UcQueryServerInfo + Io map[string]map[string][]string + IoInfo map[string]UcQueryIo + IoSrcInfo map[string]UcQueryIo + RsInfo map[string]UcQueryServerInfo + RsfInfo map[string]UcQueryServerInfo + TTL int + Up map[string]UcQueryUp + type UcQueryServerInfo struct + Backup []string + Info string + Main []string + type UcQueryUp = UcQueryServerInfo + type Zone = Region + func GetZone(ak, bucket string) (zone *Zone, err error)