docs(ax): tighten usage examples
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-04 21:13:50 +00:00
parent e1341ff2d5
commit 69452ef43f
2 changed files with 4 additions and 5 deletions

View file

@ -61,6 +61,7 @@ func (scopedConfig ScopedStoreConfig) Validate() error {
}
// ScopedStore prefixes group names with namespace + ":" before delegating to Store.
// Usage example: `scopedStore, err := store.NewScoped(storeInstance, "tenant-a"); if err != nil { return }; if err := scopedStore.Set("colour", "blue"); err != nil { return }`
//
// Usage example: `scopedStore, err := store.NewScoped(storeInstance, "tenant-a"); if err != nil { return }; if err := scopedStore.SetIn("config", "colour", "blue"); err != nil { return }`
type ScopedStore struct {

View file

@ -80,12 +80,10 @@ func (storeConfig StoreConfig) Validate() error {
return nil
}
// Usage example: `config := store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086", Organisation: "core", BucketName: "events"}`
// JournalConfiguration keeps the journal connection details in one literal so
// agents can pass a single struct to `StoreConfig.Journal` or `WithJournal`.
// Usage example: `config := storeInstance.JournalConfiguration(); fmt.Println(config.EndpointURL, config.Organisation, config.BucketName)`
// JournalConfiguration stores the SQLite journal metadata used by
// CommitToJournal and QueryJournal. The field names stay aligned with the
// agent-facing RFC vocabulary even though the implementation is local to this
// package.
// Usage example: `store.NewConfigured(store.StoreConfig{DatabasePath: ":memory:", Journal: store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086", Organisation: "core", BucketName: "events"}})`
type JournalConfiguration struct {
// Usage example: `config := store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086"}`
EndpointURL string