mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:51:50 +00:00
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
22 lines
522 B
Go
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}
|