crud

package
Version: v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

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")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON

type JSON interface{} // document that we need valid JSON 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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to