Documentation ¶
Index ¶
- Variables
- func CloneDoc(doc bson.M) bson.M
- func Echo(doc bson.M)
- func GetDemoDoc() bson.M
- func GetDemoFromFile(filename string) string
- func GetDemoSchema() string
- func GetDocByTemplate(filename string, meta bool) (bson.M, error)
- func GetEmailAddress() string
- func GetRandomizedDoc(buf []byte, meta bool) (bson.M, error)
- func RandomizeDocument(doc *map[string]interface{}, f interface{}, meta bool)
- type FavoritesDoc
- type FavoritesSchema
Constants ¶
This section is empty.
Variables ¶
View Source
var Favorites = FavoritesDoc{ Sports: []string{"Baseball", "Boxing", "Dodgeball", "Figure skating", "Football", "Horse racing", "Mountaineering", "Skateboard", "Ski", "Soccer"}, Music: []string{"Blues", "Classical", "Country", "Easy Listening", "Electronic", "Hip Pop", "Jazz", "Opera", "Soul", "Rock"}, Cities: []string{"Atlanta", "Bangkok", "Beijing", "London", "Paris", "Singapore", "New York", "Istanbul", "Dubai", "Taipei"}, Books: []string{"Journey to the West", "The Lord of the Rings", "In Search of Lost Time", "Don Quixote", "Ulysses", "The Great Gatsby", "Moby Dick", "Hamlet", "War and Peace", "The Odyssey"}, Movies: []string{"The Godfather", "The Shawshank Redemption", "Schindler's List", "Raging Bull", "Casablanca", "Citizen Kane", "Gone with the Wind", "The Wizard of Oz", "One Flew Over the Cuckoo's Nest", "Lawrence of Arabia"}, }
Favorites constance
View Source
var Quotes = []string{
"Frankly, my dear, I don't give a damn.",
"I'm going to make him an offer he can't refuse.",
"Toto, I've a feeling we're not in Kansas anymore.",
"Here's looking at you, kid.",
"Go ahead, make my day.",
"All right, Mr. DeMille, I'm ready for my close-up.",
"May the Force be with you.",
"Fasten your seatbelts. It's going to be a bumpy night.",
"You talkin' to me?",
"What we've got here is failure to communicate.",
"I love the smell of napalm in the morning.",
"Love means never having to say you're sorry.",
"The stuff that dreams are made of.",
"E.T. phone home.",
"They call me Mister Tibbs!",
"You're gonna need a bigger boat.",
"Of all the gin joints in all the towns in all the world, she walks into mine.",
"Bond. James Bond.",
"There's no place like home.",
"Show me the money!",
}
Functions ¶
func GetDemoFromFile ¶
GetDemoFromFile returns a doc from a template
func GetDocByTemplate ¶
GetDocByTemplate returns a bson.M document
func GetRandomizedDoc ¶
GetRandomizedDoc returns a randomized doc from byte string
func RandomizeDocument ¶
RandomizeDocument traverses a doc and replace values with random values according to their data type.
Types ¶
type FavoritesDoc ¶
type FavoritesDoc struct { Sports []string Music []string Cities []string Books []string Movies []string }
FavoritesDoc -
type FavoritesSchema ¶
type FavoritesSchema struct { ID string `json:"_id" bson:"_id"` FavoriteBook string `json:"favoriteBook" bson:"favoriteBook"` FavoriteCity string `json:"favoriteCity" bson:"favoriteCity"` FavoriteMovie string `json:"favoriteMovie" bson:"favoriteMovie"` FavoriteMusic string `json:"favoriteMusic" bson:"favoriteMusic"` FavoriteSport string `json:"favoriteSport" bson:"favoriteSport"` }
FavoritesSchema -
Click to show internal directories.
Click to hide internal directories.