mocks

package
v0.0.0-...-d1236c8 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	mock.Mock
}

func (*API) Accounts

func (_m *API) Accounts() (*model.Accounts, error)

func (*API) Me

func (_m *API) Me() (*model.User, error)

func (*API) Page

func (_m *API) Page(pageID string) (*model.Page, error)

func (*API) PagePhotoCreate

func (_m *API) PagePhotoCreate(pageAccessToken string, pageID string, photo *model.Photo) (*model.PhotoResponse, error)

func (*API) PagePublish

func (_m *API) PagePublish(pageAccessToken string, pageID string, post *model.Post) (*model.PostResponse, error)

func (*API) Post

func (_m *API) Post(pageAccessToken string, postID string) (*model.PostResponse, error)

func (*API) PostDelete

func (_m *API) PostDelete(pageAccessToken string, postID string) error

func (*API) PostUpdate

func (_m *API) PostUpdate(pageAccessToken string, postID string, post *model.Post) error

type Authenticator

type Authenticator struct {
	mock.Mock
}

func (*Authenticator) APIConnection

func (m *Authenticator) APIConnection(tok *oauth2.Token) facebook.API

func (*Authenticator) AuthURL

func (m *Authenticator) AuthURL(state string) string

func (*Authenticator) PageAccessToken

func (m *Authenticator) PageAccessToken(tok *oauth2.Token, pageID string) (string, error)

func (*Authenticator) Token

func (m *Authenticator) Token(state string, r *http.Request) (*oauth2.Token, error)

type Images

type Images struct {
	mock.Mock
}

func (*Images) ChecksumDataURL

func (_m *Images) ChecksumDataURL(_a0 string) (string, error)

func (*Images) GetOriginal

func (_m *Images) GetOriginal(checksum string) (image.Image, error)

func (*Images) HasChecksum

func (_m *Images) HasChecksum(checksum string) (bool, error)

func (*Images) PathsFor

func (_m *Images) PathsFor(checksum string) (*model.OfferImagePaths, error)

func (*Images) StoreDataURL

func (_m *Images) StoreDataURL(_a0 string) error

type Manager

type Manager struct {
	mock.Mock
}

func (*Manager) Get

func (_m *Manager) Get(_a0 *http.Request) (string, error)

func (*Manager) GetOrInit

func (_m *Manager) GetOrInit(_a0 http.ResponseWriter, _a1 *http.Request) string

type OfferGroupPosts

type OfferGroupPosts struct {
	mock.Mock
}

func (*OfferGroupPosts) GetByDate

func (*OfferGroupPosts) GetByID

func (_m *OfferGroupPosts) GetByID(_a0 bson.ObjectId) (*model.OfferGroupPost, error)

func (*OfferGroupPosts) Insert

func (_m *OfferGroupPosts) Insert(_a0 ...*model.OfferGroupPost) ([]*model.OfferGroupPost, error)

func (*OfferGroupPosts) UpdateByID

func (_m *OfferGroupPosts) UpdateByID(_a0 bson.ObjectId, _a1 *model.OfferGroupPost) error

type Offers

type Offers struct {
	mock.Mock
}

func (*Offers) GetForRegion

func (_m *Offers) GetForRegion(region string, startTime time.Time, endTime time.Time) ([]*model.Offer, error)

func (*Offers) GetForRestaurant

func (_m *Offers) GetForRestaurant(restaurantID bson.ObjectId, startTime time.Time) ([]*model.Offer, error)

func (*Offers) GetForRestaurantByTitle

func (_m *Offers) GetForRestaurantByTitle(restaurantID bson.ObjectId, title string) (*model.Offer, error)

func (*Offers) GetForRestaurantWithinTimeBounds

func (_m *Offers) GetForRestaurantWithinTimeBounds(restaurantID bson.ObjectId, startTime time.Time, endTime time.Time) ([]*model.Offer, error)

func (*Offers) GetID

func (_m *Offers) GetID(_a0 bson.ObjectId) (*model.Offer, error)

func (*Offers) GetNear

func (_m *Offers) GetNear(loc geo.Location, startTime time.Time, endTime time.Time) ([]*model.OfferWithDistance, error)

func (*Offers) GetSimilarTitlesForRestaurant

func (_m *Offers) GetSimilarTitlesForRestaurant(restaurantID bson.ObjectId, partialTitle string) ([]string, error)

func (*Offers) Insert

func (_m *Offers) Insert(_a0 ...*model.Offer) ([]*model.Offer, error)

func (*Offers) RemoveID

func (_m *Offers) RemoveID(_a0 bson.ObjectId) error

func (*Offers) UpdateID

func (_m *Offers) UpdateID(_a0 bson.ObjectId, _a1 *model.Offer) error

type Post

type Post struct {
	mock.Mock
}

func (*Post) Update

func (_m *Post) Update(_a0 model.DateWithoutTime, _a1 *model.User, _a2 *model.Restaurant) *router.HandlerError

type Regions

type Regions struct {
	mock.Mock
}

func (*Regions) GetAll

func (_m *Regions) GetAll() db.RegionIter

func (*Regions) GetName

func (_m *Regions) GetName(_a0 string) (*model.Region, error)

func (*Regions) Insert

func (_m *Regions) Insert(_a0 ...*model.Region) error

func (*Regions) UpdateName

func (_m *Regions) UpdateName(_a0 string, _a1 *model.Region) error

type RegistrationAccessTokens

type RegistrationAccessTokens struct {
	mock.Mock
}

func (*RegistrationAccessTokens) Exists

func (_m *RegistrationAccessTokens) Exists(_a0 model.Token) (bool, error)

func (*RegistrationAccessTokens) Insert

type Restaurants

type Restaurants struct {
	mock.Mock
}

func (*Restaurants) Exists

func (_m *Restaurants) Exists(name string) (bool, error)

func (*Restaurants) GetAll

func (_m *Restaurants) GetAll() db.RestaurantIter

func (*Restaurants) GetByFacebookPageIDs

func (_m *Restaurants) GetByFacebookPageIDs(_a0 []string) ([]*model.Restaurant, error)

func (*Restaurants) GetByIDs

func (_m *Restaurants) GetByIDs(_a0 []bson.ObjectId) ([]*model.Restaurant, error)

func (*Restaurants) GetID

func (_m *Restaurants) GetID(_a0 bson.ObjectId) (*model.Restaurant, error)

func (*Restaurants) Insert

func (_m *Restaurants) Insert(_a0 ...*model.Restaurant) ([]*model.Restaurant, error)

func (*Restaurants) UpdateID

func (_m *Restaurants) UpdateID(_a0 bson.ObjectId, _a1 *model.Restaurant) error

type Users

type Users struct {
	mock.Mock
}

func (*Users) GetAll

func (_m *Users) GetAll() db.UserIter

func (*Users) GetFbID

func (_m *Users) GetFbID(_a0 string) (*model.User, error)

func (*Users) GetSessionID

func (_m *Users) GetSessionID(_a0 string) (*model.User, error)

func (*Users) Insert

func (_m *Users) Insert(_a0 ...*model.User) error

func (*Users) SetAccessToken

func (_m *Users) SetAccessToken(_a0 string, _a1 oauth2.Token) error

func (*Users) SetPageAccessTokens

func (_m *Users) SetPageAccessTokens(_a0 string, _a1 []model.FacebookPageToken) error

func (*Users) SetSessionID

func (_m *Users) SetSessionID(_a0 bson.ObjectId, _a1 string) error

func (*Users) UnsetSessionID

func (_m *Users) UnsetSessionID(_a0 bson.ObjectId) error

func (*Users) Update

func (_m *Users) Update(_a0 string, _a1 *model.User) error

Jump to

Keyboard shortcuts

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