webui

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountOn added in v1.4.0

func MountOn(app *fiber.App, prefix string, cfg *ServerConfig) error

MountOn registers the WebUI routes on an existing Fiber app at the given path prefix. This allows hosting the WebUI on the same port as another service (e.g. the S3 API server). The prefix must start with "/" and must not be empty or just "/".

Types

type Option

type Option func(*Server)

Option sets various options for NewServer()

func WithClientIPHeader added in v1.10.0

func WithClientIPHeader(header string) Option

WithClientIPHeader records the client address from the named proxy header in the standalone WebUI request log. The accepted values are clientip.ClientIPHeaderForwardedFor and clientip.ClientIPHeaderRealIP; an empty value (the default) keeps the socket peer address. The header is only honoured from a peer listed in WithTrustedProxies. When the WebUI is mounted on another server's port (MountOn), that server's settings apply instead.

func WithPathPrefix added in v1.4.0

func WithPathPrefix(prefix string) Option

WithPathPrefix mounts the entire web UI under the given path prefix

func WithQuiet

func WithQuiet() Option

WithQuiet silences default logging output.

func WithSocketPerm added in v1.4.1

func WithSocketPerm(perm os.FileMode) Option

WithSocketPerm sets the file-mode permissions applied to file-backed UNIX domain sockets after binding. It has no effect on TCP/IP or abstract namespace sockets.

func WithTLS

func WithTLS(cs *netutil.CertStorage) Option

WithTLS sets TLS Credentials

func WithTrustedProxies added in v1.10.0

func WithTrustedProxies(trusted clientip.TrustedProxies) Option

WithTrustedProxies sets the peers whose client IP header is trusted, as parsed by clientip.ParseTrustedProxies. It only has an effect together with WithClientIPHeader.

type Server

type Server struct {
	CertStorage *netutil.CertStorage
	// contains filtered or unexported fields
}

Server is the main GUI server

func NewServer

func NewServer(cfg *ServerConfig, opts ...Option) (*Server, error)

NewServer creates a new GUI server instance

func (*Server) ServeMultiPort added in v1.3.0

func (s *Server) ServeMultiPort(ports []string) error

ServeMultiPort creates listeners for multiple address specifications and serves on all of them simultaneously. This supports listening on multiple addresses.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown gracefully shuts down the server

type ServerConfig

type ServerConfig struct {
	Gateways      []string // S3 API gateways
	AdminGateways []string // Admin API gateways (defaults to Gateways if empty)
	// IAMGateways are standalone IAM service (versitygw iam) endpoints, used
	// to seed the WebUI's optional IAM endpoint field. Unlike AdminGateways
	// there is no fallback to Gateways: the IAM service is a separate
	// process, so empty means "no IAM endpoint to offer".
	IAMGateways []string
	Region      string
	CORSOrigin  string
}

ServerConfig holds the server configuration

Jump to

Keyboard shortcuts

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