Documentation
¶
Index ¶
- type Addition
- type BasicConfigResp
- type CaptchaResp
- type CloudreveV4
- func (d *CloudreveV4) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, ...) ([]model.Obj, error)
- func (d *CloudreveV4) Config() driver.Config
- func (d *CloudreveV4) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *CloudreveV4) Drop(ctx context.Context) error
- func (d *CloudreveV4) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)
- func (d *CloudreveV4) GetAddition() driver.Additional
- func (d *CloudreveV4) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)
- func (d *CloudreveV4) Init(ctx context.Context) error
- func (d *CloudreveV4) InitReference(storage driver.Driver) error
- func (d *CloudreveV4) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *CloudreveV4) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *CloudreveV4) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]model.Obj, error)
- func (d *CloudreveV4) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *CloudreveV4) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *CloudreveV4) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, ...) error
- func (d *CloudreveV4) Remove(ctx context.Context, obj model.Obj) error
- func (d *CloudreveV4) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- type File
- type FileResp
- type FileThumbResp
- type FileUploadResp
- type FileUrlResp
- type FolderSummaryResp
- type Object
- type Pagination
- type PrepareLoginResp
- type Props
- type Resp
- type SiteLoginConfigResp
- type StoragePolicy
- type Token
- type TokenResponse
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 Address string `json:"address" required:"true"` Username string `json:"username"` Password string `json:"password"` AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` CustomUA string `json:"custom_ua"` EnableFolderSize bool `json:"enable_folder_size"` EnableThumb bool `json:"enable_thumb"` EnableVersionUpload bool `json:"enable_version_upload"` OrderBy string `json:"order_by" type:"select" options:"name,size,updated_at,created_at" default:"name" required:"true"` OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc" required:"true"` }
type BasicConfigResp ¶
type BasicConfigResp struct { InstanceID string `json:"instance_id"` // Title string `json:"title"` // Themes string `json:"themes"` // DefaultTheme string `json:"default_theme"` User struct { ID string `json:"id"` // Nickname string `json:"nickname"` // CreatedAt time.Time `json:"created_at"` // Anonymous bool `json:"anonymous"` Group struct { ID string `json:"id"` Name string `json:"name"` Permission string `json:"permission"` } `json:"group"` } `json:"user"` // Logo string `json:"logo"` // LogoLight string `json:"logo_light"` // CaptchaReCaptchaKey string `json:"captcha_ReCaptchaKey"` CaptchaType string `json:"captcha_type"` // support 'normal' only }
type CaptchaResp ¶
type CloudreveV4 ¶
func (*CloudreveV4) ArchiveDecompress ¶
func (d *CloudreveV4) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, args model.ArchiveDecompressArgs) ([]model.Obj, error)
func (*CloudreveV4) Config ¶
func (d *CloudreveV4) Config() driver.Config
func (*CloudreveV4) Extract ¶
func (d *CloudreveV4) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)
func (*CloudreveV4) GetAddition ¶
func (d *CloudreveV4) GetAddition() driver.Additional
func (*CloudreveV4) GetArchiveMeta ¶
func (d *CloudreveV4) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)
func (*CloudreveV4) InitReference ¶
func (d *CloudreveV4) InitReference(storage driver.Driver) error
func (*CloudreveV4) ListArchive ¶
func (d *CloudreveV4) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]model.Obj, error)
func (*CloudreveV4) Put ¶
func (d *CloudreveV4) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) error
type File ¶
type File struct { Type int `json:"type"` // 0: file, 1: folder ID string `json:"id"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Size int64 `json:"size"` Metadata interface{} `json:"metadata"` Path string `json:"path"` Capability string `json:"capability"` Owned bool `json:"owned"` PrimaryEntity string `json:"primary_entity"` }
type FileResp ¶
type FileResp struct { Files []File `json:"files"` Parent File `json:"parent"` Pagination Pagination `json:"pagination"` Props Props `json:"props"` ContextHint string `json:"context_hint"` MixedType bool `json:"mixed_type"` StoragePolicy StoragePolicy `json:"storage_policy"` }
type FileThumbResp ¶
type FileUploadResp ¶
type FileUploadResp struct { // UploadID string `json:"upload_id"` SessionID string `json:"session_id"` ChunkSize int64 `json:"chunk_size"` Expires int64 `json:"expires"` StoragePolicy StoragePolicy `json:"storage_policy"` URI string `json:"uri"` CompleteURL string `json:"completeURL,omitempty"` // for S3-like CallbackSecret string `json:"callback_secret,omitempty"` // for S3-like, OneDrive UploadUrls []string `json:"upload_urls,omitempty"` // for not-local Credential string `json:"credential,omitempty"` // for local }
type FileUrlResp ¶
type FolderSummaryResp ¶
type Object ¶
type Object struct { model.Object StoragePolicy StoragePolicy }
type Pagination ¶
type PrepareLoginResp ¶
type SiteLoginConfigResp ¶
type StoragePolicy ¶
type TokenResponse ¶
type TokenResponse struct { User struct { ID string `json:"id"` // Email string `json:"email"` // Nickname string `json:"nickname"` Status string `json:"status"` // CreatedAt time.Time `json:"created_at"` Group struct { ID string `json:"id"` Name string `json:"name"` Permission string `json:"permission"` } `json:"group"` } `json:"user"` Token Token `json:"token"` }
Click to show internal directories.
Click to hide internal directories.