webui

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 13 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 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

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