memory

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const VaultType = "memory"

Variables

This section is empty.

Functions

func CreateVault

func CreateVault(cfg *vaults.Config, resolver cmdbase.ParameterResolver, verifier model.AccessVerifier) (vaults.Vault, error)

Types

type InMemoryVault

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

InMemoryVault keeps all submitted data in memory. It doesn't survive restarts. This vault type is useful for testing to avoid disk or network operations SSE mode is not supported. The value of SSE parameter will be ignored.

func (*InMemoryVault) CAS

func (v *InMemoryVault) CAS() bool

func (*InMemoryVault) Close

func (v *InMemoryVault) Close() error

func (*InMemoryVault) CreateBlob

func (v *InMemoryVault) CreateBlob(ctx context.Context, r io.Reader) (*model.StoredResource, error)

func (*InMemoryVault) ID

func (v *InMemoryVault) ID() string

func (*InMemoryVault) Name

func (v *InMemoryVault) Name() string

func (*InMemoryVault) PurgeBlob

func (v *InMemoryVault) PurgeBlob(ctx context.Context, id string, params map[string]any) error

func (*InMemoryVault) SSE

func (v *InMemoryVault) SSE() bool

func (*InMemoryVault) ServeBlob

func (v *InMemoryVault) ServeBlob(ctx context.Context, id string, params map[string]any, accessToken string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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