gormi

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package gormi provides interface so forks of gorm can be used to work with gormetrics. See github.com/profects/gormetrics/gormi/adapter/unforked for an example of how to use these interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback interface {
	Create() CallbackProcessor
	Delete() CallbackProcessor
	Query() CallbackProcessor
	Update() CallbackProcessor
}

Callback is an interface which can be satisfied by wrapping gorm.Callback.

type CallbackProcessor

type CallbackProcessor interface {
	After(callbackName string) CallbackProcessor
	Register(callbackName string, callback func(scope Scope))
}

CallbackProcessor is an interface which can be satisfied by wrapping gorm.CallbackProcessor.

type DB

type DB interface {
	DB() *sql.DB
	Callback() Callback
	Error() error
}

DB is an interface which can be easily satisfied by wrapping gorm.DB.

type Scope

type Scope interface {
	DB() DB
}

Scope is an interface which can be satisfied by wrapping gorm.Scope.

Directories

Path Synopsis
adapter

Jump to

Keyboard shortcuts

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