Documentation ¶
Index ¶
- type Keystore
- func (k *Keystore) Close(save bool)
- func (k *Keystore) DataOnDrive() bool
- func (k *Keystore) Delete() int
- func (k *Keystore) DeleteKey(key string) helpers.Error
- func (k *Keystore) EncryptCost() int
- func (k *Keystore) Get(key string) (*keystoreEntry, int)
- func (k *Keystore) GetKey(key string, items map[string]interface{}) (map[string]interface{}, helpers.Error)
- func (k *Keystore) InsertKey(key string, insertObj map[string]interface{}) (*keystoreEntry, helpers.Error)
- func (k *Keystore) MemOnly() bool
- func (k *Keystore) SetEncryptionCost(cost int) int
- func (k *Keystore) SetMaxEntries(max uint64) int
- func (k *Keystore) SetPartitionMax(max uint16) int
- func (k *Keystore) Size() int
- func (k *Keystore) UpdateKey(key string, updateObj map[string]interface{}) helpers.Error
- func (k *Keystore) UpsertKey(key string, upsertObj map[string]interface{}) (*keystoreEntry, helpers.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keystore ¶
type Keystore struct {
// contains filtered or unexported fields
}
Keystore
func New ¶
func New(name string, configFile *os.File, s schema.Schema, fileOn uint32, dataOnDrive bool, memOnly bool) (*Keystore, helpers.Error)
New creates a new Keystore with the provided name, schema, and other parameters.
func (*Keystore) Close ¶
Close a Keystore and save current settings to a config file if `save` is true
func (*Keystore) DataOnDrive ¶
DataOnDrive returns the current dataOnDrive preference saved for this Keystore
func (*Keystore) EncryptCost ¶
func (*Keystore) GetKey ¶
func (k *Keystore) GetKey(key string, items map[string]interface{}) (map[string]interface{}, helpers.Error)
Get
func (*Keystore) InsertKey ¶
func (k *Keystore) InsertKey(key string, insertObj map[string]interface{}) (*keystoreEntry, helpers.Error)
Insert creates a new keystoreEntry in the Keystore, as long as one doesnt already exist
func (*Keystore) MemOnly ¶
MemOnly returns the current memory-only preference saved for this Keystore
func (*Keystore) SetEncryptionCost ¶
SetEncryptionCost sets the bcrypt encrytion cost
func (*Keystore) SetMaxEntries ¶
SetMaxEntries sets the maximum entries for the Keystore
func (*Keystore) SetPartitionMax ¶
SetPartitionMax sets the maximum entries stored in a data file
Click to show internal directories.
Click to hide internal directories.