Skip to content

APIBot: GO SDK Dev Preview #609

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

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ filename: "{{ .InterfaceName | snakecase }}.go"
mockname: "{{.InterfaceName}}"

packages:
go.mongodb.org/atlas-sdk/v20250312003/admin:
github.com/mongodb/atlas-sdk-go/admin:
config:
include-regex: ".*Api"
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
SOURCE_FILES?=./...
GOLANGCI_VERSION=v2.1.6 # Also update golangci-lint GH action in pr.yml when updating this version

GOIMPORTS_VERSION=v0.21.0
COVERAGE=coverage.out

export GO111MODULE := on
export PATH := ./bin:$(PATH)

Expand All @@ -20,7 +17,7 @@ build:

.PHONY: test
test:
go test $(SOURCE_FILES) -coverprofile $(COVERAGE) -timeout=30s -parallel=4 -cover -race
go test $(SOURCE_FILES) -timeout=30s -parallel=4 -race

.PHONY: test-examples
test-examples:
Expand Down Expand Up @@ -48,7 +45,7 @@ install-golangci-lint:

.PHONY: install-goimports
install-goimports:
go install golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION)
go install golang.org/x/tools/cmd/goimports@latest

.PHONY: tools
tools: install-golangci-lint install-goimports
Expand Down
12 changes: 6 additions & 6 deletions admin/api_access_tracking.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
type AccessTrackingApi interface {

/*
ListAccessLogsByClusterName Return Database Access History for One Cluster using Its Cluster Name
ListAccessLogsByClusterName Return Database Access History for One Cluster by Cluster Name

Returns the access logs of one cluster identified by the cluster's name. Access logs contain a list of authentication requests made against your cluster. You can't use this feature on tenant-tier clusters (M0, M2, M5). To use this resource, the requesting Service Account or API Key must have the Project Monitoring Admin role or the Project Database Access Admin role.

Expand All @@ -24,7 +24,7 @@ type AccessTrackingApi interface {
*/
ListAccessLogsByClusterName(ctx context.Context, groupId string, clusterName string) ListAccessLogsByClusterNameApiRequest
/*
ListAccessLogsByClusterName Return Database Access History for One Cluster using Its Cluster Name
ListAccessLogsByClusterName Return Database Access History for One Cluster by Cluster Name


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand All @@ -37,7 +37,7 @@ type AccessTrackingApi interface {
ListAccessLogsByClusterNameExecute(r ListAccessLogsByClusterNameApiRequest) (*MongoDBAccessLogsList, *http.Response, error)

/*
ListAccessLogsByHostname Return Database Access History for One Cluster using Its Hostname
ListAccessLogsByHostname Return Database Access History for One Cluster by Hostname

Returns the access logs of one cluster identified by the cluster's hostname. Access logs contain a list of authentication requests made against your clusters. You can't use this feature on tenant-tier clusters (M0, M2, M5). To use this resource, the requesting Service Account or API Key must have the Project Monitoring Admin role or the Project Database Access Admin role.

Expand All @@ -48,7 +48,7 @@ type AccessTrackingApi interface {
*/
ListAccessLogsByHostname(ctx context.Context, groupId string, hostname string) ListAccessLogsByHostnameApiRequest
/*
ListAccessLogsByHostname Return Database Access History for One Cluster using Its Hostname
ListAccessLogsByHostname Return Database Access History for One Cluster by Hostname


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand Down Expand Up @@ -135,7 +135,7 @@ func (r ListAccessLogsByClusterNameApiRequest) Execute() (*MongoDBAccessLogsList
}

/*
ListAccessLogsByClusterName Return Database Access History for One Cluster using Its Cluster Name
ListAccessLogsByClusterName Return Database Access History for One Cluster by Cluster Name

Returns the access logs of one cluster identified by the cluster's name. Access logs contain a list of authentication requests made against your cluster. You can't use this feature on tenant-tier clusters (M0, M2, M5). To use this resource, the requesting Service Account or API Key must have the Project Monitoring Admin role or the Project Database Access Admin role.

Expand Down Expand Up @@ -322,7 +322,7 @@ func (r ListAccessLogsByHostnameApiRequest) Execute() (*MongoDBAccessLogsList, *
}

/*
ListAccessLogsByHostname Return Database Access History for One Cluster using Its Hostname
ListAccessLogsByHostname Return Database Access History for One Cluster by Hostname

Returns the access logs of one cluster identified by the cluster's hostname. Access logs contain a list of authentication requests made against your clusters. You can't use this feature on tenant-tier clusters (M0, M2, M5). To use this resource, the requesting Service Account or API Key must have the Project Monitoring Admin role or the Project Database Access Admin role.

Expand Down
24 changes: 12 additions & 12 deletions admin/api_alert_configurations.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ type AlertConfigurationsApi interface {
GetAlertConfigurationExecute(r GetAlertConfigurationApiRequest) (*GroupAlertsConfig, *http.Response, error)

/*
ListAlertConfigurationMatchersFieldNames Get All Alert Configuration Matchers Field Names
ListAlertConfigurationMatchersFieldNames Return All Alert Configuration Matchers Field Names

Get all field names that the `matchers.fieldName` parameter accepts when you create or update an Alert Configuration. You can successfully call this endpoint with any assigned role.

Expand All @@ -100,7 +100,7 @@ type AlertConfigurationsApi interface {
*/
ListAlertConfigurationMatchersFieldNames(ctx context.Context) ListAlertConfigurationMatchersFieldNamesApiRequest
/*
ListAlertConfigurationMatchersFieldNames Get All Alert Configuration Matchers Field Names
ListAlertConfigurationMatchersFieldNames Return All Alert Configuration Matchers Field Names


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand All @@ -113,7 +113,7 @@ type AlertConfigurationsApi interface {
ListAlertConfigurationMatchersFieldNamesExecute(r ListAlertConfigurationMatchersFieldNamesApiRequest) ([]string, *http.Response, error)

/*
ListAlertConfigurations Return All Alert Configurations for One Project
ListAlertConfigurations Return All Alert Configurations in One Project

Returns all alert configurations for one project. These alert configurations apply to any component in the project. Alert configurations define the triggers and notification methods for alerts. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.

Expand All @@ -125,7 +125,7 @@ type AlertConfigurationsApi interface {
*/
ListAlertConfigurations(ctx context.Context, groupId string) ListAlertConfigurationsApiRequest
/*
ListAlertConfigurations Return All Alert Configurations for One Project
ListAlertConfigurations Return All Alert Configurations in One Project


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand Down Expand Up @@ -164,7 +164,7 @@ type AlertConfigurationsApi interface {
ListAlertConfigurationsByAlertIdExecute(r ListAlertConfigurationsByAlertIdApiRequest) (*PaginatedAlertConfig, *http.Response, error)

/*
ToggleAlertConfiguration Toggle One State of One Alert Configuration in One Project
ToggleAlertConfiguration Toggle State of One Alert Configuration in One Project

Enables or disables the specified alert configuration in the specified project. The resource enables the specified alert configuration if currently enabled. The resource disables the specified alert configuration if currently disabled. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.

Expand All @@ -180,7 +180,7 @@ type AlertConfigurationsApi interface {
*/
ToggleAlertConfiguration(ctx context.Context, groupId string, alertConfigId string, alertsToggle *AlertsToggle) ToggleAlertConfigurationApiRequest
/*
ToggleAlertConfiguration Toggle One State of One Alert Configuration in One Project
ToggleAlertConfiguration Toggle State of One Alert Configuration in One Project


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand All @@ -193,7 +193,7 @@ type AlertConfigurationsApi interface {
ToggleAlertConfigurationExecute(r ToggleAlertConfigurationApiRequest) (*GroupAlertsConfig, *http.Response, error)

/*
UpdateAlertConfiguration Update One Alert Configuration for One Project
UpdateAlertConfiguration Update One Alert Configuration in One Project

Updates one alert configuration in the specified project. Alert configurations define the triggers and notification methods for alerts. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.

Expand All @@ -209,7 +209,7 @@ type AlertConfigurationsApi interface {
*/
UpdateAlertConfiguration(ctx context.Context, groupId string, alertConfigId string, groupAlertsConfig *GroupAlertsConfig) UpdateAlertConfigurationApiRequest
/*
UpdateAlertConfiguration Update One Alert Configuration for One Project
UpdateAlertConfiguration Update One Alert Configuration in One Project


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand Down Expand Up @@ -603,7 +603,7 @@ func (r ListAlertConfigurationMatchersFieldNamesApiRequest) Execute() ([]string,
}

/*
ListAlertConfigurationMatchersFieldNames Get All Alert Configuration Matchers Field Names
ListAlertConfigurationMatchersFieldNames Return All Alert Configuration Matchers Field Names

Get all field names that the `matchers.fieldName` parameter accepts when you create or update an Alert Configuration. You can successfully call this endpoint with any assigned role.

Expand Down Expand Up @@ -738,7 +738,7 @@ func (r ListAlertConfigurationsApiRequest) Execute() (*PaginatedAlertConfig, *ht
}

/*
ListAlertConfigurations Return All Alert Configurations for One Project
ListAlertConfigurations Return All Alert Configurations in One Project

Returns all alert configurations for one project. These alert configurations apply to any component in the project. Alert configurations define the triggers and notification methods for alerts. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.

Expand Down Expand Up @@ -1054,7 +1054,7 @@ func (r ToggleAlertConfigurationApiRequest) Execute() (*GroupAlertsConfig, *http
}

/*
ToggleAlertConfiguration Toggle One State of One Alert Configuration in One Project
ToggleAlertConfiguration Toggle State of One Alert Configuration in One Project

Enables or disables the specified alert configuration in the specified project. The resource enables the specified alert configuration if currently enabled. The resource disables the specified alert configuration if currently disabled. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.

Expand Down Expand Up @@ -1190,7 +1190,7 @@ func (r UpdateAlertConfigurationApiRequest) Execute() (*GroupAlertsConfig, *http
}

/*
UpdateAlertConfiguration Update One Alert Configuration for One Project
UpdateAlertConfiguration Update One Alert Configuration in One Project

Updates one alert configuration in the specified project. Alert configurations define the triggers and notification methods for alerts. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.

Expand Down
6 changes: 3 additions & 3 deletions admin/api_alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ type AlertsApi interface {
ListAlertsExecute(r ListAlertsApiRequest) (*PaginatedAlert, *http.Response, error)

/*
ListAlertsByAlertConfigurationId Return All Open Alerts for Alert Configuration
ListAlertsByAlertConfigurationId Return All Open Alerts for One Alert Configuration

Returns all open alerts that the specified alert configuration triggers. These alert configurations apply to the specified project only. Alert configurations define the triggers and notification methods for alerts. Open alerts have been triggered but remain unacknowledged. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. Use the Return All Alert Configurations for One Project endpoint to retrieve all alert configurations to which the authenticated user has access.

Expand All @@ -104,7 +104,7 @@ type AlertsApi interface {
*/
ListAlertsByAlertConfigurationId(ctx context.Context, groupId string, alertConfigId string) ListAlertsByAlertConfigurationIdApiRequest
/*
ListAlertsByAlertConfigurationId Return All Open Alerts for Alert Configuration
ListAlertsByAlertConfigurationId Return All Open Alerts for One Alert Configuration


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand Down Expand Up @@ -608,7 +608,7 @@ func (r ListAlertsByAlertConfigurationIdApiRequest) Execute() (*PaginatedAlert,
}

/*
ListAlertsByAlertConfigurationId Return All Open Alerts for Alert Configuration
ListAlertsByAlertConfigurationId Return All Open Alerts for One Alert Configuration

Returns all open alerts that the specified alert configuration triggers. These alert configurations apply to the specified project only. Alert configurations define the triggers and notification methods for alerts. Open alerts have been triggered but remain unacknowledged. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. Use the Return All Alert Configurations for One Project endpoint to retrieve all alert configurations to which the authenticated user has access.

Expand Down
24 changes: 12 additions & 12 deletions admin/api_atlas_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ type AtlasSearchApi interface {
DeleteAtlasSearchDeploymentExecute(r DeleteAtlasSearchDeploymentApiRequest) (*http.Response, error)

/*
DeleteAtlasSearchIndex Remove One Atlas Search Index by Id
DeleteAtlasSearchIndex Remove One Atlas Search Index by ID

Removes one Atlas Search index that you identified with its unique ID. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role. This deletion is eventually consistent.

Expand All @@ -128,7 +128,7 @@ type AtlasSearchApi interface {
*/
DeleteAtlasSearchIndex(ctx context.Context, groupId string, clusterName string, indexId string) DeleteAtlasSearchIndexApiRequest
/*
DeleteAtlasSearchIndex Remove One Atlas Search Index by Id
DeleteAtlasSearchIndex Remove One Atlas Search Index by ID


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand Down Expand Up @@ -197,7 +197,7 @@ type AtlasSearchApi interface {
DeleteAtlasSearchIndexDeprecatedExecute(r DeleteAtlasSearchIndexDeprecatedApiRequest) (*http.Response, error)

/*
GetAtlasSearchDeployment Return Search Nodes
GetAtlasSearchDeployment Return All Search Nodes

Returns the Search Nodes for the specified cluster. Deprecated versions: v2-{2024-05-30}, v2-{2023-01-01}

Expand All @@ -208,7 +208,7 @@ type AtlasSearchApi interface {
*/
GetAtlasSearchDeployment(ctx context.Context, groupId string, clusterName string) GetAtlasSearchDeploymentApiRequest
/*
GetAtlasSearchDeployment Return Search Nodes
GetAtlasSearchDeployment Return All Search Nodes


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand Down Expand Up @@ -407,7 +407,7 @@ type AtlasSearchApi interface {
UpdateAtlasSearchDeploymentExecute(r UpdateAtlasSearchDeploymentApiRequest) (*ApiSearchDeploymentResponse, *http.Response, error)

/*
UpdateAtlasSearchIndex Update One Atlas Search Index By ID
UpdateAtlasSearchIndex Update One Atlas Search Index by ID

Updates one Atlas Search index that you identified with its unique ID. Atlas Search indexes define the fields on which to create the index and the analyzers to use when creating the index. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.

Expand All @@ -420,7 +420,7 @@ type AtlasSearchApi interface {
*/
UpdateAtlasSearchIndex(ctx context.Context, groupId string, clusterName string, indexId string, searchIndexUpdateRequest *SearchIndexUpdateRequest) UpdateAtlasSearchIndexApiRequest
/*
UpdateAtlasSearchIndex Update One Atlas Search Index By ID
UpdateAtlasSearchIndex Update One Atlas Search Index by ID


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand All @@ -433,7 +433,7 @@ type AtlasSearchApi interface {
UpdateAtlasSearchIndexExecute(r UpdateAtlasSearchIndexApiRequest) (*SearchIndexResponse, *http.Response, error)

/*
UpdateAtlasSearchIndexByName Update One Atlas Search Index By Name
UpdateAtlasSearchIndexByName Update One Atlas Search Index by Name

Updates one Atlas Search index that you identified with its database, collection name, and index name. Atlas Search indexes define the fields on which to create the index and the analyzers to use when creating the index. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.

Expand All @@ -448,7 +448,7 @@ type AtlasSearchApi interface {
*/
UpdateAtlasSearchIndexByName(ctx context.Context, groupId string, clusterName string, collectionName string, databaseName string, indexName string, searchIndexUpdateRequest *SearchIndexUpdateRequest) UpdateAtlasSearchIndexByNameApiRequest
/*
UpdateAtlasSearchIndexByName Update One Atlas Search Index By Name
UpdateAtlasSearchIndexByName Update One Atlas Search Index by Name


@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand Down Expand Up @@ -1029,7 +1029,7 @@ func (r DeleteAtlasSearchIndexApiRequest) Execute() (*http.Response, error) {
}

/*
DeleteAtlasSearchIndex Remove One Atlas Search Index by Id
DeleteAtlasSearchIndex Remove One Atlas Search Index by ID

Removes one Atlas Search index that you identified with its unique ID. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role. This deletion is eventually consistent.

Expand Down Expand Up @@ -1392,7 +1392,7 @@ func (r GetAtlasSearchDeploymentApiRequest) Execute() (*ApiSearchDeploymentRespo
}

/*
GetAtlasSearchDeployment Return Search Nodes
GetAtlasSearchDeployment Return All Search Nodes

Returns the Search Nodes for the specified cluster. Deprecated versions: v2-{2024-05-30}, v2-{2023-01-01}

Expand Down Expand Up @@ -2480,7 +2480,7 @@ func (r UpdateAtlasSearchIndexApiRequest) Execute() (*SearchIndexResponse, *http
}

/*
UpdateAtlasSearchIndex Update One Atlas Search Index By ID
UpdateAtlasSearchIndex Update One Atlas Search Index by ID

Updates one Atlas Search index that you identified with its unique ID. Atlas Search indexes define the fields on which to create the index and the analyzers to use when creating the index. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.

Expand Down Expand Up @@ -2627,7 +2627,7 @@ func (r UpdateAtlasSearchIndexByNameApiRequest) Execute() (*SearchIndexResponse,
}

/*
UpdateAtlasSearchIndexByName Update One Atlas Search Index By Name
UpdateAtlasSearchIndexByName Update One Atlas Search Index by Name

Updates one Atlas Search index that you identified with its database, collection name, and index name. Atlas Search indexes define the fields on which to create the index and the analyzers to use when creating the index. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.

Expand Down
Loading
Loading