phigros

package
v0.0.0-...-1562072 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChanllengeMode = transform.ReturnLucyMainDataIndex("phi") + "rec/challengemode/"
)

Functions

func CBCDecrypt

func CBCDecrypt(ciphertext string, key string) string

func CardRender

func CardRender(canvas *gg.Context, dataOrigin []byte) *gg.Context

CardRender Render By Original Image,so it's single work and do slowly.

func DecHashToRaw

func DecHashToRaw(raw string) string

func DrawParallelogram

func DrawParallelogram(img image.Image) image.Image

DrawParallelogram Draw Card TriAnglePath

func GetRank

func GetRank(num int, isFC bool) string

GetRank get this rank.

func GetUserChallengeMode

func GetUserChallengeMode(num int) (challenge string, link string)

GetUserChallengeMode Challenge Mode Type Reply

func GetUserInfoTimeFromDatabase

func GetUserInfoTimeFromDatabase(userID int64) int64

func InitDataBase

func InitDataBase() error

func PhiBind

func PhiBind(ctx *rei.Ctx, bindAcc string)

func RawJsonParse

func RawJsonParse(raw string) (qq int64, Session string)

func RenderPhi

func RenderPhi(ctx *rei.Ctx)

func RollToRenderPhigros

func RollToRenderPhigros(ctx *rei.Ctx, num string)

func SetDiffColor

func SetDiffColor(diff string, canvas *gg.Context)

SetDiffColor Set Diff Color.

Types

type PhigrosSQL

type PhigrosSQL struct {
	Id         int64  `db:"user_tgid"` // tgid
	PhiSession string `db:"session"`   // pgr session
	Time       int64  `db:"time"`      // time.
}

func FormatUserDataBase

func FormatUserDataBase(tgid int64, session string, Time int64) *PhigrosSQL

func GetUserInfoFromDatabase

func GetUserInfoFromDatabase(userID int64) *PhigrosSQL

func (*PhigrosSQL) BindUserDataBase

func (info *PhigrosSQL) BindUserDataBase() error

type PhigrosStruct

type PhigrosStruct struct {
	Status  bool   `json:"status"`
	Message string `json:"message"`
	Content struct {
		Phi      bool `json:"phi"`
		BestList []struct {
			Score      int     `json:"score"`
			Acc        float64 `json:"acc"`
			Level      string  `json:"level"`
			Fc         bool    `json:"fc"`
			SongId     string  `json:"songId"`
			Songname   string  `json:"songname"`
			Difficulty float64 `json:"difficulty"`
			Rks        float64 `json:"rks"`
		} `json:"bests"`
		PlayerID          string  `json:"PlayerID"`
		ChallengeModeRank int     `json:"ChallengeModeRank"`
		RankingScore      float64 `json:"RankingScore"`
	} `json:"content"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL