v2

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	LogEventMetadata Metadata `textlog:",expand"`

	Data Fields `textlog:",expand"`

	EventVersion common.Version `json:"log_version"`
}

func (Event) MarshalJSON

func (e Event) MarshalJSON() ([]byte, error)

func (*Event) Message

func (e *Event) Message() string

func (*Event) Metadata

func (e *Event) Metadata() *common.LogEventMetadata

func (*Event) UnmarshalJSON

func (e *Event) UnmarshalJSON(data []byte) error

func (*Event) Version

func (e *Event) Version() common.Version

type Field

type Field struct {
	Key   string
	Value any
}

type Fields

type Fields []Field

func (Fields) MarshalJSON

func (o Fields) MarshalJSON() ([]byte, error)

func (Fields) MarshalTextLog

func (m Fields) MarshalTextLog(t jsonlog.TextlogFormatter) jsonlog.TextlogEntry

func (*Fields) UnmarshalJSON

func (o *Fields) UnmarshalJSON(data []byte) error

type Metadata

type Metadata struct {
	Time   time.Time       `json:"time" textlog:"-"`
	Lvl    common.LogLevel `json:"level" textlog:"-"`
	Mod    string          `json:"module" textlog:"module"`
	ScanID string          `json:"scanid" textlog:"scanid,omitempty"`
	GenID  string          `json:"uid" textlog:"uid,omitempty"`
	Source string          `json:"hostname" textlog:"-"`
}

Jump to

Keyboard shortcuts

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