validator

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const PluginName = "thrift-gen-kitex"

PluginName is the link name when the kitex binary is used as a plugin for thriftgo.

View Source
const TheUseOptionMessage = "kitex_gen is not generated due to the -use option"

TheUseOptionMessage indicates that the generating of kitex_gen is aborted due to the -use option.

Variables

View Source
var FieldValidate = `` /* 299-byte string literal not displayed */

FieldValidate .

View Source
var FieldValidateBase = `` /* 647-byte string literal not displayed */

FieldValidateBase .

View Source
var FieldValidateContainer = `` /* 445-byte string literal not displayed */

FieldValidateContainer .

View Source
var FieldValidateList = `` /* 330-byte string literal not displayed */

FieldValidateList .

View Source
var FieldValidateMap = `` /* 325-byte string literal not displayed */

FieldValidateMap .

View Source
var FieldValidateSet = `` /* 328-byte string literal not displayed */

FieldValidateSet .

View Source
var FieldValidateStructLike = `` /* 294-byte string literal not displayed */

FieldValidateStructLike .

View Source
var StructLikeValidate = `` /* 290-byte string literal not displayed */

StructLikeValidate .

View Source
var Version string

Functions

func Run

func Run(req *plugin.Request, cfg *config.Config) int

Run is an entry of the plugin mode of kitex for thriftgo. It reads a plugin request from the standard input and writes out a response.

Types

type ValidateContext

type ValidateContext struct {
	AST          *tp.Thrift
	FieldName    string
	RawFieldName string
	Resolver     *golang.Resolver
	StructLike   *golang.StructLike
	*golang.ReadWriteContext
	*parser.Validation
	IsOptional bool
	// contains filtered or unexported fields
}

func (*ValidateContext) GenID

func (v *ValidateContext) GenID(prefix string) (name string)

Jump to

Keyboard shortcuts

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