{"modulePath":"github.com/110y/controller-tools","version":"v0.1.12","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parse\n\n## Functions\n\n```go\nfunc DefaultNameSystem() string\n```\nDefaultNameSystem returns public by default.\n\n```go\nfunc GetGroup(t *types.Type) string\n```\nGetGroup returns group of t.\n\n```go\nfunc GetGroupPackage(t *types.Type) string\n```\nGetGroupPackage returns group package of t.\n\n```go\nfunc GetKind(t *types.Type, group string) string\n```\nGetKind returns kind of t.\n\n```go\nfunc GetVersion(t *types.Type, group string) string\n```\nGetVersion returns version of t.\n\n```go\nfunc HasDocAnnotation(t *types.Type) bool\n```\nHasDocAnnotation returns true if t is an APIResource with doc annotation +kubebuilder:doc\n\n```go\nfunc HasSubresource(t *types.Type) bool\n```\nHasSubresource returns true if t is an APIResource with one or more Subresources\n\n```go\nfunc IsAPIResource(t *types.Type) bool\n```\nIsAPIResource returns true if either of the two conditions become true: 1. t has a +resource/+kubebuilder:resource comment tag 2. t has TypeMeta and ObjectMeta in its member list.\n\n```go\nfunc IsAPISubresource(t *types.Type) bool\n```\nIsAPISubresource returns true if t has a +subresource-request comment tag\n\n```go\nfunc IsApisDir(dir string) bool\n```\nIsApisDir returns true if a directory path is a Kubernetes api directory\n\n```go\nfunc IsController(t *types.Type) bool\n```\nIsController returns true if t has a +controller or +kubebuilder:controller tag\n\n```go\nfunc IsInformer(t *types.Type) bool\n```\nIsInformer returns true if t has a +informers or +kubebuilder:informers tag\n\n```go\nfunc IsNonNamespaced(t *types.Type) bool\n```\nIsNonNamespaced returns true if t has a +nonNamespaced comment tag\n\n```go\nfunc IsRBAC(t *types.Type) bool\n```\nIsRBAC returns true if t has a +rbac or +kubebuilder:rbac tag\n\n```go\nfunc IsUnversioned(t *types.Type, group string) bool\n```\nIsUnversioned returns true if t is in given group, and not in versioned path.\n\n```go\nfunc IsVersioned(t *types.Type, group string) bool\n```\nIsVersioned returns true if t is in given group, and in versioned path.\n\n```go\nfunc NameSystems() namer.NameSystems\n```\nNameSystems returns the name system used by the generators in this package. e.g. black-magic\n\n```go\nfunc NewContext(p *parser.Builder) (*generator.Context, error)\n```\nNewContext returns a new Context from the builder\n\n## Types\n\n```go\ntype APIs struct {\n\tDomain          string\n\tVersionedPkgs   sets.String\n\tUnversionedPkgs sets.String\n\tAPIsPkg         string\n\tAPIsPkgRaw      *types.Package\n\tGroupNames      sets.String\n\n\tAPIs        *codegen.APIs\n\tControllers []codegen.Controller\n\n\tByGroupKindVersion    map[string]map[string]map[string]*codegen.APIResource\n\tByGroupVersionKind    map[string]map[string]map[string]*codegen.APIResource\n\tSubByGroupVersionKind map[string]map[string]map[string]*types.Type\n\tGroups                map[string]types.Package\n\tRules                 []rbacv1.PolicyRule\n\tInformers             map[v1.GroupVersionKind]bool\n\t// contains filtered or unexported fields\n}\n```\nAPIs is the information of a collection of API\n\n```go\nfunc NewAPIs(context *generator.Context, arguments *args.GeneratorArgs, domain, apisPkg string) *APIs\n```\nNewAPIs returns a new APIs instance with given context.\n\n```go\ntype Comments []string\n```\nComments is a structure for using comment tags on go structs and fields\n\n```go\ntype Options struct {\n\tSkipMapValidation bool\n\n\t// SkipRBACValidation flag determines whether to check RBAC annotations\n\t// for the controller or not at parse stage.\n\tSkipRBACValidation bool\n}\n```\nOptions contains the parser options\n\n","path":"github.com/110y/controller-tools/pkg/internal/codegen/parse","name":"parse","synopsis":"","isRedistributable":true}
