configuration

package
v0.0.72 Latest Latest
Warning

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

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

Documentation

Overview

Package configuration implements deferred, non-secret configuration references. JobDB owns the execution-scoped configuration cache.

Index

Constants

View Source
const WireKey = "$c2j_ref"

Variables

This section is empty.

Functions

func Contains

func Contains(value any) bool

func Transform

func Transform(value any, resolve func(Reference) (any, error)) (any, error)

Types

type Diagnostics

type Diagnostics struct {
	Revision string                     `json:"revision"`
	Values   map[string]json.RawMessage `json:"values"`
	Missing  []string                   `json:"missing,omitempty"`
}

func MaterializeInput

func MaterializeInput(ctx context.Context, typ reflect.Type, input any, fetch Fetch) (any, *Diagnostics, error)

type Reference

type Reference struct {
	Kind         string `json:"kind"`
	Name         string `json:"name"`
	ExpectedType string `json:"type,omitempty"`
	// Default is a JSON scalar used only when the name is absent, not for an existing null.
	Default json.RawMessage `json:"default,omitempty"`
}

func Expression

func Expression(expr string) (Reference, bool)

func Parse

func Parse(value any) (Reference, bool, error)

func Ref

func Ref(name string) Reference

func Template

func Template(text string) (Reference, bool)

func (Reference) MarshalJSON

func (r Reference) MarshalJSON() ([]byte, error)

func (Reference) MarshalYAML

func (r Reference) MarshalYAML() (any, error)

Jump to

Keyboard shortcuts

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