Documentation
¶
Overview ¶
Package lock is the Files.com API client package for the files_sdk.Lock model.
Index ¶
- func Create(params files_sdk.LockCreateParams, opts ...files_sdk.RequestResponseOption) (lock files_sdk.Lock, err error)
- func Delete(params files_sdk.LockDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
- type Client
- func (c *Client) Create(params files_sdk.LockCreateParams, opts ...files_sdk.RequestResponseOption) (lock files_sdk.Lock, err error)
- func (c *Client) Delete(params files_sdk.LockDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
- func (c *Client) ListFor(params files_sdk.LockListForParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
- type Iter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(params files_sdk.LockCreateParams, opts ...files_sdk.RequestResponseOption) (lock files_sdk.Lock, err error)
Create calls Client.Create using the default configuration.
func Delete ¶
func Delete(params files_sdk.LockDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls Client.Delete using the default configuration.
Types ¶
type Client ¶
Client calls the Lock API using its embedded Config.
func (*Client) Create ¶
func (c *Client) Create(params files_sdk.LockCreateParams, opts ...files_sdk.RequestResponseOption) (lock files_sdk.Lock, err error)
Create calls POST /locks/{path}.
func (*Client) Delete ¶
func (c *Client) Delete(params files_sdk.LockDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls DELETE /locks/{path}.
func (*Client) ListFor ¶
func (c *Client) ListFor(params files_sdk.LockListForParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
ListFor returns an iterator for GET /locks/{path}. Pages are requested as iteration reaches them: range over Iter.All, or call Next and then check Err.
API operation: List Locks by Path.
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 ListFor ¶
func ListFor(params files_sdk.LockListForParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
ListFor returns a listing iterator using the default configuration. See Client.ListFor 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) Iterate ¶
func (i *Iter) Iterate(identifier interface{}, opts ...files_sdk.RequestResponseOption) (files_sdk.IterI, error)
Iterate returns an iterator for the path in identifier, which must be a string.