envers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package envers with config utils

Index

Constants

View Source
const Add = 0
View Source
const Del = 2
View Source
const Update = 1

Variables

This section is empty.

Functions

func AfterCreate

func AfterCreate(tx *gorm.DB, e interface{}) (err error)

func AfterDelete

func AfterDelete(tx *gorm.DB, emptyModel interface{}, columnIDName string, id interface{}, e interface{}) (err error)

func AfterUpdate

func AfterUpdate(tx *gorm.DB, emptyModel interface{}, columnIDName string, id interface{}, e interface{}) (err error)

func NewConfig

func NewConfig() config

func NewGormEnversPlugin

func NewGormEnversPlugin(config config) gorm.Plugin

func NewSQLAud

func NewSQLAud(config config) *sqlAud

Types

type AudData

type AudData struct {
	Rev         uint
	Revtype     uint8
	Revend      *uint
	RevendTstmp *int64
}

type Audited

type Audited interface {
	IsAudit() bool
}

type Revinfo

type Revinfo struct {
	Rev      uint `gorm:"primaryKey;autoIncrement:true;column:rev"`
	Revtstmp int64
}

func (Revinfo) TableName

func (Revinfo) TableName() string

Jump to

Keyboard shortcuts

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