mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 04:22:13 +08:00

* Implement run migration endpoint * Refactor RunMigration method into separate methods * Save migration runs fix lint * Minor changes * Refactor how to use cms endpoint * fix interface * complete merge * add individual items * adds tracing to getMigration * linter * updated swagger definition with the latest changes * CloudMigrations: Implement core API handlers for cloud migrations and migration runs (#85407) * implement delete * add auth token encryption * implement token validation * call token validation during migration creation * implement get migration status * implement list migration runs * fix bug * finish parse domain func * fix urls * fix typo * fix encoding and decoding * remove double decryption * add missing slash * fix id returned by create function * inject missing services * finish implementing (as far as I can tell right now) data migration and response handling * comment out broken test, needs a rewrite * add a few final touches * get dashboard migration to work properly * changed runMigration to a POST * swagger * swagger * swagger --------- Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com> Co-authored-by: Leonard Gram <leo@xlson.com> Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
23 lines
934 B
Go
23 lines
934 B
Go
package cloudmigration
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Service interface {
|
|
CreateToken(context.Context) (CreateAccessTokenResponse, error)
|
|
ValidateToken(context.Context, CloudMigration) error
|
|
// migration
|
|
GetMigration(context.Context, int64) (*CloudMigration, error)
|
|
GetMigrationList(context.Context) (*CloudMigrationListResponse, error)
|
|
CreateMigration(context.Context, CloudMigrationRequest) (*CloudMigrationResponse, error)
|
|
GetMigrationDataJSON(context.Context, int64) ([]byte, error)
|
|
UpdateMigration(context.Context, int64, CloudMigrationRequest) (*CloudMigrationResponse, error)
|
|
GetMigrationStatus(context.Context, string, string) (*CloudMigrationRun, error)
|
|
GetMigrationStatusList(context.Context, string) ([]*CloudMigrationRun, error)
|
|
DeleteMigration(context.Context, int64) (*CloudMigration, error)
|
|
SaveMigrationRun(context.Context, *CloudMigrationRun) (string, error)
|
|
|
|
ParseCloudMigrationConfig() (string, error)
|
|
}
|