Documentation
¶
Index ¶
- func FromFiles(ctx context.Context, paths []string, ignoreFilePatterns []string) (<-chan Resource, <-chan error)
- func FromStream(ctx context.Context, path string, r io.Reader) (<-chan Resource, <-chan error)
- func SplitYAMLDocument(data []byte, atEOF bool) (advance int, token []byte, err error)
- type DiscoveryError
- type Resource
- type Signature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromStream ¶ added in v0.3.0
FromStream reads resources from a byte stream, usually here stdin
func SplitYAMLDocument ¶ added in v0.3.0
SplitYAMLDocument is a bufio.SplitFunc for splitting a YAML document into individual documents.
This is from Kubernetes' 'pkg/util/yaml'.splitYAMLDocument, which is unfortunately not exported.
Types ¶
type DiscoveryError ¶ added in v0.3.0
func (DiscoveryError) Error ¶ added in v0.3.0
func (de DiscoveryError) Error() string
type Resource ¶ added in v0.3.0
Resource represents a Kubernetes resource within a file
func (*Resource) Resources ¶ added in v0.4.8
Resources returns a list of resources if the resource is of type List, a single resource otherwise See https://github.com/yannh/kubeconform/issues/53
type Signature ¶
type Signature struct {
Kind, Version, Namespace, Name string
}
Signature is a key representing a Kubernetes resource
func (*Signature) GroupVersionKind ¶ added in v0.5.0
GroupVersionKind returns a string with the GVK encoding of a resource signature. This encoding slightly differs from the Kubernetes upstream implementation in order to be suitable for being used in the kubeconform command-line arguments.
func (*Signature) QualifiedName ¶ added in v0.4.13
QualifiedName returns a string for a signature in the format version/kind/namespace/name