Documentation ¶
Index ¶
- Constants
- type ShoppingMallsDAO
- func (m *ShoppingMallsDAO) Connect()
- func (m *ShoppingMallsDAO) Delete(shoppingMalls ShoppingMall) error
- func (m *ShoppingMallsDAO) FindAll() ([]ShoppingMall, error)
- func (m *ShoppingMallsDAO) FindByID(id string) (ShoppingMall, error)
- func (m *ShoppingMallsDAO) FindByQuery(city, score, sortField string, shopsToFind []string) ([]ShoppingMall, error)
- func (m *ShoppingMallsDAO) Insert(shoppingMalls ShoppingMall) error
- func (m *ShoppingMallsDAO) Update(shoppingMalls ShoppingMall) error
Constants ¶
View Source
const (
// COLLECTION is the name of the collection in MongoDB
COLLECTION = "shopping_malls"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShoppingMallsDAO ¶
ShoppingMallsDAO is the DAO structure
func (*ShoppingMallsDAO) Connect ¶
func (m *ShoppingMallsDAO) Connect()
Connect connects to the MongoDB
func (*ShoppingMallsDAO) Delete ¶
func (m *ShoppingMallsDAO) Delete(shoppingMalls ShoppingMall) error
Delete an existing shopping mall
func (*ShoppingMallsDAO) FindAll ¶
func (m *ShoppingMallsDAO) FindAll() ([]ShoppingMall, error)
FindAll Find list of shopping malls
func (*ShoppingMallsDAO) FindByID ¶
func (m *ShoppingMallsDAO) FindByID(id string) (ShoppingMall, error)
FindByID Find a shopping mall by its id
func (*ShoppingMallsDAO) FindByQuery ¶
func (m *ShoppingMallsDAO) FindByQuery(city, score, sortField string, shopsToFind []string) ([]ShoppingMall, error)
FindByQuery Find a shopping mall by query
func (*ShoppingMallsDAO) Insert ¶
func (m *ShoppingMallsDAO) Insert(shoppingMalls ShoppingMall) error
Insert a shopping mall into database
func (*ShoppingMallsDAO) Update ¶
func (m *ShoppingMallsDAO) Update(shoppingMalls ShoppingMall) error
Update an existing shopping mall
Click to show internal directories.
Click to hide internal directories.