gonextcloud/docs/README.md

803 lines
17 KiB
Markdown
Raw Normal View History

# gonextcloud
2018-07-09 11:37:44 +00:00
```go
2018-10-26 13:35:50 +00:00
import "gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud"
2018-07-09 11:37:44 +00:00
```
2018-10-26 07:38:48 +00:00
Package gonextcloud is a Go client for the Nextcloud Provisioning API.
2018-10-26 07:38:48 +00:00
For more information about the Provisioning API, see the documentation:
https://docs.nextcloud.com/server/13/admin_manual/configuration_user/user_provisioning_api.html
2018-10-26 07:38:48 +00:00
### Usage
2018-10-26 07:38:48 +00:00
You use the library by creating a client object and calling methods on it.
2018-10-26 07:38:48 +00:00
For example, to list all the Nextcloud's instance users:
```go
2018-10-26 13:35:50 +00:00
package main
import (
"fmt"
"gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud/client"
)
func main() {
url := "https://www.mynextcloud.com"
username := "admin"
password := "password"
c, err := client.NewClient(url)
if err != nil {
panic(err)
2018-10-26 07:38:48 +00:00
}
2018-10-26 13:35:50 +00:00
if err := c.Login(username, password); err != nil {
panic(err)
}
defer c.Logout()
users, err := c.Users.List()
if err != nil {
panic(err)
}
fmt.Println("Users :", users)
}
2018-10-26 07:38:48 +00:00
```
#### type Client
```go
type Client struct {
2018-10-26 07:38:48 +00:00
Apps *Apps
AppsConfig *AppsConfig
GroupFolders *GroupFolders
Notifications *Notifications
Shares *Shares
Users *Users
Groups *Groups
}
```
2018-10-26 07:38:48 +00:00
Client is the API client that performs all operations against a Nextcloud
server.
#### func NewClient
```go
func NewClient(hostname string) (*Client, error)
```
2018-10-26 07:38:48 +00:00
NewClient create a new Client from the Nextcloud Instance URL
2018-10-26 07:38:48 +00:00
#### func (*Client) Login
```go
2018-10-26 07:38:48 +00:00
func (c *Client) Login(username string, password string) error
```
2018-10-26 07:38:48 +00:00
Login perform login and create a session with the Nextcloud API.
2018-10-26 07:38:48 +00:00
#### func (*Client) Logout
```go
2018-10-26 07:38:48 +00:00
func (c *Client) Logout() error
```
2018-10-26 07:38:48 +00:00
Logout logs out from the Nextcloud API, close the session and delete session's
cookie
2018-10-26 07:38:48 +00:00
#### type Apps
```go
2018-10-26 07:38:48 +00:00
type Apps struct {
}
```
2018-10-26 07:38:48 +00:00
Apps contains all Apps available actions
#### func (*Apps) Disable
```go
2018-10-26 07:38:48 +00:00
func (a *Apps) Disable(name string) error
```
2018-10-26 07:38:48 +00:00
Disable disables an app
2018-10-26 07:38:48 +00:00
#### func (*Apps) Enable
```go
2018-10-26 07:38:48 +00:00
func (a *Apps) Enable(name string) error
```
2018-10-26 07:38:48 +00:00
Enable enables an app
2018-10-26 07:38:48 +00:00
#### func (*Apps) Infos
```go
2018-10-26 07:38:48 +00:00
func (a *Apps) Infos(name string) (types.App, error)
```
2018-10-26 07:38:48 +00:00
Infos return the app's details
2018-10-26 07:38:48 +00:00
#### func (*Apps) List
```go
2018-10-26 07:38:48 +00:00
func (a *Apps) List() ([]string, error)
```
2018-10-26 07:38:48 +00:00
List return the list of the Nextcloud Apps
2018-10-26 07:38:48 +00:00
#### func (*Apps) ListDisabled
```go
2018-10-26 07:38:48 +00:00
func (a *Apps) ListDisabled() ([]string, error)
```
2018-10-26 07:38:48 +00:00
ListDisabled lists the disabled apps
2018-10-26 07:38:48 +00:00
#### func (*Apps) ListEnabled
```go
2018-10-26 07:38:48 +00:00
func (a *Apps) ListEnabled() ([]string, error)
```
2018-10-26 07:38:48 +00:00
ListEnabled lists the enabled apps
2018-10-26 07:38:48 +00:00
#### type AppsConfig
```go
2018-10-26 07:38:48 +00:00
type AppsConfig struct {
}
```
2018-10-26 07:38:48 +00:00
AppsConfig contains all Apps Configuration available actions
#### func (*AppsConfig) DeleteValue
```go
2018-10-26 07:38:48 +00:00
func (a *AppsConfig) DeleteValue(id, key, value string) error
```
2018-10-26 07:38:48 +00:00
DeleteValue delete the config value and (!! be careful !!) the key
2018-10-26 07:38:48 +00:00
#### func (*AppsConfig) Details
```go
2018-10-26 07:38:48 +00:00
func (a *AppsConfig) Details(appID string) (map[string]string, error)
```
2018-10-26 07:38:48 +00:00
Details returns all the config's key, values pair of the app
2018-10-26 07:38:48 +00:00
#### func (*AppsConfig) Get
```go
2018-10-26 07:38:48 +00:00
func (a *AppsConfig) Get() (map[string]map[string]string, error)
```
2018-10-26 07:38:48 +00:00
Get returns all apps AppConfigDetails
2018-10-26 07:38:48 +00:00
#### func (*AppsConfig) Keys
```go
2018-10-26 07:38:48 +00:00
func (a *AppsConfig) Keys(id string) (keys []string, err error)
```
2018-10-26 07:38:48 +00:00
Keys returns the app's config keys
2018-10-26 07:38:48 +00:00
#### func (*AppsConfig) List
```go
2018-10-26 07:38:48 +00:00
func (a *AppsConfig) List() (apps []string, err error)
```
2018-10-26 07:38:48 +00:00
List lists all the available apps
2018-10-26 07:38:48 +00:00
#### func (*AppsConfig) SetValue
```go
2018-10-26 07:38:48 +00:00
func (a *AppsConfig) SetValue(id, key, value string) error
```
2018-10-26 07:38:48 +00:00
SetValue set the config value for the given app's key
2018-10-26 07:38:48 +00:00
#### func (*AppsConfig) Value
```go
2018-10-26 07:38:48 +00:00
func (a *AppsConfig) Value(id, key string) (string, error)
```
2018-10-26 07:38:48 +00:00
Value get the config value for the given app's key
2018-10-26 07:38:48 +00:00
#### type AppsConfigI
```go
2018-10-26 07:38:48 +00:00
type AppsConfigI interface {
List() (apps []string, err error)
Keys(id string) (keys []string, err error)
Value(id, key string) (string, error)
SetValue(id, key, value string) error
DeleteValue(id, key, value string) error
Get() (map[string]map[string]string, error)
Details(appID string) (map[string]string, error)
}
```
2018-10-26 07:38:48 +00:00
AppsConfigI available methods
#### type AppsI
```go
2018-10-26 07:38:48 +00:00
type AppsI interface {
List() ([]string, error)
ListEnabled() ([]string, error)
ListDisabled() ([]string, error)
Infos(name string) (types.App, error)
Enable(name string) error
Disable(name string) error
}
```
2018-10-26 07:38:48 +00:00
AppsI available methods
2018-10-26 07:38:48 +00:00
#### func (*Client) Monitoring
```go
2018-10-26 07:38:48 +00:00
func (c *Client) Monitoring() (*types.Monitoring, error)
```
2018-10-26 07:38:48 +00:00
Monitoring return nextcloud monitoring statistics
2018-10-26 07:38:48 +00:00
#### type GroupFolders
```go
2018-10-26 07:38:48 +00:00
type GroupFolders struct {
}
```
2018-10-26 07:38:48 +00:00
GroupFolders contains all Groups Folders available actions
#### func (*GroupFolders) AddGroup
```go
2018-10-26 07:38:48 +00:00
func (g *GroupFolders) AddGroup(folderID int, groupName string) error
```
2018-10-26 07:38:48 +00:00
AddGroup adds group to folder
2018-10-26 07:38:48 +00:00
#### func (*GroupFolders) Create
```go
2018-10-26 07:38:48 +00:00
func (g *GroupFolders) Create(name string) (id int, err error)
```
2018-10-26 07:38:48 +00:00
Create creates a group folder
2018-10-26 07:38:48 +00:00
#### func (*GroupFolders) Get
```go
2018-10-26 07:38:48 +00:00
func (g *GroupFolders) Get(id int) (types.GroupFolder, error)
```
2018-10-26 07:38:48 +00:00
Get returns the group folder details
2018-10-26 07:38:48 +00:00
#### func (*GroupFolders) List
```go
2018-10-26 07:38:48 +00:00
func (g *GroupFolders) List() (map[int]types.GroupFolder, error)
```
2018-10-26 07:38:48 +00:00
List returns the groups folders
2018-10-26 07:38:48 +00:00
#### func (*GroupFolders) RemoveGroup
```go
2018-10-26 07:38:48 +00:00
func (g *GroupFolders) RemoveGroup(folderID int, groupName string) error
```
2018-10-26 07:38:48 +00:00
RemoveGroup remove a group from the group folder
2018-10-26 07:38:48 +00:00
#### func (*GroupFolders) Rename
```go
2018-10-26 07:38:48 +00:00
func (g *GroupFolders) Rename(groupID int, name string) error
```
2018-10-26 07:38:48 +00:00
Rename renames the group folder
2018-10-26 07:38:48 +00:00
#### func (*GroupFolders) SetGroupPermissions
```go
2018-10-26 07:38:48 +00:00
func (g *GroupFolders) SetGroupPermissions(folderID int, groupName string, permission types.SharePermission) error
```
2018-10-26 07:38:48 +00:00
SetGroupPermissions set groups permissions
2018-10-26 07:38:48 +00:00
#### func (*GroupFolders) SetQuota
```go
2018-10-26 07:38:48 +00:00
func (g *GroupFolders) SetQuota(folderID int, quota int) error
```
2018-10-26 07:38:48 +00:00
SetQuota set quota on the group folder. quota in bytes, use -3 for unlimited
2018-10-26 07:38:48 +00:00
#### type GroupFoldersI
```go
2018-10-26 07:38:48 +00:00
type GroupFoldersI interface {
List() (map[int]types.GroupFolder, error)
Get(id int) (types.GroupFolder, error)
Create(name string) (id int, err error)
Rename(groupID int, name string) error
AddGroup(folderID int, groupName string) error
RemoveGroup(folderID int, groupName string) error
SetGroupPermissions(folderID int, groupName string, permission types.SharePermission) error
SetQuota(folderID int, quota int) error
}
```
2018-10-26 07:38:48 +00:00
GroupFoldersI available methods
#### type Groups
```go
2018-10-26 07:38:48 +00:00
type Groups struct {
}
```
2018-10-26 07:38:48 +00:00
Groups contains all Groups available actions
#### func (*Groups) Create
```go
2018-10-26 07:38:48 +00:00
func (g *Groups) Create(name string) error
```
2018-10-26 07:38:48 +00:00
Create creates a group
2018-10-26 07:38:48 +00:00
#### func (*Groups) Delete
```go
2018-10-26 07:38:48 +00:00
func (g *Groups) Delete(name string) error
```
2018-10-26 07:38:48 +00:00
Delete deletes the group
2018-10-26 07:38:48 +00:00
#### func (*Groups) List
```go
2018-10-26 07:38:48 +00:00
func (g *Groups) List() ([]string, error)
```
2018-10-26 07:38:48 +00:00
List lists the Nextcloud groups
2018-10-26 07:38:48 +00:00
#### func (*Groups) ListDetails
```go
2018-10-26 07:38:48 +00:00
func (g *Groups) ListDetails() ([]types.Group, error)
```
2018-10-26 07:38:48 +00:00
ListDetails lists the Nextcloud groups
2018-10-26 07:38:48 +00:00
#### func (*Groups) Search
```go
2018-10-26 07:38:48 +00:00
func (g *Groups) Search(search string) ([]string, error)
```
2018-10-26 07:38:48 +00:00
Search return the list of groups matching the search string
2018-10-26 07:38:48 +00:00
#### func (*Groups) SubAdminList
```go
2018-10-26 07:38:48 +00:00
func (g *Groups) SubAdminList(name string) ([]string, error)
```
2018-10-26 07:38:48 +00:00
SubAdminList lists the group's subadmins
2018-10-26 07:38:48 +00:00
#### func (*Groups) Users
```go
2018-10-26 07:38:48 +00:00
func (g *Groups) Users(name string) ([]string, error)
```
2018-10-26 07:38:48 +00:00
Users list the group's users
#### type GroupsI
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
type GroupsI interface {
List() ([]string, error)
ListDetails() ([]types.Group, error)
Users(name string) ([]string, error)
Search(search string) ([]string, error)
Create(name string) error
Delete(name string) error
SubAdminList(name string) ([]string, error)
}
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
GroupsI available methods
#### type Notifications
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
type Notifications struct {
2018-07-25 14:59:55 +00:00
}
```
2018-10-26 07:38:48 +00:00
Notifications contains all Notifications available actions
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Notifications) AdminAvailable
```go
func (n *Notifications) AdminAvailable() error
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
AdminAvailable returns an error if the admin-notifications app is not installed
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Notifications) Available
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
```go
func (n *Notifications) Available() error
```
Available returns an error if the notifications app is not installed
#### func (*Notifications) Create
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (n *Notifications) Create(userID, title, message string) error
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
Create creates a notification (if the user is an admin)
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Notifications) Delete
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
```go
func (n *Notifications) Delete(id int) error
```
Delete deletes the notification corresponding to the id
#### func (*Notifications) DeleteAll
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (n *Notifications) DeleteAll() error
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
DeleteAll deletes all notifications
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Notifications) Get
```go
func (n *Notifications) Get(id int) (types.Notification, error)
```
Get returns the notification corresponding to the id
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Notifications) List
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (n *Notifications) List() ([]types.Notification, error)
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
List returns all the notifications
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### type NotificationsI
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
```go
type NotificationsI interface {
List() ([]types.Notification, error)
Get(id int) (types.Notification, error)
Delete(id int) error
DeleteAll() error
Create(userID, title, message string) error
AdminAvailable() error
Available() error
2018-07-25 14:59:55 +00:00
}
```
2018-10-26 07:38:48 +00:00
NotificationsI available methods
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### type Routes
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
type Routes struct {
2018-07-25 14:59:55 +00:00
}
```
2018-10-26 07:38:48 +00:00
Routes references the available routes
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### type Shares
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
type Shares struct {
2018-07-25 14:59:55 +00:00
}
```
2018-10-26 07:38:48 +00:00
Shares contains all Shares available actions
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Shares) Create
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (s *Shares) Create(
path string,
shareType types.ShareType,
permission types.SharePermission,
shareWith string,
publicUpload bool,
password string,
) (types.Share, error)
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
Create create a share
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Shares) Delete
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
```go
func (s *Shares) Delete(shareID int) error
```
Delete Remove the given share.
#### func (*Shares) Get
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (s *Shares) Get(shareID string) (types.Share, error)
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
Get information about a known Share
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Shares) GetFromPath
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
```go
func (s *Shares) GetFromPath(path string, reshares bool, subfiles bool) ([]types.Share, error)
```
GetFromPath return shares from a specific file or folder
#### func (*Shares) List
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (s *Shares) List() ([]types.Share, error)
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
List list all shares of the logged in user
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Shares) Update
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
```go
func (s *Shares) Update(shareUpdate types.ShareUpdate) error
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
Update update share details expireDate expireDate expects a well formatted date
string, e.g. YYYY-MM-DD
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Shares) UpdateExpireDate
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
```go
func (s *Shares) UpdateExpireDate(shareID int, expireDate string) error
```
UpdateExpireDate updates the share's expire date expireDate expects a well
formatted date string, e.g. YYYY-MM-DD
#### func (*Shares) UpdatePassword
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (s *Shares) UpdatePassword(shareID int, password string) error
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
UpdatePassword updates share password
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Shares) UpdatePermissions
```go
func (s *Shares) UpdatePermissions(shareID int, permissions types.SharePermission) error
```
UpdatePermissions update permissions
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Shares) UpdatePublicUpload
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (s *Shares) UpdatePublicUpload(shareID int, public bool) error
```
UpdatePublicUpload enable or disable public upload
#### type SharesI
```go
type SharesI interface {
List() ([]types.Share, error)
GetFromPath(path string, reshares bool, subfiles bool) ([]types.Share, error)
Get(shareID string) (types.Share, error)
Create(
path string,
shareType types.ShareType,
permission types.SharePermission,
shareWith string,
publicUpload bool,
password string,
) (types.Share, error)
Delete(shareID int) error
Update(shareUpdate types.ShareUpdate) error
UpdateExpireDate(shareID int, expireDate string) error
UpdatePublicUpload(shareID int, public bool) error
UpdatePassword(shareID int, password string) error
UpdatePermissions(shareID int, permissions types.SharePermission) error
2018-07-25 14:59:55 +00:00
}
```
2018-10-26 07:38:48 +00:00
SharesI available methods
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### type Users
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
type Users struct {
2018-07-25 14:59:55 +00:00
}
```
2018-10-26 07:38:48 +00:00
Users contains all Users available actions
#### func (*Users) Create
```go
func (u *Users) Create(username string, password string, user *types.User) error
```
Create create a new user
#### func (*Users) CreateWithoutPassword
```go
func (u *Users) CreateWithoutPassword(username, email, displayName string) error
```
CreateWithoutPassword create a user without provisioning a password, the email
address must be provided to send an init password email
#### func (*Users) Delete
```go
func (u *Users) Delete(name string) error
```
Delete delete the user
#### func (*Users) Disable
```go
func (u *Users) Disable(name string) error
```
Disable disables the user
#### func (*Users) Enable
```go
func (u *Users) Enable(name string) error
```
Enable enables the user
#### func (*Users) Get
```go
func (u *Users) Get(name string) (*types.User, error)
```
Get return the details about the specified user
#### func (*Users) GroupAdd
```go
func (u *Users) GroupAdd(name string, group string) error
```
GroupAdd adds a the user to the group
#### func (*Users) GroupDemote
```go
func (u *Users) GroupDemote(name string, group string) error
```
GroupDemote demotes the user
#### func (*Users) GroupList
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
```go
func (u *Users) GroupList(name string) ([]string, error)
```
GroupList lists the user's groups
#### func (*Users) GroupPromote
```go
func (u *Users) GroupPromote(name string, group string) error
```
GroupPromote promotes the user as group admin
#### func (*Users) GroupRemove
```go
func (u *Users) GroupRemove(name string, group string) error
```
GroupRemove removes the user from the group
#### func (*Users) GroupSubAdminList
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (u *Users) GroupSubAdminList(name string) ([]string, error)
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
GroupSubAdminList lists the groups where he is subadmin
2018-07-25 14:59:55 +00:00
2018-10-26 07:38:48 +00:00
#### func (*Users) List
2018-07-25 14:59:55 +00:00
```go
2018-10-26 07:38:48 +00:00
func (u *Users) List() ([]string, error)
2018-07-25 14:59:55 +00:00
```
2018-10-26 07:38:48 +00:00
List return the Nextcloud'user list
#### func (*Users) ListDetails
```go
func (u *Users) ListDetails() (map[string]types.User, error)
```
ListDetails return a map of user with details
#### func (*Users) Search
```go
func (u *Users) Search(search string) ([]string, error)
```
Search returns the users whose name match the search string
#### func (*Users) SendWelcomeEmail
```go
func (u *Users) SendWelcomeEmail(name string) error
```
SendWelcomeEmail (re)send the welcome mail to the user (return an error if the
user has not configured his email)
#### func (*Users) Update
```go
func (u *Users) Update(user *types.User) error
```
Update takes a *types.Users struct to update the user's information
#### func (*Users) UpdateAddress
```go
func (u *Users) UpdateAddress(name string, address string) error
```
UpdateAddress update the user's address
#### func (*Users) UpdateDisplayName
```go
func (u *Users) UpdateDisplayName(name string, displayName string) error
```
UpdateDisplayName update the user's display name
#### func (*Users) UpdateEmail
```go
func (u *Users) UpdateEmail(name string, email string) error
```
UpdateEmail update the user's email
#### func (*Users) UpdatePassword
```go
func (u *Users) UpdatePassword(name string, password string) error
```
UpdatePassword update the user's password
#### func (*Users) UpdatePhone
```go
func (u *Users) UpdatePhone(name string, phone string) error
```
UpdatePhone update the user's phone
#### func (*Users) UpdateQuota
```go
func (u *Users) UpdateQuota(name string, quota int) error
```
UpdateQuota update the user's quota (bytes)
#### func (*Users) UpdateTwitter
```go
func (u *Users) UpdateTwitter(name string, twitter string) error
```
UpdateTwitter update the user's twitter
#### func (*Users) UpdateWebSite
```go
func (u *Users) UpdateWebSite(name string, website string) error
```
UpdateWebSite update the user's website
#### type UsersI
```go
type UsersI interface {
List() ([]string, error)
ListDetails() (map[string]types.User, error)
Get(name string) (*types.User, error)
Search(search string) ([]string, error)
Create(username string, password string, user *types.User) error
CreateWithoutPassword(username, email, displayName string) error
Delete(name string) error
Enable(name string) error
Disable(name string) error
SendWelcomeEmail(name string) error
Update(user *types.User) error
UpdateEmail(name string, email string) error
UpdateDisplayName(name string, displayName string) error
UpdatePhone(name string, phone string) error
UpdateAddress(name string, address string) error
UpdateWebSite(name string, website string) error
UpdateTwitter(name string, twitter string) error
UpdatePassword(name string, password string) error
UpdateQuota(name string, quota int) error
GroupList(name string) ([]string, error)
GroupAdd(name string, group string) error
GroupRemove(name string, group string) error
GroupPromote(name string, group string) error
GroupDemote(name string, group string) error
GroupSubAdminList(name string) ([]string, error)
}
```
UsersI available methods