log_entry

package
v0.0.0-...-a52d1cd Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyLogEntryQuerySearchParams

func ApplyLogEntryQuerySearchParams(query *gorm.DB, params *LogEntrySearchParams) *gorm.DB

Types

type LogEntryDatabaseService

type LogEntryDatabaseService struct {
	DbService database.DatabaseServiceInterface
}

func (LogEntryDatabaseService) AddLogEntry

func (service LogEntryDatabaseService) AddLogEntry(logEntry *models.LogEntry) error

func (LogEntryDatabaseService) CheckIfIdExists

func (service LogEntryDatabaseService) CheckIfIdExists(logEntryId uint) (bool, error)

func (LogEntryDatabaseService) CheckIfLogEntryExists

func (service LogEntryDatabaseService) CheckIfLogEntryExists(producer string, message string) (bool, error)

func (LogEntryDatabaseService) DeleteLogEntry

func (service LogEntryDatabaseService) DeleteLogEntry(logEntryId uint) error

func (LogEntryDatabaseService) GetAllLogEntries

func (service LogEntryDatabaseService) GetAllLogEntries(request *http.Request, params *LogEntrySearchParams) (*models.LogEntryList, int, error)

func (LogEntryDatabaseService) GetLogEntryById

func (service LogEntryDatabaseService) GetLogEntryById(logEntryId uint) (*models.LogEntry, error)

func (LogEntryDatabaseService) UpdateLogEntry

func (service LogEntryDatabaseService) UpdateLogEntry(logEntryId uint, logEntryData *models.LogEntryRequest) (*models.LogEntry, error)

type LogEntryDatabaseServiceInterface

type LogEntryDatabaseServiceInterface interface {
	GetAllLogEntries(request *http.Request, params *LogEntrySearchParams) (*models.LogEntryList, int, error)
	AddLogEntry(logEntry *models.LogEntry) error
	GetLogEntryById(logEntryId uint) (*models.LogEntry, error)
	UpdateLogEntry(logEntryId uint, logEntryData *models.LogEntryRequest) (*models.LogEntry, error)
	DeleteLogEntry(logEntryId uint) error
	CheckIfIdExists(logEntryId uint) (bool, error)
	CheckIfLogEntryExists(producer string, message string) (bool, error)
}

type LogEntryResponseService

type LogEntryResponseService struct {
	PaginationService pagination.PaginationServiceInterface
}

func (LogEntryResponseService) NewLogEntryListResponse

func (service LogEntryResponseService) NewLogEntryListResponse(logEntries *models.LogEntryList, offset int, limit int, totalCount int) *pagination.PaginatedResponse

func (LogEntryResponseService) NewLogEntryResponse

func (service LogEntryResponseService) NewLogEntryResponse(logEntry *models.LogEntry) *models.LogEntryResponse

type LogEntryResponseServiceInterface

type LogEntryResponseServiceInterface interface {
	NewLogEntryResponse(logEntry *models.LogEntry) *models.LogEntryResponse
	NewLogEntryListResponse(logEntries *models.LogEntryList, offset int, limit int, totalCount int) *pagination.PaginatedResponse
}

type LogEntrySearchParams

type LogEntrySearchParams struct {
	Producer string
	Message  string
}

func GetLogEntrySearchParams

func GetLogEntrySearchParams(request *http.Request) *LogEntrySearchParams

type MockedLogEntryDatabaseService

type MockedLogEntryDatabaseService struct {
	DbService database.DatabaseServiceInterface
}

func (MockedLogEntryDatabaseService) AddLogEntry

func (service MockedLogEntryDatabaseService) AddLogEntry(logEntry *models.LogEntry) error

func (MockedLogEntryDatabaseService) CheckIfIdExists

func (service MockedLogEntryDatabaseService) CheckIfIdExists(logEntryId uint) (bool, error)

func (MockedLogEntryDatabaseService) CheckIfLogEntryExists

func (service MockedLogEntryDatabaseService) CheckIfLogEntryExists(producer string, message string) (bool, error)

func (MockedLogEntryDatabaseService) DeleteLogEntry

func (service MockedLogEntryDatabaseService) DeleteLogEntry(logEntryId uint) error

func (MockedLogEntryDatabaseService) GetAllLogEntries

func (service MockedLogEntryDatabaseService) GetAllLogEntries(request *http.Request, params *LogEntrySearchParams) (*models.LogEntryList, int, error)

func (MockedLogEntryDatabaseService) GetLogEntryById

func (service MockedLogEntryDatabaseService) GetLogEntryById(logEntryId uint) (*models.LogEntry, error)

func (MockedLogEntryDatabaseService) UpdateLogEntry

func (service MockedLogEntryDatabaseService) UpdateLogEntry(logEntryId uint, logEntryData *models.LogEntryRequest) (*models.LogEntry, error)

Jump to

Keyboard shortcuts

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