parse

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultNameSystem

func DefaultNameSystem() string

func GetGroup

func GetGroup(t *types.Type) string

func GetGroupPackage

func GetGroupPackage(t *types.Type) string

func GetKind

func GetKind(t *types.Type, group string) string

func GetVersion

func GetVersion(t *types.Type, group string) string

func HasCategories added in v0.1.8

func HasCategories(t *types.Type) bool

HasCategories returns true if t is an APIResource annotated with +kubebuilder:categories.

func HasDocAnnotation added in v0.1.10

func HasDocAnnotation(t *types.Type) bool

HasDocAnnotation returns true if t is an APIResource with doc annotation +kubebuilder:doc

func HasStatusSubresource added in v0.1.12

func HasStatusSubresource(t *types.Type) bool

HasStatusSubresource returns true if t is an APIResource annotated with +kubebuilder:subresource:status.

func HasSubresource

func HasSubresource(t *types.Type) bool

HasSubresource returns true if t is an APIResource with one or more Subresources

func IsAPIResource

func IsAPIResource(t *types.Type) bool

IsAPIResource returns true if t has a +resource/+kubebuilder:resource comment tag

func IsAPISubresource

func IsAPISubresource(t *types.Type) bool

IsAPISubresource returns true if t has a +subresource-request comment tag

func IsApisDir

func IsApisDir(dir string) bool

IsApisDir returns true if a directory path is a Kubernetes api directory

func IsController

func IsController(t *types.Type) bool

IsController returns true if t has a +controller or +kubebuilder:controller tag

func IsInformer

func IsInformer(t *types.Type) bool

IsInformer returns true if t has a +informers or +kubebuilder:informers tag

func IsNonNamespaced

func IsNonNamespaced(t *types.Type) bool

IsNonNamespaced returns true if t has a +nonNamespaced comment tag

func IsRBAC

func IsRBAC(t *types.Type) bool

IsRBAC returns true if t has a +rbac or +kubebuilder:rbac tag

func IsUnversioned

func IsUnversioned(t *types.Type, group string) bool

func IsVersioned

func IsVersioned(t *types.Type, group string) bool

func NameSystems

func NameSystems() namer.NameSystems

nameSystems returns the name system used by the generators in this package. e.g. black-magic

func NewContext

func NewContext(p *parser.Builder) (*generator.Context, error)

NewContext returns a new Context from the builder

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
}

func NewAPIs

func NewAPIs(context *generator.Context, arguments *args.GeneratorArgs) *APIs

type Comments

type Comments []string

Comments is a structure for using comment tags on go structs and fields

type ParseOptions added in v0.1.10

type ParseOptions struct {
	SkipMapValidation bool

	// SkipRBACValidation flag determines whether to check RBAC annotations
	// for the controller or not at parse stage.
	SkipRBACValidation bool
}

Jump to

Keyboard shortcuts

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