Skip to content

Commit c9c2259

Browse files
committed
chore: update comments
1 parent ae553f9 commit c9c2259

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

mongodbatlas/api_keys.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99

1010
const apiKeysPath = "orgs/%s/apiKeys"
1111

12-
//APIKeysService is an interface for interfacing with the APIKeys
12+
// APIKeysService is an interface for interfacing with the APIKeys
1313
// endpoints of the MongoDB Atlas API.
14-
//See more: https://docs.atlas.mongodb.com/reference/api/clusters/
14+
//See more: https://docs.atlas.mongodb.com/reference/api/apiKeys/
1515
type APIKeysService interface {
1616
List(context.Context, string, *ListOptions) ([]APIKey, *Response, error)
1717
Get(context.Context, string, string) (*APIKey, *Response, error)
@@ -20,21 +20,21 @@ type APIKeysService interface {
2020
Delete(context.Context, string, string) (*Response, error)
2121
}
2222

23-
//APIKeysServiceOp handles communication with the APIKey related methods
23+
// APIKeysServiceOp handles communication with the APIKey related methods
2424
// of the MongoDB Atlas API
2525
type APIKeysServiceOp struct {
2626
client *Client
2727
}
2828

2929
var _ APIKeysService = &APIKeysServiceOp{}
3030

31-
// APIKeyInput represents MongoDB cluster input reuest for Create and Update.
31+
// APIKeyInput represents MongoDB API key input request for Create.
3232
type APIKeyInput struct {
3333
Desc string `json:"desc,omitempty"`
3434
Roles []string `json:"roles,omitempty"`
3535
}
3636

37-
// APIKey represents MongoDB cluster.
37+
// APIKey represents MongoDB API Key.
3838
type APIKey struct {
3939
ID string `json:"id,omitempty"`
4040
Desc string `json:"desc,omitempty"`
@@ -43,6 +43,7 @@ type APIKey struct {
4343
PublicKey string `json:"publicKey,omitempty"`
4444
}
4545

46+
// APIKeyRole represents a role name of API key
4647
type APIKeyRole struct {
4748
GroupID string `json:"groupId,omitempty"`
4849
OrgID string `json:"orgId,omitempty"`
@@ -158,7 +159,7 @@ func (s *APIKeysServiceOp) Update(ctx context.Context, orgID string, apiKeyID st
158159
}
159160

160161
//Delete the API Key specified to {API-KEY-ID} from the organization associated to {ORG-ID}.
161-
// See more: https://docs.atlas.mongodb.com/reference/api/clusters-delete-one/
162+
// See more: https://docs.atlas.mongodb.com/reference/api/apiKey-delete-one-apiKey/
162163
func (s *APIKeysServiceOp) Delete(ctx context.Context, orgID string, apiKeyID string) (*Response, error) {
163164
if apiKeyID == "" {
164165
return nil, NewArgError("apiKeyID", "must be set")

mongodbatlas/project_api_key.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (s *ProjectAPIKeysOp) List(ctx context.Context, groupID string, listOptions
5656
}
5757

5858
//Create an API Key by the {GROUP-ID}.
59-
//See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-create-one/
59+
//See more: https://docs.atlas.mongodb.com/reference/api/projectApiKeys/create-one-apiKey-in-one-project/
6060
func (s *ProjectAPIKeysOp) Create(ctx context.Context, groupID string, createRequest *APIKeyInput) (*APIKey, *Response, error) {
6161
if createRequest == nil {
6262
return nil, nil, NewArgError("createRequest", "cannot be nil")
@@ -78,8 +78,8 @@ func (s *ProjectAPIKeysOp) Create(ctx context.Context, groupID string, createReq
7878
return root, resp, err
7979
}
8080

81-
//Assign an API-KEY related to {GROUP-ID} to a the project with {PROJECT-ID}.
82-
//See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-get-all/
81+
//Assign an API-KEY related to {GROUP-ID} to a the project with {API-KEY-ID}.
82+
//See more: https://docs.atlas.mongodb.com/reference/api/projectApiKeys/assign-one-org-apiKey-to-one-project/
8383
func (s *ProjectAPIKeysOp) Assign(ctx context.Context, groupID string, keyID string) (*Response, error) {
8484
if groupID == "" {
8585
return nil, NewArgError("apiKeyID", "must be set")
@@ -103,8 +103,8 @@ func (s *ProjectAPIKeysOp) Assign(ctx context.Context, groupID string, keyID str
103103
return resp, err
104104
}
105105

106-
//Unassign an API-KEY related to {GROUP-ID} to a the project with {PROJECT-ID}.
107-
//See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-get-all/
106+
//Unassign an API-KEY related to {GROUP-ID} to a the project with {API-KEY-ID}.
107+
//See more: https://docs.atlas.mongodb.com/reference/api/projectApiKeys/delete-one-apiKey-in-one-project/
108108
func (s *ProjectAPIKeysOp) Unassign(ctx context.Context, groupID string, keyID string) (*Response, error) {
109109
if groupID == "" {
110110
return nil, NewArgError("apiKeyID", "must be set")

0 commit comments

Comments
 (0)