Documentation
¶
Index ¶
- type Addition
- type CFImgBed
- func (d *CFImgBed) Config() driver.Config
- func (d *CFImgBed) Drop(ctx context.Context) error
- func (d *CFImgBed) Get(ctx context.Context, pathStr string) (model.Obj, error)
- func (d *CFImgBed) GetAddition() driver.Additional
- func (d *CFImgBed) Init(ctx context.Context) error
- func (d *CFImgBed) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *CFImgBed) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *CFImgBed) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
- func (d *CFImgBed) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, ...) (newObj model.Obj, err error)
- func (d *CFImgBed) Remove(ctx context.Context, obj model.Obj) error
- type FileItem
- type ListResponse
- type UploadAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct {
driver.RootPath
Address string `json:"address" required:"true" help:"Backend API address of the image hosting service, e.g., https://img.example.com"`
Token string `json:"token" required:"true" help:"Authentication Token"`
SmallChannelName string `json:"smallChannelName" help:"Channel name for regular files (typically <20MB)"`
LargeChannelName string `json:"largeChannelName" help:"Channel name for large files"`
LargeChannelType string `` /* 191-byte string literal not displayed */
UploadThread int `json:"uploadThread" type:"number" default:"3" help:"Concurrent thread count for HuggingFace chunked direct upload"`
}
type CFImgBed ¶
func (*CFImgBed) GetAddition ¶
func (d *CFImgBed) GetAddition() driver.Additional
func (*CFImgBed) MakeDir ¶
func (d *CFImgBed) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
MakeDir 在图床中通常是虚拟的,此处返回虚拟目录对象以支持上传时的路径展示
type ListResponse ¶
type ListResponse struct {
Files []FileItem `json:"files"`
Directories []string `json:"directories"`
}
ListResponse 列表接口响应
type UploadAction ¶
Click to show internal directories.
Click to hide internal directories.