hook

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(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() error
}

type AfterQueryHook added in v0.8.0

type AfterQueryHook interface {
	AfterQuery() error
}

type AfterRemoveHook added in v0.8.0

type AfterRemoveHook interface {
	AfterRemove() error
}

type AfterUpdateHook added in v0.8.0

type AfterUpdateHook interface {
	AfterUpdate() error
}

type AfterUpsertHook added in v0.8.0

type AfterUpsertHook interface {
	AfterUpsert() error
}

type BeforeInsertHook added in v0.8.0

type BeforeInsertHook interface {
	BeforeInsert() error
}

InsertHook defines the insert hook interface

type BeforeQueryHook added in v0.8.0

type BeforeQueryHook interface {
	BeforeQuery() error
}

QueryHook defines the query hook interface

type BeforeRemoveHook added in v0.8.0

type BeforeRemoveHook interface {
	BeforeRemove() error
}

RemoveHook defines the remove hook interface

type BeforeUpdateHook added in v0.8.0

type BeforeUpdateHook interface {
	BeforeUpdate() error
}

UpdateHook defines the Update hook interface

type BeforeUpsertHook added in v0.8.0

type BeforeUpsertHook interface {
	BeforeUpsert() error
}

UpsertHook defines the upsert hook interface

Jump to

Keyboard shortcuts

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