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 ¶
- Variables
- func CombineDateAndTime(dateS, timeS string) (time.Time, error)
- func ErrorPage(c *gin.Context, messages ...string)
- type Config
- type Controller
- type Server
- func (s *Server) HandleAuthorizedAppsSave() func(c *gin.Context)
- func (s *Server) HandleAuthorizedAppsShow() func(c *gin.Context)
- func (s *Server) HandleExportImportersSave() func(c *gin.Context)
- func (s *Server) HandleExportImportersShow() func(c *gin.Context)
- func (s *Server) HandleExportsSave() func(c *gin.Context)
- func (s *Server) HandleExportsShow() func(c *gin.Context)
- func (s *Server) HandleHealthAuthorityKeys() func(c *gin.Context)
- func (s *Server) HandleHealthAuthoritySave() func(c *gin.Context)
- func (s *Server) HandleHealthAuthorityShow() func(c *gin.Context)
- func (s *Server) HandleHealthz() func(c *gin.Context)
- func (s *Server) HandleIndex() func(c *gin.Context)
- func (s *Server) HandleMirrorsSave() func(c *gin.Context)
- func (s *Server) HandleMirrorsShow() func(c *gin.Context)
- func (s *Server) HandleSignatureInfosSave() func(c *gin.Context)
- func (s *Server) HandleSignatureInfosShow() func(c *gin.Context)
- func (s *Server) Routes(ctx context.Context) http.Handler
- type TemplateMap
Constants ¶
Variables ¶
var TemplateFuncMap = template.FuncMap{ "deref": deref, "htmlDate": timestampFormatter("2006-01-02"), "htmlTime": timestampFormatter("15:04"), "htmlDatetime": timestampFormatter(time.UnixDate), }
TemplateFuncMap is the list of template functions.
Functions ¶
func CombineDateAndTime ¶
CombineDateAndTime takes values from date and time HTML inputs and combines them to a single date time.
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=./cmd/admin-console/templates"` TopFile string `env:"TOP_FILE, default=top"` BotFile string `env:"BOTTOM_FILE, default=bottom"` }
func (*Config) BlobstoreConfig ¶
func (*Config) DatabaseConfig ¶
func (*Config) KeyManagerConfig ¶
func (*Config) RenderTemplate ¶
func (c *Config) RenderTemplate(w http.ResponseWriter, tmpl string, p TemplateMap) error
func (*Config) SecretManagerConfig ¶
type Controller ¶
Controller is the interfactor for controllers that can be pluggied into Gin for the admin console portion of this project.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the debugger server.
func (*Server) HandleAuthorizedAppsSave ¶
HandleAuthorizedAppsSave handles the create/update actions for authorized apps.
func (*Server) HandleAuthorizedAppsShow ¶
HandleAuthorizedAppsShow handles the show page for authorized apps.
func (*Server) HandleExportImportersSave ¶
HandleExportImportersSave handles the create/update actions for export importers.
func (*Server) HandleExportImportersShow ¶
HandleExportImportersShow handles the create/update actions for export importers.
func (*Server) HandleExportsSave ¶
HandleExportsSave handles the create/update actions for exports.
func (*Server) HandleExportsShow ¶
HandleExportsShow handles the show action for exports.
func (*Server) HandleHealthAuthorityKeys ¶
HandleHealthAuthorityKeys handles the keys action for health authorities.
func (*Server) HandleHealthAuthoritySave ¶
HandleHealthAuthoritySave handles the create/update actions for health authorities.
func (*Server) HandleHealthAuthorityShow ¶
HandleHealthAuthorityShow handles the show action for health authorities.
func (*Server) HandleHealthz ¶
func (*Server) HandleIndex ¶
func (*Server) HandleMirrorsSave ¶
HandleMirrorsSave handles the create/update actions for mirrors.
func (*Server) HandleMirrorsShow ¶
HandleMirrorsShow handles the show action for mirrors.
func (*Server) HandleSignatureInfosSave ¶
HandleSignatureInfosSave handles the create/update actions for signature infos.
func (*Server) HandleSignatureInfosShow ¶
HandleSignatureInfosShow handles the show action for signature infos.
type TemplateMap ¶
type TemplateMap map[string]interface{}
func (TemplateMap) AddErrors ¶
func (t TemplateMap) AddErrors(errors ...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)