processor

package
v0.0.0-...-287eec6 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(data interface{}) error

Types

type CourseData

type CourseData struct {
	CourseHash string `bson:"courseHash" validate:"required,string,len=32"`
	//CourseID   string
	Songs []string
}

type ScoreData

type ScoreData struct {
	UserID         string `bson:"userID" validate:"required,string,min=1,max=10"`
	IsCourse       string `bson:"isCourse" validate:"required,oneof=0 1"`
	SongHash       string `bson:"SongHash,omitempty" validate:"required_if=IsCourse 0|md5"`
	CourseHash     string `bson:"CourseHash,omitempty" validate:"required_if=IsCourse 1|md5"`
	ClearType      string `bson:"clearType" validate:"required,string"`
	LnMode         string `bson:"lnMode,omitempty" `
	Score          string `bson:"score" validate:"required,string"`
	ScoreMax       string `bson:"scoreMax" validate:"required,string"`
	ScoreRate      string `bson:"scoreRate" validate:"required,string"`
	ScoreRank      string `bson:"scoreRank" validate:"required,string"`
	ScorePG        string `bson:"scorePG" validate:"required,string,min=0"`
	ScoreGR        string `bson:"scoreGR" validate:"required,string,min=0"`
	ScoreGD        string `bson:"scoreGD" validate:"required,string,min=0"`
	ScoreBD        string `bson:"scoreBD" validate:"required,string,min=0"`
	ScorePR        string `bson:"scorePR" validate:"required,string,min=0"`
	Combo          string `bson:"combo" validate:"required,string,min=0"`
	LaneOp         string `bson:"laneOp" validate:"required,string"`
	GaugeOp        string `bson:"gaugeOp" validate:"required,string"`
	InputType      string `bson:"inputType" validate:"required,string"`
	UpdateTime     string `bson:"updateTime"`
	ReplayFileData string `bson:"fileData"`
}

type ScoreProcessor

type ScoreProcessor struct {
	Logger *logger.Logger
	// contains filtered or unexported fields
}

定义 interface

func (*ScoreProcessor) ScoreHandlerSet

func (sp *ScoreProcessor) ScoreHandlerSet(w http.ResponseWriter, r *http.Request)

func (*ScoreProcessor) Sync

type ScoreProcessorHandlerFunc

type ScoreProcessorHandlerFunc func(w http.ResponseWriter, r *http.Request, sp *ScoreProcessor) error

type SignUpProcessor

type SignUpProcessor struct {
	Logger *logger.Logger
	// contains filtered or unexported fields
}

func (*SignUpProcessor) SignUpHandlerSet

func (sup *SignUpProcessor) SignUpHandlerSet(w http.ResponseWriter, r *http.Request)

func (*SignUpProcessor) Sync

type SignUpProcessorHandlerFunc

type SignUpProcessorHandlerFunc func(w http.ResponseWriter, r *http.Request, sp *SignUpProcessor) error

type SongInfo

type SongInfo struct {
	SongHash string `bson:"SongHash,omitempty" validate:"required,string,len=32"`
	//SongID     string
	SongName   string `bson:"songName" validate:"required,string"`
	SongArtist string `bson:"songArtist" validate:"required,string"`
	MaxBpm     string `bson:"maxBpm" validate:"required,string"`
	MinBpm     string `bson:"minBpm" validate:"required,string"`
	SongTotal  string `bson:"songTotal" validate:""`
	TotalNotes string `bson:"totalNotes" validate:"required,string"`
	SongLevel  string `bson:"songLevel" validate:"required,string"`
	Keys       string `bson:"keys" validate:"required,string"`
	JudgeRank  string `bson:"judgeRank" validate:"required,string"`
}

数据体

type UserData

type UserData struct {
	UserID       string `bson:"userID" validate:"required,string"`
	UserName     string `bson:"userName" validate:"required,string"`
	UserNickname string `bson:"userNickname" validate:"required,string"`
	UserEmail    string `bson:"userEmail" validate:"required,email"`
	UserPwd      string `bson:"userPwd" validate:"required,string"`
}

Jump to

Keyboard shortcuts

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