Documentation
¶
Index ¶
- type CreateRequest
- type ListResponse
- type NullableInt
- type Schedule
- type Service
- func (s *Service) Bootstrap(ctx context.Context) error
- func (s *Service) Create(ctx context.Context, botID string, req CreateRequest) (Schedule, error)
- func (s *Service) Delete(ctx context.Context, id string) error
- func (s *Service) Get(ctx context.Context, id string) (Schedule, error)
- func (s *Service) List(ctx context.Context, botID string) ([]Schedule, error)
- func (s *Service) Trigger(ctx context.Context, scheduleID string) error
- func (s *Service) Update(ctx context.Context, id string, req UpdateRequest) (Schedule, error)
- type TriggerPayload
- type Triggerer
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type ListResponse ¶
type ListResponse struct {
Items []Schedule `json:"items"`
}
type NullableInt ¶
func (NullableInt) IsZero ¶
func (n NullableInt) IsZero() bool
func (NullableInt) MarshalJSON ¶
func (n NullableInt) MarshalJSON() ([]byte, error)
func (*NullableInt) UnmarshalJSON ¶
func (n *NullableInt) UnmarshalJSON(data []byte) error
type Schedule ¶
type Schedule struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Pattern string `json:"pattern"`
MaxCalls *int `json:"max_calls,omitempty"`
CurrentCalls int `json:"current_calls"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Enabled bool `json:"enabled"`
Command string `json:"command"`
BotID string `json:"bot_id"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
type TriggerPayload ¶
type TriggerPayload struct {
ID string
Name string
Description string
Pattern string
MaxCalls *int
Command string
OwnerUserID string
}
TriggerPayload describes the parameters passed to the chat side when a schedule triggers.
type Triggerer ¶
type Triggerer interface {
TriggerSchedule(ctx context.Context, botID string, payload TriggerPayload, token string) error
}
Triggerer triggers schedule execution for chat-related jobs.
type UpdateRequest ¶
Click to show internal directories.
Click to hide internal directories.