softdelete

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationKey = "SoftDelete"
)
View Source
const SoftDeleteField = "deleted_at"

Variables

View Source
var (

	//go:embed templates/interceptor.go.tmpl
	InterceptorTemplate string

	//go:embed templates/client.tmpl
	ClientTemplate string
)

Functions

func Hook

func Hook() gen.Hook

func SkipSoftDelete

func SkipSoftDelete(ctx context.Context) context.Context

Types

type SoftDeleteAnnotation

type SoftDeleteAnnotation struct {
	IDType   string
	Name     string
	PkgAlias string
}

type SoftDeleteExtension

type SoftDeleteExtension struct {
	entc.DefaultExtension
}

func NewExtension added in v0.0.2

func NewExtension() (*SoftDeleteExtension, error)

func (SoftDeleteExtension) Hooks

func (SoftDeleteExtension) Hooks() []gen.Hook

func (SoftDeleteExtension) Templates

func (SoftDeleteExtension) Templates() []*gen.Template

type SoftDeleteMixin

type SoftDeleteMixin struct {
	mixin.Schema
}

func (SoftDeleteMixin) Fields

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

func (SoftDeleteMixin) Index

func (SoftDeleteMixin) Index() []ent.Index

Jump to

Keyboard shortcuts

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