exposure-notifications-server: github.com/google/exposure-notifications-server/internal/admin Index | Files | Directories

package admin

import "github.com/google/exposure-notifications-server/internal/admin"

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

Index

Package Files

config.go controller.go time.go util.go

func CombineDateAndTime Uses

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 Uses

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

type Config Uses

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 Uses

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

func (*Config) DatabaseConfig Uses

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

func (*Config) KeyManagerConfig Uses

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

func (*Config) RenderTemplate Uses

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

func (*Config) SecretManagerConfig Uses

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

type Controller Uses

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 Uses

type TemplateMap map[string]interface{}

func (TemplateMap) AddErrors Uses

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

func (TemplateMap) AddSubNav Uses

func (t TemplateMap) AddSubNav(name string)

func (TemplateMap) AddSuccess Uses

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

func (TemplateMap) AddTitle Uses

func (t TemplateMap) AddTitle(title string)

Directories

PathSynopsis
authorizedappsPackage authorizedapps is part of the admin system.
exportsPackage exports is part of the admin system.
healthauthorityPackage healthauthority is part of the admin system.
indexPackage index contains admin console indexHandler for the main landing page.
siginfoPackage siginfo is part of the admin system.

Package admin imports 12 packages (graph) and is imported by 5 packages. Updated 2020-09-27. Refresh now. Tools for package owners.