Documentation ¶
Index ¶
- func Disabled(msg pgs.Message) (disabled bool, err error)
- func Has(msg proto.Message, fld string) bool
- func Needs(m pgs.Message, wk WellKnown) bool
- func RegisterFunctions(tpl *template.Template)
- func Render(tpl *template.Template) func(ctx RuleContext) (string, error)
- func RequiredOneOf(oo pgs.OneOf) (required bool, err error)
- type RuleContext
- type WellKnown
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFunctions ¶
func RequiredOneOf ¶
RequiredOneOf returns true if the oneof field requires a field to be set
Types ¶
type RuleContext ¶
type RuleContext struct { Field pgs.Field Rules proto.Message Typ string WrapperTyp string OnKey bool Index string AccessorOverride string }
func (RuleContext) Elem ¶
func (ctx RuleContext) Elem(name, idx string) (out RuleContext, err error)
func (RuleContext) Key ¶
func (ctx RuleContext) Key(name, idx string) (out RuleContext, err error)
func (RuleContext) Unwrap ¶
func (ctx RuleContext) Unwrap(name string) (out RuleContext, err error)
Click to show internal directories.
Click to hide internal directories.