Files
grafana/pkg/services/cloudmigration/cloudmigration.go
T
github-actions[bot] 5ddc329279 apply security patch: v11.3.x/194-202410181505.patch
commit 1395b7ccf1656ff6cfd3aed5eb9b5163861fe3b2
Author: Leandro Deveikis <leandro.deveikis@gmail.com>
Date:   Fri Oct 11 14:44:30 2024 -0300

    Restrict dashboards, folders and datasources by the org id of the signed in user
2024-10-24 14:40:28 -07:00

30 lines
1.4 KiB
Go

package cloudmigration
import (
"context"
"github.com/grafana/grafana/pkg/services/gcom"
"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)
// 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, orgID int64, migUID string) (*CloudMigrationSession, error)
DeleteSession(ctx context.Context, orgID int64, migUID string) (*CloudMigrationSession, error)
GetSessionList(ctx context.Context, orgID int64) (*CloudMigrationSessionListResponse, error)
CreateSnapshot(ctx context.Context, signedInUser *user.SignedInUser, sessionUid string) (*CloudMigrationSnapshot, error)
GetSnapshot(ctx context.Context, query GetSnapshotsQuery) (*CloudMigrationSnapshot, error)
GetSnapshotList(ctx context.Context, query ListSnapshotsQuery) ([]CloudMigrationSnapshot, error)
UploadSnapshot(ctx context.Context, orgID int64, sessionUid string, snapshotUid string) error
CancelSnapshot(ctx context.Context, sessionUid string, snapshotUid string) error
}