handlers

package
v0.0.0-...-62653ef Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallbackHandler

func CallbackHandler(c *gin.Context)

func ChatRoom

func ChatRoom(c *gin.Context, hub *ChatHub)

func Home

func Home(c *gin.Context)

func RetryLogin

func RetryLogin(c *gin.Context)

func SignInWithProvider

func SignInWithProvider(c *gin.Context)

func Success

func Success(c *gin.Context)

func TokenAuthMiddleware

func TokenAuthMiddleware() gin.HandlerFunc

Types

type ChatHub

type ChatHub struct {
	Clients          map[*Client]bool
	Broadcast        chan []byte
	ClientRegister   chan *Client
	ClientUnregister chan *Client
}

func (*ChatHub) Run

func (h *ChatHub) Run()

type Client

type Client struct {
	UserID string
	Conn   *websocket.Conn
	Send   chan []byte
}

Jump to

Keyboard shortcuts

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