Documentation ¶
Index ¶
- func ResolveRules(desc protoreflect.FieldDescriptor, rules *v.FieldRules) (ruleType string, rule proto.Message, messageRule *v.MessageRules, wrapped bool)
- type FieldCtx
- func (fc *FieldCtx) Elem(def string) (elem FieldCtx, err error)
- func (fc *FieldCtx) FullName() string
- func (fc FieldCtx) GetAccessor() string
- func (fc *FieldCtx) GetTmplName() (string, error)
- func (fc *FieldCtx) ImpCtx() *ImportCtx
- func (fc *FieldCtx) MapTypeName(field *protogen.Field, desc protoreflect.FieldDescriptor, rule *v.FieldRules) *FieldCtx
- func (fc *FieldCtx) SetAccessor(def string) *FieldCtx
- func (fc *FieldCtx) Unwrap(name string) (out FieldCtx, err error)
- type ImportCtx
- type MessageCtx
- type NeedWellKnown
- type OneOfField
- type ValidateCtx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveRules ¶
func ResolveRules(desc protoreflect.FieldDescriptor, rules *v.FieldRules) (ruleType string, rule proto.Message, messageRule *v.MessageRules, wrapped bool)
Types ¶
type FieldCtx ¶
type FieldCtx struct { //MessageDesc protoreflect.MessageDescriptor Desc protoreflect.FieldDescriptor Field *protogen.Field Rules proto.Message Pkg string Name string Type string Index int OnKey string Required bool Skip bool Wrap string TmplName string Err error Accessor string ErrCode int32 }
func (FieldCtx) GetAccessor ¶
func (*FieldCtx) GetTmplName ¶
func (*FieldCtx) MapTypeName ¶
func (fc *FieldCtx) MapTypeName(field *protogen.Field, desc protoreflect.FieldDescriptor, rule *v.FieldRules) *FieldCtx
func (*FieldCtx) SetAccessor ¶
type MessageCtx ¶
type MessageCtx struct { Desc protoreflect.MessageDescriptor TypeName string Fields []*FieldCtx Required bool Disabled bool Ignored bool NonOneOfFields []*FieldCtx OptionalFields []*FieldCtx RealOneOfs map[string]*OneOfField SubMessageCtxs []*MessageCtx }
type NeedWellKnown ¶
type OneOfField ¶
type ValidateCtx ¶
type ValidateCtx struct { Imports []*ImportCtx Messages []*MessageCtx NeedWellKnow *NeedWellKnown NeedCommon bool ErrCodeBegin int32 }
Click to show internal directories.
Click to hide internal directories.