Documentation ¶
Index ¶
- func GetCookie(cookies []*http.Cookie, name string) *http.Cookie
- type FilesClient
- func (cl *FilesClient) AddSharing(dirpath string) (*http.Response, string, []error)
- func (cl *FilesClient) Create(filepath string, size int64) (*http.Response, string, []error)
- func (cl *FilesClient) DelSharing(dirpath string) (*http.Response, string, []error)
- func (cl *FilesClient) DelUploading(filepath string) (*http.Response, string, []error)
- func (cl *FilesClient) Delete(filepath string) (*http.Response, string, []error)
- func (cl *FilesClient) Download(filepath string, headers map[string]string) (*http.Response, string, []error)
- func (cl *FilesClient) GenerateHash(filepath string) (*http.Response, string, []error)
- func (cl *FilesClient) GetSharingDir(shareID string) (*http.Response, string, []error)
- func (cl *FilesClient) IsSharing(dirpath string) (*http.Response, string, []error)
- func (cl *FilesClient) List(dirPath string) (*http.Response, *fileshdr.ListResp, []error)
- func (cl *FilesClient) ListHome() (*http.Response, *fileshdr.ListResp, []error)
- func (cl *FilesClient) ListSharingIDs() (*http.Response, *fileshdr.SharingIDsResp, []error)
- func (cl *FilesClient) ListSharings() (*http.Response, *fileshdr.SharingResp, []error)deprecated
- func (cl *FilesClient) ListUploadings() (*http.Response, *fileshdr.ListUploadingsResp, []error)
- func (cl *FilesClient) Metadata(filepath string) (*http.Response, *fileshdr.MetadataResp, []error)
- func (cl *FilesClient) Mkdir(dirpath string) (*http.Response, string, []error)
- func (cl *FilesClient) Move(oldpath, newpath string) (*http.Response, string, []error)
- func (cl *FilesClient) Reindex() (*http.Response, string, []error)
- func (cl *FilesClient) SearchItems(keywords []string) (*http.Response, *fileshdr.SearchItemsResp, []error)
- func (cl *FilesClient) UploadChunk(filepath string, content string, offset int64) (*http.Response, string, []error)
- func (cl *FilesClient) UploadStatus(filepath string) (*http.Response, *fileshdr.UploadStatusResp, []error)
- type SettingsClient
- func (cl *SettingsClient) GetClientCfg() (*http.Response, *settings.ClientCfgMsg, []error)
- func (cl *SettingsClient) Health() (*http.Response, string, []error)
- func (cl *SettingsClient) ReportErrors(reports *settings.ClientErrorReports) (*http.Response, string, []error)
- func (cl *SettingsClient) SetClientCfg(cfgMsg *settings.ClientCfgMsg) (*http.Response, string, []error)
- func (cl *SettingsClient) WorkerQueueLen() (*http.Response, *settings.WorkerQueueLenResp, []error)
- type UsersClient
- func (cl *UsersClient) AddRole(role string) (*http.Response, string, []error)
- func (cl *UsersClient) AddUser(name, pwd, role string) (*http.Response, *multiusers.AddUserResp, []error)
- func (cl *UsersClient) DelRole(role string) (*http.Response, string, []error)
- func (cl *UsersClient) DelUser(id string) (*http.Response, string, []error)
- func (cl *UsersClient) ForceSetPwd(userID, newPwd string) (*http.Response, string, []error)
- func (cl *UsersClient) IsAuthed() (*http.Response, string, []error)
- func (cl *UsersClient) ListRoles() (*http.Response, *multiusers.ListRolesResp, []error)
- func (cl *UsersClient) ListUsers() (*http.Response, *multiusers.ListUsersResp, []error)
- func (cl *UsersClient) Login(user, pwd string) (*http.Response, string, []error)
- func (cl *UsersClient) Logout() (*http.Response, string, []error)
- func (cl *UsersClient) ResetUsedSpace(userID uint64) (*http.Response, string, []error)
- func (cl *UsersClient) Self() (*http.Response, *multiusers.SelfResp, []error)
- func (cl *UsersClient) SetPreferences(prefers *db.Preferences) (*http.Response, string, []error)
- func (cl *UsersClient) SetPwd(oldPwd, newPwd string) (*http.Response, string, []error)
- func (cl *UsersClient) SetToken(token *http.Cookie)
- func (cl *UsersClient) SetUser(ID uint64, role string, quota *db.Quota) (*http.Response, string, []error)
- func (cl *UsersClient) Token() *http.Cookie
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FilesClient ¶
type FilesClient struct {
// contains filtered or unexported fields
}
func NewFilesClient ¶
func NewFilesClient(addr string, token *http.Cookie) *FilesClient
func (*FilesClient) AddSharing ¶
func (*FilesClient) DelSharing ¶
func (*FilesClient) DelUploading ¶
func (*FilesClient) GenerateHash ¶
func (*FilesClient) GetSharingDir ¶ added in v0.5.0
func (*FilesClient) ListSharingIDs ¶ added in v0.5.0
func (cl *FilesClient) ListSharingIDs() (*http.Response, *fileshdr.SharingIDsResp, []error)
func (*FilesClient) ListSharings
deprecated
func (cl *FilesClient) ListSharings() (*http.Response, *fileshdr.SharingResp, []error)
Deprecated: use ListSharingIDs intead
func (*FilesClient) ListUploadings ¶
func (cl *FilesClient) ListUploadings() (*http.Response, *fileshdr.ListUploadingsResp, []error)
func (*FilesClient) Metadata ¶
func (cl *FilesClient) Metadata(filepath string) (*http.Response, *fileshdr.MetadataResp, []error)
func (*FilesClient) Reindex ¶ added in v0.9.1
func (cl *FilesClient) Reindex() (*http.Response, string, []error)
func (*FilesClient) SearchItems ¶ added in v0.9.1
func (cl *FilesClient) SearchItems(keywords []string) (*http.Response, *fileshdr.SearchItemsResp, []error)
func (*FilesClient) UploadChunk ¶
func (*FilesClient) UploadStatus ¶
func (cl *FilesClient) UploadStatus(filepath string) (*http.Response, *fileshdr.UploadStatusResp, []error)
type SettingsClient ¶
type SettingsClient struct {
// contains filtered or unexported fields
}
func NewSettingsClient ¶
func NewSettingsClient(addr string, token *http.Cookie) *SettingsClient
func (*SettingsClient) GetClientCfg ¶ added in v0.4.11
func (cl *SettingsClient) GetClientCfg() (*http.Response, *settings.ClientCfgMsg, []error)
func (*SettingsClient) Health ¶
func (cl *SettingsClient) Health() (*http.Response, string, []error)
func (*SettingsClient) ReportErrors ¶ added in v0.4.21
func (cl *SettingsClient) ReportErrors(reports *settings.ClientErrorReports) (*http.Response, string, []error)
func (*SettingsClient) SetClientCfg ¶ added in v0.4.11
func (cl *SettingsClient) SetClientCfg(cfgMsg *settings.ClientCfgMsg) (*http.Response, string, []error)
func (*SettingsClient) WorkerQueueLen ¶ added in v0.6.1
func (cl *SettingsClient) WorkerQueueLen() (*http.Response, *settings.WorkerQueueLenResp, []error)
type UsersClient ¶ added in v0.9.1
type UsersClient struct {
// contains filtered or unexported fields
}
func NewUsersClient ¶ added in v0.9.1
func NewUsersClient(addr string) *UsersClient
func (*UsersClient) AddUser ¶ added in v0.9.1
func (cl *UsersClient) AddUser(name, pwd, role string) (*http.Response, *multiusers.AddUserResp, []error)
func (*UsersClient) ForceSetPwd ¶ added in v0.9.1
func (*UsersClient) IsAuthed ¶ added in v0.9.1
func (cl *UsersClient) IsAuthed() (*http.Response, string, []error)
func (*UsersClient) ListRoles ¶ added in v0.9.1
func (cl *UsersClient) ListRoles() (*http.Response, *multiusers.ListRolesResp, []error)
func (*UsersClient) ListUsers ¶ added in v0.9.1
func (cl *UsersClient) ListUsers() (*http.Response, *multiusers.ListUsersResp, []error)
func (*UsersClient) Logout ¶ added in v0.9.1
func (cl *UsersClient) Logout() (*http.Response, string, []error)
func (*UsersClient) ResetUsedSpace ¶ added in v0.9.1
func (*UsersClient) Self ¶ added in v0.9.1
func (cl *UsersClient) Self() (*http.Response, *multiusers.SelfResp, []error)
func (*UsersClient) SetPreferences ¶ added in v0.9.1
func (cl *UsersClient) SetPreferences(prefers *db.Preferences) (*http.Response, string, []error)
func (*UsersClient) SetToken ¶ added in v0.9.1
func (cl *UsersClient) SetToken(token *http.Cookie)
func (*UsersClient) Token ¶ added in v0.9.1
func (cl *UsersClient) Token() *http.Cookie
Click to show internal directories.
Click to hide internal directories.