logStore

package
v0.0.0-...-ae4999c Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemLog = "system"
	DebugLog  = "debug"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	ID      uint64 `json:"id"`
	Content []byte `json:"content"`
}

type Entry

type Entry struct {
	Level     string                 `json:"level"`
	Message   string                 `json:"message"`
	Fields    map[string]interface{} `json:"fields"`
	CreatedAt time.Time              `json:"created_at"`
}

func (*Entry) Marshal

func (entry *Entry) Marshal() ([]byte, error)

type Store

type Store interface {
	Open(option map[string]interface{}) error
	Close()

	GetList(orgID int64, src, level string, start *uint64, offset, limit uint64) (result []*Data, total uint64, err error)
	Delete(orgID int64, src string) error
	Stats(orgID int64) map[string]interface{}

	//interface for logrus hook
	Levels() []logrus.Level
	Fire(entry *logrus.Entry) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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