entity

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadCaster

type BroadCaster struct {
	Clients   map[*websocket.Conn]Client
	Broadcast chan ChatMessage
}

BroadCaster entity

type ChatMessage

type ChatMessage struct {
	Identifier string `json:"-"`
	ClientID   string `json:"-"`
	IsSelf     bool   `json:"isSelf"`
	UserName   string `json:"username"`
	Message    string `json:"message"`
}

ChatMessage entity

type ChatRoom added in v0.2.0

type ChatRoom struct {
	Identifier     string
	RoomName       string
	HashedPassword string
	Salt           string
}

ChatRoom entity

type Client

type Client struct {
	Identifier string
	ClientID   string
}

Client entity

type Cookie struct {
	Cookie *http.Cookie
}

Cookie entity

type CreateRoomForm added in v0.2.0

type CreateRoomForm struct {
	RoomName string `form:"roomname" validate:"required"`
	Password string `form:"password" validate:"required,min=8"`
}

CreateRoomForm entity

type JwtClaims added in v0.2.0

type JwtClaims struct {
	Name       string `json:"name"`
	Admin      bool   `json:"admin"`
	Identifier string `json:"identifier"`
	jwt.RegisteredClaims
}

JwtClaims entity

type LoginRoomForm added in v0.2.0

type LoginRoomForm struct {
	UserName string `form:"username" validate:"required,min=8"`
	Password string `form:"password" validate:"required"`
}

LoginRoomForm entity

Jump to

Keyboard shortcuts

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