siteaddr

package
v1.166.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package siteaddr is every hostname the deployment answers on for a site or an application, as the system administrator's ingress rules need them: each site's addresses on the pages domain and every domain added, with a site domain's role (#2687). GET /api/v1/admin/sites/domains answers it.

Index

Constants

View Source
const (
	KindSite        = "site_address"
	KindDomain      = "domain"
	KindApplication = "application"
)

The kinds of address.

View Source
const TimeLayout = "2006-01-02T15:04:05Z"

TimeLayout is how an address's creation time is written.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressList

type AddressList struct {
	Addresses []DeploymentAddress `json:"addresses"`
}

AddressList is every site address and domain on the deployment.

func List

func List(domains []site.Domain, sites []site.Site, pagesDomain string) AddressList

List is every domain and, with a pages domain, every site's addresses on it, in hostname order.

type DeploymentAddress

type DeploymentAddress struct {
	Hostname    string `json:"hostname" example:"marketing.pages.example.net"`
	Kind        string `json:"kind" example:"site_address"`
	Site        string `json:"site,omitempty" example:"marketing"`
	Environment string `json:"environment,omitempty" example:"default"`
	Application string `json:"application,omitempty"`
	// Primary, Mode and RedirectsTo are a site domain's role (#2687): a
	// redirect domain needs the same ingress as any other, and the gateway
	// answers the redirect. Absent on a pages address and an application's
	// domain.
	Primary     bool   `json:"primary,omitempty"`
	Mode        string `json:"mode,omitempty" enums:"serve,redirect"`
	RedirectsTo string `json:"redirects_to,omitempty"`
	CreatedBy   string `json:"created_by"`
	CreatedAt   string `json:"created_at"`
}

DeploymentAddress is one hostname the deployment answers on for a site or an application. Each needs an ingress rule, added by a system administrator.

Jump to

Keyboard shortcuts

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