mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* rename some stuff * more renaming * clean up api * rename more functions * rename cms -> gms * update comment * update swagger gen * update endpoints * overzealous * final touches * dont modify existing migrations * break structs into domain and dtos * add some conversion funcs * fix build * update frontend * try to make swagger happy
27 lines
1.1 KiB
Go
27 lines
1.1 KiB
Go
package cloudmigration
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/services/gcom"
|
|
)
|
|
|
|
type Service interface {
|
|
// GetToken Returns the cloud migration token if it exists.
|
|
GetToken(ctx context.Context) (gcom.TokenView, error)
|
|
// CreateToken Creates a cloud migration token.
|
|
CreateToken(ctx context.Context) (CreateAccessTokenResponse, error)
|
|
// ValidateToken Sends a request to GMS to test the token.
|
|
ValidateToken(ctx context.Context, mig CloudMigrationSession) error
|
|
DeleteToken(ctx context.Context, uid string) error
|
|
|
|
CreateSession(ctx context.Context, req CloudMigrationSessionRequest) (*CloudMigrationSessionResponse, error)
|
|
GetSession(ctx context.Context, migUID string) (*CloudMigrationSession, error)
|
|
DeleteSession(ctx context.Context, migUID string) (*CloudMigrationSession, error)
|
|
GetSessionList(context.Context) (*CloudMigrationSessionListResponse, error)
|
|
|
|
RunMigration(ctx context.Context, migUID string) (*MigrateDataResponse, error)
|
|
GetMigrationStatus(ctx context.Context, runUID string) (*CloudMigrationSnapshot, error)
|
|
GetMigrationRunList(ctx context.Context, migUID string) (*SnapshotList, error)
|
|
}
|