handlers

package
v0.0.0-...-dc057c6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveUsers

func ActiveUsers(w http.ResponseWriter, r *http.Request)

func GetUserAll

func GetUserAll(w http.ResponseWriter, r *http.Request)

func Index

func Index(w http.ResponseWriter, r *http.Request)

func RequestWithToken

func RequestWithToken(w http.ResponseWriter, r *http.Request)

websocket connection request

func UserCreate

func UserCreate(w http.ResponseWriter, r *http.Request)

Create new use and add to user table

func UserLogin

func UserLogin(w http.ResponseWriter, r *http.Request)

Check username and passoword in user table

Types

type CrRequest

type CrRequest struct {
	UserName string `json:"username"`
	Password string `json:"password"`
}

Create a struct that models the structure for a user creating Request

type CrResponse

type CrResponse struct {
	ID       string `json:"id"`
	UserName string `json:"username"`
}

Response

type LogRequest

type LogRequest struct {
	UserName string `json:"username"`
	Password string `json:"password"`
}

Create a struct that models the structure for a user login Request

type LogResponse

type LogResponse struct {
	URL string `json:"URL"`
}

Response

type UserInfo

type UserInfo struct {
	Passhash string
	Id       string
	Token    string
	ExpireAt int64
}

Jump to

Keyboard shortcuts

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