util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOrigin

func CheckOrigin(allowedOrigins []string) func(*http.Request) bool

func NewWebsocketUpgrader

func NewWebsocketUpgrader(rbs, wbs int, checkOrigin func(*http.Request) bool) *websocket.Upgrader

Types

type InMemoryUserStore

type InMemoryUserStore struct {
	// contains filtered or unexported fields
}

func NewInMemoryUserStore

func NewInMemoryUserStore(users ...User) *InMemoryUserStore

func (*InMemoryUserStore) VerifyUser

func (u *InMemoryUserStore) VerifyUser(username, password string) bool

type User

type User struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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