Versions in this module Expand all Collapse all v0 v0.6.2 Apr 9, 2019 Changes in this version + func DeleteSystem(db *infra.DB, key string) error + func GetCipherKey(ctx infra.DnoteCtx) ([]byte, error) + func GetSystem(db *infra.DB, key string, dest interface{}) error + func GetValidSession(ctx infra.DnoteCtx) (string, bool, error) + func InitSystem(ctx infra.DnoteCtx) error + func InsertSystem(db *infra.DB, key, val string) error + func UpdateSystem(db *infra.DB, key, val interface{}) error + func UpsertSystem(db *infra.DB, key, val string) error + type Book struct + Deleted bool + Dirty bool + Label string + Notes []Note + USN int + UUID string + func NewBook(uuid, label string, usn int, deleted, dirty bool) Book + func (b *Book) UpdateUUID(db *infra.DB, newUUID string) error + func (b Book) Expunge(db *infra.DB) error + func (b Book) Insert(db *infra.DB) error + func (b Book) Update(db *infra.DB) error + type Note struct + AddedOn int64 + Body string + BookUUID string + Deleted bool + Dirty bool + EditedOn int64 + Public bool + USN int + UUID string + func NewNote(uuid, bookUUID, body string, addedOn, editedOn int64, usn int, ...) Note + func (n *Note) UpdateUUID(db *infra.DB, newUUID string) error + func (n Note) Expunge(db *infra.DB) error + func (n Note) Insert(db *infra.DB) error + func (n Note) Update(db *infra.DB) error v0.4.8 Oct 14, 2018 Changes in this version + var ConfigFilename = "dnoterc" + var TmpContentFilename = "DNOTE_TMPCONTENT" + func CheckUpdate(ctx infra.DnoteCtx) error + func GetBookUUID(ctx infra.DnoteCtx, label string) (string, error) + func GetConfigPath(ctx infra.DnoteCtx) string + func GetDnoteTmpContentPath(ctx infra.DnoteCtx) string + func GetEditorInput(ctx infra.DnoteCtx, fpath string, content *string) error + func InitFiles(ctx infra.DnoteCtx) error + func LogAction(tx *sql.Tx, schema int, actionType, data string, timestamp int64) error + func LogActionAddBook(tx *sql.Tx, name string) error + func LogActionAddNote(tx *sql.Tx, noteUUID, bookName, content string, timestamp int64) error + func LogActionEditNote(tx *sql.Tx, noteUUID, bookName, content string, ts int64) error + func LogActionRemoveBook(tx *sql.Tx, name string) error + func LogActionRemoveNote(tx *sql.Tx, noteUUID, bookName string) error + func ReadConfig(ctx infra.DnoteCtx) (infra.Config, error) + func Reduce(ctx infra.DnoteCtx, tx *sql.Tx, action actions.Action) error + func ReduceAll(ctx infra.DnoteCtx, tx *sql.Tx, actionSlice []actions.Action) error + func SanitizeContent(s string) string + func WriteConfig(ctx infra.DnoteCtx, config infra.Config) error + type RunEFunc func(*cobra.Command, []string) error