eventlogs

package
v0.0.0-...-bc78c8b Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventLogsRepository

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

EventLogsRepository fetches and stores events

func NewEventLogsRepository

func NewEventLogsRepository(repo domain.Repository, appID primitive.ObjectID) *EventLogsRepository

NewEventLogsRepository returns an instance of Repository

func (*EventLogsRepository) BulkDeleteByApplicationID

func (e *EventLogsRepository) BulkDeleteByApplicationID(id string) error

BulkDeleteByApplicationID deletes rows related with an application id.

func (*EventLogsRepository) Create

func (or *EventLogsRepository) Create(eventName, message string) error

Create inserts a new event in collection

func (*EventLogsRepository) FindAll

func (e *EventLogsRepository) FindAll(filter interface{}) (*[]domain.EventLog, error)

FindAll returns all log events that match the filter

func (*EventLogsRepository) FindAllToNotify

func (or *EventLogsRepository) FindAllToNotify() (*[]domain.EventLog, error)

FindAllToNotify returns every event log that needs to be notified

func (*EventLogsRepository) MarkNotified

func (or *EventLogsRepository) MarkNotified(ids []primitive.ObjectID) error

MarkNotified marks every eventLog as notified

type EventLogsServiceMock

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

EventLogsServiceMock mocks EventLogsService

func (*EventLogsServiceMock) Create

func (l *EventLogsServiceMock) Create(logType, message string) error

Create saves log event internally

func (*EventLogsServiceMock) FindAllToNotify

func (l *EventLogsServiceMock) FindAllToNotify() (*[]domain.EventLog, error)

FindAllToNotify returns an empty slice of log events

func (*EventLogsServiceMock) MarkNotified

func (l *EventLogsServiceMock) MarkNotified(ids []primitive.ObjectID) error

MarkNotified mock the update of log events

Jump to

Keyboard shortcuts

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