imgstore

package
v0.0.0-...-6e117fe Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchStrategy

type SearchStrategy int
const (
	TopFacesStrategy SearchStrategy = iota
	TopLikesStrategy
	FacesUserStrategy
	LikesUserStrategy
)

func ChooseStrategy

func ChooseStrategy() SearchStrategy

func (SearchStrategy) String

func (s SearchStrategy) String() string

type Stat

type Stat struct {
	Faces int   `json:"faces"`
	Count int64 `json:"count"`
}

func (*Stat) String

func (s *Stat) String() string

type Stats

type Stats []Stat

func (Stats) String

func (s Stats) String() string

type Store

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

func Open

func Open(database string) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) Get

func (s *Store) Get(id string) (*model.Record, error)

func (*Store) Has

func (s *Store) Has(id string) (bool, error)

func (*Store) Put

func (s *Store) Put(rec *model.Record) error

func (*Store) ResetStates

func (s *Store) ResetStates() error

func (*Store) Search

func (s *Store) Search(minFaces int, strategy SearchStrategy) (*model.Record, error)

func (*Store) SearchRandom

func (s *Store) SearchRandom(minFaces int) (*model.Record, error)

func (*Store) SetState

func (s *Store) SetState(id string, state model.MediaState) error

func (*Store) Stats

func (s *Store) Stats(state model.MediaState) (Stats, error)

Jump to

Keyboard shortcuts

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