99
1010const 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 /
1515type 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
2525type APIKeysServiceOp struct {
2626 client * Client
2727}
2828
2929var _ APIKeysService = & APIKeysServiceOp {}
3030
31- // APIKeyInput represents MongoDB cluster input reuest for Create and Update .
31+ // APIKeyInput represents MongoDB API key input request for Create.
3232type 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 .
3838type 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
4647type 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 /
162163func (s * APIKeysServiceOp ) Delete (ctx context.Context , orgID string , apiKeyID string ) (* Response , error ) {
163164 if apiKeyID == "" {
164165 return nil , NewArgError ("apiKeyID" , "must be set" )
0 commit comments