Move hashing transformer out of k8sdeps.

This commit is contained in:
Jeffrey Regan
2019-05-29 10:01:52 -07:00
parent 4812ddff9f
commit fd2248e7c2
14 changed files with 205 additions and 201 deletions

View File

@@ -58,6 +58,7 @@ type Kunstructured interface {
type KunstructuredFactory interface {
SliceFromBytes([]byte) ([]Kunstructured, error)
FromMap(m map[string]interface{}) Kunstructured
Hasher() KunstructuredHasher
MakeConfigMap(
ldr Loader,
options *types.GeneratorOptions,
@@ -68,5 +69,11 @@ type KunstructuredFactory interface {
args *types.SecretArgs) (Kunstructured, error)
}
// KunstructuredHasher returns a hash of the argument
// or an error.
type KunstructuredHasher interface {
Hash(Kunstructured) (string, error)
}
// See core.v1.SecretTypeOpaque
const SecretTypeOpaque = "Opaque"