Documentation ¶
Index ¶
- type EventLogsRepository
- func (e *EventLogsRepository) BulkDeleteByApplicationID(id string) error
- func (or *EventLogsRepository) Create(eventName, message string) error
- func (e *EventLogsRepository) FindAll(filter interface{}) (*[]domain.EventLog, error)
- func (or *EventLogsRepository) FindAllToNotify() (*[]domain.EventLog, error)
- func (or *EventLogsRepository) MarkNotified(ids []primitive.ObjectID) error
- type EventLogsServiceMock
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
Click to show internal directories.
Click to hide internal directories.