panels

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasePanel

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

BasePanel represents the base for all panels.

func (*BasePanel) CloneOperator

func (panel *BasePanel) CloneOperator(op *data.Operator, sites map[string]string) *data.Operator

CloneOperator clones an operator and adds missing sites.

func (*BasePanel) Config

func (panel *BasePanel) Config() *config.Configuration

Config gets the configuration object.

func (*BasePanel) Execute

func (panel *BasePanel) Execute(w http.ResponseWriter, r *http.Request, session *html.Session, dataProvider html.PanelDataProvider) error

Execute generates the HTTP output of the panel and writes it to the response writer.

func (*BasePanel) FetchOperatorSites

func (panel *BasePanel) FetchOperatorSites(op *data.Operator) (map[string]string, error)

FetchOperatorSites fetches all sites for an operator using Mentix.

func (*BasePanel) GetPathTemplate

func (panel *BasePanel) GetPathTemplate(validPaths []string, defaultTemplate string, path string) string

GetPathTemplate returns the name of the active template.

func (*BasePanel) Initialize

func (panel *BasePanel) Initialize(name string, panelProvider html.PanelProvider, templates []BasePanelTemplate, conf *config.Configuration, log *zerolog.Logger) error

Initialize initializes the base panel.

func (*BasePanel) Redirect

func (panel *BasePanel) Redirect(path string, w http.ResponseWriter, r *http.Request) html.ExecutionResult

Redirect performs an HTTP redirect.

type BasePanelTemplate

type BasePanelTemplate struct {
	ID       string
	Name     string
	Provider html.ContentProvider
}

BasePanelTemplate represents an HTML template used for initialization.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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