Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ActivityModel = &models.Model{ IModel: &Activity{}, MongodbConnection: MongodbConnection, DatabaseName: DatabaseName, }
View Source
var DatabaseName = "api_test"
View Source
var MongodbConnection = "mongodb://localhost:27017"
View Source
var UserModel = &models.Model{ IModel: &User{}, MongodbConnection: MongodbConnection, DatabaseName: DatabaseName, }
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct {
Image string `bson:"image" json:"image" xml:"image"`
Images []string `bson:"images" json:"images" xml:"images"`
Title string `bson:"title" json:"title" xml:"title"`
Titles string `bson:"titles" json:"titles" xml:"titles"`
Content string `bson:"content" json:"content" xml:"content"`
Distance string `bson:"distance" json:"distance" xml:"distance"`
}
func (*Activity) CheckRequired ¶ added in v0.6.0
func (*Activity) GetCollectionName ¶ added in v0.6.0
type User ¶
type User struct {
Name string `bson:"name" json:"name" xml:"name"`
Age int `bson:"age" json:"age" xml:"age"`
}
func (*User) CheckRequired ¶ added in v0.6.0
func (*User) GetCollectionName ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.