handlers

package
v0.0.0-...-fab0456 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizeCookie        = "authorize"
	ContextUser     ctxKey = "context_user"
)

Variables

This section is empty.

Functions

func Respond

func Respond(w http.ResponseWriter, message string, v any, statusCode int)

func RespondErr

func RespondErr(w http.ResponseWriter, message string, v any)

func RespondJson

func RespondJson(w http.ResponseWriter, v any)

func ValidatePassword

func ValidatePassword(password string) bool

func ValidateRxEmail

func ValidateRxEmail(email string) bool

func ValidateRxPhone

func ValidateRxPhone(phone string) bool

func ValidateRxUsername

func ValidateRxUsername(username string) bool

Types

type Authorize

type Authorize struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Server

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

func NewServer

func NewServer(templateFS fs.FS, staticFS fs.FS, conf *config.Config, store db.Store, taskDistributor worker.TaskDistributor) (*Server, error)

func (*Server) Start

func (server *Server) Start(db *sql.DB)

Jump to

Keyboard shortcuts

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