Skip to content

Commit

Permalink
feat: some more alias to atlas client types (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
gssbzn committed Nov 7, 2023
1 parent c7d192c commit c3bc956
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions opsmngr/live_data_migration.go
Expand Up @@ -24,12 +24,14 @@ import (

const liveMigrationBasePath = "api/public/v1.0/orgs/%s/liveExport/migrationLink"

type LinkToken = atlas.LinkToken

// LiveDataMigrationService is an interface for interfacing with the Live Migration
// endpoints of the MongoDB Ops Manager API.
//
// See more: https://docs.opsmanager.mongodb.com/current/reference/api/cloud-migration/
type LiveDataMigrationService interface {
ConnectOrganizations(context.Context, string, *atlas.LinkToken) (*ConnectionStatus, *Response, error)
ConnectOrganizations(context.Context, string, *LinkToken) (*ConnectionStatus, *Response, error)
DeleteConnection(context.Context, string) (*Response, error)
ConnectionStatus(context.Context, string) (*ConnectionStatus, *Response, error)
}
Expand Down Expand Up @@ -69,7 +71,7 @@ func (s *LiveDataMigrationServiceOp) ConnectionStatus(ctx context.Context, orgID
// ConnectOrganizations connects the source Ops Manager organization with a target MongoDB Atlas organization.
//
// See more: https://docs.opsmanager.mongodb.com/current/reference/api/cloud-migration/link-the-organization-with-atlas/
func (s *LiveDataMigrationServiceOp) ConnectOrganizations(ctx context.Context, orgID string, linkToken *atlas.LinkToken) (*ConnectionStatus, *Response, error) {
func (s *LiveDataMigrationServiceOp) ConnectOrganizations(ctx context.Context, orgID string, linkToken *LinkToken) (*ConnectionStatus, *Response, error) {
if orgID == "" {
return nil, nil, atlas.NewArgError("orgID", "must be set")
}
Expand Down
1 change: 1 addition & 0 deletions opsmngr/measurements.go
Expand Up @@ -25,6 +25,7 @@ type (
ProcessDiskMeasurements = atlas.ProcessDiskMeasurements
ProcessDatabaseMeasurements = atlas.ProcessDatabaseMeasurements
ProcessMeasurementListOptions = atlas.ProcessMeasurementListOptions
Measurements = atlas.Measurements
)

// MeasurementsService provides access to the measurement related functions in the Ops Manager API.
Expand Down
2 changes: 2 additions & 0 deletions opsmngr/opsmngr.go
Expand Up @@ -52,6 +52,8 @@ type (
Checkpoint = atlas.Checkpoint
Checkpoints = atlas.Checkpoints
SnapshotTimestamp = atlas.SnapshotTimestamp
IndexOptions = atlas.IndexOptions
CollationOptions = atlas.CollationOptions
)

type HTTPClient interface {
Expand Down

0 comments on commit c3bc956

Please sign in to comment.