controller

package
v0.0.0-c241dcf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	UserLabel     string
	CategoryLabel string
	ReasonLabel   string
	TTLLabel      string
	Categories    []Pair
	TTLs          []string
}

Content defines the displayable parts of the token retrieval form.

type Controller

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

Controller manages use of the renderer in the http handler.

func New

func New(h *renderer.Renderer, p *justification.Processor, allowlist []string) *Controller

func (*Controller) HandlePopup

func (c *Controller) HandlePopup() http.Handler

type ErrorDetails

type ErrorDetails struct {
	PageTitle   string
	Description string
	Message     string
}

ErrorDetails represents the data used for the 400 page.

type FormDetails

type FormDetails struct {
	WindowName  string
	Origin      string
	PageTitle   string
	Description string
	UserEmail   string
	Content     Content
	Category    string
	Reason      string
	TTL         string
	Errors      map[string]string
}

FormDetails represents all the input and content used for the token retrievlal form.

type Pair

type Pair struct {
	Key  string
	Text string
}

Pair represents a key value pair used by the select HTML element.

type SuccessDetails

type SuccessDetails struct {
	WindowName  string
	Origin      string
	PageTitle   string
	Description string
	Token       string
}

SuccessDetails represents the data used for the success page and the postMessage response to the client.

Jump to

Keyboard shortcuts

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