2023-09-28 05:18:09 -05:00
|
|
|
package auth
|
2023-06-26 09:38:43 -05:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2023-06-27 01:47:25 -05:00
|
|
|
"github.com/grafana/grafana/pkg/plugins/plugindef"
|
2023-06-26 09:38:43 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
type ExternalService struct {
|
|
|
|
ClientID string `json:"clientId"`
|
|
|
|
ClientSecret string `json:"clientSecret"`
|
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ExternalServiceRegistry interface {
|
2023-11-13 09:23:11 -06:00
|
|
|
HasExternalService(ctx context.Context, pluginID string) (bool, error)
|
2023-11-13 06:18:13 -06:00
|
|
|
RegisterExternalService(ctx context.Context, pluginID string, pType plugindef.Type, svc *plugindef.ExternalServiceRegistration) (*ExternalService, error)
|
|
|
|
RemoveExternalService(ctx context.Context, pluginID string) error
|
2023-06-26 09:38:43 -05:00
|
|
|
}
|