model

package
v0.0.0-...-12f1d27 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lobby

type Lobby struct {
	Token           string   `json:"token"`
	Locations       []string `json:"locations"`
	CurrentLocation string   `json:"currentloc"`
	AmountPl        int      `json:"amountpl"`
	AmountSpy       int      `json:"amountspy"`
	SpyPlayers      []string `json:"spyplayers"`
	AllPlayers      []string `json:"allplayers"`
	Status          string   `json:"status"`
}

Lobby type

func TestLobby

func TestLobby(t *testing.T) *Lobby

TestLobby func

type Token

type Token struct {
	UserID uint
	jwt.StandardClaims
}

Token type

type User

type User struct {
	ID       int    `json:"id"`
	Login    string `json:"login"`
	Password string `json:"password"`
	Token    string `json:"token"`
	Lobby    string `json:"lobby"`
}

User type

func TestUser

func TestUser(t *testing.T) *User

TestUser func

func (*User) ComparePassword

func (user *User) ComparePassword(password string) (map[string]interface{}, bool)

ComparePassword func

func (*User) EncryptPassword

func (user *User) EncryptPassword() (map[string]interface{}, bool)

EncryptPassword func

func (*User) Sanitize

func (user *User) Sanitize()

Sanitize func

func (*User) Validate

func (user *User) Validate() (map[string]interface{}, bool)

Validate func

Jump to

Keyboard shortcuts

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