alerts

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(repository store.AlertRepository) domain.AlertService

NewService returns repository struct

Types

type MockAlertRepository

type MockAlertRepository struct {
	mock.Mock
}

MockAlertRepository is an autogenerated mock type for the AlertRepository type

func (*MockAlertRepository) Create

func (_m *MockAlertRepository) Create(_a0 *domain.Alert) error

Create provides a mock function with given fields: _a0

func (*MockAlertRepository) Get

func (_m *MockAlertRepository) Get(_a0 string, _a1 uint64, _a2 uint64, _a3 uint64) ([]domain.Alert, error)

Get provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*MockAlertRepository) Migrate

func (_m *MockAlertRepository) Migrate() error

Migrate provides a mock function with given fields:

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service handles business logic

func (Service) Create

func (service Service) Create(alerts *domain.Alerts) ([]domain.Alert, error)

func (Service) Get

func (service Service) Get(resourceName string, providerId, startTime, endTime uint64) ([]domain.Alert, error)

func (Service) Migrate

func (service Service) Migrate() error

Jump to

Keyboard shortcuts

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