Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a builder for schema.
func (*Builder) Add ¶
func (b *Builder) Add(spec ...ResourceSpec) *Builder
Add a new ResourceSpec to the schema.
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance represents a schema for a set of known Kubernetes resource types.
func New ¶
func New(spec ...ResourceSpec) *Instance
New is a simplified Instance factory method when all specs can be provided as arguments.
func (*Instance) All ¶
func (s *Instance) All() []ResourceSpec
All returns information about all known types.
func (*Instance) Get ¶
func (s *Instance) Get(kind string) *ResourceSpec
Get returns the schema for the given kind, or nil if not found.
type ResourceSpec ¶
type ResourceSpec struct { // Singular name of the K8s resource Singular string // Plural name of the K8s resource Plural string // Group name of the K8s resource Group string // Version of the K8s resource Version string // Kind of the K8s resource Kind string // ListKind of the K8s resource ListKind string // Target resource type of the resource Target resource.Info // The converter to use Converter converter.Fn }
ResourceSpec represents a known crd. It is used to drive the K8s-related machinery, and to map to the proto format.
func (*ResourceSpec) APIResource ¶
func (i *ResourceSpec) APIResource() *metaV1.APIResource
APIResource generated from this type.
func (*ResourceSpec) CanonicalResourceName ¶
func (i *ResourceSpec) CanonicalResourceName() string
CanonicalResourceName of the resource.
func (*ResourceSpec) GroupVersion ¶
func (i *ResourceSpec) GroupVersion() sc.GroupVersion
GroupVersion returns the GroupVersion of this type.
Click to show internal directories.
Click to hide internal directories.