websetup

package
v2.4.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoInterface is returned when no network interfaces with a real IP-address were found.
	ErrNoInterface = errors.New("No network interface found")
)

Functions

func LinkRequired

func LinkRequired(config *flamenco.Conf) bool

LinkRequired returns true iff (re)linking to Flamenco Server is required.

Types

type RestartFunction

type RestartFunction func()

RestartFunction is called when a restart is requested via the web interface.

type Routes

type Routes struct {
	RestartFunction func()
	// contains filtered or unexported fields
}

Routes handles all HTTP routes and server-side context for the web setup wizard.

func EnterSetupMode

func EnterSetupMode(config *flamenco.Conf, flamencoVersion string, router *mux.Router) (*Routes, error)

EnterSetupMode registers HTTP endpoints and logs which URLs are available to visit it.

type ServerLinker

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

ServerLinker manages linking this Manager to Flamenco Server

func StartLinking

func StartLinking(upstreamURL string, localURL *url.URL) (*ServerLinker, error)

StartLinking starts the linking process by generating a secret key.

func (*ServerLinker) ExchangeKey

func (linker *ServerLinker) ExchangeKey() error

ExchangeKey sends the locally generated key to Server and receives an identifier.

func (*ServerLinker) HasIdentifier

func (linker *ServerLinker) HasIdentifier() bool

HasIdentifier returns true iff an identifier was received from Server.

func (*ServerLinker) HasManagerID

func (linker *ServerLinker) HasManagerID() bool

HasManagerID returns true iff a Manager ID was received from Server.

type TemplateData

type TemplateData map[string]interface{}

TemplateData is the mapping type we use to pass data to the template engine.

type URLConfigOptions

type URLConfigOptions struct {
	URL               *url.URL
	IsUsedForSetup    bool // currently in use to access the web setup
	IsCurrentInConfig bool // currently configured as "own_url"
}

URLConfigOptions contains a URL with some metadata

Jump to

Keyboard shortcuts

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