Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultNameSystem ¶
func DefaultNameSystem() string
DefaultNameSystem returns the default name system for ordering the types to be processed by the generators in this package.
func NameSystems ¶
func NameSystems() namer.NameSystems
NameSystems returns the name system used by the generators in this package.
func ParseCommentTags ¶
Parses the given comments into a CommentTags type. Validates the parsed comment tags, and returns the result. Accepts an optional type to validate against, and a prefix to filter out markers not related to validation. Accepts a prefix to filter out markers not related to validation. Returns any errors encountered while parsing or validating the comment tags.
Types ¶
type APIRule ¶
type APIRule interface { // Validate evaluates API rule on type t and returns a list of field names in // the type that violate the rule. Empty field name [""] implies the entire // type violates the rule. Validate(t *types.Type) ([]string, error) // Name returns the name of APIRule Name() string }
APIRule is the interface for validating API rule on Go types
type CELTag ¶
type CELTag struct { Rule string `json:"rule,omitempty"` Message string `json:"message,omitempty"` MessageExpression string `json:"messageExpression,omitempty"` OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` Reason string `json:"reason,omitempty"` FieldPath string `json:"fieldPath,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.