client

package
v0.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCookie

func GetCookie(cookies []*http.Cookie, name string) *http.Cookie

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 (cl *FilesClient) AddSharing(dirpath string) (*http.Response, string, []error)

func (*FilesClient) Create

func (cl *FilesClient) Create(filepath string, size int64) (*http.Response, string, []error)

func (*FilesClient) DelSharing

func (cl *FilesClient) DelSharing(dirpath string) (*http.Response, string, []error)

func (*FilesClient) DelUploading

func (cl *FilesClient) DelUploading(filepath string) (*http.Response, string, []error)

func (*FilesClient) Delete

func (cl *FilesClient) Delete(filepath string) (*http.Response, string, []error)

func (*FilesClient) Download

func (cl *FilesClient) Download(filepath string, headers map[string]string) (*http.Response, string, []error)

func (*FilesClient) GenerateHash

func (cl *FilesClient) GenerateHash(filepath string) (*http.Response, string, []error)

func (*FilesClient) GetSharingDir added in v0.5.0

func (cl *FilesClient) GetSharingDir(shareID string) (*http.Response, string, []error)

func (*FilesClient) IsSharing

func (cl *FilesClient) IsSharing(dirpath string) (*http.Response, string, []error)

func (*FilesClient) List

func (cl *FilesClient) List(dirPath string) (*http.Response, *fileshdr.ListResp, []error)

func (*FilesClient) ListHome

func (cl *FilesClient) ListHome() (*http.Response, *fileshdr.ListResp, []error)

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) Mkdir

func (cl *FilesClient) Mkdir(dirpath string) (*http.Response, string, []error)

func (*FilesClient) Move

func (cl *FilesClient) Move(oldpath, newpath string) (*http.Response, string, []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 (cl *FilesClient) UploadChunk(filepath string, content string, offset int64) (*http.Response, string, []error)

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) AddRole added in v0.9.1

func (cl *UsersClient) AddRole(role string) (*http.Response, string, []error)

func (*UsersClient) AddUser added in v0.9.1

func (cl *UsersClient) AddUser(name, pwd, role string) (*http.Response, *multiusers.AddUserResp, []error)

func (*UsersClient) DelRole added in v0.9.1

func (cl *UsersClient) DelRole(role string) (*http.Response, string, []error)

func (*UsersClient) DelUser added in v0.9.1

func (cl *UsersClient) DelUser(id string) (*http.Response, string, []error)

func (*UsersClient) ForceSetPwd added in v0.9.1

func (cl *UsersClient) ForceSetPwd(userID, newPwd string) (*http.Response, string, []error)

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) Login added in v0.9.1

func (cl *UsersClient) Login(user, pwd string) (*http.Response, string, []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 (cl *UsersClient) ResetUsedSpace(userID uint64) (*http.Response, string, []error)

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) SetPwd added in v0.9.1

func (cl *UsersClient) SetPwd(oldPwd, newPwd string) (*http.Response, string, []error)

func (*UsersClient) SetToken added in v0.9.1

func (cl *UsersClient) SetToken(token *http.Cookie)

func (*UsersClient) SetUser added in v0.9.1

func (cl *UsersClient) SetUser(ID uint64, role string, quota *db.Quota) (*http.Response, string, []error)

func (*UsersClient) Token added in v0.9.1

func (cl *UsersClient) Token() *http.Cookie

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL