Add originalName field to resource.

This commit is contained in:
Jeffrey Regan
2019-06-12 14:48:17 -07:00
parent 4bb4a85037
commit 5e054c9d31
11 changed files with 465 additions and 425 deletions

View File

@@ -38,6 +38,12 @@ type ResId struct {
Suffix string `json:"suffix,omitempty"`
}
// NewResIdWithNamespace creates new resource identifier
// in a given namespace.
func NewResIdWithNamespace(k gvk.Gvk, n, ns string) ResId {
return ResId{ItemId: ItemId{Gvk: k, Name: n, Namespace: ns}}
}
// NewResIdWithPrefixSuffixNamespace creates new resource identifier with a prefix, suffix and a namespace
func NewResIdWithPrefixSuffixNamespace(k gvk.Gvk, n, p, s, ns string) ResId {
return ResId{ItemId: ItemId{Gvk: k, Name: n, Namespace: ns}, Prefix: p, Suffix: s}