Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶
type Item struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` UserId string `bson:"user_id" json:"user_id"` Message string `json:"message"` }
Item type
type ListRepository ¶
type ListRepository struct {
C *mgo.Collection
}
ListRepository type
func (*ListRepository) Create ¶
func (r *ListRepository) Create(item *Item) (string, error)
Create item
func (*ListRepository) GetAll ¶
func (r *ListRepository) GetAll(userID string) (items []Item)
GetAll items
Click to show internal directories.
Click to hide internal directories.