frontend

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package frontend provides a static file server for the frontend assets

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFrontendAddrRequired = errors.New("frontend address is required when frontend is enabled")
)

ErrFrontendAddrRequired is returned when frontend is enabled but no address is configured

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled bool   `yaml:"enabled" default:"false"`
	Addr    string `yaml:"addr" default:":8080" validate:"hostname_port"`
}

Config represents frontend service configuration

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the frontend configuration

type Service

type Service interface {
	Start(ctx context.Context) error
	Stop() error
	Handler() http.Handler
}

Service defines the frontend service interface

func NewService

func NewService(cfg *Config, log logrus.FieldLogger) Service

NewService creates a new frontend service

Jump to

Keyboard shortcuts

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