ui

package
v0.0.0-...-422ef3d Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

package ui provides the Meerkat GUI web application. Interactive parts of the interface are managed by preact; the rest is static HTML rendered by the html/template package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeName

func SanitizeName(filename string) (string, error)

Sanitize filenames so they are safe and timestamped

Types

type DashboardGroup

type DashboardGroup map[string][]meerkat.Dashboard

type Server

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

A Server serves the Meerkat GUI web application. It must be created with NewServer.

func NewServer

func NewServer(fsys fs.FS) *Server

NewServer returns a Server which serves its contents from fsys. fsys may be nil, in which case the returned Server serves the UI from an embedded filesystem created at build time.

func (*Server) AboutPage

func (srv *Server) AboutPage(w http.ResponseWriter, req *http.Request)

func (*Server) BackgroundPage

func (srv *Server) BackgroundPage(w http.ResponseWriter, req *http.Request)

func (*Server) CachePage

func (srv *Server) CachePage(w http.ResponseWriter, req *http.Request)

func (*Server) ClonePage

func (srv *Server) ClonePage(w http.ResponseWriter, req *http.Request)

func (*Server) CreatePage

func (srv *Server) CreatePage(w http.ResponseWriter, req *http.Request)

func (*Server) DeleteFileHandler

func (srv *Server) DeleteFileHandler(targetPath string) http.HandlerFunc

func (*Server) DeletePage

func (srv *Server) DeletePage(w http.ResponseWriter, req *http.Request)

func (*Server) EditHandler

func (srv *Server) EditHandler(w http.ResponseWriter, req *http.Request)

func (*Server) EditInfoHandler

func (srv *Server) EditInfoHandler(w http.ResponseWriter, req *http.Request)

func (*Server) FileServer

func (srv *Server) FileServer() http.Handler

func (*Server) GetSounds

func (srv *Server) GetSounds(w http.ResponseWriter, req *http.Request)

func (*Server) InfoPage

func (srv *Server) InfoPage(w http.ResponseWriter, req *http.Request)

func (*Server) RootHandler

func (srv *Server) RootHandler(w http.ResponseWriter, req *http.Request)

func (*Server) SoundPage

func (srv *Server) SoundPage(w http.ResponseWriter, req *http.Request)

func (*Server) UploadFileHandler

func (srv *Server) UploadFileHandler(targetPath string, allowFileType string) http.HandlerFunc

func (*Server) ViewHandler

func (srv *Server) ViewHandler(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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