Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: some more alias to atlas client types #217

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions opsmngr/live_data_migration.go
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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