Version: v0.6.3 Latest Latest

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

Go to latest
Published: Sep 7, 2023 License: BlueOak-1.0.0 Imports: 38 Imported by: 1




This section is empty.


This section is empty.


This section is empty.


type CommonArguments

type CommonArguments struct {
	UserInfo     *userInfo
	Title        string
	Experimental bool

CommonArguments are common page arguments that must be supplied to every page to populate the <title> and <header> elements.

type Config added in v0.4.0

type Config struct {
	Core          clientCore
	Addr          string
	CustomSiteDir string
	Language      string
	Logger        dex.Logger
	// NoEmbed indicates to serve files from the system disk rather than the
	// embedded files. Since this is a developer setting, this also implies
	// reloading of templates on each request. Note that only embedded files
	// should be used by default since site files from older distributions may
	// be present on the disk. When NoEmbed is true, this also implies reloading
	// and execution of html templates on each request.
	NoEmbed      bool
	HttpProf     bool
	Experimental bool

type WebServer

type WebServer struct {
	// contains filtered or unexported fields

WebServer is a single-client http and websocket server enabling a browser interface to the DEX client.

func New

func New(cfg *Config) (*WebServer, error)

New is the constructor for a new WebServer. CustomSiteDir in the Config can be left blank, in which case a handful of default locations will be checked. This will work in most cases.

func (*WebServer) Addr added in v0.6.0

func (s *WebServer) Addr() string

Addr gives the address on which WebServer is listening. Use only after Connect.

func (*WebServer) Connect

func (s *WebServer) Connect(ctx context.Context) (*sync.WaitGroup, error)

Connect starts the web server. Satisfies the dex.Connector interface.


Path Synopsis

Jump to

Keyboard shortcuts

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