Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Type model.ActionType `yaml:"type"` HTTPRequestAction `yaml:",inline"` CloudPubSubAction `yaml:",inline"` CloudTasksAction `yaml:",inline"` Payload map[string]interface{} `yaml:"payload"` }
Action is action definition.
type CloudPubSubAction ¶
type CloudPubSubAction struct {
Topic string `yaml:"topic"`
}
CloudPubSubAction is configuration of Cloud Pub/Sub action.
type CloudTasksAction ¶
type CloudTasksAction struct { Location string `yaml:"location"` Queue string `yaml:"queue"` TaskIDPrefix string `yaml:"task_id_prefix"` ServiceAccountEmail string `yaml:"service_account_email"` }
CloudTasksAction is configuration of Cloud Tasks action.
type Config ¶
type Config struct { Version string `yaml:"version"` Mode model.RunningMode `yaml:"mode"` Interval time.Duration `yaml:"interval"` CalendarID string `yaml:"calendar_id"` Handler map[string]EventHandler `yaml:"handler"` Action map[model.ActionName]Action `yaml:"action"` }
Config represents a config.yml.
func (*Config) ActionConfigMap ¶
func (c *Config) ActionConfigMap() map[model.ActionName]model.ActionConfig
ActionConfigMap returns action config map.
func (*Config) ActionNames ¶
func (c *Config) ActionNames(event model.ScheduleEvent) ([]model.ActionName, bool)
ActionNames returns action names from event schedule.
func (*Config) RunningMode ¶
func (c *Config) RunningMode() model.RunningMode
RunningMode returns running mode.
func (*Config) SyncInterval ¶
SyncInterval retruns sync interval for resident mode.
type EventHandler ¶
type EventHandler struct { Start []model.ActionName `yaml:"start"` End []model.ActionName `yaml:"end"` }
EventHandler is event handler which contains action names.
Click to show internal directories.
Click to hide internal directories.