server

package
v0.0.0-...-289bd61 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	B *models.Board

	Quit = make(chan struct{}, 1)
)

Functions

func DeleteFile

func DeleteFile(f string) error

func DeleteVoice

func DeleteVoice(f string) error

func HashPass

func HashPass(pin string) string

func NewUid16

func NewUid16() string

func RandCheck

func RandCheck() string

func RandDelay

func RandDelay()

func Rip

func Rip(r *http.Request) string

func Start

func Start()

func ValidMail

func ValidMail(email string) bool

func ValidName

func ValidName(name string) (bool, error)

func ValidPassword

func ValidPassword(pw1, pw2 string) (bool, error)

Types

type JWT

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

func NewJWT

func NewJWT() *JWT

func (*JWT) Create

func (j *JWT) Create(uid, ip string, ttl time.Duration) (string, error)

func (*JWT) Validate

func (j *JWT) Validate(token string) (any, any, error)

type Message

type Message = models.Message

type Privity

type Privity map[string]struct{}

func (Privity) Autoclean

func (p Privity) Autoclean()

type RandFor

type RandFor struct {
	Uuid string
	Rand string
}

type User

type User = models.User

type Wait

type Wait map[string]User

func (Wait) Already

func (w Wait) Already(r string) bool

Jump to

Keyboard shortcuts

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