Documentation
¶
Index ¶
- type APIResponse
- type AccountInfoResponse
- type AccountResponse
- type Addition
- type Content
- type ContentsResponse
- type CopyResponse
- type CreateFolderResponse
- type DirectLinkResponse
- type ErrorResponse
- type Gofile
- func (d *Gofile) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, ...) ([]model.Obj, error)
- func (d *Gofile) Config() driver.Config
- func (d *Gofile) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *Gofile) Drop(ctx context.Context) error
- func (d *Gofile) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)
- func (d *Gofile) GetAddition() driver.Additional
- func (d *Gofile) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)
- func (d *Gofile) Init(ctx context.Context) error
- func (d *Gofile) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *Gofile) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *Gofile) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]model.Obj, error)
- func (d *Gofile) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
- func (d *Gofile) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *Gofile) Put(ctx context.Context, dstDir model.Obj, fileStreamer model.FileStreamer, ...) (model.Obj, error)
- func (d *Gofile) Remove(ctx context.Context, obj model.Obj) error
- func (d *Gofile) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)
- type UpdateResponse
- type UploadResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type APIResponse struct {
Status string `json:"status"`
Data interface{} `json:"data"`
}
type AccountInfoResponse ¶
type AccountResponse ¶
type Addition ¶
type Addition struct {
driver.RootID
APIToken string `json:"api_token" required:"true" help:"Get your API token from your Gofile profile page"`
LinkExpiry int `json:"link_expiry" type:"number" default:"30" help:"Direct link cache duration in days. Set to 0 to disable caching"`
DirectLinkExpiry int `` /* 140-byte string literal not displayed */
}
type Content ¶
type Content struct {
ID string `json:"id"`
Type string `json:"type"` // "file" or "folder"
Name string `json:"name"`
Size int64 `json:"size,omitempty"`
CreateTime int64 `json:"createTime"`
ModTime int64 `json:"modTime,omitempty"`
DirectLink string `json:"directLink,omitempty"`
Children map[string]Content `json:"children,omitempty"`
ParentFolder string `json:"parentFolder,omitempty"`
MD5 string `json:"md5,omitempty"`
MimeType string `json:"mimeType,omitempty"`
Link string `json:"link,omitempty"`
}
func (*Content) ModifiedTime ¶
type ContentsResponse ¶
type ContentsResponse struct {
Status string `json:"status"`
Data struct {
IsOwner bool `json:"isOwner"`
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
ParentFolder string `json:"parentFolder"`
CreateTime int64 `json:"createTime"`
ChildrenList []string `json:"childrenList,omitempty"`
Children map[string]Content `json:"children,omitempty"`
Contents map[string]Content `json:"contents,omitempty"`
Public bool `json:"public,omitempty"`
Description string `json:"description,omitempty"`
Tags string `json:"tags,omitempty"`
Expiry int64 `json:"expiry,omitempty"`
} `json:"data"`
}
type CopyResponse ¶
type CreateFolderResponse ¶
type DirectLinkResponse ¶
type ErrorResponse ¶
type Gofile ¶
func (*Gofile) ArchiveDecompress ¶
func (*Gofile) GetAddition ¶
func (d *Gofile) GetAddition() driver.Additional
func (*Gofile) GetArchiveMeta ¶
func (d *Gofile) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)
func (*Gofile) ListArchive ¶
type UpdateResponse ¶
type UploadResponse ¶
type UploadResponse struct {
Status string `json:"status"`
Data struct {
DownloadPage string `json:"downloadPage"`
Code string `json:"code"`
ParentFolder string `json:"parentFolder"`
FileId string `json:"fileId"`
FileName string `json:"fileName"`
GuestToken string `json:"guestToken,omitempty"`
} `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.