Documentation
Index ¶
Constants ¶
View Source
const ( SecretLabelKey = "storage.pinniped.dev/type" SecretLifetimeAnnotationKey = "storage.pinniped.dev/garbage-collect-after" SecretLifetimeAnnotationDateFormat = time.RFC3339 ErrSecretTypeMismatch = constable.Error("secret storage data has incorrect type") ErrSecretLabelMismatch = constable.Error("secret storage data has incorrect label") ErrSecretVersionMismatch = constable.Error("secret storage data has incorrect version") )
nolint:gosec // ignore lint warnings that these are credentials
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface { Create(ctx context.Context, signature string, data JSON, additionalLabels map[string]string) (resourceVersion string, err error) Get(ctx context.Context, signature string, data JSON) (resourceVersion string, err error) Update(ctx context.Context, signature, resourceVersion string, data JSON) (newResourceVersion string, err error) Delete(ctx context.Context, signature string) error DeleteByLabel(ctx context.Context, labelName string, labelValue string) error }
func New ¶
func New(resource string, secrets corev1client.SecretInterface, clock func() time.Time, lifetime time.Duration) Storage