From 7d194dda4aa98a054203ff73498202444f48e201 Mon Sep 17 00:00:00 2001 From: Adrian Utrilla Date: Mon, 11 Sep 2017 13:08:21 -0700 Subject: [PATCH] Reorder store structs to match old order --- stores/stores.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/stores/stores.go b/stores/stores.go index 90cfd7871..b7571eb1f 100644 --- a/stores/stores.go +++ b/stores/stores.go @@ -20,14 +20,14 @@ type SopsFile struct { // in order to allow the binary format to stay backwards compatible over time, but at the same time allow the internal // representation SOPS uses to change over time. type Metadata struct { - LastModified string `yaml:"lastmodified" json:"lastmodified"` - UnencryptedSuffix string `yaml:"unencrypted_suffix" json:"unencrypted_suffix"` - MessageAuthenticationCode string `yaml:"mac" json:"mac"` - Version string `yaml:"version" json:"version"` ShamirQuorum int `yaml:"shamir_quorum,omitempty" json:"shamir_quorum,omitempty"` KeyGroups []keygroup `yaml:"key_groups,omitempty" json:"key_groups,omitempty"` - PGPKeys []pgpkey `yaml:"pgp,omitempty" json:"pgp,omitempty"` - KMSKeys []kmskey `yaml:"kms,omitempty" json:"kms,omitempty"` + KMSKeys []kmskey `yaml:"kms" json:"kms"` + LastModified string `yaml:"lastmodified" json:"lastmodified"` + MessageAuthenticationCode string `yaml:"mac" json:"mac"` + PGPKeys []pgpkey `yaml:"pgp" json:"pgp"` + UnencryptedSuffix string `yaml:"unencrypted_suffix" json:"unencrypted_suffix"` + Version string `yaml:"version" json:"version"` } type keygroup struct { @@ -42,11 +42,11 @@ type pgpkey struct { } type kmskey struct { + Arn string `yaml:"arn" json:"arn"` + Role string `yaml:"role,omitempty" json:"role,omitempty"` + Context map[string]*string `yaml:"context,omitempty" json:"context,omitempty"` CreatedAt string `yaml:"created_at" json:"created_at"` EncryptedDataKey string `yaml:"enc" json:"enc"` - Arn string `yaml:"arn" json:"arn"` - Role string `yaml:"role" json:"role"` - Context map[string]*string `yaml:"context" json:"context"` } func MetadataFromInternal(sopsMetadata sops.Metadata) Metadata {