storage

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package storage describes the requirements a storage provider has to fulfill ot be usable in OTS

Index

Constants

This section is empty.

Variables

View Source
var ErrSecretNotFound = errors.New("secret not found")

ErrSecretNotFound is a generic error to be returned when a secret does not exist in the backend. It will then be handled by API.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	Count() (int64, error)
	Create(secret string, expireIn time.Duration) (string, error)
	ReadAndDestroy(id string) (string, error)
}

Storage is the interface to implement in each storage provider

Directories

Path Synopsis
Package memory implements a pure in-memory store for secrets which is suitable for testing and should not be used for productive use
Package memory implements a pure in-memory store for secrets which is suitable for testing and should not be used for productive use
Package redis implements a Redis backed storage for secrets
Package redis implements a Redis backed storage for secrets

Jump to

Keyboard shortcuts

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