Documentation
¶
Overview ¶
Package provider defines the core interface and canonical types that external roadmap/product-management data sources must implement or produce to plug into omniroadmap.
Index ¶
- type Capabilities
- type CustomField
- type CustomFieldDefinition
- type GetItemRequest
- type Item
- type ItemKind
- type Link
- type ListCustomFieldDefinitionsRequest
- type ListCustomFieldDefinitionsResponse
- type ListItemsRequest
- type ListItemsResponse
- type ListReleasesRequest
- type ListReleasesResponse
- type ListStatusesRequest
- type ListStatusesResponse
- type Person
- type Provider
- type RICE
- type Release
- type Status
- type StatusCategory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct {
Kinds []ItemKind
SupportsReleases bool
SupportsObjectives bool
SupportsCustomFields bool
SupportsWrite bool
}
Capabilities advertises what an adapter actually supports, so callers can branch at runtime instead of relying on fields silently being empty.
type CustomField ¶
CustomField is a single custom field key/value pair on an Item.
type CustomFieldDefinition ¶
type CustomFieldDefinition struct {
ID string
Key string
Name string
Type string
AppliesToKinds []ItemKind
Metadata map[string]any
}
CustomFieldDefinition describes a custom field's schema (as opposed to CustomField, which is a value on a specific Item).
type GetItemRequest ¶
GetItemRequest identifies a single item to fetch. Kind is required because most source APIs route lookups through type-specific endpoints — there is no single, tool-agnostic ID space.
type Item ¶
type Item struct {
// ID is a canonical, globally-unique identifier: "<provider>:<source id>".
ID string
Provider string
SourceID string
// SourceRef is the source system's own human-facing reference (e.g. an
// Aha reference number like "SE-2"), where one exists.
SourceRef string
// SourceURL links back to the record in the source system's own UI.
SourceURL string
// WorkspaceRef is the source system's human-facing workspace/project
// reference when available (e.g. an Aha product reference prefix).
WorkspaceRef string
Kind ItemKind
Name string
Description string
Status *Status
Progress *float64 // normalized 0-100; nil if the provider doesn't track it
// ParentID is the canonical ID of a parent Item, if this item has one
// (e.g. a feature's initiative, or an initiative's epic).
ParentID string
// ReleaseID is the canonical ID of an associated Release, if any.
ReleaseID string
StartDate *time.Time
DueDate *time.Time
CreatedAt *time.Time
UpdatedAt *time.Time
Owner *Person
Tags []string
CustomFields []CustomField
Links []Link
// MoSCoW is an optional prioritization level: must_have, should_have,
// could_have, or wont_have; "" = unset. Like RICE, it isn't populated
// by adapters (no PM tool exposes it as a first-class API field) — a
// downstream custom-field mapping layer fills it per tenant.
MoSCoW string
// Kano is an optional Kano Model classification: must-be, performance,
// attractive, indifferent, reverse, or questionable (prism-roadmap's
// vocabulary); "" = unset. Like MoSCoW, adapters don't populate it — it
// comes from a downstream mapping or augmentation layer.
Kano string
// RICE holds optional RICE prioritization inputs; nil = not provided.
RICE *RICE
// Metadata holds provider-specific fields with no canonical equivalent.
// Keys should be namespaced by provider, e.g. "aha.progress_source".
Metadata map[string]any
}
Item is the canonical, tool-agnostic representation of a roadmap unit — a feature, epic, initiative, objective, or key result. Fields common across providers are typed; anything provider-specific that doesn't warrant a first-class field lives in Metadata.
type ItemKind ¶
type ItemKind string
ItemKind identifies the kind of roadmap item a canonical Item represents.
const ( ItemKindFeature ItemKind = "feature" ItemKindEpic ItemKind = "epic" ItemKindInitiative ItemKind = "initiative" ItemKindObjective ItemKind = "objective" ItemKindKeyResult ItemKind = "key_result" )
Known item kinds. Not every provider supports every kind — check Capabilities.Kinds before assuming one is available.
type ListCustomFieldDefinitionsRequest ¶
type ListCustomFieldDefinitionsRequest struct {
Kind ItemKind // empty means definitions for all kinds
}
ListCustomFieldDefinitionsRequest filters a ListCustomFieldDefinitions call.
type ListCustomFieldDefinitionsResponse ¶
type ListCustomFieldDefinitionsResponse struct {
Definitions []CustomFieldDefinition
}
ListCustomFieldDefinitionsResponse is the result of ListCustomFieldDefinitions.
type ListItemsRequest ¶
type ListItemsRequest struct {
Kinds []ItemKind // empty means all kinds the provider supports
Page int
PerPage int
}
ListItemsRequest filters/paginates a ListItems call.
type ListItemsResponse ¶
ListItemsResponse is the paginated result of ListItems.
type ListReleasesRequest ¶
ListReleasesRequest filters/paginates a ListReleases call.
type ListReleasesResponse ¶
ListReleasesResponse is the paginated result of ListReleases.
type ListStatusesRequest ¶
type ListStatusesRequest struct {
Kind ItemKind // empty means statuses for all kinds
}
ListStatusesRequest filters a ListStatuses call.
type ListStatusesResponse ¶
type ListStatusesResponse struct {
Statuses []Status
}
ListStatusesResponse is the result of ListStatuses.
type Provider ¶
type Provider interface {
// Name returns a short, stable identifier for this provider (e.g. "aha",
// "productboard"), used as the Provider field on canonical types and as
// the registry key.
Name() string
// Close releases any resources held by the provider (HTTP clients,
// connections, etc.).
Close() error
// Capabilities reports what this provider actually supports.
Capabilities() Capabilities
ListItems(ctx context.Context, req *ListItemsRequest) (*ListItemsResponse, error)
GetItem(ctx context.Context, req *GetItemRequest) (*Item, error)
ListReleases(ctx context.Context, req *ListReleasesRequest) (*ListReleasesResponse, error)
ListStatuses(ctx context.Context, req *ListStatusesRequest) (*ListStatusesResponse, error)
ListCustomFieldDefinitions(ctx context.Context, req *ListCustomFieldDefinitionsRequest) (*ListCustomFieldDefinitionsResponse, error)
}
Provider is implemented by an adapter for a specific roadmap/PM data source (Aha!, ProductBoard, etc.), translating that source's own data model into omniroadmap's canonical types.
Read-only for v0.1 — no write verbs yet.
type RICE ¶
type RICE struct {
Reach *float64
Impact *float64
Confidence *float64
Effort *float64
// Score is a precomputed RICE score, if the source provides one.
// Consumers typically recompute (Reach × Impact × Confidence) / Effort
// when it's nil.
Score *float64
}
RICE holds tool-agnostic RICE prioritization inputs as raw numbers (multiplier-style values for Impact/Confidence). A nil field means the source or mapping didn't provide it. Adapters don't populate RICE — no PM tool returns it as a first-class API field; it's filled downstream by a custom-field mapping layer (some Aha tenants store RICE components as custom fields).
type Release ¶
type Release struct {
ID string
Provider string
SourceID string
SourceRef string
SourceURL string
Name string
StartDate *time.Time
ReleaseDate *time.Time
Released bool
Status *Status
Progress *float64
Metadata map[string]any
}
Release is the canonical representation of a release/milestone.
type Status ¶
type Status struct {
ID string
Name string
Category StatusCategory
Complete bool
Color string
Position int64
}
Status represents a workflow status, normalized to a common category while preserving the source system's own name/ordering/color for display.
type StatusCategory ¶
type StatusCategory string
StatusCategory normalizes a provider-specific workflow status into a small, tool-agnostic bucket. The underlying Status still carries the original name/ID for display.
const ( StatusCategoryTodo StatusCategory = "todo" StatusCategoryInProgress StatusCategory = "in_progress" StatusCategoryDone StatusCategory = "done" StatusCategoryCanceled StatusCategory = "canceled" )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package providertest provides a conformance test suite for provider.Provider implementations.
|
Package providertest provides a conformance test suite for provider.Provider implementations. |