node

package
v0.0.0-...-0a5c495 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Router *mux.Router
	Config *m.NodeConfig
}

App struct to maintain router

func (*App) Authenticate

func (a *App) Authenticate(h http.Handler, logout bool) http.Handler

Authenticate is a middleware to pre-authenticate routes via the session token if logout is true, no new session token is beeing generated

func (*App) Index

func (a *App) Index(w http.ResponseWriter, r *http.Request)

Index controller

func (*App) Initialize

func (a *App) Initialize(config models.NodeConfig)

Initialize initializes application related content - router initialization

func (*App) InitializeRoutes

func (a *App) InitializeRoutes()

InitializeRoutes initializes all the available webroutes

func (*App) Run

func (a *App) Run(addr string)

Run starts the application on the passed address with the inherited router WARN: router must be initialized first

Jump to

Keyboard shortcuts

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