audit

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package audit provides a mixin that automatically creates and populates created_by and updated_by fields for schemas where the mixin is configured.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hook

func Hook(next ent.Mutator) ent.Mutator

Hook sets and returns the created_at, updated_at, etc., fields

Types

type Mixin

type Mixin struct {
	mixin.Schema
}

Mixin provides auditing for all records where enabled. The created_at, created_by, updated_at, and updated_by records are automatically populated when this mixin is enabled.

func (Mixin) Fields

func (Mixin) Fields() []ent.Field

Fields of the Mixin

func (Mixin) Hooks

func (Mixin) Hooks() []ent.Hook

Hooks of the Mixin

Jump to

Keyboard shortcuts

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