Skip to content

Commit 61cac88

Browse files
authored
chore: move grpconn and cas-client package (#1922)
Signed-off-by: Miguel Martinez <[email protected]>
1 parent c943d39 commit 61cac88

Some content is hidden

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

56 files changed

+117
-117
lines changed

app/cli/cmd/artifact.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 The Chainloop Authors.
2+
// Copyright 2023-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@ import (
1919
"context"
2020

2121
pb "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1"
22-
"github.com/chainloop-dev/chainloop/internal/grpcconn"
22+
"github.com/chainloop-dev/chainloop/pkg/grpcconn"
2323
"github.com/spf13/cobra"
2424
"github.com/spf13/viper"
2525
"google.golang.org/grpc"

app/cli/cmd/root.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ import (
3131
"github.com/chainloop-dev/chainloop/app/cli/internal/telemetry"
3232
"github.com/chainloop-dev/chainloop/app/cli/internal/telemetry/posthog"
3333
v1 "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1"
34-
"github.com/chainloop-dev/chainloop/internal/grpcconn"
34+
"github.com/chainloop-dev/chainloop/pkg/grpcconn"
3535
"github.com/golang-jwt/jwt/v4"
3636
"github.com/rs/zerolog"
3737
"github.com/spf13/cobra"

app/cli/internal/action/artifact_download.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 The Chainloop Authors.
2+
// Copyright 2023-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@ import (
2525
"path"
2626
"time"
2727

28-
"github.com/chainloop-dev/chainloop/internal/casclient"
28+
"github.com/chainloop-dev/chainloop/pkg/casclient"
2929
"github.com/jedib0t/go-pretty/v6/progress"
3030
"google.golang.org/grpc"
3131

app/cli/internal/action/artifact_upload.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 The Chainloop Authors.
2+
// Copyright 2023-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import (
2121
"os"
2222
"time"
2323

24-
"github.com/chainloop-dev/chainloop/internal/casclient"
24+
"github.com/chainloop-dev/chainloop/pkg/casclient"
2525
"github.com/jedib0t/go-pretty/v6/progress"
2626
"google.golang.org/grpc"
2727
)

app/cli/internal/action/attestation_add.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import (
2121
"fmt"
2222

2323
pb "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1"
24-
"github.com/chainloop-dev/chainloop/internal/casclient"
25-
"github.com/chainloop-dev/chainloop/internal/grpcconn"
2624
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter"
2725
api "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
26+
"github.com/chainloop-dev/chainloop/pkg/casclient"
27+
"github.com/chainloop-dev/chainloop/pkg/grpcconn"
2828
"google.golang.org/grpc"
2929
)
3030

app/controlplane/pkg/biz/casclient.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -24,9 +24,9 @@ import (
2424
"github.com/bufbuild/protovalidate-go"
2525

2626
conf "github.com/chainloop-dev/chainloop/app/controlplane/internal/conf/controlplane/config/v1"
27-
"github.com/chainloop-dev/chainloop/internal/casclient"
28-
"github.com/chainloop-dev/chainloop/internal/grpcconn"
2927
casJWT "github.com/chainloop-dev/chainloop/internal/robotaccount/cas"
28+
"github.com/chainloop-dev/chainloop/pkg/casclient"
29+
"github.com/chainloop-dev/chainloop/pkg/grpcconn"
3030
"github.com/chainloop-dev/chainloop/pkg/servicelogger"
3131
"github.com/go-kratos/kratos/v2/log"
3232
)

app/controlplane/pkg/biz/casclient_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 The Chainloop Authors.
2+
// Copyright 2023-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ import (
2121

2222
conf "github.com/chainloop-dev/chainloop/app/controlplane/internal/conf/controlplane/config/v1"
2323
"github.com/chainloop-dev/chainloop/app/controlplane/pkg/biz"
24-
"github.com/chainloop-dev/chainloop/internal/casclient"
25-
"github.com/chainloop-dev/chainloop/internal/casclient/mocks"
24+
"github.com/chainloop-dev/chainloop/pkg/casclient"
25+
"github.com/chainloop-dev/chainloop/pkg/casclient/mocks"
2626
"github.com/stretchr/testify/assert"
2727
"github.com/stretchr/testify/mock"
2828
)

pkg/attestation/crafter/crafter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ import (
2929
"github.com/bufbuild/protovalidate-go"
3030
v1 "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1"
3131
schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
32-
"github.com/chainloop-dev/chainloop/internal/casclient"
3332
"github.com/chainloop-dev/chainloop/internal/ociauth"
3433
api "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
3534
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/materials"
35+
"github.com/chainloop-dev/chainloop/pkg/casclient"
3636
"github.com/chainloop-dev/chainloop/pkg/policies"
3737
"github.com/go-git/go-git/v5"
3838
"github.com/go-git/go-git/v5/plumbing"

pkg/attestation/crafter/crafter_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 The Chainloop Authors.
2+
// Copyright 2023-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -25,13 +25,13 @@ import (
2525

2626
schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
2727
"github.com/chainloop-dev/chainloop/app/controlplane/pkg/unmarshal"
28-
"github.com/chainloop-dev/chainloop/internal/casclient"
29-
mUploader "github.com/chainloop-dev/chainloop/internal/casclient/mocks"
3028
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter"
3129
v1 "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
3230
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/materials"
3331
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/runners"
3432
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/statemanager/filesystem"
33+
"github.com/chainloop-dev/chainloop/pkg/casclient"
34+
mUploader "github.com/chainloop-dev/chainloop/pkg/casclient/mocks"
3535

3636
"github.com/go-git/go-git/v5"
3737
"github.com/go-git/go-git/v5/plumbing/object"

pkg/attestation/crafter/materials/artifact.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 The Chainloop Authors.
2+
// Copyright 2023-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -20,8 +20,8 @@ import (
2020
"fmt"
2121

2222
schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
23-
"github.com/chainloop-dev/chainloop/internal/casclient"
2423
api "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
24+
"github.com/chainloop-dev/chainloop/pkg/casclient"
2525
"github.com/rs/zerolog"
2626
)
2727

pkg/attestation/crafter/materials/artifact_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 The Chainloop Authors.
2+
// Copyright 2023-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -22,10 +22,10 @@ import (
2222

2323
"code.cloudfoundry.org/bytefmt"
2424
contractAPI "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
25-
"github.com/chainloop-dev/chainloop/internal/casclient"
26-
mUploader "github.com/chainloop-dev/chainloop/internal/casclient/mocks"
2725
attestationApi "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
2826
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/materials"
27+
"github.com/chainloop-dev/chainloop/pkg/casclient"
28+
mUploader "github.com/chainloop-dev/chainloop/pkg/casclient/mocks"
2929
"github.com/rs/zerolog"
3030
"github.com/stretchr/testify/assert"
3131
"github.com/stretchr/testify/require"

pkg/attestation/crafter/materials/attestation.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -23,10 +23,10 @@ import (
2323
"path"
2424

2525
schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
26-
"github.com/chainloop-dev/chainloop/internal/casclient"
2726
"github.com/chainloop-dev/chainloop/pkg/attestation"
2827
api "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
2928
"github.com/chainloop-dev/chainloop/pkg/attestation/renderer/chainloop"
29+
"github.com/chainloop-dev/chainloop/pkg/casclient"
3030
"github.com/rs/zerolog"
3131
"github.com/secure-systems-lab/go-securesystemslib/dsse"
3232
)

pkg/attestation/crafter/materials/attestation_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -22,9 +22,9 @@ import (
2222

2323
"code.cloudfoundry.org/bytefmt"
2424
contractAPI "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
25-
"github.com/chainloop-dev/chainloop/internal/casclient"
26-
mUploader "github.com/chainloop-dev/chainloop/internal/casclient/mocks"
2725
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/materials"
26+
"github.com/chainloop-dev/chainloop/pkg/casclient"
27+
mUploader "github.com/chainloop-dev/chainloop/pkg/casclient/mocks"
2828
"github.com/rs/zerolog"
2929
"github.com/stretchr/testify/assert"
3030
"github.com/stretchr/testify/mock"

pkg/attestation/crafter/materials/blackduck.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@ import (
2222
"os"
2323

2424
schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
25-
"github.com/chainloop-dev/chainloop/internal/casclient"
2625
api "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
26+
"github.com/chainloop-dev/chainloop/pkg/casclient"
2727
"github.com/rs/zerolog"
2828
)
2929

pkg/attestation/crafter/materials/blackduck_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -20,10 +20,10 @@ import (
2020
"testing"
2121

2222
contractAPI "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
23-
"github.com/chainloop-dev/chainloop/internal/casclient"
24-
mUploader "github.com/chainloop-dev/chainloop/internal/casclient/mocks"
2523
attestationApi "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
2624
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/materials"
25+
"github.com/chainloop-dev/chainloop/pkg/casclient"
26+
mUploader "github.com/chainloop-dev/chainloop/pkg/casclient/mocks"
2727
"github.com/rs/zerolog"
2828
"github.com/stretchr/testify/assert"
2929
"github.com/stretchr/testify/require"

pkg/attestation/crafter/materials/csaf.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 The Chainloop Authors.
2+
// Copyright 2023-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -22,9 +22,9 @@ import (
2222
"os"
2323

2424
schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
25-
"github.com/chainloop-dev/chainloop/internal/casclient"
2625
"github.com/chainloop-dev/chainloop/internal/schemavalidators"
2726
api "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
27+
"github.com/chainloop-dev/chainloop/pkg/casclient"
2828
"github.com/rs/zerolog"
2929
)
3030

pkg/attestation/crafter/materials/csaf_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -22,10 +22,10 @@ import (
2222
"testing"
2323

2424
contractAPI "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
25-
"github.com/chainloop-dev/chainloop/internal/casclient"
26-
mUploader "github.com/chainloop-dev/chainloop/internal/casclient/mocks"
2725
attestationApi "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
2826
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/materials"
27+
"github.com/chainloop-dev/chainloop/pkg/casclient"
28+
mUploader "github.com/chainloop-dev/chainloop/pkg/casclient/mocks"
2929
"github.com/rs/zerolog"
3030
"github.com/stretchr/testify/assert"
3131
"github.com/stretchr/testify/require"

pkg/attestation/crafter/materials/cyclonedxjson.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -23,9 +23,9 @@ import (
2323
"strings"
2424

2525
schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
26-
"github.com/chainloop-dev/chainloop/internal/casclient"
2726
"github.com/chainloop-dev/chainloop/internal/schemavalidators"
2827
api "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
28+
"github.com/chainloop-dev/chainloop/pkg/casclient"
2929
remotename "github.com/google/go-containerregistry/pkg/name"
3030

3131
"github.com/rs/zerolog"

pkg/attestation/crafter/materials/cyclonedxjson_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 The Chainloop Authors.
2+
// Copyright 2023-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -20,10 +20,10 @@ import (
2020
"testing"
2121

2222
contractAPI "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
23-
"github.com/chainloop-dev/chainloop/internal/casclient"
24-
mUploader "github.com/chainloop-dev/chainloop/internal/casclient/mocks"
2523
attestationApi "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
2624
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/materials"
25+
"github.com/chainloop-dev/chainloop/pkg/casclient"
26+
mUploader "github.com/chainloop-dev/chainloop/pkg/casclient/mocks"
2727
"github.com/rs/zerolog"
2828
"github.com/stretchr/testify/assert"
2929
"github.com/stretchr/testify/require"

pkg/attestation/crafter/materials/evidence.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -20,8 +20,8 @@ import (
2020
"fmt"
2121

2222
schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
23-
"github.com/chainloop-dev/chainloop/internal/casclient"
2423
api "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
24+
"github.com/chainloop-dev/chainloop/pkg/casclient"
2525
"github.com/rs/zerolog"
2626
)
2727

pkg/attestation/crafter/materials/evidence_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -22,10 +22,10 @@ import (
2222

2323
"code.cloudfoundry.org/bytefmt"
2424
contractAPI "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
25-
"github.com/chainloop-dev/chainloop/internal/casclient"
26-
mUploader "github.com/chainloop-dev/chainloop/internal/casclient/mocks"
2725
attestationApi "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
2826
"github.com/chainloop-dev/chainloop/pkg/attestation/crafter/materials"
27+
"github.com/chainloop-dev/chainloop/pkg/casclient"
28+
mUploader "github.com/chainloop-dev/chainloop/pkg/casclient/mocks"
2929
"github.com/rs/zerolog"
3030
"github.com/stretchr/testify/assert"
3131
"github.com/stretchr/testify/require"

pkg/attestation/crafter/materials/ghas_code_scan.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2024 The Chainloop Authors.
2+
// Copyright 2024-2025 The Chainloop Authors.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@ import (
2222
"os"
2323

2424
schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1"
25-
"github.com/chainloop-dev/chainloop/internal/casclient"
2625
api "github.com/chainloop-dev/chainloop/pkg/attestation/crafter/api/attestation/v1"
26+
"github.com/chainloop-dev/chainloop/pkg/casclient"
2727
"github.com/google/go-github/v66/github"
2828
"github.com/rs/zerolog"
2929
)

0 commit comments

Comments
 (0)