flagfmt

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package flagfmt provides shared types and formatting for flag values and condition-chain JSON. All packages that read or write the conditions JSONB column should use these types to avoid drift.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsAny

func AsAny(v *pbflagsv1.FlagValue) (any, error)

AsAny converts a FlagValue to a native Go value suitable for YAML/JSON serialization.

func DisplayConditionValue

func DisplayConditionValue(raw []byte) string

DisplayConditionValue formats a protojson-encoded FlagValue (from the conditions JSONB column) for human display.

func DisplayString

func DisplayString(v *pbflagsv1.FlagValue) string

DisplayString formats a FlagValue for human display (admin UI, CLI show).

Types

type StoredCondition

type StoredCondition struct {
	CEL   *string         `json:"cel"`
	Value json.RawMessage `json:"value"`
}

StoredCondition is the JSON schema for a single entry in the conditions JSONB column. Sync writes it, evaluator and admin read it.

Jump to

Keyboard shortcuts

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