db

package
v0.0.0-...-725ffc3 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2016 License: GPL-3.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package db is the endive subpackage that implements the Database interface.

The current implementation saves all Book information as a simple JSON file.

That makes it: - easy to index with bleve - easy to check and, if desperate, edit for a human being - easy to version with git

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONDB

type JSONDB struct {
	// contains filtered or unexported fields
}

JSONDB implements endive.Database with a JSON backend.

func (*JSONDB) Backup

func (db *JSONDB) Backup(path string) error

Backup JSON database by versioning it in a git repository.

func (*JSONDB) Equals

func (db *JSONDB) Equals(o endive.Database) bool

Equals to another Database

func (*JSONDB) Load

func (db *JSONDB) Load(bks endive.Collection) error

Load database into a Collection

func (*JSONDB) Path

func (db *JSONDB) Path() string

Path of database

func (*JSONDB) Save

func (db *JSONDB) Save(bks endive.Collection) (hasSaved bool, err error)

Save database as a JSON file

func (*JSONDB) SetPath

func (db *JSONDB) SetPath(path string)

SetPath for database

Jump to

Keyboard shortcuts

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