Help us shape the future of Go! Take the 2026 Go Developer Survey

contract

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Boolean

func Boolean(description string) map[string]any

func BoundedInteger

func BoundedInteger(description string, minimum, maximum int) map[string]any

func CompactValidationError

func CompactValidationError(err error) string

func InputObject

func InputObject(properties map[string]any, required ...string) map[string]any

InputObject 构造内建工具的根输入对象。结构已知的工具默认拒绝未知字段; 真正动态的字段应在对应 property 上显式声明 additionalProperties。

func Integer

func Integer(description string) map[string]any

func ObjectArray

func ObjectArray(description string) map[string]any

func OpenObject

func OpenObject(description string) map[string]any

func OutputObject

func OutputObject(properties map[string]any, required ...string) map[string]any

OutputObject 保持结果根对象可扩展。输出字段用于帮助客户端理解稳定结果, 但运行时允许能力在不破坏旧客户端的前提下增加新的领域字段。

func String

func String(description string) map[string]any

func StringArray

func StringArray(description string) map[string]any

Types

type InputValidator

type InputValidator struct {
	// contains filtered or unexported fields
}

func CompileInputSchema

func CompileInputSchema(raw map[string]any) (*InputValidator, error)

func (*InputValidator) Validate

func (v *InputValidator) Validate(arguments map[string]any) error

Jump to

Keyboard shortcuts

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