Documentation ¶
Index ¶
- Constants
- func CreateVault(cfg *vaults.Config, resolver cmdbase.ParameterResolver, ...) (vaults.Vault, error)
- type InMemoryVault
- func (v *InMemoryVault) CAS() bool
- func (v *InMemoryVault) Close() error
- func (v *InMemoryVault) CreateBlob(ctx context.Context, r io.Reader) (*model.StoredResource, error)
- func (v *InMemoryVault) ID() string
- func (v *InMemoryVault) Name() string
- func (v *InMemoryVault) PurgeBlob(ctx context.Context, id string, params map[string]any) error
- func (v *InMemoryVault) SSE() bool
- func (v *InMemoryVault) ServeBlob(ctx context.Context, id string, params map[string]any, accessToken string) (io.ReadCloser, error)
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) SSE ¶
func (v *InMemoryVault) SSE() bool
Click to show internal directories.
Click to hide internal directories.