From a84aae599323b997ed1229644708a9c4ad13e441 Mon Sep 17 00:00:00 2001 From: Jure Skelin Date: Tue, 17 Dec 2024 22:33:16 +0100 Subject: [PATCH] refactor(segment): rename segment download client name --- cmd/monaco/download/download_configs.go | 2 +- pkg/download/segment/download.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/monaco/download/download_configs.go b/cmd/monaco/download/download_configs.go index 6262fee39..272563154 100644 --- a/cmd/monaco/download/download_configs.go +++ b/cmd/monaco/download/download_configs.go @@ -241,7 +241,7 @@ type downloadFn struct { bucketDownload func(client.BucketClient, string) (projectv2.ConfigsPerType, error) documentDownload func(client.DocumentClient, string) (projectv2.ConfigsPerType, error) openPipelineDownload func(client.OpenPipelineClient, string) (projectv2.ConfigsPerType, error) - segmentDownload func(segment.Client, string) (projectv2.ConfigsPerType, error) + segmentDownload func(segment.DownloadSegmentClient, string) (projectv2.ConfigsPerType, error) } var defaultDownloadFn = downloadFn{ diff --git a/pkg/download/segment/download.go b/pkg/download/segment/download.go index beb7ffb9c..1b1970e4b 100644 --- a/pkg/download/segment/download.go +++ b/pkg/download/segment/download.go @@ -31,11 +31,11 @@ import ( project "github.com/dynatrace/dynatrace-configuration-as-code/v2/pkg/project/v2" ) -type Client interface { +type DownloadSegmentClient interface { GetAll(ctx context.Context) ([]segments.Response, error) } -func Download(client Client, projectName string) (project.ConfigsPerType, error) { +func Download(client DownloadSegmentClient, projectName string) (project.ConfigsPerType, error) { result := project.ConfigsPerType{} downloadedConfigs, err := client.GetAll(context.TODO())