Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Disconnect ¶
func (c *Client) Disconnect()
type OfferGroupPosts ¶
type OfferGroupPosts interface { Insert(...*model.OfferGroupPost) ([]*model.OfferGroupPost, error) UpdateByID(bson.ObjectId, *model.OfferGroupPost) error GetByID(bson.ObjectId) (*model.OfferGroupPost, error) GetByDate(model.DateWithoutTime, bson.ObjectId) (*model.OfferGroupPost, error) }
func NewOfferGroupPosts ¶
func NewOfferGroupPosts(c *Client) OfferGroupPosts
type Offers ¶
type Offers interface { Insert(...*model.Offer) ([]*model.Offer, error) GetForRegion(region string, startTime, endTime time.Time) ([]*model.Offer, error) GetNear(loc geo.Location, startTime, endTime time.Time) ([]*model.OfferWithDistance, error) GetForRestaurant(restaurantID bson.ObjectId, startTime time.Time) ([]*model.Offer, error) GetSimilarTitlesForRestaurant(restaurantID bson.ObjectId, partialTitle string) ([]string, error) GetForRestaurantByTitle(restaurantID bson.ObjectId, title string) (*model.Offer, error) GetForRestaurantWithinTimeBounds(restaurantID bson.ObjectId, startTime, endTime time.Time) ([]*model.Offer, error) UpdateID(bson.ObjectId, *model.Offer) error GetID(bson.ObjectId) (*model.Offer, error) RemoveID(bson.ObjectId) error }
type RegionIter ¶
RegionIter is a wrapper around *mgo.Iter that allows type safe iteration
type Regions ¶
type Regions interface { Insert(...*model.Region) error GetName(string) (*model.Region, error) GetAll() RegionIter UpdateName(string, *model.Region) error }
func NewRegions ¶
type RegistrationAccessTokens ¶
type RegistrationAccessTokens interface { Insert(*model.RegistrationAccessToken) (*model.RegistrationAccessToken, error) Exists(model.Token) (bool, error) }
func NewRegistrationAccessTokens ¶
func NewRegistrationAccessTokens(c *Client) (RegistrationAccessTokens, error)
type RestaurantIter ¶
type RestaurantIter interface { Close() error Next(*model.Restaurant) bool }
RestaurantIter is a wrapper around *mgo.Iter that allows type safe iteration
type Restaurants ¶
type Restaurants interface { Insert(...*model.Restaurant) ([]*model.Restaurant, error) GetAll() RestaurantIter GetByIDs([]bson.ObjectId) ([]*model.Restaurant, error) GetByFacebookPageIDs([]string) ([]*model.Restaurant, error) GetID(bson.ObjectId) (*model.Restaurant, error) Exists(name string) (bool, error) UpdateID(bson.ObjectId, *model.Restaurant) error }
func NewRestaurants ¶
func NewRestaurants(client *Client) Restaurants
type Tags ¶
type Users ¶
type Users interface { Insert(...*model.User) error GetFbID(string) (*model.User, error) GetSessionID(string) (*model.User, error) GetAll() UserIter Update(string, *model.User) error SetAccessToken(string, oauth2.Token) error SetPageAccessTokens(string, []model.FacebookPageToken) error SetSessionID(bson.ObjectId, string) error UnsetSessionID(bson.ObjectId) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.