Go SDK
The Go SDK provides type-safe APIs for reading, writing, and manipulating Gemara documents. Types are generated from CUE schemas using cuegen.
Installation
go get github.com/gemaraproj/go-gemara
Usage
import "github.com/gemaraproj/go-gemara"
// Load a control catalog
catalog := &gemara.Catalog{}
catalog, err := catalog.LoadFile("file://controls.yaml")
if err != nil {
log.Fatal(err)
}
// Access controls
for _, control := range catalog.Controls {
fmt.Printf("Control: %s - %s\n", control.ID, control.Title)
}
Relationship to Other Components
The Model
Provides the conceptual foundation. Go SDK types correspond to elements in the model.
The Schemas
Go SDK types are generated from the CUE schemas, ensuring consistency between validation and programmatic access.