http_server

package
v0.0.0-...-5d187b5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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

func ConsoleHandler(dist fs.FS) http.Handler

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) Run

func (a *HTTPServer) Run(ctx context.Context) error

func (*HTTPServer) Shutdown

func (a *HTTPServer) Shutdown(ctx context.Context)

Jump to

Keyboard shortcuts

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