 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AESEncryptedStorage ¶
type AESEncryptedStorage struct {
	// contains filtered or unexported fields
}
    AESEncryptedStorage is a storage type which is backed by a json-faile. The json-file contains key-value mappings, where the keys are _not_ encrypted, only the values are.
func NewAESEncryptedStorage ¶
func NewAESEncryptedStorage(filename string, key []byte) *AESEncryptedStorage
NewAESEncryptedStorage creates a new encrypted storage backed by the given file/key
func (*AESEncryptedStorage) Get ¶
func (s *AESEncryptedStorage) Get(key string) string
Get returns the previously stored value, or the empty string if it does not exist or key is of 0-length
func (*AESEncryptedStorage) Put ¶
func (s *AESEncryptedStorage) Put(key, value string)
Put stores a value by key. 0-length keys results in no-op
type EphemeralStorage ¶
type EphemeralStorage struct {
	// contains filtered or unexported fields
}
    EphemeralStorage is an in-memory storage that does not persist values to disk. Mainly used for testing
func (*EphemeralStorage) Get ¶
func (s *EphemeralStorage) Get(key string) string
func (*EphemeralStorage) Put ¶
func (s *EphemeralStorage) Put(key, value string)
type Storage ¶
type Storage interface {
	// Put stores a value by key. 0-length keys results in no-op
	Put(key, value string)
	// Get returns the previously stored value, or the empty string if it does not exist or key is of 0-length
	Get(key string) string
}
    func NewEphemeralStorage ¶
func NewEphemeralStorage() Storage
 Click to show internal directories. 
   Click to hide internal directories.