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

suggestion

package
v0.9.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CurrentSchemaVersion = 1

Variables

This section is empty.

Functions

func Save

func Save(path string, document Document) error

func ValidateClaim

func ValidateClaim(claim Claim) error

ValidateClaim validates the field-specific value type of one AI claim.

Types

type Claim

type Claim struct {
	Field      string          `json:"field"`
	Value      json.RawMessage `json:"value"`
	Evidence   string          `json:"evidence"`
	Section    string          `json:"section,omitempty"`
	Confidence string          `json:"confidence"`
}

type Document

type Document struct {
	SchemaVersion int       `json:"schema_version"`
	Kind          string    `json:"kind"`
	ModelID       string    `json:"model_id"`
	Status        string    `json:"status"`
	CreatedAt     time.Time `json:"created_at"`
	Source        Source    `json:"source"`
	Generator     Generator `json:"generator"`
	Claims        []Claim   `json:"claims"`
}

func Load

func Load(path string) (Document, error)

func (Document) Validate

func (d Document) Validate() error

type Generator

type Generator struct {
	Model   string `json:"model"`
	WireAPI string `json:"wire_api"`
}

type Source

type Source struct {
	URL      string `json:"url"`
	Revision string `json:"revision,omitempty"`
	SHA256   string `json:"sha256"`
}

Jump to

Keyboard shortcuts

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