Documentation ¶
Overview ¶
package json provides Account storage in a simple, single JSON file. This module does no versioning or backups and is not suitable for non-trivial applications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds the Account objects and can write them to disk.
func New ¶
New creates a new Store object with the given file path. The create argument specifies whether or not a new store file should be created if it doesn't already exist.
func (*Store) Flush ¶
Flush writes all store data out to disk, overwriting existing data. Concurrent calls to Flush() are thread-safe but inefficient.
Click to show internal directories.
Click to hide internal directories.