Documentation ¶
Index ¶
- Constants
- Variables
- func K8sFileExtensions() []string
- type K8sV1
- func (k *K8sV1) LoadIacDir(absRootDir string, options map[string]interface{}) (output.AllResourceConfigs, error)
- func (k *K8sV1) LoadIacFile(absFilePath string, options map[string]interface{}) (allResourcesConfig output.AllResourceConfigs, err error)
- func (*K8sV1) Name() string
- func (k *K8sV1) Normalize(doc *utils.IacDocument) (*output.ResourceConfig, error)
Constants ¶
View Source
const ( // YAMLExtension yaml YAMLExtension = "yaml" // YAMLExtension2 yml YAMLExtension2 = "yml" // JSONExtension json JSONExtension = "json" // UnknownExtension unknown UnknownExtension = "unknown" )
Variables ¶
View Source
var ( // ErrNoKind is returned when the "kind" key is not available (not a valid kubernetes resource) ErrNoKind = fmt.Errorf("kind does not exist") )
Functions ¶
func K8sFileExtensions ¶
func K8sFileExtensions() []string
K8sFileExtensions returns the valid extensions for k8s (yaml, yml, json)
Types ¶
type K8sV1 ¶
type K8sV1 struct {
// contains filtered or unexported fields
}
K8sV1 struct implements the IacProvider interface
func (*K8sV1) LoadIacDir ¶
func (k *K8sV1) LoadIacDir(absRootDir string, options map[string]interface{}) (output.AllResourceConfigs, error)
LoadIacDir loads all k8s files in the current directory
func (*K8sV1) LoadIacFile ¶
func (k *K8sV1) LoadIacFile(absFilePath string, options map[string]interface{}) (allResourcesConfig output.AllResourceConfigs, err error)
LoadIacFile loads the k8s file specified Note that a single k8s yaml file may contain multiple resource definitions
func (*K8sV1) Normalize ¶
func (k *K8sV1) Normalize(doc *utils.IacDocument) (*output.ResourceConfig, error)
Normalize takes the input document and normalizes it
Click to show internal directories.
Click to hide internal directories.