Define secret store interface
Signed-off-by: Hasan Turken <turkenh@gmail.com>
This commit is contained in:
parent
4b082d3585
commit
300dc3127f
|
|
@ -0,0 +1,35 @@
|
|||
package secret
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
|
||||
)
|
||||
|
||||
type KeyValues map[string][]byte
|
||||
type Instance struct {
|
||||
Name string
|
||||
Scope string
|
||||
Owner metav1.OwnerReference
|
||||
Metadata v1.ConnectionSecretMetadata
|
||||
}
|
||||
|
||||
type KeyValuesReader interface {
|
||||
ReadKeyValues(ctx context.Context, i Instance) (KeyValues, error)
|
||||
}
|
||||
|
||||
type KeyValuesWriter interface {
|
||||
WriteKeyValues(ctx context.Context, i Instance, kv KeyValues) error
|
||||
}
|
||||
|
||||
type KeyValuesDeleter interface {
|
||||
DeleteKeyValues(ctx context.Context, i Instance, kv KeyValues) error
|
||||
}
|
||||
|
||||
type Store interface {
|
||||
KeyValuesReader
|
||||
KeyValuesWriter
|
||||
KeyValuesDeleter
|
||||
}
|
||||
Loading…
Reference in New Issue