sourcegraph/internal/opencodegraph/providers.go
Quinn Slack c9439d9456
OpenCodeGraph prototype (#58675)
This adds support for the OpenCodeGraph prototype. Feature-flagged off by default behind the `opencodegraph` feature flag. See https://www.loom.com/share/5549d92a7c244863ac86ce56692ca030 for more information.

Also, for our CodeMirror, remove `background:transparent` so that line bg applies to block widgets
2023-12-06 21:39:33 -08:00

22 lines
522 B
Go

package opencodegraph
import (
"context"
"github.com/sourcegraph/sourcegraph/schema"
)
type Provider interface {
Name() string
Capabilities(ctx context.Context, params schema.CapabilitiesParams) (*schema.CapabilitiesResult, error)
Annotations(ctx context.Context, params schema.AnnotationsParams) (*schema.AnnotationsResult, error)
}
var providers []Provider
func RegisterProvider(provider Provider) {
providers = append(providers, provider)
}
var AllProviders Provider = &multiProvider{providers: &providers}