Cloud migrations: create route to fetch cloud migration token (#88176)

* Cloud migration: create route to fetch cloud migration token

* implement gcomStub.ListTokens

* fix swagger for POST /cloudmigration/migration

* fix swagger for POST /cloudmigration/migration

* fix swagger for POST /cloudmigration/migration
This commit is contained in:
Bruno
2024-05-31 09:39:10 -03:00
committed by GitHub
parent b640921dfd
commit 83543c6b12
10 changed files with 351 additions and 1 deletions
@@ -2,10 +2,16 @@ package cloudmigration
import (
"context"
"github.com/grafana/grafana/pkg/services/gcom"
)
type Service interface {
// Returns the cloud migration token if it exists.
GetToken(context.Context) (gcom.TokenView, error)
// Creates a cloud migration token.
CreateToken(context.Context) (CreateAccessTokenResponse, error)
// Sends a request to CMS to test the token.
ValidateToken(context.Context, CloudMigration) error
CreateMigration(context.Context, CloudMigrationRequest) (*CloudMigrationResponse, error)