logentry

package
v0.0.0-...-ee5f467 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateLogEntryRequest

type CreateLogEntryRequest struct {
	Application string                       `json:"application"`
	Details     LogEntryDetailItemCollection `json:"details"`
	ID          bson.ObjectId
	Level       string `json:"level"`
	Message     string `json:"message"`
	Time        string `json:"time"`
}

type GetLogEntriesResponse

type GetLogEntriesResponse struct {
	Count      int                `json:"count"`
	LogEntries LogEntryCollection `json:"logEntries"`
	PageSize   int                `json:"pageSize"`
	TotalCount int                `json:"totalCount"`
}

type LogEntry

type LogEntry struct {
	Application string                       `json:"application" bson:"application"`
	Details     LogEntryDetailItemCollection `json:"details" bson:"details"`
	ID          bson.ObjectId                `json:"id" bson:"_id"`
	Level       string                       `json:"level" bson:"level"`
	Message     string                       `json:"message" bson:"message"`
	Time        time.Time                    `json:"time" bson:"time"`
}

type LogEntryCollection

type LogEntryCollection []*LogEntry

type LogEntryDetailItem

type LogEntryDetailItem struct {
	Key   string `json:"key" bson:"key"`
	Value string `json:"value" bson:"value"`
}

type LogEntryDetailItemCollection

type LogEntryDetailItemCollection []*LogEntryDetailItem

type LogEntryService

type LogEntryService struct {
	DB       *mgo.Database
	PageSize int
}

func (*LogEntryService) CreateLogEntry

func (s *LogEntryService) CreateLogEntry(entryRequest *CreateLogEntryRequest) (string, error)

func (*LogEntryService) Delete

func (s *LogEntryService) Delete(fromDate time.Time) (int, error)

func (*LogEntryService) GetApplicationNames

func (s *LogEntryService) GetApplicationNames() ([]string, error)

func (*LogEntryService) GetLogEntries

func (s *LogEntryService) GetLogEntries(filter *filters.LogEntryFilter) (LogEntryCollection, int, error)

func (*LogEntryService) GetLogEntry

func (s *LogEntryService) GetLogEntry(id string) (*LogEntry, error)

Jump to

Keyboard shortcuts

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