user

package
v0.0.0-...-c857007 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Rendered for js/wasm

Overview

Package user contains code to create and edit users that can play games in the lobby.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Socket

type Socket interface {
	Close()
}

Socket is a structure that the user interacts with for the lobby and game.

type User

type User struct {
	Socket Socket
	// contains filtered or unexported fields
}

User is a http/login helper.

func New

func New(httpClient *http.Client) User

New creates a http/login helper struct.

func (*User) InitDom

func (u *User) InitDom(ctx context.Context, wg *sync.WaitGroup)

InitDom regesters user dom functions.

func (User) JWT

func (u User) JWT() string

JWT gets the value of the jwt input.

func (*User) Logout

func (u *User) Logout()

Logout logs out the user

func (User) Username

func (u User) Username() string

UserName returns the username of the logged in user. If any problem occurs, an empty string is returned.

Jump to

Keyboard shortcuts

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