cfc

package
v0.9.175 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DEFAULT_SERVICE_DOMAIN = "cfc." + bce.DEFAULT_REGION + ".baidubce.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

Client of CFC service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endpoint string) (*Client, error)

func (*Client) CreateAlias

func (c *Client) CreateAlias(args *api.CreateAliasArgs) (*api.CreateAliasResult, error)

CreateAlias - create an alias which bind one specific cfc function version

PARAMS:

  • args: the arguments to create an alias

RETURNS:

  • *api.CreateAliasResult: the result of create alias
  • error: nil if success otherwise the specific error

func (*Client) CreateEventSource added in v0.9.88

func (c *Client) CreateEventSource(args *api.CreateEventSourceArgs) (*api.CreateEventSourceResult, error)

CreateEventSource - create a event source mapping setting

PARAMS:

  • args: the arguments to create a event source mapping setting

RETURNS:

  • *api.CreateEventSourceResult: the result of create event source mapping setting
  • error: nil if success otherwise the specific error

func (*Client) CreateFlow added in v0.9.145

func (c *Client) CreateFlow(args *api.CreateUpdateFlowArgs) (*api.Flow, error)

CreateFlow - create a flow

PARAMS:

  • args: args to create a flow

RETURNS:

  • *api.Flow: the created flow information
  • error: nil if success otherwise the specific error

func (*Client) CreateFunction

func (c *Client) CreateFunction(args *api.CreateFunctionArgs) (*api.CreateFunctionResult, error)

CreateFunction - create a cfc function with specific parameters

PARAMS:

  • args: the arguments to create a cfc function

RETURNS:

  • *api.CreateFunctionResult: the result of create a cfc function, it contains function information
  • error: nil if success otherwise the specific error

func (*Client) CreateFunctionByBlueprint added in v0.9.147

func (c *Client) CreateFunctionByBlueprint(args *api.CreateFunctionByBlueprintArgs) (*api.CreateFunctionResult, error)

CreateFunctionByBlueprint - create a cfc function by a blueprint

PARAMS:

  • args: the arguments to create a cfc function

RETURNS:

  • *api.CreateFunctionResult: the result of create a cfc function, it contains function information
  • error: nil if success otherwise the specific error

func (*Client) CreateTrigger

func (c *Client) CreateTrigger(args *api.CreateTriggerArgs) (*api.CreateTriggerResult, error)

CreateTrigger - create a specific trigger

PARAMS:

  • args: the arguments to create a trigger

RETURNS:

  • *api.CreateTriggerResult: the result of create a trigger
  • error: nil if success otherwise the specific error

func (*Client) DeleteAlias

func (c *Client) DeleteAlias(args *api.DeleteAliasArgs) error

DeleteAlias - delete an alias

PARAMS:

  • args: the arguments to delete an alias

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteEventSource added in v0.9.88

func (c *Client) DeleteEventSource(args *api.DeleteEventSourceArgs) error

DeleteEventSource - delete one cfc event source mapping setting

PARAMS:

  • args: the arguments to delete cfc event source mapping setting

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteFlow added in v0.9.145

func (c *Client) DeleteFlow(flowName string) error

DeleteFlow - delete a flow

PARAMS:

  • flowName: name of the flow to delete

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteFunction

func (c *Client) DeleteFunction(args *api.DeleteFunctionArgs) error

DeleteFunction - delete a specific cfc function

PARAMS:

  • args: the arguments to delete cfc function

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteReservedConcurrentExecutions

func (c *Client) DeleteReservedConcurrentExecutions(args *api.DeleteReservedConcurrentExecutionsArgs) error

DeleteReservedConcurrentExecutions - delete one cfc function reserved concurrent executions setting

PARAMS:

  • args: the arguments to delete reserved concurrent executions setting

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteTrigger

func (c *Client) DeleteTrigger(args *api.DeleteTriggerArgs) error

DeleteTrigger - delete a trigger

PARAMS:

  • args: the arguments to delete a trigger

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DescribeExecution added in v0.9.145

func (c *Client) DescribeExecution(flowName, executionName string) (*api.Execution, error)

DescribeExecution - describe detail info of an execution

PARAMS:

  • flowName: which flow the execution belongs to
  • executionName: which execution to get

RETURNS:

  • *api.Execution: information about the execution
  • error: nil if success otherwise the specific error

func (*Client) DescribeFlow added in v0.9.145

func (c *Client) DescribeFlow(flowName string) (*api.Flow, error)

DescribeFlow - get information of a flow

PARAMS:

  • flowName: name of the flow to describe

RETURNS:

  • *api.Flow: flow information
  • error: nil if success otherwise the specific error

func (*Client) GetAlias

func (c *Client) GetAlias(args *api.GetAliasArgs) (*api.GetAliasResult, error)

GetAlias - get alias information which bind one cfc function

PARAMS:

  • args: the arguments to get an alias

RETURNS:

  • *api.GetAliasResult: the result of get alias
  • error: nil if success otherwise the specific error

func (*Client) GetEventSource added in v0.9.88

func (c *Client) GetEventSource(args *api.GetEventSourceArgs) (*api.GetEventSourceResult, error)

GetEventSource - get info for a event source mapping setting

PARAMS:

  • args: the arguments to get a event source mapping setting

RETURNS:

  • *api.GetEventSourceResult: the result of get a event source mapping
  • error: nil if success otherwise the specific error

func (*Client) GetExecutionHistory added in v0.9.145

func (c *Client) GetExecutionHistory(args *api.GetExecutionHistoryArgs) (*api.GetExecutionHistoryResult, error)

GetExecutionHistory - get all state event detail info of an execution

PARAMS:

  • args: args to get history

RETURNS:

  • *api.GetExecutionHistoryResult: state history of the execution
  • error: nil if success otherwise the specific error

func (*Client) GetFunction

func (c *Client) GetFunction(args *api.GetFunctionArgs) (*api.GetFunctionResult, error)

GetFunction - get a specific cfc function

PARAMS:

  • args: the arguments to get a specific cfc function

RETURNS:

  • *api.GetFunctionResult: the result of get function
  • error: nil if success otherwise the specific error

func (*Client) GetFunctionConfiguration

func (c *Client) GetFunctionConfiguration(args *api.GetFunctionConfigurationArgs) (*api.GetFunctionConfigurationResult, error)

GetFunctionConfiguration - get a specific cfc function configuration

PARAMS:

  • args: the arguments to get function configuration

RETURNS:

  • *api.GetFunctionConfigurationResult: the result of function configuration
  • error: nil if success otherwise the specific error

func (*Client) Invocations

func (c *Client) Invocations(args *api.InvocationsArgs) (*api.InvocationsResult, error)

Invocations - invocation a cfc function with specific parameters

PARAMS:

  • args: the arguments to invocation cfc function

RETURNS:

  • *api.InvocationsResult: the result of invocation cfc function
  • error: nil if success otherwise the specific error

func (*Client) Invoke

func (c *Client) Invoke(args *api.InvocationsArgs) (*api.InvocationsResult, error)

Invoke - invoke a cfc function, the same as Invocations

PARAMS:

  • args: the arguments to invocation cfc function

RETURNS:

  • *api.InvocationsResult: the result of invocation cfc function
  • error: nil if success otherwise the specific error

func (*Client) ListAliases

func (c *Client) ListAliases(args *api.ListAliasesArgs) (*api.ListAliasesResult, error)

ListAliases - list all alias about a specific cfc function with specific parameters

PARAMS:

  • args: the arguments to list all alias

RETURNS:

  • *api.ListAliasesResult: the result of list all alias
  • error: nil if success otherwise the specific error

func (*Client) ListEventSource added in v0.9.88

func (c *Client) ListEventSource(args *api.ListEventSourceArgs) (*api.ListEventSourceResult, error)

ListEventSource - list all event source mapping settings in one cfc function version

PARAMS:

  • args: the arguments to list all event source mapping settings

RETURNS:

  • *api.ListEventSourceResult: the result of list all event source mapping settings
  • error: nil if success otherwise the specific error

func (*Client) ListExecutions added in v0.9.145

func (c *Client) ListExecutions(flowName string) (*api.ListExecutionsResult, error)

ListExecutions - list all executions of a flow

PARAMS:

  • flowName: which flow to list executions

RETURNS:

  • *api.ListExecutionsResult: information about the executions
  • error: nil if success otherwise the specific error

func (*Client) ListFlow added in v0.9.145

func (c *Client) ListFlow() (*api.ListFlowResult, error)

ListFlow - list all flows

RETURNS:

  • *api.ListFlowResult: list of all flows
  • error: nil if success otherwise the specific error

func (*Client) ListFunctions

func (c *Client) ListFunctions(args *api.ListFunctionsArgs) (*api.ListFunctionsResult, error)

ListFunctions - list all functions with the specific parameters

PARAMS:

  • args: the arguments to list all functions

RETURNS:

  • *api.ListFunctionsResult: the result of list all functions
  • error: nil if success otherwise the specific error

func (*Client) ListTriggers

func (c *Client) ListTriggers(args *api.ListTriggersArgs) (*api.ListTriggersResult, error)

ListTriggers - list all triggers in one cfc function version

PARAMS:

  • args: the arguments to list all triggers

RETURNS:

  • *api.ListTriggersResult: the result of list all triggers
  • error: nil if success otherwise the specific error

func (*Client) ListVersionsByFunction

func (c *Client) ListVersionsByFunction(args *api.ListVersionsByFunctionArgs) (*api.ListVersionsByFunctionResult, error)

ListVersionsByFunction - list all versions about a specific cfc function

PARAMS:

  • args: the arguments to list all versions

RETURNS:

  • *api.ListVersionsByFunctionResult: the result of all versions information
  • error: nil if success otherwise the specific error

func (*Client) PublishVersion

func (c *Client) PublishVersion(args *api.PublishVersionArgs) (*api.PublishVersionResult, error)

PublishVersion - publish a cfc function as a new version

PARAMS:

  • args: the arguments to publish a version

RETURNS:

  • *api.PublishVersionResult: the result of publish a function version
  • error: nil if success otherwise the specific error

func (*Client) SetReservedConcurrentExecutions

func (c *Client) SetReservedConcurrentExecutions(args *api.ReservedConcurrentExecutionsArgs) error

SetReservedConcurrentExecutions - set a cfc function reserved concurrent executions

PARAMS:

  • args: the arguments to set reserved concurrent executions

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) StartExecution added in v0.9.145

func (c *Client) StartExecution(args *api.StartExecutionArgs) (*api.Execution, error)

StartExecution - start an execution of a workflow

PARAMS:

  • args: the arguments to start execution, include flowName、executionName(optional) and input input is a serialized json string, for example: "{\"fruits\":[\"apple\", \"banana\"]}".

RETURNS:

  • *api.Execution: information about the execution
  • error: nil if success otherwise the specific error

func (*Client) StopExecution added in v0.9.145

func (c *Client) StopExecution(flowName, executionName string) (*api.Execution, error)

StopExecution - stop a running execution of a workflow

PARAMS:

  • flowName: which flow the execution belongs to
  • executionName: which execution to stop

RETURNS:

  • *api.Execution: information about the execution
  • error: nil if success otherwise the specific error

func (*Client) UpdateAlias

func (c *Client) UpdateAlias(args *api.UpdateAliasArgs) (*api.UpdateAliasResult, error)

UpdateAlias - update an alias configuration

PARAMS:

  • args: the arguments to update an alias

RETURNS:

  • *api.UpdateAliasResult: the result of update an alias
  • error: nil if success otherwise the specific error

func (*Client) UpdateEventSource added in v0.9.88

func (c *Client) UpdateEventSource(args *api.UpdateEventSourceArgs) (*api.UpdateEventSourceResult, error)

UpdateEventSource - update a event source mapping setting

PARAMS:

  • args: the arguments to update a event source mapping

RETURNS:

  • *api.UpdateEventSourceResult: the result of update a event source mapping
  • error: nil if success otherwise the specific error

func (*Client) UpdateFlow added in v0.9.145

func (c *Client) UpdateFlow(args *api.CreateUpdateFlowArgs) (*api.Flow, error)

UpdateFlow - update a flow

PARAMS:

  • args: args to update a flow, args.Name is the name of flow to update

RETURNS:

  • *api.Flow: flow information after update
  • error: nil if success otherwise the specific error

func (*Client) UpdateFunctionCode

func (c *Client) UpdateFunctionCode(args *api.UpdateFunctionCodeArgs) (*api.UpdateFunctionCodeResult, error)

UpdateFunctionCode - update a cfc function code

PARAMS:

  • args: the arguments to update function code

RETURNS:

  • *api.UpdateFunctionCodeResult: the result of update function code
  • error: nil if success otherwise the specific error

func (*Client) UpdateFunctionConfiguration

func (c *Client) UpdateFunctionConfiguration(args *api.UpdateFunctionConfigurationArgs) (*api.UpdateFunctionConfigurationResult, error)

UpdateFunctionConfiguration - update a specific cfc function configuration

PARAMS:

  • args: the arguments to update cfc function

RETURNS:

  • *api.UpdateFunctionConfigurationResult: the result of update function configuration
  • error: nil if success otherwise the specific error

func (*Client) UpdateTrigger

func (c *Client) UpdateTrigger(args *api.UpdateTriggerArgs) (*api.UpdateTriggerResult, error)

UpdateTrigger - update a trigger

PARAMS:

  • args: the arguments to update a trigger

RETURNS:

  • *api.UpdateTriggerResult: the result of update a trigger
  • error: nil if success otherwise the specific error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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