Documentation
¶
Index ¶
- func GetMD5Hash(text string) string
- func NewHalalCommon() *halalCommon
- func NewObjFile(f *sdkUserFile.File) model.Obj
- type Addition
- type HalalCloudOpen
- func (m HalalCloudOpen) ClearConfigs() error
- func (d *HalalCloudOpen) Config() driver.Config
- func (d *HalalCloudOpen) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (m HalalCloudOpen) DeleteConfig(key string) error
- func (d *HalalCloudOpen) Drop(ctx context.Context) error
- func (m HalalCloudOpen) GetAccessToken() (string, error)
- func (d *HalalCloudOpen) GetAddition() driver.Additional
- func (m HalalCloudOpen) GetConfig(key string) (string, error)
- func (d *HalalCloudOpen) GetDetails(ctx context.Context) (*model.StorageDetails, error)
- func (m HalalCloudOpen) GetRefreshToken() (string, error)
- func (d *HalalCloudOpen) Init(ctx context.Context) error
- func (d *HalalCloudOpen) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *HalalCloudOpen) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (m HalalCloudOpen) ListConfigs() (map[string]string, error)
- func (d *HalalCloudOpen) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
- func (d *HalalCloudOpen) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *HalalCloudOpen) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) (model.Obj, error)
- func (d *HalalCloudOpen) Remove(ctx context.Context, obj model.Obj) error
- func (d *HalalCloudOpen) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)
- func (m HalalCloudOpen) SetAccessToken(token string) error
- func (m HalalCloudOpen) SetConfig(key string, value string) error
- func (m HalalCloudOpen) SetRefreshToken(token string) error
- func (m HalalCloudOpen) SetToken(accessToken string, refreshToken string, expiresIn int64) error
- type ObjFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMD5Hash ¶
func NewHalalCommon ¶
func NewHalalCommon() *halalCommon
func NewObjFile ¶
func NewObjFile(f *sdkUserFile.File) model.Obj
Types ¶
type Addition ¶
type Addition struct {
// Usually one of two
driver.RootPath
// define other
RefreshToken string `json:"refresh_token" required:"false" help:"If using a personal API approach, the RefreshToken is not required."`
UploadThread int `json:"upload_thread" type:"number" default:"3" help:"1 <= thread <= 32"`
ClientID string `json:"client_id" required:"true" default:""`
ClientSecret string `json:"client_secret" required:"true" default:""`
Host string `json:"host" required:"false" default:"openapi.2dland.cn"`
TimeOut int `json:"timeout" type:"number" default:"60" help:"timeout in seconds"`
}
type HalalCloudOpen ¶
func (HalalCloudOpen) ClearConfigs ¶
func (m HalalCloudOpen) ClearConfigs() error
ClearConfigs implements ConfigStore.
func (*HalalCloudOpen) Config ¶
func (d *HalalCloudOpen) Config() driver.Config
func (HalalCloudOpen) DeleteConfig ¶
DeleteConfig implements ConfigStore.
func (HalalCloudOpen) GetAccessToken ¶
func (*HalalCloudOpen) GetAddition ¶
func (d *HalalCloudOpen) GetAddition() driver.Additional
func (*HalalCloudOpen) GetDetails ¶
func (d *HalalCloudOpen) GetDetails(ctx context.Context) (*model.StorageDetails, error)
func (HalalCloudOpen) GetRefreshToken ¶
GetRefreshToken implements ConfigStore.
func (HalalCloudOpen) ListConfigs ¶
ListConfigs implements ConfigStore.
func (*HalalCloudOpen) Put ¶
func (d *HalalCloudOpen) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)
func (HalalCloudOpen) SetAccessToken ¶
SetAccessToken implements ConfigStore.
func (HalalCloudOpen) SetRefreshToken ¶
SetRefreshToken implements ConfigStore.
type ObjFile ¶
type ObjFile struct {
// contains filtered or unexported fields
}
func (*ObjFile) CreateTime ¶
Click to show internal directories.
Click to hide internal directories.