Documentation
¶
Overview ¶
Package analyst provides an analyst findings provider for omnisignal.
This provider ingests analyst findings from various sources (Gartner, Forrester, IDC, etc.) and converts them to signals that reference MarketSpec entities.
Usage:
import (
"github.com/plexusone/omnisignal"
_ "github.com/plexusone/omnisignal/provider/analyst"
)
provider, err := omnisignal.New("analyst", omnisignal.Config{
Options: map[string]any{
"source": "gartner", // or "forrester", "idc", etc.
},
})
Index ¶
- Constants
- func NewProvider(cfg omnisignal.Config) (omnisignal.Provider, error)
- type Adapter
- type Finding
- type MemoryAdapter
- type Provider
- func (p *Provider) Capabilities() omnisignal.Capabilities
- func (p *Provider) Close() error
- func (p *Provider) Fetch(ctx context.Context, opts omnisignal.FetchOptions) ([]signal.Signal, error)
- func (p *Provider) Name() string
- func (p *Provider) Subscribe(ctx context.Context, opts omnisignal.SubscribeOptions) (<-chan signal.Signal, error)
Constants ¶
const ( // ProviderName is the identifier for this provider. ProviderName = "analyst" // DefaultTimeout for API requests. DefaultTimeout = 30 * time.Second )
const ( SourceGartner = "gartner" SourceForrester = "forrester" SourceIDC = "idc" SourceCustom = "custom" )
Source identifiers for analyst firms.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider(cfg omnisignal.Config) (omnisignal.Provider, error)
NewProvider creates a new analyst provider.
Types ¶
type Adapter ¶
type Adapter interface {
// Fetch retrieves findings from the source.
Fetch(ctx context.Context, opts omnisignal.FetchOptions) ([]Finding, error)
// Source returns the adapter's source identifier.
Source() string
}
Adapter converts analyst findings to signals. Implement this interface to support different analyst data sources.
type Finding ¶
type Finding struct {
// ID is the unique identifier for this finding.
ID string
// ReportID is the MarketSpec report identifier (e.g., "gartner-mq-iam-2026").
ReportID string
// Title is a brief summary of the finding.
Title string
// Description is the full finding text.
Description string
// Category classifies the finding (e.g., "capability_gap", "market_trend", "competitive_position").
Category string
// Source is the analyst firm (e.g., "gartner", "forrester").
Source string
// Severity indicates the impact level.
Severity common.Severity
// Markets are the MarketSpec market slugs this finding applies to.
Markets []string
// Competitors are the MarketSpec competitor slugs mentioned.
Competitors []string
// PublishedAt is when the report was published.
PublishedAt time.Time
// Metadata contains additional source-specific fields.
Metadata map[string]any
}
Finding represents an analyst finding from reports.
type MemoryAdapter ¶
type MemoryAdapter struct {
// contains filtered or unexported fields
}
MemoryAdapter is an in-memory adapter for testing and manual finding ingestion.
func NewMemoryAdapter ¶
func NewMemoryAdapter(source string, findings []Finding) *MemoryAdapter
NewMemoryAdapter creates an in-memory adapter with pre-loaded findings.
func (*MemoryAdapter) Add ¶
func (m *MemoryAdapter) Add(f Finding)
Add adds a finding to the in-memory store.
func (*MemoryAdapter) Fetch ¶
func (m *MemoryAdapter) Fetch(ctx context.Context, opts omnisignal.FetchOptions) ([]Finding, error)
Fetch retrieves findings from memory.
func (*MemoryAdapter) Source ¶
func (m *MemoryAdapter) Source() string
Source returns the adapter's source identifier.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements omnisignal.Provider for analyst findings.
func (*Provider) Capabilities ¶
func (p *Provider) Capabilities() omnisignal.Capabilities
Capabilities returns what this provider supports.
func (*Provider) Fetch ¶
func (p *Provider) Fetch(ctx context.Context, opts omnisignal.FetchOptions) ([]signal.Signal, error)
Fetch retrieves analyst findings as signals.
func (*Provider) Subscribe ¶
func (p *Provider) Subscribe(ctx context.Context, opts omnisignal.SubscribeOptions) (<-chan signal.Signal, error)
Subscribe is not supported for analyst findings.