package main
import (
"context"
"log"
"os"
fact0 "github.com/fact0-ai/fact0/sdk/go"
)
func main() {
client := fact0.NewClient(fact0.Config{
APIKey: os.Getenv("FACT0_API_KEY"),
// BaseURL defaults to https://api.fact0.io; set for local dev only.
})
err := client.Audit.Log(context.Background(), fact0.AuditEventInput{
Actor: fact0.Actor{ID: "svc-1", Type: "system"},
Action: "config.update",
Resource: fact0.Resource{ID: "cfg_1", Type: "config"},
Outcome: "success",
})
if err != nil {
log.Fatal(err)
}
}