config

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config provides small, domain-neutral parsers and validators for configuration values. It reads no process input: the environment is the config capability in candace/runtime/config, and application policy remains with the application that declares the names and defaults.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelRefinementError

func LabelRefinementError(
	message proto.Message,
	label func(field protoreflect.FieldDescriptor) string,
	err error,
) error

LabelRefinementError translates a Liquid Proto schema field into the label used at the consuming configuration boundary, such as an environment name. Liquid owns the invariant; this function only makes its error actionable to the operator and returns the original error unchanged when it cannot map the field safely.

func ValidatePrivateOrigin

func ValidatePrivateOrigin(raw string) error

ValidatePrivateOrigin accepts an HTTP(S) origin whose host is loopback, private, link-local, tailnet, or a private DNS name. Credentials, paths, queries, and fragments are rejected so callers cannot accidentally grant a remote service a broader URL boundary than intended.

Types

type ProviderModel

type ProviderModel struct {
	ProviderID string
	ModelID    string
}

ProviderModel identifies one model within one provider.

func ParseProviderModel

func ParseProviderModel(value string) (ProviderModel, error)

ParseProviderModel parses the provider/model reference used by agent APIs. Model IDs may contain further slashes; neither component may be empty.

Jump to

Keyboard shortcuts

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