doubao

package
v3.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	// Usually one of two
	// driver.RootPath
	driver.RootID
	// define other
	Cookie string `json:"cookie" type:"text"`
}

type BaseResp

type BaseResp struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

type Doubao

type Doubao struct {
	model.Storage
	Addition
}

func (*Doubao) ArchiveDecompress

func (d *Doubao) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, args model.ArchiveDecompressArgs) ([]model.Obj, error)

func (*Doubao) Config

func (d *Doubao) Config() driver.Config

func (*Doubao) Copy

func (d *Doubao) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)

func (*Doubao) Drop

func (d *Doubao) Drop(ctx context.Context) error

func (*Doubao) Extract

func (d *Doubao) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)

func (*Doubao) GetAddition

func (d *Doubao) GetAddition() driver.Additional

func (*Doubao) GetArchiveMeta

func (d *Doubao) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)

func (*Doubao) Init

func (d *Doubao) Init(ctx context.Context) error
func (d *Doubao) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*Doubao) List

func (d *Doubao) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*Doubao) ListArchive

func (d *Doubao) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]model.Obj, error)

func (*Doubao) MakeDir

func (d *Doubao) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*Doubao) Move

func (d *Doubao) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*Doubao) Put

func (d *Doubao) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)

func (*Doubao) Remove

func (d *Doubao) Remove(ctx context.Context, obj model.Obj) error

func (*Doubao) Rename

func (d *Doubao) Rename(ctx context.Context, srcObj model.Obj, newName string) error

type GetFileUrlResp

type GetFileUrlResp struct {
	BaseResp
	Data struct {
		FileUrls []struct {
			URI     string `json:"uri"`
			MainURL string `json:"main_url"`
			BackURL string `json:"back_url"`
		} `json:"file_urls"`
	} `json:"data"`
}

type NodeInfo

type NodeInfo struct {
	ID                  string `json:"id"`
	Name                string `json:"name"`
	Key                 string `json:"key"`
	NodeType            int    `json:"node_type"` // 0: 文件, 1: 文件夹
	Size                int    `json:"size"`
	Source              int    `json:"source"`
	NameReviewStatus    int    `json:"name_review_status"`
	ContentReviewStatus int    `json:"content_review_status"`
	RiskReviewStatus    int    `json:"risk_review_status"`
	ConversationID      string `json:"conversation_id"`
	ParentID            string `json:"parent_id"`
	CreateTime          int    `json:"create_time"`
	UpdateTime          int    `json:"update_time"`
}

type NodeInfoResp

type NodeInfoResp struct {
	BaseResp
	Data struct {
		NodeInfo   NodeInfo   `json:"node_info"`
		Children   []NodeInfo `json:"children"`
		NextCursor string     `json:"next_cursor"`
		HasMore    bool       `json:"has_more"`
	} `json:"data"`
}

type Object

type Object struct {
	model.Object
	Key string
}

type UploadNodeResp

type UploadNodeResp struct {
	BaseResp
	Data struct {
		NodeList []struct {
			LocalID  string `json:"local_id"`
			ID       string `json:"id"`
			ParentID string `json:"parent_id"`
			Name     string `json:"name"`
			Key      string `json:"key"`
			NodeType int    `json:"node_type"` // 0: 文件, 1: 文件夹
		} `json:"node_list"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL