Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) CreateNotificationEndpoint(ctx context.Context, edp influxdb.NotificationEndpoint, userID platform.ID) error
- func (s *Service) DeleteNotificationEndpoint(ctx context.Context, id platform.ID) ([]influxdb.SecretField, platform.ID, error)
- func (s *Service) FindNotificationEndpointByID(ctx context.Context, id platform.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 platform.ID, upd influxdb.NotificationEndpointUpdate) (influxdb.NotificationEndpoint, error)
- func (s *Service) UpdateNotificationEndpoint(ctx context.Context, id platform.ID, nr influxdb.NotificationEndpoint, ...) (influxdb.NotificationEndpoint, error)
- type Store
- func (s *Store) CreateNotificationEndpoint(ctx context.Context, edp influxdb.NotificationEndpoint, userID platform.ID) error
- func (s *Store) DeleteNotificationEndpoint(ctx context.Context, id platform.ID) (flds []influxdb.SecretField, orgID platform.ID, err error)
- func (s *Store) FindNotificationEndpointByID(ctx context.Context, id platform.ID) (influxdb.NotificationEndpoint, error)
- func (s *Store) FindNotificationEndpoints(ctx context.Context, filter influxdb.NotificationEndpointFilter, ...) (edps []influxdb.NotificationEndpoint, n int, err error)
- func (s *Store) PatchNotificationEndpoint(ctx context.Context, id platform.ID, upd influxdb.NotificationEndpointUpdate) (influxdb.NotificationEndpoint, error)
- func (s *Store) PutNotificationEndpoint(ctx context.Context, edp influxdb.NotificationEndpoint) error
- func (s *Store) UpdateNotificationEndpoint(ctx context.Context, id platform.ID, edp influxdb.NotificationEndpoint, ...) (influxdb.NotificationEndpoint, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotificationEndpointNotFound is used when the notification endpoint is not found. ErrNotificationEndpointNotFound = &errors.Error{ Msg: "notification endpoint not found", Code: errors.ENotFound, } )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides all the notification endpoint service behavior.
func New ¶
func New(store influxdb.NotificationEndpointService, secretSVC influxdb.SecretService) *Service
New constructs a new Service.
func (*Service) CreateNotificationEndpoint ¶
func (s *Service) CreateNotificationEndpoint(ctx context.Context, edp influxdb.NotificationEndpoint, userID platform.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 platform.ID) ([]influxdb.SecretField, platform.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 platform.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 platform.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 platform.ID, nr influxdb.NotificationEndpoint, userID platform.ID) (influxdb.NotificationEndpoint, error)
UpdateNotificationEndpoint updates a single notification endpoint. Returns the new notification endpoint after update.
type Store ¶
type Store struct { IDGenerator platform.IDGenerator TimeGenerator influxdb.TimeGenerator // contains filtered or unexported fields }
func (*Store) CreateNotificationEndpoint ¶
func (s *Store) CreateNotificationEndpoint(ctx context.Context, edp influxdb.NotificationEndpoint, userID platform.ID) error
CreateNotificationEndpoint creates a new notification endpoint and sets b.ID with the new identifier.
func (*Store) DeleteNotificationEndpoint ¶
func (s *Store) DeleteNotificationEndpoint(ctx context.Context, id platform.ID) (flds []influxdb.SecretField, orgID platform.ID, err error)
DeleteNotificationEndpoint removes a notification endpoint by ID.
func (*Store) FindNotificationEndpointByID ¶
func (s *Store) FindNotificationEndpointByID(ctx context.Context, id platform.ID) (influxdb.NotificationEndpoint, error)
FindNotificationEndpointByID returns a single notification endpoint by ID.
func (*Store) FindNotificationEndpoints ¶
func (s *Store) FindNotificationEndpoints(ctx context.Context, filter influxdb.NotificationEndpointFilter, opt ...influxdb.FindOptions) (edps []influxdb.NotificationEndpoint, n int, err error)
FindNotificationEndpoints returns a list of notification endpoints that match isNext and the total count of matching notification endpoints. Additional options provide pagination & sorting.
func (*Store) PatchNotificationEndpoint ¶
func (s *Store) PatchNotificationEndpoint(ctx context.Context, id platform.ID, upd influxdb.NotificationEndpointUpdate) (influxdb.NotificationEndpoint, error)
PatchNotificationEndpoint updates a single notification endpoint with changeset. Returns the new notification endpoint state after update.
func (*Store) PutNotificationEndpoint ¶
func (s *Store) PutNotificationEndpoint(ctx context.Context, edp influxdb.NotificationEndpoint) error
PutNotificationEndpoint put a notification endpoint to storage.
func (*Store) UpdateNotificationEndpoint ¶
func (s *Store) UpdateNotificationEndpoint(ctx context.Context, id platform.ID, edp influxdb.NotificationEndpoint, userID platform.ID) (influxdb.NotificationEndpoint, error)
UpdateNotificationEndpoint updates a single notification endpoint. Returns the new notification endpoint after update.