leveldb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database is a persistent key-value store. Apart from basic data storage functionality it also supports batch writes and iterating over the keyspace in binary-alphabetical order.

func New

func New(file string, cache, handles int) (*Database, error)

New returns a wrapped LevelDB object.

func (*Database) Close

func (db *Database) Close() error

Close stops the metrics collection, flushes any pending data to disk and closes all io accesses to the underlying key-value store.

func (Database) DeleteMessageRead

func (db Database) DeleteMessageRead(messageID mail.ID) error

DeleteMessageRead mark message as unread

func (Database) GetReadStatus

func (db Database) GetReadStatus(messageID mail.ID) (bool, error)

GetReadStatus return if message is read

func (Database) PutMessageRead

func (db Database) PutMessageRead(messageID mail.ID) error

PutMessageRead mark message as read

Jump to

Keyboard shortcuts

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