plugins

package
v0.0.0-...-62aa942 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CallBackMark = "@CallBack"
View Source
const Casbin string = "Casbin"

Variables

View Source
var FindPluginInterfaceMap = make(map[string]*types.Interface)

Functions

func CheckHasInterface

func CheckHasInterface(t types.Type, interfaceNames []string) bool

func CheckMatch

func CheckMatch(match public.Match, docFields []string, inFieldType types.Type, outFieldType types.Type) bool

func CheckParamMatch

func CheckParamMatch(matchParam []string, docFields []string) bool

func RegisterCallBack

func RegisterCallBack(name string, fc func(DocFields []string, inFieldType types.Type, outFieldType types.Type) CallBackTemplate)

Types

type CallBackTemplate

type CallBackTemplate struct {
	Has      bool
	Keys     map[string]string
	Template HandlerTemplate
}

func GetCallBackTemplate

func GetCallBackTemplate(docFields []string, inFieldType types.Type, outFieldType types.Type) CallBackTemplate

func GetRedisCallBackTemplate

func GetRedisCallBackTemplate(docFields []string, inFieldType types.Type, outFieldType types.Type) CallBackTemplate

type FileMsg

type FileMsg struct {
	Name string
	Src  string
}

type HandlerTemplate

type HandlerTemplate struct {
	ImportPath string
	Template   string
}

type PointTemplate

type PointTemplate struct {
	Name      string
	Has       bool
	Keys      map[string]string
	BindBefor HandlerTemplate
	BindAfter HandlerTemplate
}

func GetCasbinPluginTemplate

func GetCasbinPluginTemplate(docFields []string, inFieldType types.Type, outFieldType types.Type) PointTemplate

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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