controllers

package
v0.58.6 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ProviderURLNames contains urls that must be modified to forward terraform requests through this server.
	ProviderURLNames = []ProviderURLName{
		ProviderDownloadURLName,
		ProviderSHASumsURLName,
		ProviderSHASumsSignatureURLName,
	}
)

Functions

This section is empty.

Types

type DiscoveryController

type DiscoveryController struct {
	Endpointers []Endpointer
}

func (*DiscoveryController) Register

func (controller *DiscoveryController) Register(router *router.Router)

Register implements router.Controller.Register

type DownloaderController

type DownloaderController struct {
	ReverseProxy    *handlers.ReverseProxy
	ProviderService *services.ProviderService
	// contains filtered or unexported fields
}

func (*DownloaderController) ProviderProxyURL

func (controller *DownloaderController) ProviderProxyURL() *url.URL

ProviderProxyURL returns URL for using as a cache to download remote archives through this controller with caching

func (*DownloaderController) Register

func (controller *DownloaderController) Register(router *router.Router)

Register implements router.Controller.Register

type Endpointer

type Endpointer interface {
	// Endpoints returns controller endpoints.
	Endpoints() map[string]any
}

type ProviderController

type ProviderController struct {
	Authorization   *handlers.Authorization
	ReverseProxy    *handlers.ReverseProxy
	Downloader      *DownloaderController
	ProviderService *services.ProviderService
	// contains filtered or unexported fields
}

func (*ProviderController) Endpoints

func (controller *ProviderController) Endpoints() map[string]any

Endpoints implements controllers.Endpointer.Endpoints

func (*ProviderController) Path

func (controller *ProviderController) Path() string

func (*ProviderController) Register

func (controller *ProviderController) Register(router *router.Router)

Register implements router.Controller.Register

type ProviderURLName

type ProviderURLName string
const (

	// The platform name used to request provider caching, e.g `terraform providers block -platform=cache_provider`
	PlatformNameCacheProvider = "cache_provider"
	// The status returned when making a request to the caching provider.
	// It is needed to prevent further loading of providers by terraform, and at the same time make sure that the request was processed successfully.
	HTTPStatusCacheProvider = http.StatusLocked

	// Provider's assets consist of three files/URLs: zipped binary, hashes and signature
	ProviderDownloadURLName         ProviderURLName = "download_url"
	ProviderSHASumsURLName          ProviderURLName = "shasums_url"
	ProviderSHASumsSignatureURLName ProviderURLName = "shasums_signature_url"
)

Jump to

Keyboard shortcuts

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