Documentation ¶
Index ¶
- Constants
- func HcHook(_ *resty.Client, req *http.Request) error
- type AliYunDrive
- func (ali AliYunDrive) GetAnonymousShare(shareId string) (*GetShareInfoResponse, error)
- func (ali AliYunDrive) GetAuthorizationToken() string
- func (ali AliYunDrive) GetFileDownloadUrl(shareToken string, shareId string, fileId string) (string, error)
- func (ali AliYunDrive) GetShare(shareId string, shareToken string) (data chan *BaseShareFile, err error)
- func (ali AliYunDrive) GetShareToken(shareId string, sharePwd string) (*GetShareTokenResponse, error)
- type BaseShareFile
- type ErrorResponse
- type FileListParam
- type GetShareFileListRequest
- type GetShareFileListResponse
- type GetShareInfoRequest
- type GetShareInfoResponse
- type GetShareLinkDownloadUrlRequest
- type GetShareLinkDownloadUrlResponse
- type GetShareTokenRequest
- type GetShareTokenResponse
- type ShareItemInfo
- type TokenRequest
- type TokenResponse
Constants ¶
View Source
const ( Authorization = "authorization" ContentType = "content-type" UserAgent = "User-Agent" ContentTypeJSON = "application/json" Bearer = "bearer" BaseURL = "https://auth.aliyundrive.com" ApiURL = "https://api.aliyundrive.com" AccessTokenPrefix = "at:" RefreshTokenPrefix = "rt:" V2AccountToken = BaseURL + "/v2/account/token" V3FileList = ApiURL + "/adrive/v3/file/list" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AliYunDrive ¶
func (AliYunDrive) GetAnonymousShare ¶
func (ali AliYunDrive) GetAnonymousShare(shareId string) (*GetShareInfoResponse, error)
func (AliYunDrive) GetAuthorizationToken ¶
func (ali AliYunDrive) GetAuthorizationToken() string
func (AliYunDrive) GetFileDownloadUrl ¶
func (AliYunDrive) GetShare ¶
func (ali AliYunDrive) GetShare(shareId string, shareToken string) (data chan *BaseShareFile, err error)
func (AliYunDrive) GetShareToken ¶
func (ali AliYunDrive) GetShareToken(shareId string, sharePwd string) (*GetShareTokenResponse, error)
type BaseShareFile ¶
type BaseShareFile struct {}
type ErrorResponse ¶
type FileListParam ¶
type FileListParam struct {
// contains filtered or unexported fields
}
type GetShareFileListRequest ¶
type GetShareFileListRequest struct {}
type GetShareFileListResponse ¶
type GetShareFileListResponse struct {}
type GetShareInfoRequest ¶
type GetShareInfoRequest struct {
}type GetShareInfoResponse ¶
type GetShareInfoResponse struct {}
type GetShareLinkDownloadUrlRequest ¶
type GetShareLinkDownloadUrlRequest struct {}
type GetShareLinkDownloadUrlResponse ¶
type GetShareLinkDownloadUrlResponse struct {}
type GetShareTokenRequest ¶
type GetShareTokenRequest struct {}
type GetShareTokenResponse ¶
type GetShareTokenResponse struct {}
type ShareItemInfo ¶
type ShareItemInfo struct {}
type TokenRequest ¶
type TokenResponse ¶
type TokenResponse struct { DefaultSboxDriveId string `json:"default_sbox_drive_id"` Role string `json:"role"` DeviceId string `json:"device_id"` UserName string `json:"user_name"` NeedLink bool `json:"need_link"` ExpireTime time.Time `json:"expire_time"` PinSetup bool `json:"pin_setup"` NeedRpVerify bool `json:"need_rp_verify"` Avatar string `json:"avatar"` TokenType string `json:"token_type"` AccessToken string `json:"access_token"` DefaultDriveId string `json:"default_drive_id"` DomainId string `json:"domain_id"` RefreshToken string `json:"refresh_token"` IsFirstLogin bool `json:"is_first_login"` UserId string `json:"user_id"` NickName string `json:"nick_name"` State string `json:"state"` ExpiresIn int `json:"expires_in"` Status string `json:"status"` }
Click to show internal directories.
Click to hide internal directories.