Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Achievement ¶
type Achievement struct { Character string `json:"character" bson:"character"` Skin string `json:"skin,omitempty" bson:"skin,omitempty"` }
Achievement holds the character achievement
type Character ¶
type Character struct { Name string `json:"name" toml:"name"` RealName string `json:"real_name" toml:"realName"` Age int `json:"age" toml:"age"` Role string `json:"role" toml:"role"` Sex string `json:"sex" toml:"sex"` Skins Skins `json:"skins" toml:"skins"` Tags []string `json:"tags" toml:"tags"` // sankaku tag Key string `json:"key"` Score `json:"score"` }
Character contains all main data about character
func (*Character) QueryScore ¶
func (c *Character) QueryScore(collection *mongo.Collection) error
QueryScore ...
func (*Character) QueryScoreSkins ¶
func (c *Character) QueryScoreSkins(collection *mongo.Collection)
QueryScoreSkins ...
func (*Character) UpdateSkinDefaults ¶
func (c *Character) UpdateSkinDefaults()
UpdateSkinDefaults ...
type Characters ¶
Characters provides custom marhaller for JSON
type OverWaifu ¶
type OverWaifu struct { UpdatedAt time.Time `json:"updated_at"` PostsCount int `json:"posts_count"` Characters Characters `json:"characters"` Achievements map[string]*Achievement `json:"achievements"` }
OverWaifu holds all overwaifu results
func (*OverWaifu) QueryAchievements ¶
func (ow *OverWaifu) QueryAchievements(collection *mongo.Collection) error
QueryAchievements calculates achievements
func (*OverWaifu) QueryScore ¶
func (ow *OverWaifu) QueryScore(postsCollection, charactersCollection *mongo.Collection)
QueryScore calculates score
type Score ¶
type Score struct { All int `json:"all,omitempty" bson:"all"` Safe int `json:"safe,omitempty" bson:"safe"` Questionable int `json:"questionable,omitempty" bson:"questionable"` Explicit int `json:"explicit,omitempty" bson:"explicit"` GenderSwaps int `json:"gender_swaps,omitempty" bson:"gender_swaps"` Lewd float64 `json:"lewd,omitempty" bson:"lewd"` Pure float64 `json:"pure,omitempty" bson:"pure"` VirginKillerSweater int `json:"virgin_killer_sweater,omitempty" bson:"virgin_killer_sweater"` Selfie int `json:"selfie,omitempty" bson:"selfie"` }
Score holds all scores
type Skin ¶
type Skin struct { Name string `json:"name" toml:"name"` Rarity string `json:"rarity,omitempty" toml:"rarity"` Event string `json:"event,omitempty" toml:"event"` Tags []string `json:"tags,omitempty" toml:"tags"` Key string `json:"key"` Score `json:"score"` }
Skin contains data about skin
func (*Skin) DefaultTags ¶
DefaultTags allows to assigs tags as `key_character`
func (*Skin) QueryScore ¶
func (s *Skin) QueryScore(owner *Character, collection *mongo.Collection) error
QueryScore ...
Click to show internal directories.
Click to hide internal directories.