webserver

package
v0.0.0-...-82180e8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GithubBaseURI   = github.RAWAddress
	MaximumFileSize = 153600
	GitLabBaseURL   = gitlab.Address
	CspPolicy       = "default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'"
	ReferrerPolicy  = "no-referrer"
)

Set various internal values used by the web interface

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	*gin.Engine
	Listener string // address:port
}

func New

func New(ctx context.Context, cfg config.Config, state *session.State) *Engine

New will create an instance of the web frontend, setting the necessary parameters.

func (*Engine) Start

func (e *Engine) Start()

Start will configure and start the webserver for graphical output and status messages It's a blocking call, so it should be run in a goroutine

Jump to

Keyboard shortcuts

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