[v11.0.x] Grafana: define the api for the grafana cloudmigration api (not the csm api) (#86115)

Grafana: define the api for the grafana cloudmigration api (not the csm api) (#84430)

* Add cloud migration endpoints

* Built auth into creating a migration.

* Added more detail to the migration result model

* goimports

* Update pkg/services/cloudmigration/api/api.go

Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>

* Update pkg/services/cloudmigration/api/api.go

Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>

---------

Co-authored-by: Leonard Gram <leo@xlson.com>
Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>
(cherry picked from commit e2f155f9f7)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-04-15 13:58:39 +01:00
committed by GitHub
parent 02788457c6
commit b49a40d319
6 changed files with 251 additions and 29 deletions
@@ -24,7 +24,7 @@ type Service struct {
features featuremgmt.FeatureToggles
dsService datasources.DataSourceService
api *api.MigrationAPI
api *api.CloudMigrationAPI
// metrics *Metrics
}
@@ -62,6 +62,61 @@ func ProvideService(
return s
}
func (s *Service) MigrateDatasources(ctx context.Context, request *cloudmigration.MigrateDatasourcesRequest) (*cloudmigration.MigrateDatasourcesResponse, error) {
return s.store.MigrateDatasources(ctx, request)
func (s *Service) CreateToken(ctx context.Context) error {
// TODO: Implement method
return nil
}
func (s *Service) ValidateToken(ctx context.Context, token string) error {
// TODO: Implement method
return nil
}
func (s *Service) SaveEncryptedToken(ctx context.Context, token string) error {
// TODO: Implement method
return nil
}
func (s *Service) GetMigration(ctx context.Context, id int64) (*cloudmigration.CloudMigrationResponse, error) {
// TODO: Implement method
return nil, nil
}
func (s *Service) GetMigrationList(ctx context.Context) ([]cloudmigration.CloudMigrationResponse, error) {
// TODO: Implement method
return nil, nil
}
func (s *Service) CreateMigration(ctx context.Context, cm cloudmigration.CloudMigrationRequest) (*cloudmigration.CloudMigrationResponse, error) {
// TODO: Implement method
return nil, nil
}
func (s *Service) UpdateMigration(ctx context.Context, id int64, cm cloudmigration.CloudMigrationRequest) (*cloudmigration.CloudMigrationResponse, error) {
// TODO: Implement method
return nil, nil
}
func (s *Service) RunMigration(ctx context.Context, uid string) (*cloudmigration.CloudMigrationRun, error) {
// TODO: Implement method
return nil, nil
}
func (s *Service) GetMigrationStatus(ctx context.Context, id string, runID string) (*cloudmigration.CloudMigrationRun, error) {
// TODO: Implement method
return nil, nil
}
func (s *Service) GetMigrationStatusList(ctx context.Context, id string) ([]cloudmigration.CloudMigrationRun, error) {
// TODO: Implement method
return nil, nil
}
func (s *Service) DeleteMigration(ctx context.Context, id string) error {
// TODO: Implement method
return nil
}
// func (s *Service) MigrateDatasources(ctx context.Context, request *cloudmigration.MigrateDatasourcesRequest) (*cloudmigration.MigrateDatasourcesResponse, error) {
// return s.store.MigrateDatasources(ctx, request)
// }