global

package
v0.0.0-...-2f954c6 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemaChan     = make(chan struct{}, 1)
	PermissionChan = make(chan struct{}, 1)
)

Functions

func GetAfterDeleteHooks

func GetAfterDeleteHooks() map[string][]func(ctx context.Context, data *gjson.Json) error

func GetAfterDeleteHooksByCollectionName

func GetAfterDeleteHooksByCollectionName(collectionName string) []func(ctx context.Context, data *gjson.Json) error

func GetAfterFindHooks

func GetAfterFindHooks() map[string][]func(ctx context.Context, data *gjson.Json) error

func GetAfterFindHooksByCollectionName

func GetAfterFindHooksByCollectionName(collectionName string) []func(ctx context.Context, data *gjson.Json) error

func GetAfterInsertHooks

func GetAfterInsertHooks() map[string][]func(ctx context.Context, data *gjson.Json) error

func GetAfterInsertHooksByCollectionName

func GetAfterInsertHooksByCollectionName(collectionName string) []func(ctx context.Context, data *gjson.Json) error

func GetAfterSaveHooks

func GetAfterSaveHooks() map[string][]func(ctx context.Context, data *gjson.Json) error

func GetAfterSaveHooksByCollectionName

func GetAfterSaveHooksByCollectionName(collectionName string) []func(ctx context.Context, data *gjson.Json) error

func GetAfterUpdateHooks

func GetAfterUpdateHooks() map[string][]func(ctx context.Context, data *gjson.Json) error

func GetAfterUpdateHooksByCollectionName

func GetAfterUpdateHooksByCollectionName(collectionName string) []func(ctx context.Context, data *gjson.Json) error

func GetBeforeDeleteHooks

func GetBeforeDeleteHooks() map[string][]func(ctx context.Context, data *gjson.Json) error

func GetBeforeDeleteHooksByCollectionName

func GetBeforeDeleteHooksByCollectionName(collectionName string) []func(ctx context.Context, data *gjson.Json) error

func GetBeforeInsertHooks

func GetBeforeInsertHooks() map[string][]func(ctx context.Context, data *gjson.Json) error

func GetBeforeInsertHooksByCollectionName

func GetBeforeInsertHooksByCollectionName(collectionName string) []func(ctx context.Context, data *gjson.Json) error

func GetBeforeSaveHooks

func GetBeforeSaveHooks() map[string][]func(ctx context.Context, data *gjson.Json) error

func GetBeforeSaveHooksByCollectionName

func GetBeforeSaveHooksByCollectionName(collectionName string) []func(ctx context.Context, data *gjson.Json) error

func GetBeforeUpdateHooks

func GetBeforeUpdateHooks() map[string][]func(ctx context.Context, data *gjson.Json) error

func GetBeforeUpdateHooksByCollectionName

func GetBeforeUpdateHooksByCollectionName(collectionName string) []func(ctx context.Context, data *gjson.Json) error

func GetPermission

func GetPermission(collectionName string) *dto.Permission

GetPermission 从内存中获取某个Collection的权限

func GetSchema

func GetSchema(collectionName string) *dto.Schema

GetSchema : 从内存中获取某个Collection的Schema

func LoadPermissions

func LoadPermissions()

LoadPermissions 将所有 权限 加载到内存

func LoadSchemas

func LoadSchemas()

LoadSchemas 加载全部Collection的Schema

func RegisterAfterDeleteHooks

func RegisterAfterDeleteHooks(collectionName string, hook ...func(ctx context.Context, data *gjson.Json) error)

func RegisterAfterFindHooks

func RegisterAfterFindHooks(collectionName string, hook ...func(ctx context.Context, data *gjson.Json) error)

func RegisterAfterInsertHooks

func RegisterAfterInsertHooks(collectionName string, hook ...func(ctx context.Context, data *gjson.Json) error)

func RegisterAfterSaveHooks

func RegisterAfterSaveHooks(collectionName string, hook ...func(ctx context.Context, data *gjson.Json) error)

func RegisterAfterUpdateHooks

func RegisterAfterUpdateHooks(collectionName string, hook ...func(ctx context.Context, data *gjson.Json) error)

func RegisterBeforeDeleteHooks

func RegisterBeforeDeleteHooks(collectionName string, hook ...func(ctx context.Context, data *gjson.Json) error)

func RegisterBeforeInsertHooks

func RegisterBeforeInsertHooks(collectionName string, hook ...func(ctx context.Context, data *gjson.Json) error)

func RegisterBeforeSaveHooks

func RegisterBeforeSaveHooks(collectionName string, hook ...func(ctx context.Context, data *gjson.Json) error)

func RegisterBeforeUpdateHooks

func RegisterBeforeUpdateHooks(collectionName string, hook ...func(ctx context.Context, data *gjson.Json) error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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