storage

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMemoryStorage

func NewMemoryStorage() *memoryStorage

func NewSeparatedMemoryStorage

func NewSeparatedMemoryStorage(filepath string) (*separatedMemoryStorage, error)

func RestoreMemoryStorage

func RestoreMemoryStorage(decoder *gob.Decoder) (*memoryStorage, error)

Types

type GobStorage

type GobStorage interface {
	StorageAdapter
	SetOutput(*gob.Encoder)
}

type StorageAdapter

type StorageAdapter interface {
	BuildIndex()
	Count() int
	Find(string, ...string) (map[string]int, bool)
	Search(string, ...string) []string
	Remove(string)
	Sync() error
	Update(string, map[string]int)
}

Jump to

Keyboard shortcuts

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