Versions in this module Expand all Collapse all v1 v1.0.1 May 11, 2018 Changes in this version + var ERR_INVALID_ID = errors.New("Invalid ID specified.") + var ERR_RECORD_NOT_FOUND = errors.New("Record not found.") + var ERR_STORE_NOT_FOUND = errors.New("Store not found.") + var Size = uint64(0) + func CountExpired() (total int, prunable int, err error) + func Delete(store *Record) (err error) + func Export(filename string) error + func Flush() + func GetStores() map[uint64]*Record + func Import(filename string) error + func Lock() + func Setup() (created bool, err error) + func ToID(value string) (id uint64, err error) + func Unlock() + type Index struct + func LoadIndex(path string) (i *Index, err error) + func (i *Index) Add(r *Record) + func (i *Index) Del(id uint64) *Record + func (i *Index) Flush() + func (i *Index) Get(id uint64) *Record + func (i *Index) Lock() error + func (i *Index) NumRecords() int + func (i *Index) Path() string + func (i *Index) Records() map[uint64]*Record + func (i *Index) Unlock() error + type Meta struct + Compressed bool + CreatedAt time.Time + Encryption string + ExpiredAt time.Time + Id uint64 + NextId uint64 + Notified bool + Pinned bool + Prune bool + Size uint64 + Title string + UpdatedAt time.Time + func Create(meta *Meta) (*Meta, error) + func CreateMeta(path string, values *Meta) (meta *Meta, err error) + func GetRecordMeta(store_id, record_id string) (meta *Meta, err error) + func OpenMeta(path string) (meta *Meta, err error) + func Records(store_id string) (records []*Meta, err error) + func Stores() (stores []*Meta, err error) + func (m *Meta) Close() + func (m *Meta) Flush() error + func (m *Meta) FlushNoLock() error + func (m *Meta) Lock() error + func (m *Meta) SetPath(path string) error + func (m *Meta) Unlock() error + func (m *Meta) Update(values *Meta) (err error) + type Record struct + func CreateRecord(root_path string, meta *Meta, reader *io.Reader) (record *Record, err error) + func GetRecord(store_id, record_id string) (record *Record, err error) + func GetStore(store_id string) (store *Record, err error) + func OpenRecord(path string) (record *Record, err error) + func PrunableRecords() (records []*Record, err error) + func (r *Record) Children() map[uint64]*Record + func (r *Record) Close() + func (r *Record) DataPath() string + func (r *Record) Del(id uint64) (deleted *Record, err error) + func (r *Record) Delete() error + func (r *Record) Encryption() string + func (r *Record) Expired() bool + func (r *Record) Expires() bool + func (r *Record) Get(id uint64) *Record + func (r *Record) Id() uint64 + func (r *Record) Lock() error + func (r *Record) MarkUpdated() + func (r *Record) Meta() *Meta + func (r *Record) New(meta *Meta, reader io.Reader) (child *Record, err error) + func (r *Record) NumChildren() int + func (r *Record) SetNotified(notified bool) + func (r *Record) Size() uint64 + func (r *Record) Unlock() error + func (r *Record) Update(meta *Meta) (err error) + func (r *Record) UpdateBuffer(reader io.Reader) (err error) + func (r *Record) WasNotified() bool