Documentation
¶
Index ¶
Constants ¶
const ConsolePrefix = "/payments/"
ConsolePrefix is where the admin console is served. Distinct from the API under /openpay/v1/, so no console route can shadow an API path.
Variables ¶
This section is empty.
Functions ¶
func ConsoleHandler ¶
ConsoleHandler serves the built admin console (ui/dist, embedded in the binary by main.go) with an SPA fallback: a path that is not a file gets index.html, and the console's router takes it from there.
When the binary was built without the console (ui/dist holds only its placeholder), it says so instead of serving an empty page.
Types ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer(cfg *configs.Configuration, console fs.FS) *HTTPServer
NewHTTPServer serves the API, webhooks, probes and — from console, the built ui/dist — the admin console.
func (*HTTPServer) Name ¶
func (a *HTTPServer) Name() string
func (*HTTPServer) Shutdown ¶
func (a *HTTPServer) Shutdown(ctx context.Context)