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是一种由JSON文件支持的存储类型。json文件包含 密钥值映射,其中密钥没有加密,只有值是加密的。
func NewAESEncryptedStorage ¶
func NewAESEncryptedStorage(filename string, key []byte) *AESEncryptedStorage
newaesEncryptedStorage创建由给定文件/密钥支持的新加密存储
func (*AESEncryptedStorage) Get ¶
func (s *AESEncryptedStorage) Get(key string) string
get返回以前存储的值,如果该值不存在或键的长度为0,则返回空字符串
func (*AESEncryptedStorage) Put ¶
func (s *AESEncryptedStorage) Put(key, value string)
按键存储值。0长度键导致无操作
type EphemeralStorage ¶
type EphemeralStorage struct {
// contains filtered or unexported fields
}
短暂存储是一种内存存储,它可以 不将值持久化到磁盘。主要用于测试
func (*EphemeralStorage) Get ¶
func (s *EphemeralStorage) Get(key string) string
func (*EphemeralStorage) Put ¶
func (s *EphemeralStorage) Put(key, value string)
Click to show internal directories.
Click to hide internal directories.