controller

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.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 Content

type Content struct {
	UserLabel     string
	CategoryLabel string
	ReasonLabel   string
	TTLLabel      string
	Categories    map[string]*jvspb.UIData
	TTLs          map[string]struct{}
}

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(ctx context.Context, h *renderer.Renderer, p *justification.Processor, allowlist []string) (*Controller, error)

func (*Controller) HandleHealth added in v0.0.5

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

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 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