nick_bot: github.com/icholy/nick_bot/imgstore Index | Files

package imgstore

import "github.com/icholy/nick_bot/imgstore"

Index

Package Files

search.go stats.go store.go strategies.go

type SearchStrategy Uses

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

func ChooseStrategy Uses

func ChooseStrategy() SearchStrategy

func (SearchStrategy) String Uses

func (s SearchStrategy) String() string

type Stat Uses

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

func (*Stat) String Uses

func (s *Stat) String() string

type Stats Uses

type Stats []Stat

func (Stats) String Uses

func (s Stats) String() string

type Store Uses

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

func Open Uses

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

func (*Store) Close Uses

func (s *Store) Close() error

func (*Store) Get Uses

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

func (*Store) Has Uses

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

func (*Store) Put Uses

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

func (*Store) ResetStates Uses

func (s *Store) ResetStates() error

func (*Store) Search Uses

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

func (*Store) SearchRandom Uses

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

func (*Store) SetState Uses

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

func (*Store) Stats Uses

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

Package imgstore imports 10 packages (graph) and is imported by 2 packages. Updated 2017-06-10. Refresh now. Tools for package owners.