/
deployments.go
28 lines (23 loc) · 1.4 KB
/
deployments.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package opsmngr
import (
"context"
atlas "go.mongodb.org/atlas/mongodbatlas"
)
// DeploymentsService provides access to the deployment related functions in the Ops Manager API.
//
// See more: https://docs.opsmanager.mongodb.com/current/reference/api/nav/deployments/
type DeploymentsService interface {
ListHosts(context.Context, string, *HostListOptions) (*Hosts, *atlas.Response, error)
GetHost(context.Context, string, string) (*Host, *atlas.Response, error)
GetHostByHostname(context.Context, string, string, int) (*Host, *atlas.Response, error)
StartMonitoring(context.Context, string, *Host) (*Host, *atlas.Response, error)
UpdateMonitoring(context.Context, string, string, *Host) (*Host, *atlas.Response, error)
StopMonitoring(context.Context, string, string) (*atlas.Response, error)
ListPartitions(context.Context, string, string, *atlas.ListOptions) (*atlas.ProcessDisksResponse, *atlas.Response, error)
GetPartition(context.Context, string, string, string) (*atlas.ProcessDisk, *atlas.Response, error)
ListDatabases(context.Context, string, string, *atlas.ListOptions) (*atlas.ProcessDatabasesResponse, *atlas.Response, error)
GetDatabase(context.Context, string, string, string) (*atlas.ProcessDatabase, *atlas.Response, error)
}
// DeploymentsServiceOp provides an implementation of the DeploymentsService interface
type DeploymentsServiceOp service
var _ DeploymentsService = new(DeploymentsServiceOp)