domain

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

internal/domain/web.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidFortName

func ValidFortName(name string) bool

ValidFortName returns true if name is a valid fort identifier. Lowercase alphanumeric + hyphens, no leading/trailing hyphens.

Types

type ConfigService

type ConfigService struct {
	URL string
}

ConfigService is what comes from the fort config file — just a URL. All configured services are considered enabled. To disable a service, remove it from the config.

type Fort

type Fort struct {
	// Name is the fort identifier (e.g., "local", "acme-corp").
	Name string

	// Local controls how the proxy routes traffic.
	// true = proxy directly to each service's URL.
	// false = proxy through Gateway.
	Local bool

	// Gateway is the single origin URL for remote forts.
	// Only used when Local is false.
	Gateway string

	// Services lists the backend services in this fort.
	Services []ConfigService
}

Fort is a named collection of services. Users can belong to multiple forts and switch between them.

type FortRegistry

type FortRegistry interface {
	// Forts returns all configured forts.
	Forts() []Fort

	// Fort looks up a fort by name.
	// Returns (fort, true) if found, (zero value, false) if not.
	Fort(name string) (Fort, bool)
}

FortRegistry provides access to configured forts.

Jump to

Keyboard shortcuts

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