Documentation
¶
Overview ¶
package store implements types that store message literals.
Messages may be stored either in-memory or on-disk. When stored on disk, they are stored encrypted and optionally compressed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type GZipCompressor ¶
type GZipCompressor struct{}
func (GZipCompressor) Decompress ¶
func (GZipCompressor) Decompress(cmp []byte) ([]byte, error)
type OnDiskStoreBuilder ¶ added in v0.9.0
type OnDiskStoreBuilder struct{}
func (*OnDiskStoreBuilder) Delete ¶ added in v0.12.0
func (*OnDiskStoreBuilder) Delete(path, userID string) error
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithCompressor ¶
func WithCompressor(cmp Compressor) Option
func WithSemaphore ¶
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
Semaphore implements a type used to limit concurrent operations.
func NewSemaphore ¶
NewSemaphore constructs a new semaphore with the given limit.
func (*Semaphore) Block ¶
func (sem *Semaphore) Block()
Block prevents the semaphore from being locked.
func (*Semaphore) Do ¶
func (sem *Semaphore) Do(fn func())
Do executes the given function synchronously.
func (*Semaphore) Go ¶
func (sem *Semaphore) Go(fn func())
Go executes the given function asynchronously.
func (*Semaphore) Lock ¶
func (sem *Semaphore) Lock()
Lock locks the semaphore, waiting first until it is possible.
type Store ¶
type Store interface { Get(messageID imap.InternalMessageID) ([]byte, error) Set(messageID imap.InternalMessageID, literal []byte) error Delete(messageID ...imap.InternalMessageID) error Close() error List() ([]imap.InternalMessageID, error) }
type ZLibCompressor ¶
type ZLibCompressor struct{}
func (ZLibCompressor) Decompress ¶
func (ZLibCompressor) Decompress(cmp []byte) ([]byte, error)
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package mock_store is a generated GoMock package.
|
Package mock_store is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.