admin

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package admin provides a small admin UI. Requires connection to the database and permissions to access whatever else you might need to access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombineDateAndTime

func CombineDateAndTime(dateS, timeS string) (time.Time, error)

CombineDateAndTime takes values from date and time HTML inputs and combines them to a single date time.

func ErrorPage

func ErrorPage(c *gin.Context, messages ...string)

Types

type Config

type Config struct {
	Database      database.Config
	KeyManager    keys.Config
	SecretManager secrets.Config
	Storage       storage.Config

	Port         string `env:"PORT, default=8080"`
	TemplatePath string `env:"TEMPLATE_DIR, default=./tools/admin-console/templates"`
	TopFile      string `env:"TOP_FILE, default=top"`
	BotFile      string `env:"BOTTOM_FILE, default=bottom"`
}

func (*Config) BlobstoreConfig

func (c *Config) BlobstoreConfig() *storage.Config

func (*Config) DatabaseConfig

func (c *Config) DatabaseConfig() *database.Config

func (*Config) KeyManagerConfig

func (c *Config) KeyManagerConfig() *keys.Config

func (*Config) RenderTemplate

func (c *Config) RenderTemplate(w http.ResponseWriter, tmpl string, p TemplateMap) error

func (*Config) SecretManagerConfig

func (c *Config) SecretManagerConfig() *secrets.Config

type Controller

type Controller interface {
	Execute(g *gin.Context)
}

Controller is the interfactor for controllers that can be pluggied into Gin for the admin console portion of this project.

type TemplateMap

type TemplateMap map[string]interface{}

func (TemplateMap) AddErrors

func (t TemplateMap) AddErrors(errors ...string)

func (TemplateMap) AddJumbotron

func (t TemplateMap) AddJumbotron(headline, subheader string)

func (TemplateMap) AddSubNav

func (t TemplateMap) AddSubNav(name string)

func (TemplateMap) AddSuccess

func (t TemplateMap) AddSuccess(success ...string)

func (TemplateMap) AddTitle

func (t TemplateMap) AddTitle(title string)

Directories

Path Synopsis
Package authorizedapps is part of the admin system.
Package authorizedapps is part of the admin system.
Package exports is part of the admin system.
Package exports is part of the admin system.
Package healthauthority is part of the admin system.
Package healthauthority is part of the admin system.
Package index contains admin console indexHandler for the main landing page.
Package index contains admin console indexHandler for the main landing page.
Package siginfo is part of the admin system.
Package siginfo is part of the admin system.

Jump to

Keyboard shortcuts

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