Documentation ¶
Index ¶
- func DefaultNameSystem() string
- func GetGroup(t *types.Type) string
- func GetGroupPackage(t *types.Type) string
- func GetKind(t *types.Type, group string) string
- func GetVersion(t *types.Type, group string) string
- func HasDocAnnotation(t *types.Type) bool
- func HasSubresource(t *types.Type) bool
- func IsAPIResource(t *types.Type) bool
- func IsAPISubresource(t *types.Type) bool
- func IsApisDir(dir string) bool
- func IsController(t *types.Type) bool
- func IsInformer(t *types.Type) bool
- func IsNonNamespaced(t *types.Type) bool
- func IsRBAC(t *types.Type) bool
- func IsUnversioned(t *types.Type, group string) bool
- func IsVersioned(t *types.Type, group string) bool
- func NameSystems() namer.NameSystems
- func NewContext(p *parser.Builder) (*generator.Context, error)
- type APIs
- type Comments
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultNameSystem ¶
func DefaultNameSystem() string
DefaultNameSystem returns public by default.
func GetGroupPackage ¶
GetGroupPackage returns group package of t.
func GetVersion ¶
GetVersion returns version of t.
func HasDocAnnotation ¶
HasDocAnnotation returns true if t is an APIResource with doc annotation +kubebuilder:doc
func HasSubresource ¶
HasSubresource returns true if t is an APIResource with one or more Subresources
func IsAPIResource ¶
IsAPIResource returns true if: 1. t has a +resource/+kubebuilder:resource comment tag 2. t has TypeMeta and ObjectMeta in its member list.
func IsAPISubresource ¶
IsAPISubresource returns true if t has a +subresource-request comment tag
func IsController ¶
IsController returns true if t has a +controller or +kubebuilder:controller tag
func IsInformer ¶
IsInformer returns true if t has a +informers or +kubebuilder:informers tag
func IsNonNamespaced ¶
IsNonNamespaced returns true if t has a +nonNamespaced comment tag
func IsUnversioned ¶
IsUnversioned returns true if t is in given group, and not in versioned path.
func IsVersioned ¶
IsVersioned returns true if t is in given group, and in versioned path.
func NameSystems ¶
func NameSystems() namer.NameSystems
NameSystems returns the name system used by the generators in this package. e.g. black-magic
Types ¶
type APIs ¶
type APIs struct { Domain string VersionedPkgs sets.String UnversionedPkgs sets.String APIsPkg string APIsPkgRaw *types.Package GroupNames sets.String APIs *codegen.APIs Controllers []codegen.Controller ByGroupKindVersion map[string]map[string]map[string]*codegen.APIResource ByGroupVersionKind map[string]map[string]map[string]*codegen.APIResource SubByGroupVersionKind map[string]map[string]map[string]*types.Type Groups map[string]types.Package Rules []rbacv1.PolicyRule Informers map[v1.GroupVersionKind]bool // contains filtered or unexported fields }
APIs is the information of a collection of API