Skip to content

Commit 67eeb86

Browse files
authored
move folders to internal (#1893)
1 parent f504e59 commit 67eeb86

File tree

401 files changed

+698
-699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

401 files changed

+698
-699
lines changed

cmd/root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"github.com/elastic/elastic-agent-client/v7/pkg/client"
2929
"github.com/elastic/elastic-agent-client/v7/pkg/proto"
3030

31-
"github.com/elastic/cloudbeat/beater"
31+
"github.com/elastic/cloudbeat/internal/beater"
3232
"github.com/elastic/cloudbeat/version"
3333
)
3434

beater/beater.go internal/beater/beater.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525
agentconfig "github.com/elastic/elastic-agent-libs/config"
2626
"github.com/elastic/elastic-agent-libs/logp"
2727

28-
"github.com/elastic/cloudbeat/config"
29-
"github.com/elastic/cloudbeat/flavors"
30-
"github.com/elastic/cloudbeat/launcher"
28+
"github.com/elastic/cloudbeat/internal/config"
29+
"github.com/elastic/cloudbeat/internal/flavors"
30+
"github.com/elastic/cloudbeat/internal/launcher"
3131
)
3232

3333
func New(_ *beat.Beat, cfg *agentconfig.C) (beat.Beater, error) {

beater/validator.go internal/beater/validator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
agentconfig "github.com/elastic/elastic-agent-libs/config"
2727

28-
"github.com/elastic/cloudbeat/config"
28+
"github.com/elastic/cloudbeat/internal/config"
2929
)
3030

3131
type validator struct{}
File renamed without changes.
File renamed without changes.

config/config.go internal/config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
"github.com/elastic/beats/v7/x-pack/libbeat/common/aws"
3131
"github.com/elastic/elastic-agent-libs/config"
3232

33-
"github.com/elastic/cloudbeat/launcher"
33+
"github.com/elastic/cloudbeat/internal/launcher"
3434
)
3535

3636
const (
File renamed without changes.

dataprovider/data_provider.go internal/dataprovider/data_provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package dataprovider
2020
import (
2121
"github.com/elastic/beats/v7/libbeat/beat"
2222

23-
"github.com/elastic/cloudbeat/resources/fetching"
23+
"github.com/elastic/cloudbeat/internal/resources/fetching"
2424
)
2525

2626
type CommonDataProvider interface {
File renamed without changes.
File renamed without changes.

dataprovider/mock_common_data_provider.go internal/dataprovider/mock_common_data_provider.go

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

dataprovider/providers/cloud/data_provider.go internal/dataprovider/providers/cloud/data_provider.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222

2323
"github.com/elastic/beats/v7/libbeat/beat"
2424

25-
"github.com/elastic/cloudbeat/resources/fetching"
26-
"github.com/elastic/cloudbeat/resources/utils/strings"
25+
"github.com/elastic/cloudbeat/internal/resources/fetching"
26+
"github.com/elastic/cloudbeat/internal/resources/utils/strings"
2727
)
2828

2929
const (

dataprovider/providers/cloud/data_provider_test.go internal/dataprovider/providers/cloud/data_provider_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/stretchr/testify/assert"
2626
"github.com/stretchr/testify/require"
2727

28-
"github.com/elastic/cloudbeat/resources/fetching"
28+
"github.com/elastic/cloudbeat/internal/resources/fetching"
2929
)
3030

3131
var (

dataprovider/providers/common/data_provider.go internal/dataprovider/providers/common/data_provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package common
2020
import (
2121
"github.com/mitchellh/mapstructure"
2222

23-
"github.com/elastic/cloudbeat/config"
23+
"github.com/elastic/cloudbeat/internal/config"
2424
"github.com/elastic/cloudbeat/version"
2525
)
2626

dataprovider/providers/common/data_provider_test.go internal/dataprovider/providers/common/data_provider_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import (
2424
"github.com/stretchr/testify/assert"
2525
"github.com/stretchr/testify/require"
2626

27-
"github.com/elastic/cloudbeat/config"
28-
"github.com/elastic/cloudbeat/dataprovider"
27+
"github.com/elastic/cloudbeat/internal/config"
28+
"github.com/elastic/cloudbeat/internal/dataprovider"
2929
"github.com/elastic/cloudbeat/version"
3030
)
3131

dataprovider/providers/k8s/cluster_name_provider.go internal/dataprovider/providers/k8s/cluster_name_provider.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import (
2626
agent_config "github.com/elastic/elastic-agent-libs/config"
2727
"k8s.io/client-go/kubernetes"
2828

29-
"github.com/elastic/cloudbeat/config"
30-
"github.com/elastic/cloudbeat/resources/providers/awslib"
29+
"github.com/elastic/cloudbeat/internal/config"
30+
"github.com/elastic/cloudbeat/internal/resources/providers/awslib"
3131
)
3232

3333
type ClusterNameProviderAPI interface {

dataprovider/providers/k8s/cluster_name_provider_test.go internal/dataprovider/providers/k8s/cluster_name_provider_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"k8s.io/apimachinery/pkg/types"
2929
"k8s.io/client-go/kubernetes/fake"
3030

31-
"github.com/elastic/cloudbeat/config"
31+
"github.com/elastic/cloudbeat/internal/config"
3232
)
3333

3434
type KubernetesClusterNameProviderTestSuite struct {

dataprovider/providers/k8s/data_provider.go internal/dataprovider/providers/k8s/data_provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/elastic/beats/v7/libbeat/beat"
2424

25-
"github.com/elastic/cloudbeat/resources/fetching"
25+
"github.com/elastic/cloudbeat/internal/resources/fetching"
2626
)
2727

2828
const (

dataprovider/providers/k8s/data_provider_test.go internal/dataprovider/providers/k8s/data_provider_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/stretchr/testify/assert"
2626
"github.com/stretchr/testify/require"
2727

28-
"github.com/elastic/cloudbeat/resources/fetching"
28+
"github.com/elastic/cloudbeat/internal/resources/fetching"
2929
)
3030

3131
func TestK8sDataProvider_EnrichEvent(t *testing.T) {

dataprovider/providers/k8s/id_provider.go internal/dataprovider/providers/k8s/id_provider.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ package k8s
2020
import (
2121
"github.com/gofrs/uuid"
2222

23-
"github.com/elastic/cloudbeat/dataprovider"
24-
"github.com/elastic/cloudbeat/resources/fetching"
25-
fetchers "github.com/elastic/cloudbeat/resources/fetching/fetchers/k8s"
23+
"github.com/elastic/cloudbeat/internal/dataprovider"
24+
"github.com/elastic/cloudbeat/internal/resources/fetching"
25+
fetchers "github.com/elastic/cloudbeat/internal/resources/fetching/fetchers/k8s"
2626
)
2727

2828
var uuidNamespace = uuid.Must(uuid.FromString("971a1103-6b5d-4b60-ab3d-8a339a58c6c8"))

dataprovider/providers/k8s/id_provider_test.go internal/dataprovider/providers/k8s/id_provider_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222

2323
"github.com/stretchr/testify/assert"
2424

25-
"github.com/elastic/cloudbeat/resources/fetching"
26-
fetchers "github.com/elastic/cloudbeat/resources/fetching/fetchers/k8s"
25+
"github.com/elastic/cloudbeat/internal/resources/fetching"
26+
fetchers "github.com/elastic/cloudbeat/internal/resources/fetching/fetchers/k8s"
2727
)
2828

2929
func Test_k8sIdProvider_GetIdInCluster(t *testing.T) {

dataprovider/providers/k8s/mock_cluster_name_provider_api.go internal/dataprovider/providers/k8s/mock_cluster_name_provider_api.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.
File renamed without changes.

evaluator/evaluator.go internal/evaluator/evaluator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package evaluator
2020
import (
2121
"time"
2222

23-
"github.com/elastic/cloudbeat/resources/fetching"
23+
"github.com/elastic/cloudbeat/internal/resources/fetching"
2424
)
2525

2626
type Metadata struct {
File renamed without changes.
File renamed without changes.

evaluator/opa.go internal/evaluator/opa.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ import (
2828
"github.com/open-policy-agent/opa/plugins"
2929
"github.com/open-policy-agent/opa/sdk"
3030

31-
"github.com/elastic/cloudbeat/config"
32-
dlogger "github.com/elastic/cloudbeat/evaluator/debug_logger"
33-
"github.com/elastic/cloudbeat/resources/fetching"
31+
"github.com/elastic/cloudbeat/internal/config"
32+
dlogger "github.com/elastic/cloudbeat/internal/evaluator/debug_logger"
33+
"github.com/elastic/cloudbeat/internal/resources/fetching"
3434
)
3535

3636
var now = func() time.Time { return time.Now().UTC() }

evaluator/opa_test.go internal/evaluator/opa_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ import (
3030
"go.uber.org/zap/zapcore"
3131
"go.uber.org/zap/zaptest/observer"
3232

33-
"github.com/elastic/cloudbeat/config"
34-
"github.com/elastic/cloudbeat/resources/fetching"
35-
"github.com/elastic/cloudbeat/resources/fetching/cycle"
36-
"github.com/elastic/cloudbeat/resources/utils/testhelper"
33+
"github.com/elastic/cloudbeat/internal/config"
34+
"github.com/elastic/cloudbeat/internal/resources/fetching"
35+
"github.com/elastic/cloudbeat/internal/resources/fetching/cycle"
36+
"github.com/elastic/cloudbeat/internal/resources/utils/testhelper"
3737
)
3838

3939
type DummyResource struct {
@@ -151,7 +151,7 @@ func (s *OpaTestSuite) TestOpaEvaluatorWithDecisionLogs() {
151151
}
152152

153153
func (s *OpaTestSuite) getTestConfig() *config.Config {
154-
path, err := filepath.Abs("../bundle.tar.gz")
154+
path, err := filepath.Abs("../../bundle.tar.gz")
155155
s.Require().NoError(err)
156156
_, err = os.Stat(path)
157157
s.Require().NoError(err)

flavors/benchmark/aws.go internal/flavors/benchmark/aws.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ import (
2525
"github.com/elastic/beats/v7/x-pack/libbeat/common/aws"
2626
"github.com/elastic/elastic-agent-libs/logp"
2727

28-
"github.com/elastic/cloudbeat/config"
29-
"github.com/elastic/cloudbeat/dataprovider"
30-
"github.com/elastic/cloudbeat/dataprovider/providers/cloud"
31-
"github.com/elastic/cloudbeat/flavors/benchmark/builder"
32-
"github.com/elastic/cloudbeat/resources/fetching"
33-
"github.com/elastic/cloudbeat/resources/fetching/preset"
34-
"github.com/elastic/cloudbeat/resources/fetching/registry"
35-
"github.com/elastic/cloudbeat/resources/providers/awslib"
28+
"github.com/elastic/cloudbeat/internal/config"
29+
"github.com/elastic/cloudbeat/internal/dataprovider"
30+
"github.com/elastic/cloudbeat/internal/dataprovider/providers/cloud"
31+
"github.com/elastic/cloudbeat/internal/flavors/benchmark/builder"
32+
"github.com/elastic/cloudbeat/internal/resources/fetching"
33+
"github.com/elastic/cloudbeat/internal/resources/fetching/preset"
34+
"github.com/elastic/cloudbeat/internal/resources/fetching/registry"
35+
"github.com/elastic/cloudbeat/internal/resources/providers/awslib"
3636
)
3737

3838
const resourceChBufferSize = 10000

flavors/benchmark/aws_org.go internal/flavors/benchmark/aws_org.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ import (
2828
"github.com/elastic/beats/v7/x-pack/libbeat/common/aws"
2929
"github.com/elastic/elastic-agent-libs/logp"
3030

31-
"github.com/elastic/cloudbeat/config"
32-
"github.com/elastic/cloudbeat/dataprovider"
33-
"github.com/elastic/cloudbeat/dataprovider/providers/cloud"
34-
"github.com/elastic/cloudbeat/flavors/benchmark/builder"
35-
"github.com/elastic/cloudbeat/resources/fetching"
36-
"github.com/elastic/cloudbeat/resources/fetching/preset"
37-
"github.com/elastic/cloudbeat/resources/fetching/registry"
38-
"github.com/elastic/cloudbeat/resources/providers/awslib"
31+
"github.com/elastic/cloudbeat/internal/config"
32+
"github.com/elastic/cloudbeat/internal/dataprovider"
33+
"github.com/elastic/cloudbeat/internal/dataprovider/providers/cloud"
34+
"github.com/elastic/cloudbeat/internal/flavors/benchmark/builder"
35+
"github.com/elastic/cloudbeat/internal/resources/fetching"
36+
"github.com/elastic/cloudbeat/internal/resources/fetching/preset"
37+
"github.com/elastic/cloudbeat/internal/resources/fetching/registry"
38+
"github.com/elastic/cloudbeat/internal/resources/providers/awslib"
3939
)
4040

4141
type AWSOrg struct {

flavors/benchmark/aws_org_test.go internal/flavors/benchmark/aws_org_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ import (
2727
"github.com/stretchr/testify/mock"
2828
"github.com/stretchr/testify/require"
2929

30-
"github.com/elastic/cloudbeat/config"
31-
"github.com/elastic/cloudbeat/dataprovider/providers/cloud"
32-
"github.com/elastic/cloudbeat/resources/fetching"
33-
"github.com/elastic/cloudbeat/resources/providers/awslib"
34-
"github.com/elastic/cloudbeat/resources/utils/testhelper"
30+
"github.com/elastic/cloudbeat/internal/config"
31+
"github.com/elastic/cloudbeat/internal/dataprovider/providers/cloud"
32+
"github.com/elastic/cloudbeat/internal/resources/fetching"
33+
"github.com/elastic/cloudbeat/internal/resources/providers/awslib"
34+
"github.com/elastic/cloudbeat/internal/resources/utils/testhelper"
3535
)
3636

3737
func TestAWSOrg_Initialize(t *testing.T) {

flavors/benchmark/aws_test.go internal/flavors/benchmark/aws_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import (
2121
"errors"
2222
"testing"
2323

24-
"github.com/elastic/cloudbeat/config"
25-
"github.com/elastic/cloudbeat/resources/fetching"
26-
"github.com/elastic/cloudbeat/resources/providers/awslib"
27-
"github.com/elastic/cloudbeat/resources/utils/testhelper"
24+
"github.com/elastic/cloudbeat/internal/config"
25+
"github.com/elastic/cloudbeat/internal/resources/fetching"
26+
"github.com/elastic/cloudbeat/internal/resources/providers/awslib"
27+
"github.com/elastic/cloudbeat/internal/resources/utils/testhelper"
2828
)
2929

3030
func TestAWS_Initialize(t *testing.T) {

flavors/benchmark/azure.go internal/flavors/benchmark/azure.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ import (
2525

2626
"github.com/elastic/elastic-agent-libs/logp"
2727

28-
"github.com/elastic/cloudbeat/config"
29-
"github.com/elastic/cloudbeat/dataprovider"
30-
"github.com/elastic/cloudbeat/dataprovider/providers/cloud"
31-
"github.com/elastic/cloudbeat/flavors/benchmark/builder"
32-
"github.com/elastic/cloudbeat/resources/fetching"
33-
"github.com/elastic/cloudbeat/resources/fetching/preset"
34-
"github.com/elastic/cloudbeat/resources/fetching/registry"
35-
"github.com/elastic/cloudbeat/resources/providers/azurelib"
36-
"github.com/elastic/cloudbeat/resources/providers/azurelib/auth"
28+
"github.com/elastic/cloudbeat/internal/config"
29+
"github.com/elastic/cloudbeat/internal/dataprovider"
30+
"github.com/elastic/cloudbeat/internal/dataprovider/providers/cloud"
31+
"github.com/elastic/cloudbeat/internal/flavors/benchmark/builder"
32+
"github.com/elastic/cloudbeat/internal/resources/fetching"
33+
"github.com/elastic/cloudbeat/internal/resources/fetching/preset"
34+
"github.com/elastic/cloudbeat/internal/resources/fetching/registry"
35+
"github.com/elastic/cloudbeat/internal/resources/providers/azurelib"
36+
"github.com/elastic/cloudbeat/internal/resources/providers/azurelib/auth"
3737
)
3838

3939
type Azure struct {

flavors/benchmark/azure_test.go internal/flavors/benchmark/azure_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323

2424
"github.com/stretchr/testify/mock"
2525

26-
"github.com/elastic/cloudbeat/config"
27-
"github.com/elastic/cloudbeat/resources/providers/azurelib"
28-
"github.com/elastic/cloudbeat/resources/providers/azurelib/auth"
26+
"github.com/elastic/cloudbeat/internal/config"
27+
"github.com/elastic/cloudbeat/internal/resources/providers/azurelib"
28+
"github.com/elastic/cloudbeat/internal/resources/providers/azurelib/auth"
2929
)
3030

3131
func TestAzure_Initialize(t *testing.T) {

flavors/benchmark/builder/benchmark.go internal/flavors/benchmark/builder/benchmark.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323
"github.com/elastic/beats/v7/libbeat/beat"
2424
"github.com/elastic/elastic-agent-libs/logp"
2525

26-
"github.com/elastic/cloudbeat/evaluator"
27-
"github.com/elastic/cloudbeat/pipeline"
28-
"github.com/elastic/cloudbeat/resources/fetching"
26+
"github.com/elastic/cloudbeat/internal/evaluator"
27+
"github.com/elastic/cloudbeat/internal/pipeline"
28+
"github.com/elastic/cloudbeat/internal/resources/fetching"
2929
)
3030

3131
type Manager interface {

flavors/benchmark/builder/benchmark_test.go internal/flavors/benchmark/builder/benchmark_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ import (
2828
"github.com/stretchr/testify/require"
2929
"go.uber.org/goleak"
3030

31-
"github.com/elastic/cloudbeat/evaluator"
32-
"github.com/elastic/cloudbeat/resources/fetching"
33-
"github.com/elastic/cloudbeat/resources/utils/testhelper"
31+
"github.com/elastic/cloudbeat/internal/evaluator"
32+
"github.com/elastic/cloudbeat/internal/resources/fetching"
33+
"github.com/elastic/cloudbeat/internal/resources/utils/testhelper"
3434
)
3535

3636
func TestRun_ReturnEvents(t *testing.T) {

flavors/benchmark/builder/builder.go internal/flavors/benchmark/builder/builder.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ import (
2424
"github.com/elastic/beats/v7/libbeat/beat"
2525
"github.com/elastic/elastic-agent-libs/logp"
2626

27-
"github.com/elastic/cloudbeat/config"
28-
"github.com/elastic/cloudbeat/dataprovider"
29-
"github.com/elastic/cloudbeat/dataprovider/providers/common"
30-
"github.com/elastic/cloudbeat/evaluator"
31-
"github.com/elastic/cloudbeat/resources/fetching"
32-
"github.com/elastic/cloudbeat/resources/fetching/manager"
33-
"github.com/elastic/cloudbeat/resources/fetching/registry"
34-
"github.com/elastic/cloudbeat/transformer"
27+
"github.com/elastic/cloudbeat/internal/config"
28+
"github.com/elastic/cloudbeat/internal/dataprovider"
29+
"github.com/elastic/cloudbeat/internal/dataprovider/providers/common"
30+
"github.com/elastic/cloudbeat/internal/evaluator"
31+
"github.com/elastic/cloudbeat/internal/resources/fetching"
32+
"github.com/elastic/cloudbeat/internal/resources/fetching/manager"
33+
"github.com/elastic/cloudbeat/internal/resources/fetching/registry"
34+
"github.com/elastic/cloudbeat/internal/transformer"
3535
"github.com/elastic/cloudbeat/version"
3636
)
3737

0 commit comments

Comments
 (0)