handlers

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentSlide = int64(-10)

Functions

func API

func API() http.Handler

func APICmd

func APICmd(config configuration.Config) http.Handler

func APILogin

func APILogin(config configuration.Config) http.Handler

func APIUsers

func APIUsers(config configuration.Config) http.Handler

func AccessControlAllow

func AccessControlAllow(next http.Handler) http.Handler

func CastSSE added in v1.0.3

func CastSSE(server data.Server, config configuration.Config) http.Handler

func Exec

func Exec() http.Handler

func Homepage

func Homepage(iframeHandler http.Handler, config configuration.Config) http.Handler

func IFrame added in v1.0.2

func IFrame(config configuration.Config) http.Handler

func Login

func Login(loginPage []byte) http.Handler

func LoginRedirect added in v1.0.4

func LoginRedirect(w http.ResponseWriter, r *http.Request, origin string)

func NoLayout added in v1.0.2

func NoLayout(config configuration.Config) http.Handler

func SSE added in v1.0.3

func SSE(server data.Server, config configuration.Config) http.Handler

func Stats added in v1.0.4

func Stats(statsPage []byte, config configuration.Config) http.Handler

Types

type RequestPayload

type RequestPayload struct {
	Slide int      `json:"slide"`
	Code  []string `json:"code"`
	Block *int     `json:"block"`
}

type User

type User struct {
	Username  string              `json:"username"`
	Admin     bool                `json:"admin"`
	IP        string              `json:"ip"`
	UA        useragent.UserAgent `json:"ua"`
	LoginTime time.Time           `json:"login_time"`
}

Jump to

Keyboard shortcuts

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