model

package
v0.0.0-...-660a5ed Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEvent error = errors.New("invalid event -- missing message body")
)

Functions

This section is empty.

Types

type Event

type Event struct {
	gorm.Model
	Time     time.Time
	Prefix   string
	Sub      string
	Level    string
	Msg      string
	Metadata string
}

Event struct defines the general structure of a log message, to be used with gorm.

This model is used by different databases which are accessed with gorm.

func (*Event) From

func (m *Event) From(msg *event.Event) error

From method will take in an event.Event and convert it into a (DB model) Event, returning any errors if existing.

Jump to

Keyboard shortcuts

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