terraformbackend

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package terraformbackend serves the TFE-shaped API used by Terraform's remote backend (decision 0041). Repository items remain its source of truth.

Index

Constants

View Source
const (
	Prefix = "/artifactory/api/terraform/remote/v2"
)

Prefix is the service URL advertised by Terraform discovery.

Variables

This section is empty.

Functions

func IsPath

func IsPath(path string) bool

IsPath reports whether a request belongs to this API, including its root.

func Register

func Register(r chi.Router, o Options)

Register mounts the API with explicit chi routes. The backend resolves workspace IDs against both repository and workspace existence; the registry router's repository-only resolution would choose the wrong ambiguous ID.

func SkipsAuthentication

func SkipsAuthentication(r *http.Request) bool

SkipsAuthentication admits only the probe and the capability upload. Checking the full route keeps a query token from bypassing another API.

Types

type Options

type Options struct {
	Items *item.Service
	Keys  *crypt.Keyring
	Now   func() time.Time
	Fault func(*http.Request, error)
}

Options supplies the shared item service, keyring and fault recorder. Now is a test clock; nil uses the wall clock.

Jump to

Keyboard shortcuts

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