Skip to content

Commit 729c84c

Browse files
authored
docs fix godoc rendering (#196)
1 parent 66fae8a commit 729c84c

28 files changed

+157
-17
lines changed

mongodbatlas/alert_configurations.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ type CurrentValue struct {
136136
}
137137

138138
// Create creates an alert configuration for the project associated to {GROUP-ID}.
139+
//
139140
// See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-create-config/
140141
func (s *AlertConfigurationsServiceOp) Create(ctx context.Context, groupID string, createReq *AlertConfiguration) (*AlertConfiguration, *Response, error) {
141142
if groupID == "" {
@@ -162,6 +163,7 @@ func (s *AlertConfigurationsServiceOp) Create(ctx context.Context, groupID strin
162163
}
163164

164165
// EnableAnAlertConfig Enables/disables the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
166+
//
165167
// See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-enable-disable-config/
166168
func (s *AlertConfigurationsServiceOp) EnableAnAlertConfig(ctx context.Context, groupID, alertConfigID string, enabled *bool) (*AlertConfiguration, *Response, error) {
167169
if groupID == "" {
@@ -189,6 +191,7 @@ func (s *AlertConfigurationsServiceOp) EnableAnAlertConfig(ctx context.Context,
189191
}
190192

191193
// GetAnAlertConfig gets the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
194+
//
192195
// See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-get-config/
193196
func (s *AlertConfigurationsServiceOp) GetAnAlertConfig(ctx context.Context, groupID, alertConfigID string) (*AlertConfiguration, *Response, error) {
194197
if groupID == "" {
@@ -216,6 +219,7 @@ func (s *AlertConfigurationsServiceOp) GetAnAlertConfig(ctx context.Context, gro
216219
}
217220

218221
// GetOpenAlertsConfig gets all open alerts for the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
222+
//
219223
// See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-get-open-alerts/
220224
func (s *AlertConfigurationsServiceOp) GetOpenAlertsConfig(ctx context.Context, groupID, alertConfigID string) ([]AlertConfiguration, *Response, error) {
221225
if groupID == "" {
@@ -246,6 +250,7 @@ func (s *AlertConfigurationsServiceOp) GetOpenAlertsConfig(ctx context.Context,
246250
}
247251

248252
// List gets all alert configurations for the project associated to {GROUP-ID}.
253+
//
249254
// See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-get-all-configs/
250255
func (s *AlertConfigurationsServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]AlertConfiguration, *Response, error) {
251256
if groupID == "" {
@@ -279,6 +284,7 @@ func (s *AlertConfigurationsServiceOp) List(ctx context.Context, groupID string,
279284
}
280285

281286
// Update the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
287+
//
282288
// See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-update-config/
283289
func (s *AlertConfigurationsServiceOp) Update(ctx context.Context, groupID, alertConfigID string, updateReq *AlertConfiguration) (*AlertConfiguration, *Response, error) {
284290
if updateReq == nil {
@@ -309,6 +315,7 @@ func (s *AlertConfigurationsServiceOp) Update(ctx context.Context, groupID, aler
309315
}
310316

311317
// Delete the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
318+
//
312319
// See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-delete-config/
313320
func (s *AlertConfigurationsServiceOp) Delete(ctx context.Context, groupID, alertConfigID string) (*Response, error) {
314321
if groupID == "" {
@@ -332,6 +339,7 @@ func (s *AlertConfigurationsServiceOp) Delete(ctx context.Context, groupID, aler
332339
}
333340

334341
// ListMatcherFields gets all field names that the matchers.fieldName parameter accepts when you create or update an Alert Configuration.
342+
//
335343
// See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-get-matchers-field-names/
336344
func (s *AlertConfigurationsServiceOp) ListMatcherFields(ctx context.Context) ([]string, *Response, error) {
337345
path := "alertConfigs/matchers/fieldNames"

mongodbatlas/api_keys.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const apiKeysPath = "orgs/%s/apiKeys"
2525

2626
// APIKeysService is an interface for interfacing with the APIKeys
2727
// endpoints of the MongoDB Atlas API.
28+
//
2829
// See more: https://docs.atlas.mongodb.com/reference/api/apiKeys/
2930
type APIKeysService interface {
3031
List(context.Context, string, *ListOptions) ([]APIKey, *Response, error)
@@ -70,6 +71,7 @@ type apiKeysResponse struct {
7071
}
7172

7273
// List all API-KEY in the organization associated to {ORG-ID}.
74+
//
7375
// See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-get-all/
7476
func (s *APIKeysServiceOp) List(ctx context.Context, orgID string, listOptions *ListOptions) ([]APIKey, *Response, error) {
7577
path := fmt.Sprintf(apiKeysPath, orgID)
@@ -99,6 +101,7 @@ func (s *APIKeysServiceOp) List(ctx context.Context, orgID string, listOptions *
99101
}
100102

101103
// Get gets the APIKey specified to {API-KEY-ID} from the organization associated to {ORG-ID}.
104+
//
102105
// See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-get-one/
103106
func (s *APIKeysServiceOp) Get(ctx context.Context, orgID, apiKeyID string) (*APIKey, *Response, error) {
104107
if apiKeyID == "" {
@@ -124,6 +127,7 @@ func (s *APIKeysServiceOp) Get(ctx context.Context, orgID, apiKeyID string) (*AP
124127
}
125128

126129
// Create an API Key by the {ORG-ID}.
130+
//
127131
// See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-create-one/
128132
func (s *APIKeysServiceOp) Create(ctx context.Context, orgID string, createRequest *APIKeyInput) (*APIKey, *Response, error) {
129133
if createRequest == nil {
@@ -146,7 +150,8 @@ func (s *APIKeysServiceOp) Create(ctx context.Context, orgID string, createReque
146150
return root, resp, err
147151
}
148152

149-
// Update a API Key in the organization associated to {ORG-ID}
153+
// Update a API Key in the organization associated to {ORG-ID}.
154+
//
150155
// See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-update-one/
151156
func (s *APIKeysServiceOp) Update(ctx context.Context, orgID, apiKeyID string, updateRequest *APIKeyInput) (*APIKey, *Response, error) {
152157
if updateRequest == nil {
@@ -171,6 +176,7 @@ func (s *APIKeysServiceOp) Update(ctx context.Context, orgID, apiKeyID string, u
171176
}
172177

173178
// Delete the API Key specified to {API-KEY-ID} from the organization associated to {ORG-ID}.
179+
//
174180
// See more: https://docs.atlas.mongodb.com/reference/api/apiKey-delete-one-apiKey/
175181
func (s *APIKeysServiceOp) Delete(ctx context.Context, orgID, apiKeyID string) (*Response, error) {
176182
if apiKeyID == "" {

mongodbatlas/auditing.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type Auditing struct {
4747
}
4848

4949
// Get audit configuration for the project associated with {GROUP-ID}.
50+
//
5051
// See more: https://docs.atlas.mongodb.com/reference/api/auditing-get-auditLog/
5152
func (s *AuditingsServiceOp) Get(ctx context.Context, groupID string) (*Auditing, *Response, error) {
5253
if groupID == "" {
@@ -69,6 +70,7 @@ func (s *AuditingsServiceOp) Get(ctx context.Context, groupID string) (*Auditing
6970
}
7071

7172
// Configure the audit configuration for the project associated with {GROUP-ID}.
73+
//
7274
// See more: https://docs.atlas.mongodb.com/reference/api/auditing-set-auditLog/
7375
func (s *AuditingsServiceOp) Configure(ctx context.Context, groupID string, configRequest *Auditing) (*Auditing, *Response, error) {
7476
if configRequest == nil {

mongodbatlas/checkpoints.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ type Checkpoints struct {
6565
}
6666

6767
// List all checkpoints for the specified sharded cluster.
68+
//
6869
// See more: https://docs.atlas.mongodb.com/reference/api/checkpoints-get-all/
6970
func (s CheckpointsServiceOp) List(ctx context.Context, groupID, clusterName string, listOptions *ListOptions) (*Checkpoints, *Response, error) {
7071
if groupID == "" {
@@ -92,6 +93,7 @@ func (s CheckpointsServiceOp) List(ctx context.Context, groupID, clusterName str
9293
}
9394

9495
// Get one checkpoint for the specified sharded cluster.
96+
//
9597
// See more: https://docs.atlas.mongodb.com/reference/api/checkpoints-get-one/
9698
func (s CheckpointsServiceOp) Get(ctx context.Context, groupID, clusterName, checkpointID string) (*Checkpoint, *Response, error) {
9799
if groupID == "" {

mongodbatlas/cloud_provider_regions.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import (
2020
"net/http"
2121
)
2222

23-
const (
24-
cloudProviderRegionsBasePath = "groups/%s/clusters/provider/regions"
25-
)
23+
const cloudProviderRegionsBasePath = "groups/%s/clusters/provider/regions"
2624

2725
// CloudProviderRegionsService is an interface for interfacing with the Cloud Provider Regions
2826
// endpoints of the MongoDB Atlas API.
27+
//
28+
// See more: https://docs.atlas.mongodb.com/reference/api/cluster-get-regions/
2929
type CloudProviderRegionsService interface {
3030
List(context.Context, string, *CloudProviderRegionsOptions) (*CloudProviders, *Response, error)
3131
}
@@ -67,7 +67,9 @@ type CloudProviderRegionsOptions struct {
6767
Tier string `url:"tier,omitempty"`
6868
}
6969

70-
// List gets the available regions for each cloud provider
70+
// List gets the available regions for each cloud provider.
71+
//
72+
// See more: https://docs.atlas.mongodb.com/reference/api/cluster-get-regions/
7173
func (s *CloudProviderRegionsServiceOp) List(ctx context.Context, groupID string, options *CloudProviderRegionsOptions) (*CloudProviders, *Response, error) {
7274
if groupID == "" {
7375
return nil, nil, NewArgError("groupId", "must be set")

mongodbatlas/cloud_provider_snapshot_backup_policies.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const (
2626

2727
// CloudProviderSnapshotBackupPoliciesService is an interface for interfacing with the Cloud Provider Snapshots Backup Policy
2828
// endpoints of the MongoDB Atlas API.
29+
//
2930
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-schedule/
3031
type CloudProviderSnapshotBackupPoliciesService interface {
3132
Get(context.Context, string, string) (*CloudProviderSnapshotBackupPolicy, *Response, error)

mongodbatlas/cloud_provider_snapshot_restore_jobs.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ import (
2020
"net/http"
2121
)
2222

23-
const (
24-
cloudProviderSnapshotRestoreJobBasePath = "groups"
25-
)
23+
const cloudProviderSnapshotRestoreJobBasePath = "groups"
2624

2725
// CloudProviderSnapshotRestoreJobsService is an interface for interfacing with the CloudProviderSnapshotRestoreJobs
2826
// endpoints of the MongoDB Atlas API.
27+
//
2928
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs/
3029
type CloudProviderSnapshotRestoreJobsService interface {
3130
List(context.Context, *SnapshotReqPathParameters, *ListOptions) (*CloudProviderSnapshotRestoreJobs, *Response, error)
@@ -74,6 +73,7 @@ type Component struct {
7473
}
7574

7675
// List gets all cloud provider snapshot restore jobs for the specified cluster.
76+
//
7777
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs-get-all/
7878
func (s *CloudProviderSnapshotRestoreJobsServiceOp) List(ctx context.Context, requestParameters *SnapshotReqPathParameters, listOptions *ListOptions) (*CloudProviderSnapshotRestoreJobs, *Response, error) {
7979
if requestParameters.GroupID == "" {
@@ -108,6 +108,7 @@ func (s *CloudProviderSnapshotRestoreJobsServiceOp) List(ctx context.Context, re
108108
}
109109

110110
// Get gets one cloud provider snapshot restore jobs for the specified cluster.
111+
//
111112
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs-get-one/
112113
func (s *CloudProviderSnapshotRestoreJobsServiceOp) Get(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*CloudProviderSnapshotRestoreJob, *Response, error) {
113114
if requestParameters.GroupID == "" {
@@ -137,6 +138,7 @@ func (s *CloudProviderSnapshotRestoreJobsServiceOp) Get(ctx context.Context, req
137138
}
138139

139140
// Create creates a new restore job from a cloud provider snapshot associated to the specified cluster.
141+
//
140142
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs-create-one/
141143
func (s *CloudProviderSnapshotRestoreJobsServiceOp) Create(ctx context.Context, requestParameters *SnapshotReqPathParameters, createRequest *CloudProviderSnapshotRestoreJob) (*CloudProviderSnapshotRestoreJob, *Response, error) {
142144
// Verify if is download or automated
@@ -176,6 +178,7 @@ func (s *CloudProviderSnapshotRestoreJobsServiceOp) Create(ctx context.Context,
176178
}
177179

178180
// Delete cancels the cloud provider snapshot manual download restore job associated to {JOB-ID}.
181+
//
179182
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs-delete-one/
180183
func (s *CloudProviderSnapshotRestoreJobsServiceOp) Delete(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*Response, error) {
181184
if requestParameters.GroupID == "" {

mongodbatlas/cloud_provider_snapshots.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const (
2626

2727
// CloudProviderSnapshotsService is an interface for interfacing with the Cloud Provider Snapshots
2828
// endpoints of the MongoDB Atlas API.
29+
//
2930
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot/
3031
type CloudProviderSnapshotsService interface {
3132
GetAllCloudProviderSnapshots(context.Context, *SnapshotReqPathParameters, *ListOptions) (*CloudProviderSnapshots, *Response, error)
@@ -72,6 +73,7 @@ type SnapshotReqPathParameters struct {
7273
}
7374

7475
// GetAllCloudProviderSnapshots gets all cloud provider snapshots for the specified cluster.
76+
//
7577
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-get-all/
7678
func (s *CloudProviderSnapshotsServiceOp) GetAllCloudProviderSnapshots(ctx context.Context, requestParameters *SnapshotReqPathParameters, listOptions *ListOptions) (*CloudProviderSnapshots, *Response, error) {
7779
if requestParameters.GroupID == "" {
@@ -107,6 +109,7 @@ func (s *CloudProviderSnapshotsServiceOp) GetAllCloudProviderSnapshots(ctx conte
107109
}
108110

109111
// GetOneCloudProviderSnapshot gets the snapshot associated to {SNAPSHOT-ID}.
112+
//
110113
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-get-one/
111114
func (s *CloudProviderSnapshotsServiceOp) GetOneCloudProviderSnapshot(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*CloudProviderSnapshot, *Response, error) {
112115
if requestParameters.GroupID == "" {
@@ -136,6 +139,7 @@ func (s *CloudProviderSnapshotsServiceOp) GetOneCloudProviderSnapshot(ctx contex
136139
}
137140

138141
// Create takes one on-demand snapshot. Atlas takes on-demand snapshots immediately, unlike scheduled snapshots which occur at regular intervals.
142+
//
139143
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-take-one-ondemand/
140144
func (s *CloudProviderSnapshotsServiceOp) Create(ctx context.Context, requestParameters *SnapshotReqPathParameters, createRequest *CloudProviderSnapshot) (*CloudProviderSnapshot, *Response, error) {
141145
if requestParameters.GroupID == "" {
@@ -165,6 +169,7 @@ func (s *CloudProviderSnapshotsServiceOp) Create(ctx context.Context, requestPar
165169
}
166170

167171
// Delete deletes the snapshot associated to {SNAPSHOT-ID}.
172+
//
168173
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-delete-one/
169174
func (s *CloudProviderSnapshotsServiceOp) Delete(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*Response, error) {
170175
if requestParameters.GroupID == "" {

mongodbatlas/custom_db_roles.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ type CustomDBRole struct {
6666
}
6767

6868
// List gets all custom db roles in the project.
69+
//
6970
// See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-get-all-roles/
7071
func (s *CustomDBRolesServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) (*[]CustomDBRole, *Response, error) {
7172
path := fmt.Sprintf(dbCustomDBRolesBasePath, groupID)
@@ -90,6 +91,7 @@ func (s *CustomDBRolesServiceOp) List(ctx context.Context, groupID string, listO
9091
}
9192

9293
// Get gets a single Custom MongoDB Role in the project.
94+
//
9395
// See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-get-single-role/
9496
func (s *CustomDBRolesServiceOp) Get(ctx context.Context, groupID, roleName string) (*CustomDBRole, *Response, error) {
9597
if roleName == "" {
@@ -114,6 +116,7 @@ func (s *CustomDBRolesServiceOp) Get(ctx context.Context, groupID, roleName stri
114116
}
115117

116118
// Create create a new Custom MongoDB Role in the project.
119+
//
117120
// See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-create-a-role/
118121
func (s *CustomDBRolesServiceOp) Create(ctx context.Context, groupID string, createRequest *CustomDBRole) (*CustomDBRole, *Response, error) {
119122
if createRequest == nil {
@@ -137,6 +140,7 @@ func (s *CustomDBRolesServiceOp) Create(ctx context.Context, groupID string, cre
137140
}
138141

139142
// Update updates a single Custom MongoDB Role.
143+
//
140144
// See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-update-a-role/
141145
func (s *CustomDBRolesServiceOp) Update(ctx context.Context, groupID, roleName string, updateRequest *CustomDBRole) (*CustomDBRole, *Response, error) {
142146
if updateRequest == nil {
@@ -161,6 +165,7 @@ func (s *CustomDBRolesServiceOp) Update(ctx context.Context, groupID, roleName s
161165
}
162166

163167
// Delete deletes a single Custom MongoDB Role.
168+
//
164169
// See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-delete-a-role/
165170
func (s *CustomDBRolesServiceOp) Delete(ctx context.Context, groupID, roleName string) (*Response, error) {
166171
if roleName == "" {

mongodbatlas/data_lakes.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ import (
2020
"net/http"
2121
)
2222

23-
const (
24-
dataLakesBasePath = "groups"
25-
)
23+
const dataLakesBasePath = "groups"
2624

2725
// DataLakeService is an interface for interfacing with the Data Lake endpoints of the MongoDB Atlas API.
2826
//

0 commit comments

Comments
 (0)