plugin

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const TracerName = "orm"

TracerName is the tracer name for ORM operations.

Variables

This section is empty.

Functions

func NewOrmTracerPlugin

func NewOrmTracerPlugin(tracerProvider trace.TracerProvider, withValues bool) gorm.Plugin

NewOrmTracerPlugin returns a new OrmTracerPlugin.

Types

type OrmRegisterer

type OrmRegisterer interface {
	Register(name string, fn func(*gorm.DB)) error
}

OrmRegisterer is the interface for compatibility with Gorm plugins.

type OrmTracerPlugin

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

OrmTracerPlugin is the Gorm tracing plugin.

func (*OrmTracerPlugin) Initialize

func (p *OrmTracerPlugin) Initialize(db *gorm.DB) error

Initialize is called upon plugin initialization.

func (*OrmTracerPlugin) Name

func (p *OrmTracerPlugin) Name() string

Name returns the plugin name.

Jump to

Keyboard shortcuts

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