validators

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LuaValidator

type LuaValidator struct {
	// contains filtered or unexported fields
}

func NewLuaValidator

func NewLuaValidator(opts Opts) (*LuaValidator, error)

func (*LuaValidator) GetAvailablePluginNames

func (v *LuaValidator) GetAvailablePluginNames(ctx context.Context) []string

GetAvailablePluginNames implements the Validator.GetAvailablePluginNames interface.

func (*LuaValidator) GetRawLuaSchema

func (v *LuaValidator) GetRawLuaSchema(ctx context.Context, name string) ([]byte, error)

GetRawLuaSchema implements the Validator.GetRawLuaSchema interface.

func (*LuaValidator) LoadPatch

func (v *LuaValidator) LoadPatch(pgkName string) error

func (*LuaValidator) LoadSchemasFromEmbed

func (v *LuaValidator) LoadSchemasFromEmbed(fs embed.FS, dirName string) error

func (*LuaValidator) ProcessDefaults

func (v *LuaValidator) ProcessDefaults(ctx context.Context, plugin *grpcModel.Plugin) error

ProcessDefaults implements the Validator.ProcessDefaults interface.

func (*LuaValidator) SetStoreLoader

func (v *LuaValidator) SetStoreLoader(storeLoader util.StoreLoader)

func (*LuaValidator) Validate

func (v *LuaValidator) Validate(ctx context.Context, plugin *grpcModel.Plugin) error

Validate implements the Validator.Validate interface.

func (*LuaValidator) ValidateSchema

func (v *LuaValidator) ValidateSchema(ctx context.Context, pluginSchema string) (string, error)

type Opts

type Opts struct {
	Logger      *zap.Logger
	InjectFS    *embed.FS
	StoreLoader util.StoreLoader
}

Jump to

Keyboard shortcuts

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