Documentation ¶
Index ¶
- type Account
- type Children
- type ClientOption
- type Content
- type DirectLink
- type File
- type FileContent
- type Folder
- type FolderContent
- type Gofile
- func (g *Gofile) CreateFolder(parentFolderId, folderName string) (*Folder, error)
- func (g *Gofile) DeleteContent(contentId string) error
- func (g *Gofile) DeleteContents(contentIds ...string) error
- func (g *Gofile) DirectLink(contentId string) (*DirectLink, error)
- func (g *Gofile) Download(contentId string) (io.Reader, error)
- func (g *Gofile) DownloadUrl(url string) (io.Reader, error)
- func (g *Gofile) FindFile(value string, args ...string) (*Content, *FileContent, error)
- func (g *Gofile) FindFolder(value string, args ...string) (*Content, *FolderContent, error)
- func (g *Gofile) GetAccount(args ...string) (*Account, error)
- func (g *Gofile) GetAccountId() (string, error)
- func (g *Gofile) GetContent(contentId string) (*Content, error)
- func (g *Gofile) GetFile(folderId, fileId string) (*FileContent, error)
- func (g *Gofile) RemoveProxy(proxy string)
- func (g *Gofile) ResetToken() error
- func (g *Gofile) Servers() ([]Server, error)
- func (g *Gofile) SetCache(cache bool)
- func (g *Gofile) SetProxy(proxy string)
- func (g *Gofile) SetWt(wt string)
- func (g *Gofile) UpdateContent(contentId string, data map[string]string) error
- func (g *Gofile) UploadFile(folderId, filename string, file io.Reader) (*File, error)
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Email string `json:"email"` Id string `json:"id"` RootFolder string `json:"rootFolder"` StatsCurrent struct { FileCount int `json:"fileCount"` FolderCount int `json:"folderCount"` Storage int `json:"storage"` TrafficWebDownloaded int `json:"trafficWebDownloaded"` } `json:"statsCurrent"` Tier string `json:"tier"` Token string `json:"token"` // contains filtered or unexported fields }
type ClientOption ¶
type Content ¶
type Content struct { Id string `json:"id"` Type string `json:"type"` Name string `json:"name"` ParentFolder string `json:"parentFolder"` Code string `json:"code"` CreateTime int `json:"createTime"` Public bool `json:"public"` TotalDownloadCount int `json:"totalDownloadCount"` TotalSize int `json:"totalSize"` IsOwner bool `json:"isOwner"` IsRoot bool `json:"isRoot"` ChildrenIds []string `json:"childrenIds"` Children map[string]Children `json:"children"` // contains filtered or unexported fields }
func (*Content) FindChildren ¶
type DirectLink ¶
type File ¶
type FileContent ¶
type FileContent struct { Id string `json:"id"` Type string `json:"type"` Name string `json:"name"` ParentFolder string `json:"parentFolder"` Code string `json:"code"` CreateTime int `json:"createTime"` Size int `json:"size"` DownloadCount int `json:"downloadCount"` Md5 string `json:"md5"` MimeType string `json:"mimetype"` ServerSelected string `json:"serverSelected"` Link string `json:"link"` Thumbnail string `json:"thumbnail"` // contains filtered or unexported fields }
func (*FileContent) Delete ¶
func (f *FileContent) Delete() error
func (*FileContent) GetId ¶
func (f *FileContent) GetId() string
func (*FileContent) IsFolder ¶
func (f *FileContent) IsFolder() bool
func (*FileContent) IsId ¶
func (f *FileContent) IsId(id string) bool
type Folder ¶
type FolderContent ¶
type FolderContent struct { Id string `json:"id"` Type string `json:"type"` Name string `json:"name"` ParentFolder string `json:"parentFolder"` Code string `json:"code"` CreateTime int `json:"createTime"` Public bool `json:"public"` ChildrenIds []string `json:"childrenIds"` // contains filtered or unexported fields }
func (*FolderContent) Delete ¶
func (f *FolderContent) Delete() error
func (*FolderContent) GetId ¶
func (f *FolderContent) GetId() string
func (*FolderContent) IsFolder ¶
func (f *FolderContent) IsFolder() bool
func (*FolderContent) IsId ¶
func (f *FolderContent) IsId(id string) bool
type Gofile ¶
type Gofile struct {
// contains filtered or unexported fields
}
func Anonymous ¶ added in v0.0.3
func Anonymous(args ...ClientOption) (*Gofile, error)
func (*Gofile) CreateFolder ¶
func (*Gofile) DeleteContent ¶
func (*Gofile) DeleteContents ¶
func (*Gofile) DirectLink ¶
func (g *Gofile) DirectLink(contentId string) (*DirectLink, error)
func (*Gofile) DownloadUrl ¶ added in v0.0.5
func (*Gofile) FindFolder ¶
func (*Gofile) GetAccountId ¶
func (*Gofile) RemoveProxy ¶ added in v0.0.4
func (*Gofile) ResetToken ¶
func (*Gofile) UpdateContent ¶ added in v0.0.6
Source Files ¶
Click to show internal directories.
Click to hide internal directories.