Documentation
¶
Index ¶
Constants ¶
const ( ListMetaID = "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" ObjectMetaID = "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" )
Short handles for longer types
Variables ¶
This section is empty.
Functions ¶
func CamelLower ¶
CamelLower returns the string with the word lowercased.
Types ¶
type Constructor ¶
type Constructor struct {
Help string `json:"help"`
// Args are the arguments this constructor takes.
// Generated constructors only have one argument, `name`
Args []Parameter `json:"args"`
}
Constructor creates new objects
type Kind ¶
type Kind struct {
Help string `json:"help"`
Kind string `json:"kind"`
Group string `json:"group"`
Version string `json:"version"`
// constructor
New *Constructor `json:"new"`
// modifiers
Modifiers modifiers `json:"modifiers,omitempty"`
// Cluster or Namespaced scope, ignored if unset
Scope *string
}
Kind represents both actual Kinds ("Deployment", "Version"), but also other parts of the API, like "Container" or "ServicePort".
func (Kind) APIVersion ¶
APIVersion constructs the full api path for a group
type Modifier ¶
type Modifier struct {
Help string `json:"help"`
// Arg is the name of the functions argument
Arg Parameter `json:"arg"`
// Target is the jsonpath to the field that is modified
Target string `json:"target"`
// Type is the type of the modified value
Type swagger.Type `json:"type"`
}
Modifier is a function that returns a patch to modify the value at `Target`
type Object ¶
type Object struct {
Help string `json:"help"`
Fields modifiers `json:"fields"`
}
Object is the logical group for Modifiers that target fields of a nested object
type Parameter ¶
type Parameter struct {
Key string `json:"key"`
Default interface{} `json:"default"`
}
Parameter is a function argument, with an optional default value
type Version ¶
Version represents a specific version of the API, like "apps/v1" or "core/v1"
func (Version) MarshalJSON ¶
MarshalJSON marsals wraps json.Marshal and adds the `_apiVersion` field
func (*Version) UnmarshalJSON ¶
UnmarshalJSON wraps json.Unmarshal and decodes the "private" `_apiVersion` field