Documentation ¶
Index ¶
- type Service
- func (s *Service) CreateCheck(ctx context.Context, c influxdb.CheckCreate, userID platform.ID) (err error)
- func (s *Service) DeleteCheck(ctx context.Context, id platform.ID) error
- func (s *Service) FindCheck(ctx context.Context, filter influxdb.CheckFilter) (influxdb.Check, error)
- func (s *Service) FindCheckByID(ctx context.Context, id platform.ID) (influxdb.Check, error)
- func (s *Service) FindChecks(ctx context.Context, filter influxdb.CheckFilter, opts ...influxdb.FindOptions) ([]influxdb.Check, int, error)
- func (s *Service) PatchCheck(ctx context.Context, id platform.ID, upd influxdb.CheckUpdate) (influxdb.Check, error)
- func (s *Service) PutCheck(ctx context.Context, c influxdb.Check) error
- func (s *Service) UpdateCheck(ctx context.Context, id platform.ID, chk influxdb.CheckCreate) (influxdb.Check, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a check service It provides all the operations needed to manage checks
func NewService ¶
func NewService(logger *zap.Logger, store kv.Store, orgs influxdb.OrganizationService, tasks taskmodel.TaskService) *Service
NewService constructs and configures a new checks.Service
func (*Service) CreateCheck ¶
func (s *Service) CreateCheck(ctx context.Context, c influxdb.CheckCreate, userID platform.ID) (err error)
CreateCheck creates a influxdb check and sets ID.
func (*Service) DeleteCheck ¶
DeleteCheck deletes a check and prunes it from the index.
func (*Service) FindCheck ¶
func (s *Service) FindCheck(ctx context.Context, filter influxdb.CheckFilter) (influxdb.Check, error)
FindCheck retrieves a check using an arbitrary check filter. Filters using ID, or OrganizationID and check Name should be efficient. Other filters will do a linear scan across checks until it finds a match.
func (*Service) FindCheckByID ¶
FindCheckByID retrieves a check by id.
func (*Service) FindChecks ¶
func (s *Service) FindChecks(ctx context.Context, filter influxdb.CheckFilter, opts ...influxdb.FindOptions) ([]influxdb.Check, int, error)
FindChecks retrieves all checks that match an arbitrary check filter. Filters using ID, or OrganizationID and check Name should be efficient. Other filters will do a linear scan across all checks searching for a match.
func (*Service) PatchCheck ¶
func (s *Service) PatchCheck(ctx context.Context, id platform.ID, upd influxdb.CheckUpdate) (influxdb.Check, error)
PatchCheck updates a check according the parameters set on upd.