sqlite

package
v0.0.0-...-13e6371 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(filePath string, cacheSize int, translators []string) (*Cache, error)

func (*Cache) Close

func (c *Cache) Close() error

func (*Cache) Get

func (c *Cache) Get(bucketName, text string) (string, bool, error)

func (*Cache) Put

func (c *Cache) Put(bucketName, text, translation string, cerr error) error

type Item

type Item struct {
	Translation string
	ErrorCode   translationError
	ErrorText   string
	Timestamp   int64
}

type StormItem

type StormItem struct {
	Text        string `storm:"id"` // primary key
	Translation string
	ErrorCode   translationError `storm:"index"`
	ErrorText   string
	Timestamp   int64
}

Jump to

Keyboard shortcuts

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