Documentation
¶
Index ¶
Constants ¶
DefaultShareDuration sets a maximum of 30 days for shared secrets with no defined time limit
Variables ¶
Functions ¶
func ValidateDuration ¶
ValidateDuration verifies if the input duration is valid, returning an error if otherwise
func ValidateTime ¶
ValidateTime verifies if the input time is valid, returning an error if otherwise
Types ¶
type Repository ¶
type Repository interface { // Create shares the secret identified by `secretName`, owned by `owner`, with // user `target`. Returns its ID and an error Create(ctx context.Context, s *Share) (uint64, error) // Get fetches the secret's share metadata for a given owner's username and secret key Get(ctx context.Context, owner, secretName string) ([]*Share, error) // List fetches all shared secrets for a given owner's username List(ctx context.Context, owner string) ([]*Share, error) // ListTarget is similar to List, but returns secrets that are shared with a target user ListTarget(ctx context.Context, target string) ([]*Share, error) // Delete removes the user `target` from the secret share Delete(ctx context.Context, s *Share) error }
Repository describes the actions exposed by the shared secrets store
func WithTrace ¶
func WithTrace(r Repository) Repository
Click to show internal directories.
Click to hide internal directories.