web

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RootMultiplexer      *goji.Mux
	DashboardMultiplexer *goji.Mux

	StaticFiles fs.FS = frontend.StaticFiles

	URL        string = "https://" + common.ConfigSummitHost
	TermsURL   string = common.ConfigTermsURLOverride
	PrivacyURL string = common.ConfigPrivacyURLOverride
)
View Source
var OauthConf *oauth2.Config

Functions

func AddHTMLFilesystem

func AddHTMLFilesystem(fs fs.FS)

func RegisterDashboardRoutes

func RegisterDashboardRoutes(route func(*goji.Mux))

Called by plugins to add their routes

func RenderPage

func RenderPage(filename string) http.HandlerFunc

RenderPage serves the given html page It attaches the template function array and the template data

func Run

func Run()

Run starts the necessary processes to begin serving the web server it handles starting the authentication and the multiplexer

func SendErrorToast

func SendErrorToast(w http.ResponseWriter, message string)

SendErrorToast is used to send a JSON response to the client to send the error toasts

func SendSuccessToast

func SendSuccessToast(w http.ResponseWriter, message string)

SendSuccessToast is used to send a JSON response to the client to send the success toasts

Types

type CtxKey

type CtxKey int
const (
	CtxKeyTmplData CtxKey = iota
)

type FormResponse

type FormResponse struct {
	Success bool   `json:"Success"`
	Message string `json:"Message"`
}

type GithubRelease

type GithubRelease struct {
	HTMLURL     string    `json:"html_url"`
	Name        string    `json:"name"`
	Draft       bool      `json:"draft"`
	PublishedAt time.Time `json:"published_at"`
	Body        string    `json:"body"`
	BodyHTML    template.HTML
}

type TmplContextData

type TmplContextData map[string]interface{}

Jump to

Keyboard shortcuts

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