Documentation ¶
Index ¶
- type Config
- type Datastore
- func (d *Datastore) Add(col string, fp []byte, name string, data map[string][]byte) error
- func (d *Datastore) Close() error
- func (d *Datastore) Get(col string, fp []byte) (map[string]map[string][]byte, error)
- func (d *Datastore) GetFingerPrints(col string) [][]byte
- func (d *Datastore) GetImages(col string, fp []byte) []string
- func (d *Datastore) Remove(col string, fp []byte, name string) error
- type Datastorer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore struct { Cfg Config // contains filtered or unexported fields }
Datastore is the default implementation of a Datastorer.
func (*Datastore) Add ¶
Add adds file data to the set of file data associated with this fingerprint.
func (*Datastore) GetFingerPrints ¶
GetFingerPrints gets the fingerprints
type Datastorer ¶
type Datastorer interface { // Open opens the datastore for reading and writing. Open(Config) (*Datastore, error) // Close closes the datastore; no further transactions will be completed. Close() error // Get gets the set of fileData that has the same fingerprint. Get(collection string, fingerprint []byte) (map[string]map[string][]byte, error) // Add adds a file data for a fingerprint. Add(collection string, fingerprint []byte, filename string, data map[string][]byte) error // Remove removes a file from the set of files for this fingerprint. Remove(collection string, fingerprint []byte, filename string) error }
Datastorer stores image fingerprints and their associated context data like filename and path.
Click to show internal directories.
Click to hide internal directories.