Documentation ¶
Index ¶
- Variables
- func InsertDataAnime(uid string, anime AnimationData, views int, likes int, comments int) (InsertedID interface{})
- func InsertOneDoc(db string, collection string, doc interface{}) (insertedID interface{})
- func MongoConnect(dbname string) (db *mongo.Database)
- type AnimationData
- type StatisticData
Constants ¶
This section is empty.
Variables ¶
View Source
var MongoString string = os.Getenv("MONGOSTRING")
Functions ¶
func InsertDataAnime ¶
func InsertDataAnime(uid string, anime AnimationData, views int, likes int, comments int) (InsertedID interface{})
func InsertOneDoc ¶
func MongoConnect ¶
Types ¶
type AnimationData ¶
type AnimationData struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` UniversalID string `bson:"uid,omitempty" json:"uid,omitempty"` Title string `bson:"title,omitempty" json:"title,omitempty"` Producer string `bson:"producer,omitempty" json:"producer,omitempty"` Games string `bson:"games,omitempty" json:"games,omitempty"` Dates string `bson:"dates,omitempty" json:"dates,omitempty"` URLVid string `bson:"urlvid,omitempty" json:"urlvid,omitempty"` }
type StatisticData ¶
type StatisticData struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` UniversalID string `bson:"uid,omitempty" json:"uid,omitempty"` Animation AnimationData `bson:"animation,omitempty" json:"animation,omitempty"` Views int `bson:"views,omitempty" json:"views,omitempty"` Likes int `bson:"likes,omitempty" json:"likes,omitempty"` Comments int `bson:"comments,omitempty" json:"comments,omitempty"` }
func GetAllDataAnime ¶
func GetAllDataAnime() (data []StatisticData)
func GetAnimeFromID ¶
func GetDataAnimeWithUID ¶
func GetDataAnimeWithUID(uid string) (anidata StatisticData)
Click to show internal directories.
Click to hide internal directories.