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 TraceMoeResp
- type TraceMoeResult
- 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://api.trace.moe/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 TraceMoeResp ¶
type TraceMoeResp struct { FrameCount int `json:"frameCount"` Error string `json:"error"` Result []TraceMoeResult `json:"result"` }
func TraceAnime ¶
func TraceAnime(i image.Image) (*TraceMoeResp, error)
type TraceMoeResult ¶ added in v1.1.0
type TranslateRequest ¶
type TranslateResponse ¶
type TranslateResponse []interface{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.