Documentation ¶
Index ¶
- type PlanRequest
- type PlanVariableRequest
- type Service
- func (s *Service) Add(ctx *gin.Context, req PlanRequest) (plan.Plan, error)
- func (s *Service) AddValidation(req PlanRequest) error
- func (s *Service) Cancel(ctx *gin.Context, id int) error
- func (s *Service) PaginateList(ctx *gin.Context) ([]plan.Plan, error)
- func (s *Service) Read(id int) (plan.Plan, error)
- func (s *Service) Retry(ctx *gin.Context, id int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlanRequest ¶
type PlanVariableRequest ¶
type PlanVariableRequest struct { Key string `json:"key" validate:"required"` Value string `json:"value" validate:"required"` Category planVariable.Category `json:"category" validate:"required"` Sensitive bool `json:"sensitive"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service struct manages interactions with activities store
func (*Service) AddValidation ¶
func (s *Service) AddValidation(req PlanRequest) error
AddValidation validates the request to add a plan to the database
func (*Service) Cancel ¶
Cancel cancels a plan in the database Only plans in pending or running state can be cancelled TODO: Notify all workers to stop processing the plan
func (*Service) PaginateList ¶
PaginateList retrieves a paginated list of plan entries from the database
Click to show internal directories.
Click to hide internal directories.