Documentation ¶
Index ¶
- Variables
- func CreateRoom(c echo.Context) error
- func DBNotFound(err error, msg string) error
- func ExitRoom(c echo.Context) error
- func GameEvent(c echo.Context) error
- func GetCurrentGame(c echo.Context) (*game.Game, error)
- func GetCurrentPlayer(c echo.Context) (*model.Player, error)
- func GetCurrentRoom(c echo.Context) (*model.Room, error)
- func GetCurrentUser(c echo.Context) (*model.User, error)
- func GetDB(e echo.Context) *gorm.DB
- func GetGameList(c echo.Context) error
- func GetPlayer(c echo.Context) error
- func GetPlayerByID(c echo.Context) error
- func GetProfile(c echo.Context) error
- func GetProfileById(c echo.Context) error
- func GetRoom(c echo.Context) error
- func GetRoomByID(c echo.Context) error
- func GetUser(c echo.Context) error
- func GetUserById(c echo.Context) error
- func IntParam(c echo.Context, name string) int
- func JoinRoom(c echo.Context) error
- func Login(c echo.Context) error
- func LoginOpenid(c echo.Context, param LoginParam) error
- func LoginPassword(c echo.Context, param LoginParam) error
- func Logout(c echo.Context) error
- func NewValidator() echo.Validator
- func Ready(c echo.Context) error
- func RoomSSE(c echo.Context) error
- func RoomSocket(c echo.Context) error
- func SignUp(c echo.Context) error
- func StartGame(c echo.Context) error
- func SwapSeat(c echo.Context) error
- func UpdateProfile(c echo.Context) error
- type LoginParam
Constants ¶
This section is empty.
Variables ¶
View Source
var Regexps = map[string]*regexp2.Regexp{ "USERNAME": regexp2.MustCompile("^(?!_)(?![0-9]+$)[a-zA-Z0-9_]+(?<!_)$", 0), "PASSWORD": regexp2.MustCompile("^(?![0-9]+$)(?![a-zA-Z]+$)(?=[A-Za-z])[0-9A-Za-z]{6,16}$", 0), }
Functions ¶
func CreateRoom ¶
func CreateRoom(c echo.Context) error
func DBNotFound ¶
func GetCurrentGame ¶
func GetCurrentPlayer ¶
func GetCurrentRoom ¶
func GetCurrentUser ¶
func GetGameList ¶
func GetGameList(c echo.Context) error
func GetPlayerByID ¶
func GetPlayerByID(c echo.Context) error
func GetProfile ¶
func GetProfile(c echo.Context) error
func GetProfileById ¶
func GetProfileById(c echo.Context) error
func GetRoomByID ¶
func GetRoomByID(c echo.Context) error
func GetUserById ¶
func GetUserById(c echo.Context) error
func LoginOpenid ¶
func LoginOpenid(c echo.Context, param LoginParam) error
func LoginPassword ¶
func LoginPassword(c echo.Context, param LoginParam) error
func NewValidator ¶
func NewValidator() echo.Validator
func RoomSocket ¶
func RoomSocket(c echo.Context) error
func UpdateProfile ¶
func UpdateProfile(c echo.Context) error
Types ¶
type LoginParam ¶
type LoginParam struct { Type string `json:"type" form:"type" query:"type"` Username string `json:"username" form:"username" query:"username" validate:"regexp=USERNAME"` Password string `json:"password" form:"password" query:"password"` Provider string `json:"provider" form:"provider" query:"provider"` Token string `json:"token" form:"token" query:"token"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.