Documentation ¶
Index ¶
- Variables
- func GetUploadProgress[T any](driver driver.Driver, keys ...string) (state T, ok bool)
- func InitClient()
- func NewHttpClient() *http.Client
- func NewRestyClient() *resty.Client
- func SaveUploadProgress(driver driver.Driver, state any, keys ...string) bool
- type Json
- type ReqCallback
- type TokenResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NoRedirectClient *resty.Client RestyClient *resty.Client HttpClient *http.Client )
View Source
var DefaultTimeout = time.Second * 30
View Source
var UploadStateCache = cache.NewMemCache(cache.WithShards[any](32))
storage upload progress, for upload recovery
View Source
var UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
Functions ¶
func GetUploadProgress ¶
An upload progress can only be made by one process alone, so here you need to get it and then delete it.
func InitClient ¶
func InitClient()
func NewHttpClient ¶
func NewRestyClient ¶
func NewRestyClient() *resty.Client
Types ¶
type ReqCallback ¶
type ReqCallback func(req *resty.Request)
Click to show internal directories.
Click to hide internal directories.