validation

package
v0.3.18 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HELLO = "hello there"
)

Variables

View Source
var (
	STRUCT_OPTION_PERSON_STRING_INFO               = thrift_option.NewStructOption("../option_idl/annotations/validation/validation.thrift", "person_string_info")
	STRUCT_OPTION_PERSON_MAP_INFO                  = thrift_option.NewStructOption("../option_idl/annotations/validation/validation.thrift", "person_map_info")
	STRUCT_OPTION_PERSON_ENUM_INFO                 = thrift_option.NewStructOption("../option_idl/annotations/validation/validation.thrift", "person_enum_info")
	STRUCT_OPTION_PERSON_BASIC_TYPEDEF_INFO        = thrift_option.NewStructOption("../option_idl/annotations/validation/validation.thrift", "person_basic_typedef_info")
	STRUCT_OPTION_PERSON_STRUCT_TYPEDEF_INFO       = thrift_option.NewStructOption("../option_idl/annotations/validation/validation.thrift", "person_struct_typedef_info")
	STRUCT_OPTION_PERSON_STRUCT_DEFAULT_VALUE_INFO = thrift_option.NewStructOption("../option_idl/annotations/validation/validation.thrift", "person_struct_default_value_info")
	FIELD_OPTION_CARD_FIELD_INFO                   = thrift_option.NewFieldOption("../option_idl/annotations/validation/validation.thrift", "card_field_info")
	SERVICE_OPTION_SVC_INFO                        = thrift_option.NewServiceOption("../option_idl/annotations/validation/validation.thrift", "svc_info")
	METHOD_OPTION_METHOD_INFO                      = thrift_option.NewMethodOption("../option_idl/annotations/validation/validation.thrift", "method_info")
	ENUM_OPTION_ENUM_INFO                          = thrift_option.NewEnumOption("../option_idl/annotations/validation/validation.thrift", "enum_info")
	ENUM_VALUE_OPTION_ENUM_VALUE_INFO              = thrift_option.NewEnumValueOption("../option_idl/annotations/validation/validation.thrift", "enum_value_info")
)

Functions

func GetFileDescriptorForValidation

func GetFileDescriptorForValidation() *thrift_reflection.FileDescriptor

func New_EnumOptions

func New_EnumOptions() *_EnumOptions

func New_EnumValueOptions

func New_EnumValueOptions() *_EnumValueOptions

func New_FieldOptions

func New_FieldOptions() *_FieldOptions

func New_MethodOptions

func New_MethodOptions() *_MethodOptions

func New_ServiceOptions

func New_ServiceOptions() *_ServiceOptions

func New_StructOptions

func New_StructOptions() *_StructOptions

Types

type MyBasicTypedef

type MyBasicTypedef = string

type MyEnum

type MyEnum int64
const (
	MyEnum_X   MyEnum = 0
	MyEnum_XL  MyEnum = 1
	MyEnum_XXL MyEnum = 2
)

func MyEnumFromString

func MyEnumFromString(s string) (MyEnum, error)

func MyEnumPtr

func MyEnumPtr(v MyEnum) *MyEnum

func (MyEnum) GetDescriptor

func (p MyEnum) GetDescriptor() *thrift_reflection.EnumDescriptor

func (*MyEnum) GetTypeDescriptor

func (p *MyEnum) GetTypeDescriptor() *thrift_reflection.TypeDescriptor

func (*MyEnum) Scan

func (p *MyEnum) Scan(value interface{}) (err error)

func (MyEnum) String

func (p MyEnum) String() string

func (*MyEnum) Value

func (p *MyEnum) Value() (driver.Value, error)

type MyStructTypedef

type MyStructTypedef = TestInfo

func NewMyStructTypedef

func NewMyStructTypedef() *MyStructTypedef

type MyStructWithDefaultVal

type MyStructWithDefaultVal struct {
	V1  string            `thrift:"v1,1,required" json:"v1"`
	V2  string            `thrift:"v2,2,required" json:"v2"`
	V3  int8              `thrift:"v3,3,required" json:"v3"`
	V4  int16             `thrift:"v4,4,required" json:"v4"`
	V5  int32             `thrift:"v5,5,required" json:"v5"`
	V6  int64             `thrift:"v6,6,required" json:"v6"`
	V7  bool              `thrift:"v7,7,required" json:"v7"`
	V8  float64           `thrift:"v8,8,required" json:"v8"`
	V9  map[string]string `thrift:"v9,9,required" json:"v9"`
	V10 []string          `thrift:"v10,10,required" json:"v10"`
	V11 string            `thrift:"v11,11,required" json:"v11"`
}

func NewMyStructWithDefaultVal

func NewMyStructWithDefaultVal() *MyStructWithDefaultVal

func (*MyStructWithDefaultVal) GetDescriptor

func (*MyStructWithDefaultVal) GetTypeDescriptor

func (*MyStructWithDefaultVal) GetV1

func (p *MyStructWithDefaultVal) GetV1() (v string)

func (*MyStructWithDefaultVal) GetV10

func (p *MyStructWithDefaultVal) GetV10() (v []string)

func (*MyStructWithDefaultVal) GetV11

func (p *MyStructWithDefaultVal) GetV11() (v string)

func (*MyStructWithDefaultVal) GetV2

func (p *MyStructWithDefaultVal) GetV2() (v string)

func (*MyStructWithDefaultVal) GetV3

func (p *MyStructWithDefaultVal) GetV3() (v int8)

func (*MyStructWithDefaultVal) GetV4

func (p *MyStructWithDefaultVal) GetV4() (v int16)

func (*MyStructWithDefaultVal) GetV5

func (p *MyStructWithDefaultVal) GetV5() (v int32)

func (*MyStructWithDefaultVal) GetV6

func (p *MyStructWithDefaultVal) GetV6() (v int64)

func (*MyStructWithDefaultVal) GetV7

func (p *MyStructWithDefaultVal) GetV7() (v bool)

func (*MyStructWithDefaultVal) GetV8

func (p *MyStructWithDefaultVal) GetV8() (v float64)

func (*MyStructWithDefaultVal) GetV9

func (p *MyStructWithDefaultVal) GetV9() (v map[string]string)

func (*MyStructWithDefaultVal) InitDefault

func (p *MyStructWithDefaultVal) InitDefault()

func (*MyStructWithDefaultVal) String

func (p *MyStructWithDefaultVal) String() string

type TestInfo

type TestInfo struct {
	Name   string `thrift:"name,1,required" json:"name"`
	Number int16  `thrift:"number,2,required" json:"number"`
}

func NewTestInfo

func NewTestInfo() *TestInfo

func (*TestInfo) GetDescriptor

func (p *TestInfo) GetDescriptor() *thrift_reflection.StructDescriptor

func (*TestInfo) GetName

func (p *TestInfo) GetName() (v string)

func (*TestInfo) GetNumber

func (p *TestInfo) GetNumber() (v int16)

func (*TestInfo) GetTypeDescriptor

func (p *TestInfo) GetTypeDescriptor() *thrift_reflection.TypeDescriptor

func (*TestInfo) InitDefault

func (p *TestInfo) InitDefault()

func (*TestInfo) String

func (p *TestInfo) String() string

Jump to

Keyboard shortcuts

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