Documentation ¶
Overview ¶
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
Index ¶
- Variables
- 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
- 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
- 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)
- type Record
- 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
Constants ¶
This section is empty.
Variables ¶
var ( ERR_INVALID_ID = errors.New("Invalid ID specified.") ERR_STORE_NOT_FOUND = errors.New("Store not found.") ERR_RECORD_NOT_FOUND = errors.New("Record not found.") )
var (
Size = uint64(0)
)
Functions ¶
func CountExpired ¶
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func (*Index) NumRecords ¶
type Meta ¶
type Meta struct { Id uint64 `json:"id"` Title string `json:"title"` Encryption string `json:"encryption"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` ExpiredAt time.Time `json:"expired_at"` Prune bool `json:"prune"` Notified bool `json:"notified"` Compressed bool `json:"compressed"` Pinned bool `json:"pinned"` Size uint64 `json:"size"` NextId uint64 `json:"next_id"` // contains filtered or unexported fields }
func GetRecordMeta ¶
func (*Meta) FlushNoLock ¶
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
func CreateRecord ¶
func OpenRecord ¶
func PrunableRecords ¶
func (*Record) Encryption ¶
func (*Record) MarkUpdated ¶
func (r *Record) MarkUpdated()