Documentation ¶
Index ¶
Constants ¶
View Source
const ( UniqueID = "unique_identifier" TokenKey = "active-token" // reserved: will be used encrypting user private keys // TODO: implement this ^ ServerID = "secr-server-id" )
Variables ¶
This section is empty.
Functions ¶
func UserBucket ¶
UserBucket formats the input user ID as a user bucket identifier (`uid:###`)
Types ¶
type Repository ¶
type Repository interface { // Set creates or overwrites a secret identified by `k` with value `v`, in // bucket `bucket`. Returns an error Set(ctx context.Context, bucket, k string, v []byte) error // Get fetches the secret identified by `k` in the bucket `bucket`, // returning a slice of bytes for the value and an error Get(ctx context.Context, bucket, k string) ([]byte, error) // Delete removes the secret identified by `k` in bucket `bucket`, returning an error Delete(ctx context.Context, bucket, k string) error // Purge removes all the secrets in the bucket `bucket`, returning an error Purge(ctx context.Context, bucket string) error }
Repository describes the action exposed by the keys store
func WithTrace ¶
func WithTrace(r Repository) Repository
Click to show internal directories.
Click to hide internal directories.