ui

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const ExtraAssetPrefix = "/extra-statics"

ExtraAssetPrefix is used for extra assets

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtraAsset

type ExtraAsset struct {
	Filename string
	Ext      string
	Content  []byte
}

ExtraAsset describes an extra asset to by exported by the server

type Server

type Server struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Server describes the HTTP server for the Skydive UI Extra assets to be served by the server can be specified Global var is a map of variables that will be used when processing Golang templates for the page

func NewServer

func NewServer(server *shttp.Server, assetsFolder string) *Server

NewServer returns a new Web server that serves the Skydive UI

func (*Server) AddGlobalVar

func (s *Server) AddGlobalVar(key string, v interface{})

AddGlobalVar adds a global variable with the provided name and value

func (*Server) ServeIndex

func (s *Server) ServeIndex(index string, baseURL string) func(w http.ResponseWriter, r *auth.AuthenticatedRequest)

ServeIndex servers the index page

Jump to

Keyboard shortcuts

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