Documentation
¶
Index ¶
- func BaseHeader() map[string]string
- type FileBrowserClient
- func (f *FileBrowserClient) Debug(isDebug bool)
- func (f *FileBrowserClient) IsLogin() bool
- func (f *FileBrowserClient) Login() error
- func (f *FileBrowserClient) ResourceDownload(remotePath string, localPath string, override bool) error
- func (f *FileBrowserClient) ResourcesDeletePath(remotePath string) (bool, error)
- func (f *FileBrowserClient) ResourcesGet(pathResource string) (web_api.Resources, error)
- func (f *FileBrowserClient) ResourcesGetCheckSum(pathResource string, checksum string) (web_api.Resources, error)
- func (f *FileBrowserClient) ResourcesPostDirectoryFiles(resourceDirectory ResourcePostDirectory, override bool) (ResourcesPostDirectoryResult, error)
- func (f *FileBrowserClient) ResourcesPostFile(resourceFile ResourcePostFile, override bool) error
- func (f *FileBrowserClient) ShareDelete(hash string) (bool, error)
- func (f *FileBrowserClient) ShareGetByRemotePath(remotePath string) ([]web_api.ShareLink, error)
- func (f *FileBrowserClient) SharePost(shareResource ShareResource) (ShareContent, error)
- func (f *FileBrowserClient) SharesGet() ([]web_api.ShareLink, error)
- type ResourcePostDirectory
- type ResourcePostFile
- type ResourcesPostDirectoryResult
- type ShareContent
- type ShareResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseHeader ¶
Types ¶
type FileBrowserClient ¶
type FileBrowserClient struct {
Recaptcha string
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient( username, password, baseUrl string, timeoutSecond, timeoutFileSecond uint, ) (FileBrowserClient, error)
NewClient new client for filebrowser
func (*FileBrowserClient) Debug ¶
func (f *FileBrowserClient) Debug(isDebug bool)
Debug open FileBrowserClient debug or close
func (*FileBrowserClient) IsLogin ¶
func (f *FileBrowserClient) IsLogin() bool
IsLogin check FileBrowserClient has login
func (*FileBrowserClient) Login ¶
func (f *FileBrowserClient) Login() error
Login do login by FileBrowserClient
func (*FileBrowserClient) ResourceDownload ¶
func (f *FileBrowserClient) ResourceDownload(remotePath string, localPath string, override bool) error
ResourceDownload remotePath must exist and not empty; localPath must not empty and parent folder must exist override is overrider download
func (*FileBrowserClient) ResourcesDeletePath ¶
func (f *FileBrowserClient) ResourcesDeletePath(remotePath string) (bool, error)
ResourcesDeletePath remotePath just use remote path
func (*FileBrowserClient) ResourcesGet ¶
func (f *FileBrowserClient) ResourcesGet(pathResource string) (web_api.Resources, error)
ResourcesGet pathResource path resource at remote
func (*FileBrowserClient) ResourcesGetCheckSum ¶
func (f *FileBrowserClient) ResourcesGetCheckSum(pathResource string, checksum string) (web_api.Resources, error)
ResourcesGetCheckSum pathResource path resource at remote checksum will be [ md5 sha1 sha256 sha512 ] or empty
func (*FileBrowserClient) ResourcesPostDirectoryFiles ¶
func (f *FileBrowserClient) ResourcesPostDirectoryFiles(resourceDirectory ResourcePostDirectory, override bool) (ResourcesPostDirectoryResult, error)
ResourcesPostDirectoryFiles post directory full files by ResourcePostDirectory settings ResourcePostDirectory.LocalDirectoryPath must exist override will want override remote path, but success must enable the permission at filebrowser to modify files
func (*FileBrowserClient) ResourcesPostFile ¶
func (f *FileBrowserClient) ResourcesPostFile(resourceFile ResourcePostFile, override bool) error
ResourcesPostFile param post file by ResourcePostFile, ResourcePostFile.LocalFilePath must exist; override will want override remote path, but success must enable the permission at filebrowser to modify files
func (*FileBrowserClient) ShareDelete ¶
func (f *FileBrowserClient) ShareDelete(hash string) (bool, error)
ShareDelete delete share by share hash warning: For security purposes, this api always returns correct if the permission is passed
func (*FileBrowserClient) ShareGetByRemotePath ¶
func (f *FileBrowserClient) ShareGetByRemotePath(remotePath string) ([]web_api.ShareLink, error)
ShareGetByRemotePath get share by remote path return shareLink will be list
func (*FileBrowserClient) SharePost ¶
func (f *FileBrowserClient) SharePost(shareResource ShareResource) (ShareContent, error)
SharePost post share by ShareResource settings ShareResource.RemotePath must exist
type ResourcePostDirectory ¶
type ResourcePostFile ¶
type ResourcesPostDirectoryResult ¶
type ResourcesPostDirectoryResult struct {
FullSuccess bool `json:"full_success"`
SuccessFiles []ResourcePostFile `json:"post_success_files,omitempty"`
FailFiles []ResourcePostFile `json:"fail_files,omitempty"`
}
type ShareContent ¶
type ShareContent struct {
}
type ShareResource ¶
type ShareResource struct {
}