1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 12:45:21 +01:00

Ignore encryption selection options for binary store (and warn when they are used).

Signed-off-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Felix Fontein
2025-08-30 11:04:09 +02:00
parent 8117a49639
commit ffc1e265bb
6 changed files with 82 additions and 6 deletions

View File

@@ -22,12 +22,29 @@ func NewStore(c *config.JSONStoreConfig) *Store {
return &Store{config: *c}
}
func (store *Store) IsSingleValueStore() bool {
return false
}
func (store *Store) Name() string {
return "json"
}
// BinaryStore handles storage of binary data in a JSON envelope.
type BinaryStore struct {
store Store
config config.JSONBinaryStoreConfig
}
// The binary store uses a single key ("data") to store everything.
func (store *BinaryStore) IsSingleValueStore() bool {
return true
}
func (store *BinaryStore) Name() string {
return "binary"
}
func NewBinaryStore(c *config.JSONBinaryStoreConfig) *BinaryStore {
return &BinaryStore{config: *c, store: *NewStore(&config.JSONStoreConfig{
Indent: c.Indent,