Documentation
¶
Overview ¶
Package user is the Files.com API client package for the files_sdk.User model.
Index ¶
- func Create(params files_sdk.UserCreateParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
- func Delete(params files_sdk.UserDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
- func Find(params files_sdk.UserFindParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
- func ResendWelcomeEmail(params files_sdk.UserResendWelcomeEmailParams, ...) (err error)
- func Unlock(params files_sdk.UserUnlockParams, opts ...files_sdk.RequestResponseOption) (err error)
- func Update(params files_sdk.UserUpdateParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
- func UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
- func User2faReset(params files_sdk.UserUser2faResetParams, ...) (err error)
- type Client
- func (c *Client) Create(params files_sdk.UserCreateParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
- func (c *Client) Delete(params files_sdk.UserDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
- func (c *Client) Find(params files_sdk.UserFindParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
- func (c *Client) List(params files_sdk.UserListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
- func (c *Client) ResendWelcomeEmail(params files_sdk.UserResendWelcomeEmailParams, ...) (err error)
- func (c *Client) Unlock(params files_sdk.UserUnlockParams, opts ...files_sdk.RequestResponseOption) (err error)
- func (c *Client) Update(params files_sdk.UserUpdateParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
- func (c *Client) UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
- func (c *Client) User2faReset(params files_sdk.UserUser2faResetParams, ...) (err error)
- type Iter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(params files_sdk.UserCreateParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
Create calls Client.Create using the default configuration.
func Delete ¶
func Delete(params files_sdk.UserDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls Client.Delete using the default configuration.
func Find ¶
func Find(params files_sdk.UserFindParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
Find calls Client.Find using the default configuration.
func ResendWelcomeEmail ¶
func ResendWelcomeEmail(params files_sdk.UserResendWelcomeEmailParams, opts ...files_sdk.RequestResponseOption) (err error)
ResendWelcomeEmail calls Client.ResendWelcomeEmail using the default configuration.
func Unlock ¶
func Unlock(params files_sdk.UserUnlockParams, opts ...files_sdk.RequestResponseOption) (err error)
Unlock calls Client.Unlock using the default configuration.
func Update ¶
func Update(params files_sdk.UserUpdateParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
Update calls Client.Update using the default configuration.
func UpdateWithMap ¶
func UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
UpdateWithMap calls Client.UpdateWithMap using the default configuration.
func User2faReset ¶
func User2faReset(params files_sdk.UserUser2faResetParams, opts ...files_sdk.RequestResponseOption) (err error)
User2faReset calls Client.User2faReset using the default configuration.
Types ¶
type Client ¶
Client calls the User API using its embedded Config.
func (*Client) Create ¶
func (c *Client) Create(params files_sdk.UserCreateParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
Create calls POST /users.
func (*Client) Delete ¶
func (c *Client) Delete(params files_sdk.UserDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls DELETE /users/{id}.
func (*Client) Find ¶
func (c *Client) Find(params files_sdk.UserFindParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
Find calls GET /users/{id}.
func (*Client) List ¶
func (c *Client) List(params files_sdk.UserListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
List returns an iterator for GET /users. Pages are requested as iteration reaches them: range over Iter.All, or call Next and then check Err.
func (*Client) ResendWelcomeEmail ¶
func (c *Client) ResendWelcomeEmail(params files_sdk.UserResendWelcomeEmailParams, opts ...files_sdk.RequestResponseOption) (err error)
ResendWelcomeEmail calls POST /users/{id}/resend_welcome_email.
API operation: Resend user welcome email.
func (*Client) Unlock ¶
func (c *Client) Unlock(params files_sdk.UserUnlockParams, opts ...files_sdk.RequestResponseOption) (err error)
Unlock calls POST /users/{id}/unlock.
API operation: Unlock user who has been locked out due to failed logins.
func (*Client) Update ¶
func (c *Client) Update(params files_sdk.UserUpdateParams, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
Update calls PATCH /users/{id}.
func (*Client) UpdateWithMap ¶
func (c *Client) UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (user files_sdk.User, err error)
UpdateWithMap calls PATCH /users/{id} using API parameter names as map keys. Include any path parameters in the map. Unlike optional struct fields, explicit zero values in the map are included in the request.
func (*Client) User2faReset ¶
func (c *Client) User2faReset(params files_sdk.UserUser2faResetParams, opts ...files_sdk.RequestResponseOption) (err error)
User2faReset calls POST /users/{id}/2fa/reset.
API operation: Trigger 2FA Reset process for user who has lost access to their existing 2FA methods.
type Iter ¶
Iter traverses a paginated API response. Range over All to get each resource with a nil error, followed by the error that stopped the listing, if any. Alternatively, call Next before reading the current resource, then check Err after Next returns false.
func List ¶
func List(params files_sdk.UserListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
List returns a listing iterator using the default configuration. See Client.List for the operation and paging behavior.
func (*Iter) All ¶ added in v3.3.301
All returns an iterator over the listing's remaining resources, each with a nil error, followed by the error that stops the listing, if any. Pages are requested as the loop reaches them. See files_sdk.IterAll.
func (*Iter) LoadResource ¶
func (i *Iter) LoadResource(identifier interface{}, opts ...files_sdk.RequestResponseOption) (interface{}, error)
LoadResource fetches a resource by its ID. identifier must have type int64.