lookout

package
v0.0.0-...-56aa9b5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LookoutConfig

type LookoutConfig struct {
	Id          int
	Name        string
	Query       string
	Cron        string
	NotifyLocal bool
	NotifyMail  bool
}

type LookoutConfigCreate

type LookoutConfigCreate struct {
	Name        string
	Query       string
	Cron        string
	NotifyLocal bool
	NotifyMail  bool
}

type LookoutConfigUpdate

type LookoutConfigUpdate struct {
	Name        *string
	Query       *string
	Cron        *string
	NotifyLocal *bool
	NotifyMail  *bool
}

type LookoutManager

type LookoutManager interface {
	Start() error
	Watch(lookoutId int) error
	Remove(lookoutId int) error
	Reload(lookoutId int) error
}

func NewLookoutManager

func NewLookoutManager(lookoutRepo LookoutRepo, watcher watch.Watcher) LookoutManager

type LookoutRepo

type LookoutRepo interface {
	Get() ([]LookoutConfig, error)
	GetById(id int) (*LookoutConfig, error)
	Create(data LookoutConfigCreate) (*LookoutConfig, error)
	Update(id int, data LookoutConfigUpdate) (*LookoutConfig, error)
	Delete(id int) (*LookoutConfig, error)
}

type MockLookoutRepo

type MockLookoutRepo struct {
	mock.Mock
}

MockLookoutRepo is an autogenerated mock type for the LookoutRepo type

func NewMockLookoutRepo

func NewMockLookoutRepo(t mockConstructorTestingTNewMockLookoutRepo) *MockLookoutRepo

NewMockLookoutRepo creates a new instance of MockLookoutRepo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockLookoutRepo) Create

Create provides a mock function with given fields: data

func (*MockLookoutRepo) Delete

func (_m *MockLookoutRepo) Delete(id int) (*LookoutConfig, error)

Delete provides a mock function with given fields: id

func (*MockLookoutRepo) Get

func (_m *MockLookoutRepo) Get() ([]LookoutConfig, error)

Get provides a mock function with given fields:

func (*MockLookoutRepo) GetById

func (_m *MockLookoutRepo) GetById(id int) (*LookoutConfig, error)

GetById provides a mock function with given fields: id

func (*MockLookoutRepo) Update

func (_m *MockLookoutRepo) Update(id int, data LookoutConfigUpdate) (*LookoutConfig, error)

Update provides a mock function with given fields: id, data

Directories

Path Synopsis
delivery

Jump to

Keyboard shortcuts

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