http

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MPL-2.0 Imports: 63 Imported by: 0

Documentation

Overview

Package http implements the HTTP frontend.

Index

Constants

View Source
const (
	TargetMetal = "metal"
	TargetCloud = "cloud"
	TargetSBC   = "sbc"
)

Target constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frontend

type Frontend struct {
	// contains filtered or unexported fields
}

Frontend is the HTTP frontend.

func NewFrontend

func NewFrontend(
	logger *zap.Logger,
	schematicFactory *schematic.Factory,
	assetBuilder *asset.Builder,
	artifactsManager *artifacts.Manager,
	secureBootService *secureboot.Service,
	opts Options,
) (*Frontend, error)

NewFrontend creates a new HTTP frontend.

func (*Frontend) Handler

func (f *Frontend) Handler() http.Handler

Handler returns the HTTP handler.

type InvalidImageTag added in v0.9.0

type InvalidImageTag struct{}

InvalidImageTag is an error tag for invalid image names.

type Options

type Options struct {
	CacheSigningKey                  crypto.PrivateKey
	ExternalURL                      *url.URL
	ExternalPXEURL                   *url.URL
	InstallerInternalRepository      name.Repository
	InstallerExternalRepository      name.Repository
	MetricsNamespace                 string
	AllowedOrigins                   []string
	RemoteOptions                    []remote.Option
	RegistryRefreshInterval          time.Duration
	ProxyInstallerInternalRepository bool
}

Options configures the HTTP frontend.

type Talosctl added in v0.7.5

type Talosctl struct{}

Talosctl provides methods to generate paths for talosctl binaries.

func (Talosctl) TalosctlPaths added in v0.7.5

func (Talosctl) TalosctlPaths(tuples []artifacts.TalosctlTuple) []string

TalosctlPaths generates paths for talosctl binaries based on the provided tuples.

type WizardParams added in v0.4.0

type WizardParams struct {
	Target         string
	Version        string
	Arch           string
	Platform       string
	Board          string
	SecureBoot     string
	Bootloader     string
	Extensions     []string
	Cmdline        string
	CmdlineSet     bool
	OverlayOptions string

	SelectedTarget         string
	SelectedVersion        string
	SelectedArch           string
	SelectedPlatform       string
	SelectedBoard          string
	SelectedSecureBoot     string
	SelectedBootloader     string
	SelectedExtensions     []string
	SelectedCmdline        string
	SelectedOverlayOptions string

	// Dynamically set fields.
	PlatformMeta platforms.Platform
	BoardMeta    platforms.SBC
	TalosctlMeta Talosctl

	// Localizer
	Localizer *i18n.Localizer
}

WizardParams encapsulates the parameters of the wizard.

Some fields might be not set if we haven't reached that step yet.

func WizardParamsFromRequest added in v0.4.0

func WizardParamsFromRequest(r *http.Request) WizardParams

WizardParamsFromRequest extracts the wizard parameters from the request.

func (WizardParams) URLValues added in v0.4.0

func (p WizardParams) URLValues() url.Values

URLValues returns the URL values of the wizard parameters.

Jump to

Keyboard shortcuts

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