Documentation ¶
Index ¶
- type Service
- func (s *Service) CreateNotificationEndpoint(ctx context.Context, edp influxdb.NotificationEndpoint, userID influxdb.ID) error
- func (s *Service) DeleteNotificationEndpoint(ctx context.Context, id influxdb.ID) ([]influxdb.SecretField, influxdb.ID, error)
- func (s *Service) FindNotificationEndpointByID(ctx context.Context, id influxdb.ID) (influxdb.NotificationEndpoint, error)
- func (s *Service) FindNotificationEndpoints(ctx context.Context, filter influxdb.NotificationEndpointFilter, ...) ([]influxdb.NotificationEndpoint, int, error)
- func (s *Service) PatchNotificationEndpoint(ctx context.Context, id influxdb.ID, upd influxdb.NotificationEndpointUpdate) (influxdb.NotificationEndpoint, error)
- func (s *Service) UpdateNotificationEndpoint(ctx context.Context, id influxdb.ID, nr influxdb.NotificationEndpoint, ...) (influxdb.NotificationEndpoint, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { // TODO(jsteenb2): NUKE THESE 2 embedded services after fixing up the domain! influxdb.UserResourceMappingService influxdb.OrganizationService // contains filtered or unexported fields }
Service provides all the notification endpoint service behavior.
func NewService ¶
func NewService(store influxdb.NotificationEndpointService, secretSVC influxdb.SecretService, urmSVC influxdb.UserResourceMappingService, orgSVC influxdb.OrganizationService) *Service
NewService constructs a new Service.
func (*Service) CreateNotificationEndpoint ¶
func (s *Service) CreateNotificationEndpoint(ctx context.Context, edp influxdb.NotificationEndpoint, userID influxdb.ID) error
CreateNotificationEndpoint creates a new notification endpoint and sets b.ID with the new identifier.
func (*Service) DeleteNotificationEndpoint ¶
func (s *Service) DeleteNotificationEndpoint(ctx context.Context, id influxdb.ID) ([]influxdb.SecretField, influxdb.ID, error)
DeleteNotificationEndpoint removes a notification endpoint by ID, returns secret fields, orgID for further deletion.
func (*Service) FindNotificationEndpointByID ¶
func (s *Service) FindNotificationEndpointByID(ctx context.Context, id influxdb.ID) (influxdb.NotificationEndpoint, error)
FindNotificationEndpointByID returns a single notification endpoint by ID.
func (*Service) FindNotificationEndpoints ¶
func (s *Service) FindNotificationEndpoints(ctx context.Context, filter influxdb.NotificationEndpointFilter, opt ...influxdb.FindOptions) ([]influxdb.NotificationEndpoint, int, error)
FindNotificationEndpoints returns a list of notification endpoints that match filter and the total count of matching notification endpoints. Additional options provide pagination & sorting.
func (*Service) PatchNotificationEndpoint ¶
func (s *Service) PatchNotificationEndpoint(ctx context.Context, id influxdb.ID, upd influxdb.NotificationEndpointUpdate) (influxdb.NotificationEndpoint, error)
PatchNotificationEndpoint updates a single notification endpoint with changeset. Returns the new notification endpoint state after update.
func (*Service) UpdateNotificationEndpoint ¶
func (s *Service) UpdateNotificationEndpoint(ctx context.Context, id influxdb.ID, nr influxdb.NotificationEndpoint, userID influxdb.ID) (influxdb.NotificationEndpoint, error)
UpdateNotificationEndpoint updates a single notification endpoint. Returns the new notification endpoint after update.