Documentation ¶
Index ¶
- Constants
- Variables
- func AnilistAnimeIDQuery(id int) map[string]string
- func AnilistAnimeSearchQuery(query string) map[string]string
- func AnilistMangaSearchQuery(query string) map[string]string
- func GetStringValidation(answers []string, guess string) bool
- func Getuser(ctx *exrouter.Context) *discordgo.User
- func Index(arr []string, str string) int
- func LoadImage(url string) (image.Image, error)
- func ParseDate(year, month, day int) string
- func RandomString(n int) string
- func UrlToStruct(url string, target interface{}) error
- type AniListAnimeSearchResponse
- type AniListMangaSearchResponse
- type DynamoDBMusicQuizDatabase
- func (db *DynamoDBMusicQuizDatabase) CreateScore(id string, score, attempts int)
- func (db *DynamoDBMusicQuizDatabase) GetScore(id string) (int, int)
- func (db *DynamoDBMusicQuizDatabase) GetScores() map[string]MusicQuizEntryTuple
- func (db *DynamoDBMusicQuizDatabase) SetScores()
- func (db *DynamoDBMusicQuizDatabase) UpdateScore(id string, score, attempts int)
- type DynamoDBPrefixDatabase
- func (db *DynamoDBPrefixDatabase) CheckGuild(id string) bool
- func (db *DynamoDBPrefixDatabase) CreateGuild(id, prefix string)
- func (db *DynamoDBPrefixDatabase) GetGuilds() map[string]string
- func (db *DynamoDBPrefixDatabase) GetPrefix(id string) string
- func (db *DynamoDBPrefixDatabase) RemoveGuild(id string)
- func (db *DynamoDBPrefixDatabase) SetGuilds()
- func (db *DynamoDBPrefixDatabase) UpdateGuild(id, prefix string)
- type GifCacheDatabase
- type GifDatabase
- type GifImage
- type GifItem
- type GifItemList
- type GifUpload
- type MALAnime
- type MusicQuizDatabase
- type MusicQuizEntry
- type MusicQuizEntryTuple
- type PrefixDatabase
- type PrefixEntry
- type TraceSearchResult
Constants ¶
View Source
const ImgurEndpoint = "https://api.imgur.com/3"
Variables ¶
View Source
var ( AwsSession *session.Session DynamoDBInstance *dynamodb.DynamoDB MQDB MusicQuizDatabase PDB PrefixDatabase GBD GifDatabase ImgurToken string ImgurUsername string )
View Source
var HttpClient *http.Client
Functions ¶
func AnilistAnimeIDQuery ¶
func AnilistAnimeSearchQuery ¶
func AnilistMangaSearchQuery ¶
func GetStringValidation ¶
GetStringValidation checks if string is correct
func RandomString ¶
RandomString returns random string at fixed length
func UrlToStruct ¶
UrlToStruct loads url json to struct target
Types ¶
type AniListAnimeSearchResponse ¶
type AniListAnimeSearchResponse struct { Data struct { Media struct { IDMal int `json:"idMal"` Title struct { Romaji string `json:"romaji"` English string `json:"english"` Native string `json:"native"` UserPreferred string `json:"userPreferred"` } `json:"title"` Type string `json:"type"` Format string `json:"format"` Status string `json:"status"` Description string `json:"description"` StartDate struct { Year int `json:"year"` Month int `json:"month"` Day int `json:"day"` } `json:"startDate"` EndDate struct { Year int `json:"year"` Month int `json:"month"` Day int `json:"day"` } `json:"endDate"` Season string `json:"season"` SeasonYear int `json:"seasonYear"` Episodes int `json:"episodes"` Source string `json:"source"` CoverImage struct { ExtraLarge string `json:"extraLarge"` Color string `json:"color"` } `json:"coverImage"` Genres []string `json:"genres"` AverageScore int `json:"averageScore"` Studios struct { Edges []struct { Node struct { IsAnimationStudio bool `json:"isAnimationStudio"` Name string `json:"name"` } `json:"node"` } `json:"edges"` } `json:"studios"` Rankings []struct { Rank int `json:"rank"` Type string `json:"type"` AllTime bool `json:"allTime"` } `json:"rankings"` SiteURL string `json:"siteUrl"` } `json:"Media"` } `json:"data"` }
type AniListMangaSearchResponse ¶
type AniListMangaSearchResponse struct { Data struct { Media struct { IDMal int `json:"idMal"` Title struct { Romaji string `json:"romaji"` English string `json:"english"` Native string `json:"native"` UserPreferred string `json:"userPreferred"` } `json:"title"` Type string `json:"type"` Format string `json:"format"` Status string `json:"status"` Description string `json:"description"` StartDate struct { Year int `json:"year"` Month int `json:"month"` Day int `json:"day"` } `json:"startDate"` EndDate struct { Year int `json:"year"` Month int `json:"month"` Day int `json:"day"` } `json:"endDate"` Volumes int `json:"volumes"` Chapters int `json:"chapters"` Source string `json:"source"` CoverImage struct { ExtraLarge string `json:"extraLarge"` Color string `json:"color"` } `json:"coverImage"` Staff struct { Edges []struct { Node struct { Name struct { Full string `json:"full"` } `json:"name"` } `json:"node"` } `json:"edges"` } `json:"staff"` Genres []string `json:"genres"` AverageScore int `json:"averageScore"` Rankings []struct { Rank int `json:"rank"` Type string `json:"type"` AllTime bool `json:"allTime"` } `json:"rankings"` SiteURL string `json:"siteUrl"` } `json:"Media"` } `json:"data"` }
type DynamoDBMusicQuizDatabase ¶
func (*DynamoDBMusicQuizDatabase) CreateScore ¶
func (db *DynamoDBMusicQuizDatabase) CreateScore(id string, score, attempts int)
func (*DynamoDBMusicQuizDatabase) GetScore ¶
func (db *DynamoDBMusicQuizDatabase) GetScore(id string) (int, int)
func (*DynamoDBMusicQuizDatabase) GetScores ¶
func (db *DynamoDBMusicQuizDatabase) GetScores() map[string]MusicQuizEntryTuple
func (*DynamoDBMusicQuizDatabase) SetScores ¶
func (db *DynamoDBMusicQuizDatabase) SetScores()
func (*DynamoDBMusicQuizDatabase) UpdateScore ¶
func (db *DynamoDBMusicQuizDatabase) UpdateScore(id string, score, attempts int)
type DynamoDBPrefixDatabase ¶
func (*DynamoDBPrefixDatabase) CheckGuild ¶
func (db *DynamoDBPrefixDatabase) CheckGuild(id string) bool
func (*DynamoDBPrefixDatabase) CreateGuild ¶
func (db *DynamoDBPrefixDatabase) CreateGuild(id, prefix string)
func (*DynamoDBPrefixDatabase) GetGuilds ¶
func (db *DynamoDBPrefixDatabase) GetGuilds() map[string]string
func (*DynamoDBPrefixDatabase) GetPrefix ¶
func (db *DynamoDBPrefixDatabase) GetPrefix(id string) string
func (*DynamoDBPrefixDatabase) RemoveGuild ¶
func (db *DynamoDBPrefixDatabase) RemoveGuild(id string)
func (*DynamoDBPrefixDatabase) SetGuilds ¶
func (db *DynamoDBPrefixDatabase) SetGuilds()
func (*DynamoDBPrefixDatabase) UpdateGuild ¶
func (db *DynamoDBPrefixDatabase) UpdateGuild(id, prefix string)
type GifCacheDatabase ¶
func (*GifCacheDatabase) CheckDup ¶
func (db *GifCacheDatabase) CheckDup(guildId, hash string) bool
func (*GifCacheDatabase) GetGif ¶
func (db *GifCacheDatabase) GetGif(guildId string) (string, string)
func (*GifCacheDatabase) SetAlbums ¶
func (db *GifCacheDatabase) SetAlbums()
func (*GifCacheDatabase) UploadGif ¶
func (db *GifCacheDatabase) UploadGif(guildId, userId, imgUrl, hash string) error
type GifDatabase ¶
type GifItemList ¶
type MusicQuizDatabase ¶
type MusicQuizEntry ¶
type MusicQuizEntryTuple ¶
type PrefixDatabase ¶
type PrefixEntry ¶
type TraceSearchResult ¶
Click to show internal directories.
Click to hide internal directories.