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) 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) ListSharings() (*http.Response, *fileshdr.SharingResp, []error)
- 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) UploadChunk(filepath string, content string, offset int64) (*http.Response, string, []error)
- func (cl *FilesClient) UploadStatus(filepath string) (*http.Response, *fileshdr.UploadStatusResp, []error)
- type SettingsClient
- type SingleUserClient
- func (cl *SingleUserClient) AddRole(role string, token *http.Cookie) (*http.Response, string, []error)
- func (cl *SingleUserClient) AddUser(name, pwd, role string, token *http.Cookie) (*http.Response, *multiusers.AddUserResp, []error)
- func (cl *SingleUserClient) DelRole(role string, token *http.Cookie) (*http.Response, string, []error)
- func (cl *SingleUserClient) DelUser(id string, token *http.Cookie) (*http.Response, string, []error)
- func (cl *SingleUserClient) ListRoles(token *http.Cookie) (*http.Response, *multiusers.ListRolesResp, []error)
- func (cl *SingleUserClient) ListUsers(token *http.Cookie) (*http.Response, *multiusers.ListUsersResp, []error)
- func (cl *SingleUserClient) Login(user, pwd string) (*http.Response, string, []error)
- func (cl *SingleUserClient) Logout(token *http.Cookie) (*http.Response, string, []error)
- func (cl *SingleUserClient) Self(token *http.Cookie) (*http.Response, *multiusers.SelfResp, []error)
- func (cl *SingleUserClient) SetPreferences(prefers *userstore.Preferences, token *http.Cookie) (*http.Response, string, []error)
- func (cl *SingleUserClient) SetPwd(oldPwd, newPwd string, token *http.Cookie) (*http.Response, string, []error)
- func (cl *SingleUserClient) SetUser(ID uint64, role string, quota *userstore.Quota, token *http.Cookie) (*http.Response, string, []error)
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) ListSharings ¶
func (cl *FilesClient) ListSharings() (*http.Response, *fileshdr.SharingResp, []error)
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) 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) *SettingsClient
func (*SettingsClient) GetClientCfg ¶ added in v0.4.11
func (cl *SettingsClient) GetClientCfg(token *http.Cookie) (*http.Response, *settings.ClientCfgMsg, []error)
func (*SettingsClient) Health ¶
func (cl *SettingsClient) Health() (*http.Response, string, []error)
func (*SettingsClient) SetClientCfg ¶ added in v0.4.11
func (cl *SettingsClient) SetClientCfg(cfg *sitestore.ClientConfig, token *http.Cookie) (*http.Response, string, []error)
type SingleUserClient ¶
type SingleUserClient struct {
// contains filtered or unexported fields
}
func NewSingleUserClient ¶
func NewSingleUserClient(addr string) *SingleUserClient
func (*SingleUserClient) AddUser ¶
func (cl *SingleUserClient) AddUser(name, pwd, role string, token *http.Cookie) (*http.Response, *multiusers.AddUserResp, []error)
func (*SingleUserClient) ListRoles ¶
func (cl *SingleUserClient) ListRoles(token *http.Cookie) (*http.Response, *multiusers.ListRolesResp, []error)
func (*SingleUserClient) ListUsers ¶
func (cl *SingleUserClient) ListUsers(token *http.Cookie) (*http.Response, *multiusers.ListUsersResp, []error)
func (*SingleUserClient) Self ¶
func (cl *SingleUserClient) Self(token *http.Cookie) (*http.Response, *multiusers.SelfResp, []error)
func (*SingleUserClient) SetPreferences ¶ added in v0.4.13
func (cl *SingleUserClient) SetPreferences(prefers *userstore.Preferences, token *http.Cookie) (*http.Response, string, []error)
Click to show internal directories.
Click to hide internal directories.