diff --git a/secret.go b/secret.go new file mode 100644 index 0000000000..fcc7d9d1c5 --- /dev/null +++ b/secret.go @@ -0,0 +1,15 @@ +package platform + +import "context" + +// SecretService a service for storing and retrieving secrets. +type SecretService interface { + // LoadSecret retrieves the secret value v found at key k for organization orgID. + LoadSecret(ctx context.Context, orgID ID, k string) (string, error) + + // GetSecretKeys retrieves all secret keys that are stored for the organization orgID. + GetSecretKeys(ctx context.Context, orgID ID) ([]string, error) + + // PutSecret stores the secret pair (k,v) for the organization orgID. + PutSecret(ctx context.Context, orgID ID, k string, v string) error +}