Documentation
¶
Index ¶
Constants ¶
const ( FGS = "fgs" TRIGGER = "triggers" )
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(c *golangsdk.ServiceClient, urn string) pagination.Pager
List is a method to obtain an array of one or more trigger for function graph according to the urn.
Types ¶
type CreateOpts ¶
type CreateOpts struct {
// Trigger type, which support:
// TIMER
// APIG
// CTS
// DDS
// DMS
// DIS
// LTS
// OBS
// KAFKA
// SMN
TriggerTypeCode string `json:"trigger_type_code" required:"true"`
// Trigger status, which support:
// ACTIVE
// DISABLED
TriggerStatus string `json:"trigger_status,omitempty"`
// Message code.
EventTypeCode string `json:"event_type_code" required:"true"`
// Event struct.
EventData map[string]interface{} `json:"event_data" required:"true"`
}
CreateOpts is a struct which will be used to create a new trigger.
func (CreateOpts) ToCreateTriggerMap ¶
func (opts CreateOpts) ToCreateTriggerMap() (map[string]interface{}, error)
ToCreateTriggerMap is a method which to build a request body by the CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder is an interface used to support the construction of the request body for trigger creates.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents a result of the Create method.
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOptsBuilder, urn string) (r CreateResult)
Create is a method to create trigger through function urn and CreateOpts.
type DeleteResult ¶
DeleteResult represents a result of the Delete method.
func Delete ¶
func Delete(c *golangsdk.ServiceClient, urn, triggerType, triggerId string) (r DeleteResult)
Delete is a method to delete existing trigger.
func DeleteAll ¶
func DeleteAll(c *golangsdk.ServiceClient, urn string) (r DeleteResult)
DeleteAll is a method to delete all triggers from a function
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents a result of the Update method.
type Trigger ¶
type Trigger struct {
TriggerId string `json:"trigger_id"`
TriggerTypeCode string `json:"trigger_type_code"`
EventData map[string]interface{} `json:"event_data"`
EventTypeCode string `json:"event_type_code"`
Status string `json:"trigger_status"`
LastUpdatedTime string `json:"last_updated_time"`
CreatedTime string `json:"created_time"`
LastError string `json:"last_error"`
}
Trigger is a struct that represents the result of Create and Get methods.
func ExtractList ¶
func ExtractList(r pagination.Page) ([]Trigger, error)
ExtractList is a method which to extract the response to a trigger list.
type TriggerPage ¶
type TriggerPage struct {
pagination.SinglePageBase
}
TriggerPage represents the response pages of the List method.
type UpdateOpts ¶
type UpdateOpts struct {
TriggerStatus string `json:"trigger_status" required:"true"`
}
UpdateOpts is a struct which will be used to update existing trigger.
func (UpdateOpts) ToUpdateTriggerMap ¶
func (opts UpdateOpts) ToUpdateTriggerMap() (map[string]interface{}, error)
ToUpdateTriggerMap is a method which to build a request body by the UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder is an interface used to support the construction of the request body for trigger updates.
type UpdateResult ¶
UpdateResult represents a result of the Update method.
func Update ¶
func Update(c *golangsdk.ServiceClient, opts UpdateOptsBuilder, urn, triggerType, triggerId string) (r UpdateResult)
Update is a method to update existing trigger through function urn, function code, trigger ID and UpdateOpts.