Documentation
¶
Overview ¶
Package pkgfile contains functions for working with KptFile instances.
Index ¶
Constants ¶
View Source
const KptFileName = "Kptfile"
KptFileName is the name of the KptFile
Variables ¶
View Source
var TypeMeta = yaml.ResourceMeta{ Kind: KptFileName, APIVersion: "kpt.dev/v1alpha1", }
TypeMeta is the TypeMeta for KptFile instances.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Git ¶
type Git struct {
// Commit is the git commit that the package was fetched at
Commit string `yaml:"commit,omitempty"`
// Repo is the git repository the package was cloned from. e.g. https://
Repo string `yaml:"repo,omitempty"`
// RepoDirectory is the sub directory of the git repository that the package was cloned from
Directory string `yaml:"directory,omitempty"`
// Ref is the git ref the package was cloned from
Ref string `yaml:"ref,omitempty"`
}
Git contains information on the origin of packages cloned from a git repository.
type KptFile ¶
type KptFile struct {
yaml.ResourceMeta `yaml:",inline"`
// CloneFrom records where the package was originally cloned from
Upstream Upstream `yaml:"upstream,omitempty"`
// PackageMeta contains information about the package
PackageMeta PackageMeta `yaml:"packageMetadata,omitempty"`
Dependencies []Dependency `yaml:"dependencies,omitempty"`
// OpenAPI contains additional schema for the resources in this package
// Uses interface{} instead of Node to work around yaml serialization issues
// See https://github.com/go-yaml/yaml/issues/518 and
// https://github.com/go-yaml/yaml/issues/575
OpenAPI interface{} `yaml:"openAPI,omitempty"`
}
KptFile contains information about a package managed with kpt
func (*KptFile) MergeOpenAPI ¶
MergeOpenAPI adds the OpenAPI definitions from file to k. This function is very complex due to serialization issues with yaml.Node.
type OriginType ¶
type OriginType string
OriginType defines the type of origin for a package
const ( // GitOrigin specifies a package as having been cloned from a git repository GitOrigin OriginType = "git" StdinOrigin OriginType = "stdin" )
type PackageMeta ¶
type PackageMeta struct {
// URL is the location of the package. e.g. https://github.com/example/com
URL string `yaml:"url,omitempty"`
// Email is the email of the package maintainer
Email string `yaml:"email,omitempty"`
// License is the package license
License string `yaml:"license,omitempty"`
// Version is the package version
Version string `yaml:"version,omitempty"`
// Tags can be indexed and are metadata about the package
Tags []string `yaml:"tags,omitempty"`
// Man is the path to documentation about the package
Man string `yaml:"man,omitempty"`
// ShortDescription contains a short description of the package.
ShortDescription string `yaml:"shortDescription,omitempty"`
}
type Upstream ¶
type Upstream struct {
// Type is the type of origin.
Type OriginType `yaml:"type,omitempty"`
// Git contains information on the origin of packages cloned from a git repository.
Git Git `yaml:"git,omitempty"`
Stdin Stdin `yaml:"stdin,omitempty"`
}
Upstream defines where a package was cloned from
Click to show internal directories.
Click to hide internal directories.