pkg/k8sutil: Add Kind() and Raw() methods to get manifest's fields
So after using LoadManifests, user can traverse over created manifests
and check their kind and get them in the raw format.
In the future we should consider making those fields exported in the
struct to simplify the code.
@@ -116,6 +116,14 @@ func (m manifest) String() string {
return fmt.Sprintf("%s %s %s/%s", m.filepath, m.kind, m.namespace, m.name)
}
+func (m manifest) Kind() string {
+ return m.kind
+}
+
+func (m manifest) Raw() []byte {
+ return m.raw
+}
+
type creater struct {
client *rest.RESTClient
