journal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocation

func GetLocation() *time.Location

func PrintLogsEntries

func PrintLogsEntries(entries []*LogsEntry)

Types

type DateRangeInput

type DateRangeInput struct {
	Timestamp string
	Name      string
	Label     string
}

type JournalLogService

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

func NewJournalLogService

func NewJournalLogService(dbUrl string) (*JournalLogService, error)

func (*JournalLogService) Close

func (j *JournalLogService) Close()

func (*JournalLogService) GetLogPage

func (s *JournalLogService) GetLogPage(data *LogPageData) ([]LogsEntry, error)

func (*JournalLogService) SaveJournalLogs

func (s *JournalLogService) SaveJournalLogs(logs string) error

type JournalRenderData

type JournalRenderData struct {
	Start     time.Time
	End       time.Time
	Page      int
	PageSize  int
	Container string
	Host      string
	Filter    string
}

type JournalTable

type JournalTable struct {
	Headers        []string
	Rows           [][]string
	NextUrl        string
	StartInput     *DateRangeInput
	EndInput       *DateRangeInput
	PreviousButton *PaginationButton
	NextButton     *PaginationButton
	PageSize       *TextInput
	Container      *TextInput
	Host           *TextInput
	Filter         *TextInput
}

type JournalView

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

func NewJournalView

func NewJournalView(journalService *JournalLogService) *JournalView

func (*JournalView) CreateJournalTable

func (j *JournalView) CreateJournalTable(data *JournalRenderData) (*JournalTable, error)

func (*JournalView) Render

func (j *JournalView) Render(c echo.Context, data *JournalRenderData) error

type LogPageData

type LogPageData struct {
	StartTime       time.Time
	EndTime         time.Time
	Limit           int
	TimeId          int
	AdditionalWhere string
	Filter          string
	ContainerName   string
	Hostname        string
}

type LogsEntry

type LogsEntry struct {
	Id     int
	Time   time.Time
	Hash   string
	Log    map[string]any
	TimeId int
}

func ParseJournalLogs

func ParseJournalLogs(logs string) []*LogsEntry

func (*LogsEntry) String

func (e *LogsEntry) String() string

type LogsEntryCopyFrom

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

func (*LogsEntryCopyFrom) Err

func (c *LogsEntryCopyFrom) Err() error

func (*LogsEntryCopyFrom) Next

func (c *LogsEntryCopyFrom) Next() bool

func (*LogsEntryCopyFrom) Values

func (c *LogsEntryCopyFrom) Values() ([]any, error)

type PaginationButton

type PaginationButton struct {
	Enabled bool
	Url     string
	Page    int
	Label   string
	Name    string
}

type TextInput

type TextInput struct {
	Label string
	Name  string
	Value string
}

Jump to

Keyboard shortcuts

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