dashboard

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dashboard

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

Dashboard is a dashboard user interface.

func New

func New(instance instance) (*Dashboard, error)

New adds a dashboard to the given instance.

func (*Dashboard) CheckRequestToken

func (d *Dashboard) CheckRequestToken(nonce, token string, actions ...string) (ok bool)

CheckRequestToken checks the given token and action context. The given actions must be same as when the token was created.

func (*Dashboard) CreateRequestToken

func (d *Dashboard) CreateRequestToken(actions ...string) (*RequestToken, error)

CreateRequestToken creates a new request token with the given actions as context.

func (*Dashboard) Start

func (d *Dashboard) Start(mgr *mgr.Manager) error

Start starts the router.

func (*Dashboard) Stop

func (d *Dashboard) Stop(mgr *mgr.Manager) error

Stop stops the router.

type RequestToken

type RequestToken struct {
	Nonce string `json:"nonce"`
	Token string `json:"token"`
}

RequestToken is used for CSRF protection.

Jump to

Keyboard shortcuts

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