Documentation ¶
Index ¶
- Variables
- func BindFriendCode(ctx *rei.Ctx, bindCode int64)
- func BindUserToMaimai(ctx *rei.Ctx, bindName string)
- func CheckTheTicketIsValid(ticket string) bool
- func ConvertRealPlayWords(retry RealConvertPlay) string
- func ConvertZlib(value, total int) string
- func FullPageRender(data player, ctx *rei.Ctx) (raw image.Image)
- func GetChartType(chart string) image.Image
- func GetCover(id string) (image.Image, error)
- func GetCoverFromLxns(url string) (images image.Image, err error)
- func GetCoverLxns(id string) (image.Image, error)
- func GetDefaultPlate(id string) (image.Image, error)
- func GetRankPicRaw(id int) (image.Image, error)
- func GetRateStatusAndRenderToImage(rank string) image.Image
- func GetShouldCount(archivement float64) float64
- func GetUserDefaultBackgroundDataFromDatabase(userID int64) string
- func GetUserInfoNameFromDatabase(userID int64) string
- func GetUserPlateInfoFromDatabase(userID int64) string
- func GetUserSwitcherInfoFromDatabase(userid int64) bool
- func GetUserToken(userid string) string
- func HandlerUserSetsCustomImage(ctx *rei.Ctx, ps []tgba.PhotoSize)
- func InitDataBase() error
- func LoadComboImage(imageName string) image.Image
- func LoadFontFace(filePath string, size float64) font.Face
- func LoadPictureWithResize(link string, w int, h int) image.Image
- func LoadSyncImage(imageName string) image.Image
- func MaimaiRenderBase(ctx *rei.Ctx, israw bool)
- func MaimaiSwitcherService(ctx *rei.Ctx)
- func MixedRegionWriter(regionID int, playCount int, createdDate string) string
- func NoHeadLineCase(word string) string
- func QueryMaiBotDataFromUserName(username string) (playerdata []byte, err error)
- func QueryReferSong(Alias string, isLxnet bool) (status bool, id []int, needAcc bool, accInfoList [][]int)
- func ReCardRenderBase(data LxnsMaimaiRequestDataPiece, getNum int, isSimpleRender bool) image.Image
- func ReFullPageRender(data LxnsMaimaiRequestB50, userData LxnsMaimaiRequestFromFriendCode, ...) (image.Image, bool)
- func RemoveUserLocalCustomImage(ctx *rei.Ctx)
- func RenderCard(data playerData, num int, isSimpleRender bool) image.Image
- func ReportToEndPoint(getReport int, getReportType string) string
- func Resize(image image.Image, w int, h int) image.Image
- func ReturnMaiIndexBackground(returnInt int) image.Image
- func SetUserDefaultPlateToDatabase(ctx *rei.Ctx, plateName string)
- func SetUserPlateToLocal(ctx *rei.Ctx, plateID string)
- func UpdateAliasPackage()
- func UpdateHandler(userMusicList UserMusicListStruct, getTokenId string) int
- type AliasesReturnValue
- type DataHostSQL
- type DivingFishB50UserName
- type DivingFishDevFullDataRecords
- type LxnsAliases
- type LxnsMaimaiRequestB50
- type LxnsMaimaiRequestDataPiece
- type LxnsMaimaiRequestFromFriendCode
- type LxnsMaimaiRequestUserReferBestSong
- type LxnsMaimaiRequestUserReferBestSongIndex
- type LxnsSongListInfo
- type MappedListStruct
- type RealConvertPlay
- type UserIDToMaimaiFriendCode
- type UserIDToQQ
- type UserIDToToken
- type UserSwitcherService
- type WebPingStauts
- type ZlibErrorStatus
Constants ¶
This section is empty.
Variables ¶
var ( UniFontPath = maifont + "Montserrat-Bold.ttf" Root = transform.ReturnLucyMainDataIndex("maidx") + "resources/maimai/" )
Functions ¶
func BindFriendCode ¶
BindFriendCode Bind FriendCode To Users
func BindUserToMaimai ¶
BindUserToMaimai Bind UserMaiMaiID
func CheckTheTicketIsValid ¶
func ConvertRealPlayWords ¶
func ConvertRealPlayWords(retry RealConvertPlay) string
func ConvertZlib ¶
func FullPageRender ¶
FullPageRender Render Full Page
func GetCoverFromLxns ¶
GetCoverFromLxns Get origin Cover From LXNS Service.
func GetCoverLxns ¶
GetCoverLxns Careful The nil data
func GetRateStatusAndRenderToImage ¶
GetRateStatusAndRenderToImage Get Rate
func GetShouldCount ¶
func GetUserDefaultBackgroundDataFromDatabase ¶
GetUserDefaultBackgroundDataFromDatabase Get Default Background.
func GetUserInfoNameFromDatabase ¶
GetUserInfoNameFromDatabase GetUserName
func GetUserPlateInfoFromDatabase ¶
GetUserPlateInfoFromDatabase Get plate data
func GetUserToken ¶
func HandlerUserSetsCustomImage ¶
HandlerUserSetsCustomImage Handle User Custom Image and Send To Local
func InitDataBase ¶
func InitDataBase() error
func LoadComboImage ¶
LoadComboImage Load combo images
func LoadFontFace ¶
LoadFontFace load font face once before running, to work it quickly and save memory.
func LoadPictureWithResize ¶
LoadPictureWithResize Load Picture
func LoadSyncImage ¶
LoadSyncImage Load sync images
func MaimaiRenderBase ¶
MaimaiRenderBase Render Base Maimai B50.
func MaimaiSwitcherService ¶
MaimaiSwitcherService True == Lxns Service || False == Diving Fish Service.
func MixedRegionWriter ¶
MixedRegionWriter Some Mixed Magic, looking for your region information.
func QueryReferSong ¶
func QueryReferSong(Alias string, isLxnet bool) (status bool, id []int, needAcc bool, accInfoList [][]int)
QueryReferSong use LocalStorageData.
func ReCardRenderBase ¶
func ReCardRenderBase(data LxnsMaimaiRequestDataPiece, getNum int, isSimpleRender bool) image.Image
ReCardRenderBase This Function is same as cardRender, but it convert for LXNS Network Maimai.
func ReFullPageRender ¶
func ReFullPageRender(data LxnsMaimaiRequestB50, userData LxnsMaimaiRequestFromFriendCode, ctx *rei.Ctx) (image.Image, bool)
func RemoveUserLocalCustomImage ¶
RemoveUserLocalCustomImage Remove User Local Image.
func RenderCard ¶
RenderCard Main Lucy Render Page , if isSimpleRender == true, then render count will not show here.
func ReportToEndPoint ¶
ReportToEndPoint Report Some Error To Wahlap Server.
func SetUserDefaultPlateToDatabase ¶
SetUserDefaultPlateToDatabase Set Default plateID To Database.
func SetUserPlateToLocal ¶
SetUserPlateToLocal Set Default Plate to Local
func UpdateAliasPackage ¶
func UpdateAliasPackage()
UpdateAliasPackage Use simple action to update alias.
func UpdateHandler ¶
UpdateHandler Update handler
Types ¶
type AliasesReturnValue ¶
type DataHostSQL ¶
type DataHostSQL struct { TelegramId int64 `db:"telegramid"` // telegramid Username string `db:"username"` // maimai user id ,query from this one. Plate string `db:"plate"` // plate Background string `db:"bg"` // bg }
func FormatUserDataBase ¶
func FormatUserDataBase(tgid int64, plate string, bg string, username string) *DataHostSQL
func (*DataHostSQL) BindUserDataBase ¶
func (info *DataHostSQL) BindUserDataBase() error
BindUserDataBase Bind Database only for DataHost Inline code.
type DivingFishB50UserName ¶
type DivingFishDevFullDataRecords ¶
type DivingFishDevFullDataRecords struct { AdditionalRating int `json:"additional_rating"` Nickname string `json:"nickname"` Plate string `json:"plate"` Rating int `json:"rating"` Records []struct { Achievements float64 `json:"achievements"` Ds float64 `json:"ds"` DxScore int `json:"dxScore"` Fc string `json:"fc"` Fs string `json:"fs"` Level string `json:"level"` LevelIndex int `json:"level_index"` LevelLabel string `json:"level_label"` Ra int `json:"ra"` Rate string `json:"rate"` SongId int `json:"song_id"` Title string `json:"title"` Type string `json:"type"` } `json:"records"` Username string `json:"username"` }
func QueryDevDataFromDivingFish ¶
func QueryDevDataFromDivingFish(username string) DivingFishDevFullDataRecords
type LxnsAliases ¶
type LxnsMaimaiRequestB50 ¶
type LxnsMaimaiRequestB50 struct { Success bool `json:"success"` Code int `json:"code"` Message string `json:"message"` Data struct { StandardTotal int `json:"standard_total"` DxTotal int `json:"dx_total"` Standard []struct { Id int `json:"id"` SongName string `json:"song_name"` Level string `json:"level"` LevelIndex int `json:"level_index"` Achievements float64 `json:"achievements"` Fc *string `json:"fc"` Fs *string `json:"fs"` DxScore int `json:"dx_score"` DxRating float64 `json:"dx_rating"` Rate string `json:"rate"` Type string `json:"type"` UploadTime time.Time `json:"upload_time"` } `json:"standard"` Dx []struct { Id int `json:"id"` SongName string `json:"song_name"` Level string `json:"level"` LevelIndex int `json:"level_index"` Achievements float64 `json:"achievements"` Fc *string `json:"fc"` Fs *string `json:"fs"` DxScore int `json:"dx_score"` DxRating float64 `json:"dx_rating"` Rate string `json:"rate"` Type string `json:"type"` UploadTime time.Time `json:"upload_time"` } `json:"dx"` } `json:"data"` }
func RequestB50DataByFriendCode ¶
func RequestB50DataByFriendCode(friendCode int64) LxnsMaimaiRequestB50
type LxnsMaimaiRequestDataPiece ¶
type LxnsMaimaiRequestDataPiece struct { Id int `json:"id"` SongName string `json:"song_name"` Level string `json:"level"` LevelIndex int `json:"level_index"` Achievements float64 `json:"achievements"` Fc *string `json:"fc"` Fs *string `json:"fs"` DxScore int `json:"dx_score"` DxRating float64 `json:"dx_rating"` Rate string `json:"rate"` Type string `json:"type"` UploadTime time.Time `json:"upload_time"` }
func DataPiecesRepacked ¶
func DataPiecesRepacked(data LxnsMaimaiRequestB50, returnTypeIsSD bool, getShouldNum int) LxnsMaimaiRequestDataPiece
type LxnsMaimaiRequestFromFriendCode ¶
type LxnsMaimaiRequestFromFriendCode struct { Success bool `json:"success"` Code int `json:"code"` Message string `json:"message"` Data struct { Name string `json:"name"` Rating int `json:"rating"` FriendCode int64 `json:"friend_code"` Trophy struct { Id int `json:"id"` Name string `json:"name"` Color string `json:"color"` } `json:"trophy"` CourseRank int `json:"course_rank"` ClassRank int `json:"class_rank"` Star int `json:"star"` IconUrl string `json:"icon_url"` NamePlate struct { Id int `json:"id"` Name string `json:"name"` } `json:"name_plate"` Frame struct { Id int `json:"id"` Name string `json:"name"` } `json:"frame"` UploadTime time.Time `json:"upload_time"` } `json:"data"` }
func RequestBasicDataFromLxns ¶
func RequestBasicDataFromLxns(friendcode int64) LxnsMaimaiRequestFromFriendCode
type LxnsMaimaiRequestUserReferBestSong ¶
type LxnsMaimaiRequestUserReferBestSong struct { Success bool `json:"success"` Code int `json:"code"` Data []struct { Id int `json:"id"` SongName string `json:"song_name"` Level string `json:"level"` LevelIndex int `json:"level_index"` Achievements float64 `json:"achievements"` Fc *string `json:"fc"` Fs *string `json:"fs"` DxScore int `json:"dx_score"` DxRating float64 `json:"dx_rating"` Rate string `json:"rate"` Type string `json:"type"` UploadTime time.Time `json:"upload_time"` } `json:"data"` }
func RequestReferSong ¶
func RequestReferSong(friendID int64, songID int64, isSD bool) LxnsMaimaiRequestUserReferBestSong
type LxnsMaimaiRequestUserReferBestSongIndex ¶
type LxnsMaimaiRequestUserReferBestSongIndex struct { Success bool `json:"success"` Code int `json:"code"` Data struct { Id int `json:"id"` SongName string `json:"song_name"` Level string `json:"level"` LevelIndex int `json:"level_index"` Achievements float64 `json:"achievements"` Fc *string `json:"fc"` Fs *string `json:"fs"` DxScore int `json:"dx_score"` DxRating float64 `json:"dx_rating"` Rate string `json:"rate"` Type string `json:"type"` UploadTime time.Time `json:"upload_time"` } `json:"data"` }
func RequestReferSongIndex ¶
func RequestReferSongIndex(friendID int64, songID int64, diff int64, isSD bool) LxnsMaimaiRequestUserReferBestSongIndex
type LxnsSongListInfo ¶
type LxnsSongListInfo struct { Songs []struct { Id int `json:"id"` Title string `json:"title"` Artist string `json:"artist"` Genre string `json:"genre"` Bpm int `json:"bpm"` Version int `json:"version"` Difficulties struct { Standard []struct { Type string `json:"type"` Difficulty int `json:"difficulty"` Level string `json:"level"` LevelValue float64 `json:"level_value"` NoteDesigner string `json:"note_designer"` Version int `json:"version"` } `json:"standard"` Dx []struct { Type string `json:"type"` Difficulty int `json:"difficulty"` Level string `json:"level"` LevelValue float64 `json:"level_value"` NoteDesigner string `json:"note_designer"` Version int `json:"version"` } `json:"dx"` } `json:"difficulties"` } `json:"songs"` Genres []struct { Id int `json:"id"` Title string `json:"title"` Genre string `json:"genre"` } `json:"genres"` Versions []struct { Id int `json:"id"` Title string `json:"title"` Version int `json:"version"` } `json:"versions"` }
type MappedListStruct ¶
type RealConvertPlay ¶
type UserIDToMaimaiFriendCode ¶
type UserIDToMaimaiFriendCode struct { TelegramId int64 `db:"telegramid"` MaimaiID int64 `db:"friendid"` }
func FormatMaimaiFriendCode ¶
func FormatMaimaiFriendCode(friendCode int64, tgid int64) *UserIDToMaimaiFriendCode
func GetUserMaiFriendID ¶
func GetUserMaiFriendID(userid int64) UserIDToMaimaiFriendCode
func (*UserIDToMaimaiFriendCode) BindUserFriendCode ¶
func (info *UserIDToMaimaiFriendCode) BindUserFriendCode() error
type UserIDToQQ ¶
type UserIDToQQ struct { QQ int64 `db:"user_qq"` // qq nums Userid string `db:"user_id"` // user_id }
func FormatUserIDDatabase ¶
func FormatUserIDDatabase(qq int64, userid string) *UserIDToQQ
func GetUserIDFromDatabase ¶
func GetUserIDFromDatabase(userID int64) UserIDToQQ
GetUserIDFromDatabase Params: user qq id ==> user maimai id.
func (*UserIDToQQ) BindUserIDDataBase ¶
func (info *UserIDToQQ) BindUserIDDataBase() error
type UserIDToToken ¶
func FormatUserToken ¶
func FormatUserToken(tgid string, token string) *UserIDToToken
func (*UserIDToToken) BindUserToken ¶
func (info *UserIDToToken) BindUserToken() error
type UserSwitcherService ¶
type UserSwitcherService struct { TGId int64 `db:"tgid"` IsUsed bool `db:"isused"` // true == lxns service \ false == Diving Fish. }
func FormatUserSwitcher ¶
func FormatUserSwitcher(tgid int64, isSwitcher bool) *UserSwitcherService
func (*UserSwitcherService) ChangeUserSwitchInfoFromDataBase ¶
func (info *UserSwitcherService) ChangeUserSwitchInfoFromDataBase() error
type WebPingStauts ¶
type WebPingStauts struct { Details struct { MaimaiDXCN struct { Uptime float64 `json:"uptime"` } `json:"maimai DX CN"` MaimaiDXCNDXNet struct { Uptime float64 `json:"uptime"` } `json:"maimai DX CN DXNet"` MaimaiDXCNMain struct { Uptime float64 `json:"uptime"` } `json:"maimai DX CN Main"` MaimaiDXCNNetLogin struct { Uptime float64 `json:"uptime"` } `json:"maimai DX CN NetLogin"` MaimaiDXCNTitle struct { Uptime float64 `json:"uptime"` } `json:"maimai DX CN Title"` MaimaiDXCNUpdate struct { Uptime float64 `json:"uptime"` } `json:"maimai DX CN Update"` } `json:"details"` Status bool `json:"status"` }
type ZlibErrorStatus ¶
type ZlibErrorStatus struct { Full struct { Field1 int `json:"10"` Field2 int `json:"30"` Field3 int `json:"60"` } `json:"full"` FullError struct { Field1 int `json:"10"` Field2 int `json:"30"` Field3 int `json:"60"` } `json:"full_Error"` ZlibError struct { Field1 int `json:"10"` Field2 int `json:"30"` Field3 int `json:"60"` } `json:"zlib_Error"` }