Documentation
¶
Overview ¶
Package omniroadmap implements omniroadmap-core's provider.Provider over aha-studio's local SQLite cache (*sync.DB), registered as "aha-studio" — distinct from aha-go/omniroadmap's live-API "aha" provider. Syncing from the cache needs no Aha API traffic: aha-studio keeps owning Aha-native entities while downstream consumers work with generalized ones.
Fidelity caveats vs. the live "aha" provider:
- Only the workflow status *name* is cached, so StatusCategory normalization is a name heuristic (no Complete flag or Position).
- Custom fields are present only for records fetched via detailed sync.
- Custom field *definitions* aren't cached — ListCustomFieldDefinitions returns ErrUnsupportedOperation (per-record CustomFields still work, so fieldmap-based MoSCoW/RICE mapping is unaffected).
Note the canonical IDs are prefixed "aha-studio:", so syncing both this provider and the live "aha" provider into the same store produces parallel copies, not merged records.
Index ¶
- type Option
- type Provider
- func (p *Provider) Capabilities() provider.Capabilities
- func (p *Provider) Close() error
- func (p *Provider) GetItem(ctx context.Context, req *provider.GetItemRequest) (*provider.Item, error)
- func (p *Provider) ListCustomFieldDefinitions(ctx context.Context, req *provider.ListCustomFieldDefinitionsRequest) (*provider.ListCustomFieldDefinitionsResponse, error)
- func (p *Provider) ListItems(ctx context.Context, req *provider.ListItemsRequest) (*provider.ListItemsResponse, error)
- func (p *Provider) ListReleases(ctx context.Context, req *provider.ListReleasesRequest) (*provider.ListReleasesResponse, error)
- func (p *Provider) ListStatuses(ctx context.Context, req *provider.ListStatusesRequest) (*provider.ListStatusesResponse, error)
- func (p *Provider) Name() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Provider)
Option configures a Provider.
func WithProduct ¶
WithProduct scopes list operations to a single Aha product (workspace) reference. Empty means all cached products.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements provider.Provider over aha-studio's cache DB.
func NewProvider ¶
func NewProvider(db *studiosync.DB, opts ...Option) *Provider
NewProvider wraps an opened cache DB as a provider.Provider. Callers typically open the DB via sync.Open(sync.DefaultDBPath()).
func (*Provider) Capabilities ¶
func (p *Provider) Capabilities() provider.Capabilities
func (*Provider) Close ¶
Close is a no-op — the caller owns the DB handle's lifecycle (it may be shared with other aha-studio components).
func (*Provider) GetItem ¶
func (p *Provider) GetItem(ctx context.Context, req *provider.GetItemRequest) (*provider.Item, error)
GetItem fetches one cached record by kind and source ID (or Aha reference number).
func (*Provider) ListCustomFieldDefinitions ¶
func (p *Provider) ListCustomFieldDefinitions(ctx context.Context, req *provider.ListCustomFieldDefinitionsRequest) (*provider.ListCustomFieldDefinitionsResponse, error)
ListCustomFieldDefinitions is unsupported: the cache stores per-record custom field values but not field definitions/schema. Per-record CustomFields on Items still work, so fieldmap-based MoSCoW/RICE mapping is unaffected.
func (*Provider) ListItems ¶
func (p *Provider) ListItems(ctx context.Context, req *provider.ListItemsRequest) (*provider.ListItemsResponse, error)
ListItems reads cached records for the requested kinds (or all supported kinds if req.Kinds is empty). The cache is local, so pagination is unnecessary — everything is returned in one response regardless of req.Page/PerPage.
func (*Provider) ListReleases ¶
func (p *Provider) ListReleases(ctx context.Context, req *provider.ListReleasesRequest) (*provider.ListReleasesResponse, error)
ListReleases reads cached releases. Like ListItems, pagination is unnecessary for the local cache.
func (*Provider) ListStatuses ¶
func (p *Provider) ListStatuses(ctx context.Context, req *provider.ListStatusesRequest) (*provider.ListStatusesResponse, error)
ListStatuses derives the distinct statuses present across cached items. Only status names are cached (no workflow definitions), so this reflects observed data, not the product's full workflow configuration.