3.3 KiB
ui
import "github.com/effective-security/trustyca/server/service/ui"
Index
Constants
ServiceName provides the Service Name for this package
const ServiceName = "ui"
func Factory
func Factory(server gserver.GServer) any
Factory returns a factory of the service
type Service
Service serves the static test pages: the ALIVE index, the login page that starts the OAuth flow, the page shown after authentication, and the Stripe checkout page. The pages are embedded in the binary and rendered with the public keys (reCAPTCHA site key, Stripe publishable key) taken from the configuration.
type Service struct {
// contains filtered or unexported fields
}
func New
func New(cfg *config.Configuration) *Service
New returns the service for the configuration, without registering it with a server; used by tests.
func (*Service) Close
func (s *Service) Close()
Close the subservices and its resources
func (*Service) IsReady
func (s *Service) IsReady() bool
IsReady indicates that the service is ready to serve its end-points
func (*Service) Name
func (s *Service) Name() string
Name returns the service name
func (*Service) PageHandler
func (s *Service) PageHandler(path string) restserver.Handle
PageHandler renders the page registered for the route path. An unknown path renders nothing and responds with an error.
func (*Service) RegisterRoute
func (s *Service) RegisterRoute(r restserver.Router)
RegisterRoute adds the UI pages to the overall URL router
Generated by gomarkdoc