Documentation ¶
Overview ¶
Package mongo implements the interfaces for storing users, results and crawler config in a mongodb datastore.
Index ¶
- type Store
- func (s *Store) CreateUser(user *api.User, password string) error
- func (s *Store) GetCrawlerConfig(userID string) (*api.CrawlerConfig, error)
- func (s *Store) GetResults(userID string) (*api.Results, error)
- func (s *Store) GetUser(id string) (*api.User, error)
- func (s *Store) GetUserForLogin(email string) (*api.User, string, error)
- func (s *Store) ListUsers() ([]*api.User, error)
- func (s *Store) UpdateCrawlerConfig(crawlerConfig *api.CrawlerConfig) error
- func (s *Store) UpdateResults(userResults *api.Results) error
- func (s *Store) UpdateUser(user *api.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the interfaces for storing users, crawlerconfigs and results in a mongo data store.
func (*Store) CreateUser ¶
CreateUser adds a new user.
func (*Store) GetCrawlerConfig ¶
func (s *Store) GetCrawlerConfig(userID string) (*api.CrawlerConfig, error)
GetCrawlerConfig returns the crawler config for the specified user.
func (*Store) GetResults ¶
GetResults returns results for a user.
func (*Store) GetUserForLogin ¶
GetUserForLogin return a user by email with a password hash.
func (*Store) UpdateCrawlerConfig ¶
func (s *Store) UpdateCrawlerConfig(crawlerConfig *api.CrawlerConfig) error
UpdateCrawlerConfig updates the crawler config with the specified config.
func (*Store) UpdateResults ¶
UpdateResults updates results for a user.
Click to show internal directories.
Click to hide internal directories.