storage

package
v0.0.0-...-e8da0a6 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	Add(context.Context, map[string][]byte) error
	Get(context.Context, string, bool) ([]byte, error)
	GetAll(context.Context, bool) (map[string][]byte, error)
	Update(context.Context, map[string][]byte) error
	Delete(context.Context, []string) error
}

func NewStorageKubernetes

func NewStorageKubernetes() (Storage, error)

func NewStorageVolume

func NewStorageVolume(path string, encrypt bool, getSecretKey func() ([]byte, error)) (Storage, error)

type StorageKubernetes

type StorageKubernetes struct {
	// contains filtered or unexported fields
}

func (*StorageKubernetes) Add

func (s *StorageKubernetes) Add(ctx context.Context, dataset map[string][]byte) (err error)

func (*StorageKubernetes) Delete

func (s *StorageKubernetes) Delete(ctx context.Context, keys []string) (err error)

func (*StorageKubernetes) Get

func (s *StorageKubernetes) Get(ctx context.Context, key string, getData bool) ([]byte, error)

func (*StorageKubernetes) GetAll

func (s *StorageKubernetes) GetAll(ctx context.Context, getData bool) (map[string][]byte, error)

func (*StorageKubernetes) Update

func (s *StorageKubernetes) Update(ctx context.Context, dataset map[string][]byte) (err error)

type StorageType

type StorageType string
const (
	StorageType_KubernetesSecret StorageType = "k8s/secret"
	StorageType_Volume           StorageType = "volume"
)

type StorageVolume

type StorageVolume struct {
	// contains filtered or unexported fields
}

func (*StorageVolume) Add

func (s *StorageVolume) Add(ctx context.Context, dataset map[string][]byte) (err error)

func (*StorageVolume) Delete

func (s *StorageVolume) Delete(ctx context.Context, keys []string) (err error)

func (*StorageVolume) Get

func (s *StorageVolume) Get(ctx context.Context, key string, getData bool) ([]byte, error)

func (*StorageVolume) GetAll

func (s *StorageVolume) GetAll(ctx context.Context, getData bool) (map[string][]byte, error)

func (*StorageVolume) Update

func (s *StorageVolume) Update(ctx context.Context, dataset map[string][]byte) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL