Versions in this module Expand all Collapse all v0 v0.0.1 Nov 28, 2024 Changes in this version + const API_URL + const FILE + const FILE_API_URL + const FOLDER + const RESUMABLE + const UPLOAD_TYPE_RESUMABLE + const UPLOAD_TYPE_UNKNOWN + const UPLOAD_TYPE_URL + const XLUSER_API_URL + func GetAction(method string, url string) string + type Addition struct + CaptchaToken string + Password string + Username string + func (i *Addition) GetIdentity() string + type CaptchaTokenRequest struct + Action string + CaptchaToken string + ClientID string + DeviceID string + Meta map[string]string + RedirectUri string + type CaptchaTokenResponse struct + CaptchaToken string + ExpiresIn int64 + Url string + type Common struct + Algorithms []string + CaptchaSign string + ClientID string + ClientSecret string + ClientVersion string + DeviceID string + DownloadUserAgent string + PackageName string + Timestamp string + UseVideoUrl bool + UserAgent string + func (c *Common) GetCaptchaSign() (timestamp, sign string) + func (c *Common) GetCaptchaToken() string + func (c *Common) RefreshCaptchaTokenAtLogin(action, userID string) error + func (c *Common) RefreshCaptchaTokenInLogin(action, username string) error + func (c *Common) Request(url, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) + func (c *Common) SetCaptchaToken(captchaToken string) + type ErrResp struct + ErrorCode int64 + ErrorDescription string + ErrorMsg string + func (e *ErrResp) Error() string + func (e *ErrResp) IsError() bool + type ExpertAddition struct + Algorithms string + CaptchaSign string + CaptchaToken string + ClientID string + ClientSecret string + ClientVersion string + DeviceID string + DownloadUserAgent string + LoginType string + PackageName string + Password string + RefreshToken string + SignType string + Timestamp string + UseVideoUrl bool + UserAgent string + Username string + func (i *ExpertAddition) GetIdentity() string + type FileList struct + Files []Files + Kind string + NextPageToken string + Version string + VersionOutdated bool + type Files struct + CreatedTime time.Time + DeleteTime string + Hash string + ID string + IconLink string + Kind string + Medias []struct{ ... } + ModifiedTime time.Time + Name string + OriginalURL string + ParentID string + Size string + ThumbnailLink string + Trashed bool + WebContentLink string + func (c *Files) CreateTime() time.Time + func (c *Files) GetHash() utils.HashInfo + func (c *Files) GetID() string + func (c *Files) GetName() string + func (c *Files) GetPath() string + func (c *Files) GetSize() int64 + func (c *Files) IsDir() bool + func (c *Files) ModTime() time.Time + func (c *Files) Thumb() string + type Link struct + Expire time.Time + Token string + Type string + URL string + type SignInRequest struct + CaptchaToken string + ClientID string + ClientSecret string + Password string + Username string + type Thunder struct + func (x *Thunder) Config() driver.Config + func (x *Thunder) Drop(ctx context.Context) error + func (x *Thunder) GetAddition() driver.Additional + func (x *Thunder) Init(ctx context.Context) (err error) + type ThunderExpert struct + func (x *ThunderExpert) Config() driver.Config + func (x *ThunderExpert) Drop(ctx context.Context) error + func (x *ThunderExpert) GetAddition() driver.Additional + func (x *ThunderExpert) Init(ctx context.Context) (err error) + func (x *ThunderExpert) SetTokenResp(token *TokenResp) + type TokenResp struct + AccessToken string + ExpiresIn int64 + RefreshToken string + Sub string + TokenType string + UserID string + func (t *TokenResp) Token() string + type UploadTaskResponse struct + File Files + Resumable struct{ ... } + UploadType string + type XunLeiCommon struct + func (xc *XunLeiCommon) Copy(ctx context.Context, srcObj, dstDir model.Obj) error + func (xc *XunLeiCommon) IsLogin() bool + func (xc *XunLeiCommon) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error) + func (xc *XunLeiCommon) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error) + func (xc *XunLeiCommon) Login(username, password string) (*TokenResp, error) + func (xc *XunLeiCommon) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error + func (xc *XunLeiCommon) Move(ctx context.Context, srcObj, dstDir model.Obj) error + func (xc *XunLeiCommon) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error + func (xc *XunLeiCommon) RefreshToken(refreshToken string) (*TokenResp, error) + func (xc *XunLeiCommon) Remove(ctx context.Context, obj model.Obj) error + func (xc *XunLeiCommon) Rename(ctx context.Context, srcObj model.Obj, newName string) error + func (xc *XunLeiCommon) Request(url string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) + func (xc *XunLeiCommon) SetRefreshTokenFunc(fn func() error) + func (xc *XunLeiCommon) SetTokenResp(tr *TokenResp)