client

package
v0.4.18 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 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) 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) 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) 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) 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) *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) AddRole

func (cl *SingleUserClient) AddRole(role string, token *http.Cookie) (*http.Response, string, []error)

func (*SingleUserClient) AddUser

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

func (*SingleUserClient) DelRole

func (cl *SingleUserClient) DelRole(role string, token *http.Cookie) (*http.Response, string, []error)

func (*SingleUserClient) DelUser

func (cl *SingleUserClient) DelUser(id string, token *http.Cookie) (*http.Response, string, []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) Login

func (cl *SingleUserClient) Login(user, pwd string) (*http.Response, string, []error)

func (*SingleUserClient) Logout

func (cl *SingleUserClient) Logout(token *http.Cookie) (*http.Response, string, []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)

func (*SingleUserClient) SetPwd

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

func (*SingleUserClient) SetUser

func (cl *SingleUserClient) SetUser(ID uint64, role string, quota *userstore.Quota, token *http.Cookie) (*http.Response, string, []error)

Jump to

Keyboard shortcuts

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