trigger

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, funcURN, triggerType, triggerId string) (err error)

func DeleteTriggers added in v0.9.3

func DeleteTriggers(client *golangsdk.ServiceClient, funcURN string) (err error)

Types

type CreateOpts

type CreateOpts struct {
	FuncUrn         string     `json:"-"`
	TriggerTypeCode string     `json:"trigger_type_code" required:"true"`
	TriggerStatus   string     `json:"trigger_status,omitempty"`
	EventTypeCode   string     `json:"event_type_code,omitempty"`
	EventData       *EventData `json:"event_data" required:"true"`
}

type EventData added in v0.9.3

type EventData struct {
	Name                string           `json:"name,omitempty"`
	ScheduleType        string           `json:"schedule_type,omitempty"`
	Schedule            string           `json:"schedule,omitempty"`
	UserEvent           string           `json:"user_event,omitempty"`
	Type                *int             `json:"type,omitempty"`
	Path                string           `json:"path,omitempty"`
	Protocol            string           `json:"protocol,omitempty"`
	ReqMethod           string           `json:"req_method,omitempty"`
	GroupID             string           `json:"group_id,omitempty"`
	GroupName           string           `json:"group_name,omitempty"`
	MatchMode           string           `json:"match_mode,omitempty"`
	EnvName             string           `json:"env_name,omitempty"`
	EnvID               string           `json:"env_id,omitempty"`
	Auth                string           `json:"auth,omitempty"`
	FuncInfo            *TriggerFuncInfo `json:"func_info,omitempty"`
	SlDomain            string           `json:"sl_domain,omitempty"`
	BackendType         string           `json:"backend_type,omitempty"`
	Operations          []string         `json:"operations,omitempty"`
	InstanceID          string           `json:"instance_id,omitempty"`
	CollectionName      string           `json:"collection_name,omitempty"`
	DbName              string           `json:"db_name,omitempty"`
	DbPassword          string           `json:"db_password,omitempty"`
	BatchSize           *int             `json:"batch_size,omitempty"`
	QueueID             string           `json:"queue_id,omitempty"`
	ConsumerGroupID     string           `json:"consumer_group_id,omitempty"`
	PollingInterval     *int             `json:"polling_interval,omitempty"`
	StreamName          string           `json:"stream_name,omitempty"`
	SharditeratorType   string           `json:"sharditerator_type,omitempty"`
	PollingUnit         string           `json:"polling_unit,omitempty"`
	MaxFetchBytes       *int             `json:"max_fetch_bytes,omitempty"`
	IsSerial            string           `json:"is_serial,omitempty"`
	LogGroupID          string           `json:"log_group_id,omitempty"`
	LogTopicID          string           `json:"log_topic_id,omitempty"`
	Bucket              string           `json:"bucket,omitempty"`
	Prefix              string           `json:"prefix,omitempty"`
	Suffix              string           `json:"suffix,omitempty"`
	Events              []string         `json:"events,omitempty"`
	TopicUrn            string           `json:"topic_urn,omitempty"`
	TopicIds            []string         `json:"topic_ids,omitempty"`
	KafkaUser           string           `json:"kafka_user,omitempty"`
	KafkaPassword       string           `json:"kafka_password,omitempty"`
	KafkaConnectAddress string           `json:"kafka_connect_address,omitempty"`
	KafkaSSLEnable      *bool            `json:"kafka_ssl_enable,omitempty"`
	AccessPassword      string           `json:"access_password,omitempty"`
	AccessUser          string           `json:"access_user,omitempty"`
	ConnectAddress      string           `json:"connect_address,omitempty"`
	ExchangeName        string           `json:"exchange_name,omitempty"`
	Vhost               string           `json:"vhost,omitempty"`
	SSLEnable           *bool            `json:"ssl_enable,omitempty"`
	// return values
	TriggerId     string   `json:"trigger_id,omitempty"`
	InvokeUrl     string   `json:"invoke_url,omitempty"`
	RomaAppId     string   `json:"roma_app_id,omitempty"`
	InstanceAddrs []string `json:",omitempty"`
	Mode          string   `json:"mode,omitempty"`
}

type TriggerFuncInfo added in v0.9.3

type TriggerFuncInfo struct {
	FunctionUrn    string `json:"function_urn,omitempty"`
	InvocationType string `json:"invocation_type,omitempty"`
	Timeout        int    `json:"timeout" required:"true"`
	Version        string `json:"version,omitempty"`
}

type TriggerFuncResp added in v0.9.3

type TriggerFuncResp struct {
	TriggerId       string     `json:"trigger_id"`
	TriggerTypeCode string     `json:"trigger_type_code"`
	TriggerStatus   string     `json:"trigger_status"`
	EventData       *EventData `json:"event_data"`
	LastUpdatedTime string     `json:"last_updated_time"`
	CreatedTime     string     `json:"created_time"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*TriggerFuncResp, error)

func Get

func Get(client *golangsdk.ServiceClient, funcURN, triggerType, triggerId string) (*TriggerFuncResp, error)

func GetTriggers added in v0.9.3

func GetTriggers(client *golangsdk.ServiceClient, funcURN string) ([]TriggerFuncResp, error)

func Update added in v0.9.3

func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*TriggerFuncResp, error)

type UpdateEventData added in v0.9.3

type UpdateEventData struct {
	IsSerial        *bool `json:"is_serial,omitempty"`
	MaxFetchBytes   *int  `json:"max_fetch_bytes,omitempty"`
	PollingInterval *int  `json:"polling_interval,omitempty"`
	PollingUnit     *int  `json:"polling_unit,omitempty"`
}

type UpdateOpts added in v0.9.3

type UpdateOpts struct {
	FuncUrn         string            `json:"-"`
	TriggerId       string            `json:"-"`
	TriggerTypeCode string            `json:"-"`
	TriggerStatus   string            `json:"trigger_status,omitempty"`
	EventData       []UpdateEventData `json:"event_data,omitempty"`
}

Jump to

Keyboard shortcuts

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