pricing

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package pricing contains shared validation for persisted pricing facts.

Index

Constants

View Source
const (
	PlatformPriceRatioMin = 0.0
	PlatformPriceRatioMax = 1000.0
)

Variables

View Source
var ErrInvalidModelPrices = errors.New("invalid model prices")

Functions

func ValidateModelPrices

func ValidateModelPrices(input, output, cacheRead, cacheWrite float64) error

ValidateModelPrices enforces the persisted four-bucket model-price contract. Zero is a valid price; negative and non-finite amounts are not.

func ValidatePlatformPriceRatio

func ValidatePlatformPriceRatio(value float64) error

ValidatePlatformPriceRatio enforces the canonical closed interval used by channel writes and every server-side pricing consumer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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