Documentation ¶
Index ¶
- Constants
- func AddUsersToTestDb(users []models.User, db *dao.TestDB)
- func AuthMiddleware(next http.Handler) http.Handler
- func AuthenticateUser(u models.User, base dao.DBase) (token map[string]string, err error)
- func CreateUser(userIn models.User, db dao.DBase) (userOut models.User, err error)
- func ExtractJWTToken(req *http.Request, tokenType TokenType) (string, error)
- func MakeToken(u models.User) (map[string]string, error)
- func NewClient(g *Game, conn *websocket.Conn)
- func RefreshToken(refreshToken string, u models.User) (map[string]string, error)
- func UserFromJson(data io.ReadCloser) (user models.User, err error)
- func UserFromToken(token string, db dao.DBase) (user models.User, err error)
- type Client
- type Game
- type GameState
- type TokenType
Constants ¶
View Source
const ( ID = iota X Y ACT DIRECTION )
View Source
const ( READY byte = iota CREATE ASSIGN MOVE WRITE )
View Source
const ( LEFT = iota RIGHT UP DOWN )
Directions
Variables ¶
This section is empty.
Functions ¶
func AuthenticateUser ¶
func CreateUser ¶
func RefreshToken ¶
func UserFromJson ¶
func UserFromJson(data io.ReadCloser) (user models.User, err error)
Types ¶
Click to show internal directories.
Click to hide internal directories.