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 (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 (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 + func CheckUpdate(ctx infra.DnoteCtx) error + func GetBookUUID(ctx infra.DnoteCtx, label string) (string, error) + func InitFiles(ctx infra.DnoteCtx) error v0.2.2 Jun 6, 2018 Changes in this version type Action + Schema int + UUID string type EditNoteData + FromBook string + ToBook string v0.2.1-beta Feb 13, 2018 v0.2.0 Jan 21, 2018 Changes in this version + const ActionFilename + const ConfigFilename + const DnoteDirName + const DnoteFilename + const TimestampFilename + const TmpContentFilename + const Version + var ActionAddBook = "add_book" + var ActionAddNote = "add_note" + var ActionEditNote = "edit_note" + var ActionRemoveBook = "remove_book" + var ActionRemoveNote = "remove_note" + func ClearActionLog(ctx infra.DnoteCtx) error + func FilterNotes(notes []infra.Note, testFunc func(infra.Note) bool) []infra.Note + func GetActionPath(ctx infra.DnoteCtx) string + func GetConfigPath(ctx infra.DnoteCtx) string + func GetDnote(ctx infra.DnoteCtx) (infra.Dnote, error) + func GetDnotePath(ctx infra.DnoteCtx) string + func GetDnoteTmpContentPath(ctx infra.DnoteCtx) string + func GetEditorInput(ctx infra.DnoteCtx, fpath string, content *string) error + func GetTimestampPath(ctx infra.DnoteCtx) string + func GetUpdatedBook(book infra.Book, notes []infra.Note) infra.Book + func InitActionFile(ctx infra.DnoteCtx) error + func InitConfigFile(ctx infra.DnoteCtx) error + func InitDnoteDir(ctx infra.DnoteCtx) error + func InitDnoteFile(ctx infra.DnoteCtx) error + func InitTimestampFile(ctx infra.DnoteCtx) error + func IsFreshInstall(ctx infra.DnoteCtx) (bool, error) + func LogAction(ctx infra.DnoteCtx, action Action) error + func LogActionAddBook(ctx infra.DnoteCtx, name string) error + func LogActionAddNote(ctx infra.DnoteCtx, noteUUID, bookName, content string, timestamp int64) error + func LogActionEditNote(ctx infra.DnoteCtx, noteUUID, bookName, content string, ts int64) error + func LogActionRemoveBook(ctx infra.DnoteCtx, name string) error + func LogActionRemoveNote(ctx infra.DnoteCtx, noteUUID, bookName string) error + func MigrateToDnoteDir(ctx infra.DnoteCtx) error + func NewBook(name string) infra.Book + func NewNote(content string, ts int64) infra.Note + func ReadActionLogContent(ctx infra.DnoteCtx) ([]byte, error) + func ReadConfig(ctx infra.DnoteCtx) (infra.Config, error) + func ReadNoteContent(ctx infra.DnoteCtx) ([]byte, error) + func ReadTimestamp(ctx infra.DnoteCtx) (infra.Timestamp, error) + func Reduce(ctx infra.DnoteCtx, action Action) error + func ReduceAll(ctx infra.DnoteCtx, actions []Action) error + func SanitizeContent(s string) string + func UpdateLastActionTimestamp(ctx infra.DnoteCtx, val int64) error + func WriteActionLog(ctx infra.DnoteCtx, actions []Action) error + func WriteConfig(ctx infra.DnoteCtx, config infra.Config) error + func WriteDnote(ctx infra.DnoteCtx, dnote infra.Dnote) error + func WriteTimestamp(ctx infra.DnoteCtx, timestamp infra.Timestamp) error + type Action struct + Data json.RawMessage + ID int + Timestamp int64 + Type string + func ReadActionLog(ctx infra.DnoteCtx) ([]Action, error) + type AddBookData struct + BookName string + type AddNoteData struct + BookName string + Content string + NoteUUID string + type EditNoteData struct + BookName string + Content string + NoteUUID string + type RemoveBookData struct + BookName string + type RemoveNoteData struct + BookName string + NoteUUID string + type RunEFunc func(*cobra.Command, []string) error v0.2.0-beta.1 Jan 14, 2018 v0.2.0-alpha.4 Jan 10, 2018 v0.2.0-alpha.3 Jan 9, 2018 v0.2.0-alpha.2 Jan 7, 2018