Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertCurrency(fromAmt float64, from string, to string) (float64, error)
- func ConvertTimezone(timeStr, srcZoneStr, destZoneStr string) (time.Time, error)
- func DecodeFlag(image image.Image) ([]byte, error)
- func EncodeFlag(data []byte) image.Image
- func GetFontByName(name string, size float64) font.Face
- func GetMinecraftSkin(player *Player, renderType MinecraftRenderType) (image.Image, error)
- func GetNotoBoldFont(size float64) font.Face
- func GetNotoFont(size float64) font.Face
- func IntnNoDup(n int, prevPick *int) int
- func MapToEmoji(in string) (out []string, err error)
- func MustMapToEmoji(in string) []string
- func ParseEmojis(input string) []discordgo.Emoji
- func SkipCI(t *testing.T)
- func Translate(st, sl, tl string) (string, error)
- type ALMedia
- type ALRequest
- type ALResponse
- type Data
- type EmojiConversionError
- type ExchangeRateInfo
- type MediaType
- type MinecraftRenderType
- type NHentai
- type Player
- type Response
- type TraceMoeDocs
- type TraceMoeResp
- type TranslateRequest
- type TranslateResponse
Constants ¶
View Source
const ( Avatars MinecraftRenderType = "avatars" Head = "head" Body = "body" Skins = "skins" )
View Source
const HEIGHT = 1080
View Source
const TRACE_URL = "https://trace.moe/api/search"
View Source
const WIDTH = 1920
Variables ¶
View Source
var ErrIncorrectCurrency = errors.New("one of the currency symbols is incorrect")
View Source
var SearchQueryTemplate = `` /* 248-byte string literal not displayed */
Functions ¶
func ConvertCurrency ¶
func ConvertTimezone ¶
func EncodeFlag ¶
func GetMinecraftSkin ¶
func GetMinecraftSkin(player *Player, renderType MinecraftRenderType) (image.Image, error)
func GetNotoBoldFont ¶
func GetNotoFont ¶
func MapToEmoji ¶
func ParseEmojis ¶
Types ¶
type ALMedia ¶
type ALMedia struct { SiteURL string `json:"siteUrl"` Title struct { English string `json:"english"` } `json:"title"` CoverImage struct { Large string `json:"large"` } `json:"coverImage"` Type MediaType `json:"type"` Status string `json:"status"` SeasonYear int `json:"seasonYear"` Episodes int `json:"episodes"` Duration int `json:"duration"` Chapters int `json:"chapters"` Volumes int `json:"volumes"` Description string `json:"description"` Genres []string `json:"genres"` AverageScore int `json:"averageScore"` }
func GetAnimeInfoFromID ¶
func GetAnimeInfoFromTitle ¶
func GetMangaInfoFromTitle ¶
type ALResponse ¶
type ALResponse struct { Data struct { Media ALMedia `json:"media"` } `json:"data"` }
type EmojiConversionError ¶
func (EmojiConversionError) Error ¶
func (e EmojiConversionError) Error() string
type ExchangeRateInfo ¶
type ExchangeRateInfo struct { Error string `json:"error"` Rates map[currency.Unit]float64 Base currency.Unit Date string `json:"date"` }
func GetExchangeRateInfo ¶
func (*ExchangeRateInfo) UnmarshalJSON ¶
func (e *ExchangeRateInfo) UnmarshalJSON(data []byte) error
type MinecraftRenderType ¶
type MinecraftRenderType string
type NHentai ¶
type NHentai struct { Title string Tags map[string][]string PageCount int CoverArt string URL string }
func ParseNhentai ¶
type Player ¶
type Player struct { Username string `json:"username"` Id string `json:"id"` Avatar string `json:"avatar"` Meta map[string]interface{} `json:"meta"` }
func LookupMinecraft ¶
type TraceMoeDocs ¶
type TraceMoeDocs struct { From float64 `json:"from"` To float64 `json:"to"` AnilistID int `json:"anilist_id"` At float64 `json:"at"` Season string `json:"season"` Anime string `json:"anime"` Filename string `json:"filename"` Episode int `json:"episode"` Tokenthumb string `json:"tokenthumb"` Similarity float64 `json:"similarity"` Title string `json:"title"` TitleNative string `json:"title_native"` TitleChinese string `json:"title_chinese"` TitleEnglish string `json:"title_english"` TitleRomaji string `json:"title_romaji"` MalID int `json:"mal_id"` Synonyms []string `json:"synonyms"` SynonymsChinese []interface{} `json:"synonyms_chinese"` IsAdult bool `json:"is_adult"` }
type TraceMoeResp ¶
type TraceMoeResp struct { RawDocsCount int `json:"RawDocsCount"` RawDocsSearchTime int `json:"RawDocsSearchTime"` ReRankSearchTime int `json:"ReRankSearchTime"` CacheHit bool `json:"CacheHit"` Trial int `json:"trial"` Limit int `json:"limit"` LimitTTL int `json:"limit_ttl"` Quota int `json:"quota"` QuotaTTL int `json:"quota_ttl"` Docs []TraceMoeDocs `json:"docs"` }
func TraceAnime ¶
func TraceAnime(i image.Image) (*TraceMoeResp, error)
type TranslateRequest ¶
type TranslateResponse ¶
type TranslateResponse []interface{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.