Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionConfig ¶
type ActionConfig struct { Name ActionName Type ActionType HTTPRequestAction CloudPubSubAction CloudTasksAction Payload map[string]interface{} }
ActionConfig is action configuration.
type ActionType ¶
type ActionType string
ActionType represents action type.
const ( // ActionNone is uncategorized action type. ActionNone ActionType = "" // ActionHTTP is action type for HTTP action. ActionHTTP ActionType = "http" // ActionPubSub is action type for Cloud Pub/Sub action. ActionPubSub ActionType = "pubsub" // ActionTasks is action type for Cloud Tasks action. ActionTasks ActionType = "tasks" )
type CloudPubSubAction ¶
type CloudPubSubAction struct {
Topic string
}
CloudPubSubAction is parameter of Cloud Pub/Sub action.
type CloudTasksAction ¶
type CloudTasksAction struct { Location string Queue string TaskIDPrefix string ServiceAccountEmail string }
CloudTasksAction is parameter of Cloud Tasks action.
type EventType ¶
type EventType int
EventType represents calendar event type.
func (EventType) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
type HTTPRequestAction ¶
HTTPRequestAction is parameter of HTTP action.
type RunningMode ¶
type RunningMode string
RunningMode represents running mode.
const ( // ModeNone is uncategorized running mode. ModeNone RunningMode = "" // ModeResident is resident running mode. ModeResident RunningMode = "resident" // ModeOnDemand is on-demand running mode. ModeOnDemand RunningMode = "ondemand" )
type Schedule ¶
type Schedule struct { ID string Summary string Description string StartAt time.Time EndAt time.Time }
Schedule is calendar schedule item.
func (*Schedule) EndEvent ¶
func (s *Schedule) EndEvent() ScheduleEvent
EndEvent returnsend event of schedule.
func (*Schedule) Events ¶
func (s *Schedule) Events(t time.Time) ScheduleEvents
Events returns schedule events from schedule.
func (*Schedule) StartEvent ¶
func (s *Schedule) StartEvent() ScheduleEvent
StartEvent returns start event of schedule.
type ScheduleEvent ¶
type ScheduleEvent struct { ScheduleID string Summary string Description string EventType EventType ExecuteAt time.Time }
ScheduleEvent is (start or end) event of schedule.
func (*ScheduleEvent) ID ¶
func (s *ScheduleEvent) ID(delimiter string) string
ID returns schedule event id.
func (*ScheduleEvent) ParseID ¶
func (s *ScheduleEvent) ParseID(id, delimiter string) string
ParseID parses ID and returns ScheduleID.
type ScheduleEvents ¶
type ScheduleEvents []ScheduleEvent
ScheduleEvents represents schedule event slice.
func (ScheduleEvents) SortByExecuteAtAsc ¶
func (ss ScheduleEvents) SortByExecuteAtAsc()
SortByExecuteAtAsc sorts schedule events by ExecuteAt ascending.
func (ScheduleEvents) Sub ¶
func (ss ScheduleEvents) Sub(tt ScheduleEvents) ScheduleEvents
Sub returns schedule events ss-tt.