_anidata

package module
v0.0.0-...-2c15603 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 InsertOneDoc(db string, collection string, doc interface{}) (insertedID interface{})

func MongoConnect

func MongoConnect(dbname string) (db *mongo.Database)

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 GetAnimeFromID(_id primitive.ObjectID, db *mongo.Database, col string) (anidata StatisticData, errs error)

func GetDataAnimeWithUID

func GetDataAnimeWithUID(uid string) (anidata StatisticData)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL