user

package
v0.0.0-...-8b989c9 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginOrRegister

func LoginOrRegister(conn *websocket.Conn)

LoginOrRegister speaks with the LoginOrRegister function in the server part. This function is used to initialize the user.

func Trim

func Trim(str string) string

func Work

func Work(conn *websocket.Conn, wg sync.WaitGroup)

Types

type User

type User struct {
	gorm.Model
	Name     string `json:"name"`
	Password string `json:"password"`
}

User struct will handle user input and will send requests to the server

func NewUser

func NewUser(name string, pass string) User

NewUser creates a new User

Jump to

Keyboard shortcuts

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