CloudMigration: Create authapi service (#96581)

This commit is contained in:
lean.dev
2024-11-21 20:46:06 +02:00
committed by GitHub
parent c8bc1f8637
commit e9fae5bd7f
17 changed files with 837 additions and 452 deletions
@@ -3,13 +3,13 @@ package cloudmigration
import (
"context"
"github.com/grafana/grafana/pkg/services/gcom"
"github.com/grafana/grafana/pkg/services/authapi"
"github.com/grafana/grafana/pkg/services/user"
)
type Service interface {
// GetToken Returns the cloud migration token if it exists.
GetToken(ctx context.Context) (gcom.TokenView, error)
GetToken(ctx context.Context) (authapi.TokenView, error)
// CreateToken Creates a cloud migration token.
CreateToken(ctx context.Context) (CreateAccessTokenResponse, error)
// ValidateToken Sends a request to GMS to test the token.