Documentation
¶
Index ¶
- Constants
- Variables
- func IsPublicSignatureType(signatureType plugins.SignatureType) bool
- func ProvideService(cfg *setting.Cfg, httpClientProvider *httpclient.Provider, ...) (cloudmigration.Service, error)
- type Metrics
- type NoopServiceImpl
- func (s *NoopServiceImpl) CancelSnapshot(ctx context.Context, sessionUid string, snapshotUid string) error
- func (s *NoopServiceImpl) CreateSession(ctx context.Context, signedInUser *user.SignedInUser, ...) (*cloudmigration.CloudMigrationSessionResponse, error)
- func (s *NoopServiceImpl) CreateSnapshot(ctx context.Context, user *user.SignedInUser, ...) (*cloudmigration.CloudMigrationSnapshot, error)
- func (s *NoopServiceImpl) CreateToken(ctx context.Context) (cloudmigration.CreateAccessTokenResponse, error)
- func (s *NoopServiceImpl) DeleteSession(ctx context.Context, orgID int64, signedInUser *user.SignedInUser, uid string) (*cloudmigration.CloudMigrationSession, error)
- func (s *NoopServiceImpl) DeleteToken(ctx context.Context, uid string) error
- func (s *NoopServiceImpl) GetSession(ctx context.Context, orgID int64, uid string) (*cloudmigration.CloudMigrationSession, error)
- func (s *NoopServiceImpl) GetSessionList(ctx context.Context, orgID int64) (*cloudmigration.CloudMigrationSessionListResponse, error)
- func (s *NoopServiceImpl) GetSnapshot(ctx context.Context, query cloudmigration.GetSnapshotsQuery) (*cloudmigration.CloudMigrationSnapshot, error)
- func (s *NoopServiceImpl) GetSnapshotList(ctx context.Context, query cloudmigration.ListSnapshotsQuery) ([]cloudmigration.CloudMigrationSnapshot, error)
- func (s *NoopServiceImpl) GetToken(ctx context.Context) (authapi.TokenView, error)
- func (s *NoopServiceImpl) UploadSnapshot(ctx context.Context, orgID int64, signedInUser *user.SignedInUser, ...) error
- func (s *NoopServiceImpl) ValidateToken(ctx context.Context, cm cloudmigration.CloudMigrationSession) error
- type PluginCmd
- type Service
- func (s *Service) CancelSnapshot(ctx context.Context, sessionUid string, snapshotUid string) (err error)
- func (s *Service) CreateSession(ctx context.Context, signedInUser *user.SignedInUser, ...) (*cloudmigration.CloudMigrationSessionResponse, error)
- func (s *Service) CreateSnapshot(ctx context.Context, signedInUser *user.SignedInUser, ...) (*cloudmigration.CloudMigrationSnapshot, error)
- func (s *Service) CreateToken(ctx context.Context) (cloudmigration.CreateAccessTokenResponse, error)
- func (s *Service) DeleteSession(ctx context.Context, orgID int64, signedInUser *user.SignedInUser, ...) (*cloudmigration.CloudMigrationSession, error)
- func (s *Service) DeleteToken(ctx context.Context, tokenID string) error
- func (s *Service) GetSession(ctx context.Context, orgID int64, uid string) (*cloudmigration.CloudMigrationSession, error)
- func (s *Service) GetSessionList(ctx context.Context, orgID int64) (*cloudmigration.CloudMigrationSessionListResponse, error)
- func (s *Service) GetSnapshot(ctx context.Context, query cloudmigration.GetSnapshotsQuery) (*cloudmigration.CloudMigrationSnapshot, error)
- func (s *Service) GetSnapshotList(ctx context.Context, query cloudmigration.ListSnapshotsQuery) ([]cloudmigration.CloudMigrationSnapshot, error)
- func (s *Service) GetToken(ctx context.Context) (authapi.TokenView, error)
- func (s *Service) UploadSnapshot(ctx context.Context, orgID int64, signedInUser *user.SignedInUser, ...) error
- func (s *Service) ValidateToken(ctx context.Context, cm cloudmigration.CloudMigrationSession) error
Constants ¶
View Source
const ( GetAllSnapshots = -1 GetSnapshotListSortingLatest = "latest" )
Variables ¶
View Source
var LogPrefix = "cloudmigration.service"
Functions ¶
func IsPublicSignatureType ¶
func IsPublicSignatureType(signatureType plugins.SignatureType) bool
IsPublicSignatureType returns true if plugin signature type is public
func ProvideService ¶
func ProvideService( cfg *setting.Cfg, httpClientProvider *httpclient.Provider, features featuremgmt.FeatureToggles, db db.DB, dsService datasources.DataSourceService, secretsStore secretskv.SecretsKVStore, secretsService secrets.Service, routeRegister routing.RouteRegister, prom prometheus.Registerer, tracer tracing.Tracer, dashboardService dashboards.DashboardService, folderService folder.Service, pluginStore pluginstore.Store, pluginSettingsService pluginsettings.Service, accessControl accesscontrol.AccessControl, acService accesscontrol.Service, kvStore kvstore.KVStore, libraryElementsService libraryelements.Service, ngAlert *ngalert.AlertNG, ) (cloudmigration.Service, error)
ProvideService Factory for method used by wire to inject dependencies. builds the service, and api, and configures routes
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func (*Metrics) Collect ¶
func (metrics *Metrics) Collect(ch chan<- prometheus.Metric)
func (*Metrics) Describe ¶
func (metrics *Metrics) Describe(ch chan<- *prometheus.Desc)
type NoopServiceImpl ¶
type NoopServiceImpl struct{}
NoopServiceImpl Define the Service Implementation.
func (*NoopServiceImpl) CancelSnapshot ¶
func (*NoopServiceImpl) CreateSession ¶
func (s *NoopServiceImpl) CreateSession(ctx context.Context, signedInUser *user.SignedInUser, cm cloudmigration.CloudMigrationSessionRequest) (*cloudmigration.CloudMigrationSessionResponse, error)
func (*NoopServiceImpl) CreateSnapshot ¶
func (s *NoopServiceImpl) CreateSnapshot(ctx context.Context, user *user.SignedInUser, cmd cloudmigration.CreateSnapshotCommand) (*cloudmigration.CloudMigrationSnapshot, error)
func (*NoopServiceImpl) CreateToken ¶
func (s *NoopServiceImpl) CreateToken(ctx context.Context) (cloudmigration.CreateAccessTokenResponse, error)
func (*NoopServiceImpl) DeleteSession ¶
func (s *NoopServiceImpl) DeleteSession(ctx context.Context, orgID int64, signedInUser *user.SignedInUser, uid string) (*cloudmigration.CloudMigrationSession, error)
func (*NoopServiceImpl) DeleteToken ¶
func (s *NoopServiceImpl) DeleteToken(ctx context.Context, uid string) error
func (*NoopServiceImpl) GetSession ¶
func (s *NoopServiceImpl) GetSession(ctx context.Context, orgID int64, uid string) (*cloudmigration.CloudMigrationSession, error)
func (*NoopServiceImpl) GetSessionList ¶
func (s *NoopServiceImpl) GetSessionList(ctx context.Context, orgID int64) (*cloudmigration.CloudMigrationSessionListResponse, error)
func (*NoopServiceImpl) GetSnapshot ¶
func (s *NoopServiceImpl) GetSnapshot(ctx context.Context, query cloudmigration.GetSnapshotsQuery) (*cloudmigration.CloudMigrationSnapshot, error)
func (*NoopServiceImpl) GetSnapshotList ¶
func (s *NoopServiceImpl) GetSnapshotList(ctx context.Context, query cloudmigration.ListSnapshotsQuery) ([]cloudmigration.CloudMigrationSnapshot, error)
func (*NoopServiceImpl) UploadSnapshot ¶
func (s *NoopServiceImpl) UploadSnapshot(ctx context.Context, orgID int64, signedInUser *user.SignedInUser, sessionUid string, snapshotUid string) error
func (*NoopServiceImpl) ValidateToken ¶
func (s *NoopServiceImpl) ValidateToken(ctx context.Context, cm cloudmigration.CloudMigrationSession) error
type PluginCmd ¶
type PluginCmd struct {
ID string `json:"id"`
Name string `json:"name"`
SettingCmd pluginsettings.UpdatePluginSettingCmd `json:"settingCmd"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service Define the cloudmigration.Service Implementation.
func (*Service) CancelSnapshot ¶
func (*Service) CreateSession ¶
func (s *Service) CreateSession(ctx context.Context, signedInUser *user.SignedInUser, cmd cloudmigration.CloudMigrationSessionRequest) (*cloudmigration.CloudMigrationSessionResponse, error)
func (*Service) CreateSnapshot ¶
func (s *Service) CreateSnapshot(ctx context.Context, signedInUser *user.SignedInUser, cmd cloudmigration.CreateSnapshotCommand) (*cloudmigration.CloudMigrationSnapshot, error)
func (*Service) CreateToken ¶
func (s *Service) CreateToken(ctx context.Context) (cloudmigration.CreateAccessTokenResponse, error)
func (*Service) DeleteSession ¶
func (s *Service) DeleteSession(ctx context.Context, orgID int64, signedInUser *user.SignedInUser, sessionUID string) (*cloudmigration.CloudMigrationSession, error)
func (*Service) DeleteToken ¶
func (*Service) GetSession ¶
func (s *Service) GetSession(ctx context.Context, orgID int64, uid string) (*cloudmigration.CloudMigrationSession, error)
func (*Service) GetSessionList ¶
func (s *Service) GetSessionList(ctx context.Context, orgID int64) (*cloudmigration.CloudMigrationSessionListResponse, error)
func (*Service) GetSnapshot ¶
func (s *Service) GetSnapshot(ctx context.Context, query cloudmigration.GetSnapshotsQuery) (*cloudmigration.CloudMigrationSnapshot, error)
GetSnapshot returns the on-prem version of a snapshot, supplemented with processing status from GMS
func (*Service) GetSnapshotList ¶
func (s *Service) GetSnapshotList(ctx context.Context, query cloudmigration.ListSnapshotsQuery) ([]cloudmigration.CloudMigrationSnapshot, error)
func (*Service) UploadSnapshot ¶
func (*Service) ValidateToken ¶
func (s *Service) ValidateToken(ctx context.Context, cm cloudmigration.CloudMigrationSession) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.