service

package
v2.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

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

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 NewStore

func NewStore(store kv.Store) *Store

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL