collector

package
v0.0.0-...-1987470 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	ID            int            `gorm:"primaryKey;column:id" json:"-"`
	Level         string         `gorm:"level" json:"level"`
	Time          sql.NullTime   `gorm:"time" json:"time"`
	Caller        string         `gorm:"caller" json:"caller"`
	Message       string         `gorm:"message" json:"message"`
	TraceID       string         `gorm:"trace_id" json:"trace_id"`
	ContainerID   string         `gorm:"container_id" json:"container_id"`
	ContainerName string         `gorm:"container_name" json:"container_name"`
	Extra         datatypes.JSON `gorm:"extra" json:"extra"`
}

func (*Log) Count

func (l *Log) Count(db *gorm.DB) (total int64)

func (*Log) CountByArgs

func (l *Log) CountByArgs(db *gorm.DB, query interface{}, args ...interface{}) (total int64)

func (*Log) Create

func (l *Log) Create(db *gorm.DB) (id int, err error)

func (*Log) Delete

func (l *Log) Delete(db *gorm.DB) (err error)

func (*Log) First

func (l *Log) First(db *gorm.DB) (log *Log, err error)

func (*Log) Last

func (l *Log) Last(db *gorm.DB) (log *Log, err error)

func (*Log) List

func (l *Log) List(db *gorm.DB) (logs []Log, err error)

func (*Log) ListByArgs

func (l *Log) ListByArgs(db *gorm.DB, query interface{}, args ...interface{}) (logs []Log, err error)

func (*Log) TableName

func (l *Log) TableName() string

func (*Log) Updates

func (l *Log) Updates(db *gorm.DB, m map[string]any) (err error)

Jump to

Keyboard shortcuts

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