hook

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(ctx context.Context, hook interface{}, opType operator.OpType, opts ...interface{}) error

Do call the specific method to handle hook based on hType If opts has valid value, use it instead of original hook

Types

type AfterInsertHook added in v0.8.0

type AfterInsertHook interface {
	AfterInsert(ctx context.Context) error
}

type AfterQueryHook added in v0.8.0

type AfterQueryHook interface {
	AfterQuery(ctx context.Context) error
}

type AfterRemoveHook added in v0.8.0

type AfterRemoveHook interface {
	AfterRemove(ctx context.Context) error
}

type AfterUpdateHook added in v0.8.0

type AfterUpdateHook interface {
	AfterUpdate(ctx context.Context) error
}

type AfterUpsertHook added in v0.8.0

type AfterUpsertHook interface {
	AfterUpsert(ctx context.Context) error
}

type BeforeInsertHook added in v0.8.0

type BeforeInsertHook interface {
	BeforeInsert(ctx context.Context) error
}

BeforeInsertHook InsertHook defines the insert hook interface

type BeforeQueryHook added in v0.8.0

type BeforeQueryHook interface {
	BeforeQuery(ctx context.Context) error
}

BeforeQueryHook QueryHook defines the query hook interface

type BeforeRemoveHook added in v0.8.0

type BeforeRemoveHook interface {
	BeforeRemove(ctx context.Context) error
}

BeforeRemoveHook RemoveHook defines the remove hook interface

type BeforeUpdateHook added in v0.8.0

type BeforeUpdateHook interface {
	BeforeUpdate(ctx context.Context) error
}

BeforeUpdateHook defines the Update hook interface

type BeforeUpsertHook added in v0.8.0

type BeforeUpsertHook interface {
	BeforeUpsert(ctx context.Context) error
}

BeforeUpsertHook UpsertHook defines the upsert hook interface

Jump to

Keyboard shortcuts

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