Documentation
¶
Index ¶
- Constants
- func GenerateDPoPKeyPair() (*ecdsa.PrivateKey, error)
- func ParseJWTPayload(token string, out any) error
- type Addition
- type BaseResp
- type Clock
- type CreateFolderResp
- type DPoPTokenInput
- type DPoPTokenOutput
- type DoubaoNew
- func (d *DoubaoNew) Config() driver.Config
- func (d *DoubaoNew) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *DoubaoNew) Drop(ctx context.Context) error
- func (d *DoubaoNew) GetAddition() driver.Additional
- func (d *DoubaoNew) GetDetails(ctx context.Context) (*model.StorageDetails, error)
- func (d *DoubaoNew) Init(ctx context.Context) error
- func (d *DoubaoNew) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *DoubaoNew) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *DoubaoNew) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
- func (d *DoubaoNew) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *DoubaoNew) Other(ctx context.Context, args model.OtherArgs) (interface{}, error)
- func (d *DoubaoNew) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, ...) (model.Obj, error)
- func (d *DoubaoNew) Remove(ctx context.Context, obj model.Obj) error
- func (d *DoubaoNew) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)
- type FileInfo
- type FileInfoResp
- type JWTPayload
- type ListData
- type ListResp
- type Node
- type Object
- type PreviewImageExtra
- type PreviewMeta
- type PreviewMetaEntry
- type RemoveResp
- type SystemClock
- type TaskStatusData
- type TaskStatusResp
- type UploadBlock
- type UploadBlockNeed
- type UploadBlocksData
- type UploadBlocksResp
- type UploadFinishData
- type UploadFinishResp
- type UploadMergeData
- type UploadMergeResp
- type UploadPrepareData
- type UploadPrepareResp
- type User
- type UserStorageData
- type UserStorageResp
Constants ¶
View Source
const ( BaseURL = "https://my.feishu.cn" DownloadBaseURL = "https://internal-api-drive-stream.feishu.cn" DoubaoURL = "https://www.doubao.com" )
Variables ¶
This section is empty.
Functions ¶
func GenerateDPoPKeyPair ¶
func GenerateDPoPKeyPair() (*ecdsa.PrivateKey, error)
func ParseJWTPayload ¶
Types ¶
type Addition ¶
type Addition struct {
// Usually one of two
driver.RootID
// define other
Cookie string `json:"cookie" required:"true" help:"Web Cookie"`
AppID string `json:"app_id" required:"true" default:"497858" help:"Doubao App ID"`
DPoPKeySecret string `json:"dpop_key_secret" help:"DPoP Key Secret for generating DPoP token"`
AuthClientID string `json:"auth_client_id" help:"Doubao Biz Auth Client ID"`
AuthClientType string `json:"auth_client_type" help:"Doubao Biz Auth Client Type"`
AuthScope string `json:"auth_scope" help:"Doubao Biz Auth Scope"`
AuthSDKSource string `json:"auth_sdk_source" help:"Doubao Biz Auth SDK Source"`
AuthSDKVersion string `json:"auth_sdk_version" help:"Doubao Biz Auth SDK Version"`
IgnoreJWTCheck bool `json:"ignore_jwt_check" help:"Whether to ignore JWT check to prevent time issue"`
}
type CreateFolderResp ¶
type DPoPTokenInput ¶
type DPoPTokenOutput ¶
type DPoPTokenOutput struct {
DPoPToken string `json:"dpopToken"`
ExpiredTime int64 `json:"expiredTime"`
ExpiresIn int64 `json:"expiresIn"`
}
func GenerateDPoPToken ¶
func GenerateDPoPToken(in DPoPTokenInput) (*DPoPTokenOutput, error)
type DoubaoNew ¶
type DoubaoNew struct {
model.Storage
Addition
TtLogid string
// DPoP access token (Authorization header value, without DPoP prefix)
Authorization string
AuthorizationPublic string
// DPoP header value
DPoP string
DPoPPublic string
// DPoP key pair for generating DPoP
DPoPKeyPairStr string
DPoPKeyPair *ecdsa.PrivateKey
// contains filtered or unexported fields
}
func (*DoubaoNew) GetAddition ¶
func (d *DoubaoNew) GetAddition() driver.Additional
func (*DoubaoNew) GetDetails ¶
type FileInfoResp ¶
type JWTPayload ¶
type Node ¶
type Node struct {
Token string `json:"token"`
NodeToken string `json:"node_token"`
ObjToken string `json:"obj_token"`
Name string `json:"name"`
Type int `json:"type"`
NodeType int `json:"node_type"`
OwnerID string `json:"owner_id"`
EditUID string `json:"edit_uid"`
CreateTime int64 `json:"create_time"`
EditTime int64 `json:"edit_time"`
URL string `json:"url"`
Extra struct {
Size string `json:"size"`
} `json:"extra"`
}
type PreviewImageExtra ¶
type PreviewMeta ¶
type PreviewMeta struct {
Data map[string]PreviewMetaEntry `json:"data"`
}
type PreviewMetaEntry ¶
type RemoveResp ¶
type SystemClock ¶
type SystemClock struct{}
func (SystemClock) Now ¶
func (SystemClock) Now() (int64, error)
type TaskStatusData ¶
type TaskStatusResp ¶
type TaskStatusResp struct {
BaseResp
Data TaskStatusData `json:"data"`
}
type UploadBlock ¶
type UploadBlockNeed ¶
type UploadBlocksData ¶
type UploadBlocksData struct {
NeededUploadBlocks []UploadBlockNeed `json:"needed_upload_blocks"`
}
type UploadBlocksResp ¶
type UploadBlocksResp struct {
BaseResp
Data UploadBlocksData `json:"data"`
}
type UploadFinishData ¶
type UploadFinishResp ¶
type UploadFinishResp struct {
BaseResp
Data UploadFinishData `json:"data"`
}
type UploadMergeData ¶
type UploadMergeData struct {
SuccessSeqList []int `json:"success_seq_list"`
}
type UploadMergeResp ¶
type UploadMergeResp struct {
BaseResp
Data UploadMergeData `json:"data"`
}
type UploadPrepareData ¶
type UploadPrepareResp ¶
type UploadPrepareResp struct {
BaseResp
Data UploadPrepareData `json:"data"`
}
type UserStorageData ¶
type UserStorageResp ¶
type UserStorageResp struct {
BaseResp
Data UserStorageData `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.