Documentation
¶
Overview ¶
Package automation provides the Files.com Automation API client.
Index ¶
- func Create(params files_sdk.AutomationCreateParams, ...) (automation files_sdk.Automation, err error)
- func Delete(params files_sdk.AutomationDeleteParams, ...) (err error)
- func Find(params files_sdk.AutomationFindParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
- func GetAuthoringSchema(opts ...files_sdk.RequestResponseOption) (automationAuthoringSchema files_sdk.AutomationAuthoringSchema, err error)
- func ManualRun(params files_sdk.AutomationManualRunParams, ...) (err error)
- func Update(params files_sdk.AutomationUpdateParams, ...) (automation files_sdk.Automation, err error)
- func UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
- func Upgrade(params files_sdk.AutomationUpgradeParams, ...) (automation files_sdk.Automation, err error)
- type Client
- func (c *Client) Create(params files_sdk.AutomationCreateParams, ...) (automation files_sdk.Automation, err error)
- func (c *Client) Delete(params files_sdk.AutomationDeleteParams, ...) (err error)
- func (c *Client) Find(params files_sdk.AutomationFindParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
- func (c *Client) GetAuthoringSchema(opts ...files_sdk.RequestResponseOption) (automationAuthoringSchema files_sdk.AutomationAuthoringSchema, err error)
- func (c *Client) List(params files_sdk.AutomationListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
- func (c *Client) ManualRun(params files_sdk.AutomationManualRunParams, ...) (err error)
- func (c *Client) Update(params files_sdk.AutomationUpdateParams, ...) (automation files_sdk.Automation, err error)
- func (c *Client) UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
- func (c *Client) Upgrade(params files_sdk.AutomationUpgradeParams, ...) (automation files_sdk.Automation, err error)
- type Iter
- func (i *Iter) All() iter.Seq2[files_sdk.Automation, error]
- func (i *Iter) Automation() files_sdk.Automation
- func (i *Iter) LoadResource(identifier interface{}, opts ...files_sdk.RequestResponseOption) (interface{}, error)
- func (i *Iter) Reload(opts ...files_sdk.RequestResponseOption) files_sdk.IterI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(params files_sdk.AutomationCreateParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
Create calls Client.Create using the default configuration.
func Delete ¶
func Delete(params files_sdk.AutomationDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls Client.Delete using the default configuration.
func Find ¶
func Find(params files_sdk.AutomationFindParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
Find calls Client.Find using the default configuration.
func GetAuthoringSchema ¶ added in v3.3.189
func GetAuthoringSchema(opts ...files_sdk.RequestResponseOption) (automationAuthoringSchema files_sdk.AutomationAuthoringSchema, err error)
GetAuthoringSchema calls Client.GetAuthoringSchema using the default configuration.
func ManualRun ¶
func ManualRun(params files_sdk.AutomationManualRunParams, opts ...files_sdk.RequestResponseOption) (err error)
ManualRun calls Client.ManualRun using the default configuration.
func Update ¶
func Update(params files_sdk.AutomationUpdateParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
Update calls Client.Update using the default configuration.
func UpdateWithMap ¶
func UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
UpdateWithMap calls Client.UpdateWithMap using the default configuration.
func Upgrade ¶ added in v3.3.192
func Upgrade(params files_sdk.AutomationUpgradeParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
Upgrade calls Client.Upgrade using the default configuration.
Types ¶
type Client ¶
Client calls the Automation API using its embedded Config.
func (*Client) Create ¶
func (c *Client) Create(params files_sdk.AutomationCreateParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
Create calls POST /automations.
func (*Client) Delete ¶
func (c *Client) Delete(params files_sdk.AutomationDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls DELETE /automations/{id}.
func (*Client) Find ¶
func (c *Client) Find(params files_sdk.AutomationFindParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
Find calls GET /automations/{id}.
func (*Client) GetAuthoringSchema ¶ added in v3.3.189
func (c *Client) GetAuthoringSchema(opts ...files_sdk.RequestResponseOption) (automationAuthoringSchema files_sdk.AutomationAuthoringSchema, err error)
GetAuthoringSchema calls GET /automations/authoring_schema.
API operation: Show the Automation v2 authoring schema and active node catalog.
func (*Client) List ¶
func (c *Client) List(params files_sdk.AutomationListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
List returns an iterator for GET /automations. Pages are requested as iteration reaches them: range over Iter.All, or call Next and then check Err.
func (*Client) ManualRun ¶
func (c *Client) ManualRun(params files_sdk.AutomationManualRunParams, opts ...files_sdk.RequestResponseOption) (err error)
ManualRun calls POST /automations/{id}/manual_run.
API operation: Manually Run Automation.
func (*Client) Update ¶
func (c *Client) Update(params files_sdk.AutomationUpdateParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
Update calls PATCH /automations/{id}.
func (*Client) UpdateWithMap ¶
func (c *Client) UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
UpdateWithMap calls PATCH /automations/{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) Upgrade ¶ added in v3.3.192
func (c *Client) Upgrade(params files_sdk.AutomationUpgradeParams, opts ...files_sdk.RequestResponseOption) (automation files_sdk.Automation, err error)
Upgrade calls POST /automations/{id}/upgrade.
API operation: Upgrade a legacy Automation to Automation v2.
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.AutomationListParams, 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) Automation ¶
func (i *Iter) Automation() files_sdk.Automation
Automation returns the current resource. Call it only after Next returns true.
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.