Skip to content

Commit 38f42c8

Browse files
authored
refactor(plugins): s/extension/plugin (#194)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent 6cc5906 commit 38f42c8

Some content is hidden

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

51 files changed

+527
-538
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Operators can set up third-party integrations such as [Dependency-Track](https:/
108108

109109
Ops can mix and match with different integrations while **not requiring developers to make any changes on their side**!
110110

111-
You can see the list of available integrations by running `chainloop integration available list` or by browsing [their source code](./app/controlplane/extensions/).
111+
You can see the list of available integrations by running `chainloop integration available list` or by browsing [their source code](./app/controlplane/plugins/).
112112

113113
### Role-tailored experience
114114

app/cli/cmd/available_integration_describe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"sort"
2323

2424
"github.com/chainloop-dev/chainloop/app/cli/internal/action"
25-
"github.com/chainloop-dev/chainloop/app/controlplane/extensions/sdk/v1"
25+
"github.com/chainloop-dev/chainloop/app/controlplane/plugins/sdk/v1"
2626
"github.com/jedib0t/go-pretty/v6/table"
2727
"github.com/jedib0t/go-pretty/v6/text"
2828
"github.com/spf13/cobra"

app/cli/cmd/registered_integration_add.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"strings"
2323

2424
"github.com/chainloop-dev/chainloop/app/cli/internal/action"
25-
"github.com/chainloop-dev/chainloop/app/controlplane/extensions/sdk/v1"
25+
"github.com/chainloop-dev/chainloop/app/controlplane/plugins/sdk/v1"
2626
"github.com/santhosh-tekuri/jsonschema/v5"
2727
"github.com/spf13/cobra"
2828
)

app/cli/internal/action/available_integration_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"fmt"
2222

2323
pb "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1"
24-
"github.com/chainloop-dev/chainloop/app/controlplane/extensions/sdk/v1"
24+
"github.com/chainloop-dev/chainloop/app/controlplane/plugins/sdk/v1"
2525
"github.com/santhosh-tekuri/jsonschema/v5"
2626
)
2727

app/cli/internal/action/registered_integration_add.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func NewRegisteredIntegrationAdd(cfg *ActionsOpts) *RegisteredIntegrationAdd {
3131
return &RegisteredIntegrationAdd{cfg}
3232
}
3333

34-
func (action *RegisteredIntegrationAdd) Run(extensionID, description string, options map[string]any) (*RegisteredIntegrationItem, error) {
34+
func (action *RegisteredIntegrationAdd) Run(pluginID, description string, options map[string]any) (*RegisteredIntegrationItem, error) {
3535
// Transform to structpb for transport
3636
requestConfig, err := structpb.NewStruct(options)
3737
if err != nil {
@@ -40,7 +40,7 @@ func (action *RegisteredIntegrationAdd) Run(extensionID, description string, opt
4040

4141
client := pb.NewIntegrationsServiceClient(action.cfg.CPConnection)
4242
i, err := client.Register(context.Background(), &pb.IntegrationsServiceRegisterRequest{
43-
ExtensionId: extensionID,
43+
PluginId: pluginID,
4444
Config: requestConfig,
4545
Description: description,
4646
})

app/controlplane/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ It's implemented following(ish) [Hexagonal architecture](https://netflixtechblog
1212
- Business layer `./internal/biz`. Implementation of use-cases referenced by the service layer and definition of the data repository abstractions.
1313
- Data layer `./internal/data`. Implementation of data repositories interfaces defined in the business layer.
1414

15-
## Extensions
15+
## Plugins
1616

17-
The source code and documentation for the different supported extensions can be found at `./extensions`.
17+
The source code and documentation for the different supported plugins can be found at `./plugins`.
1818

1919
## System Dependencies
2020

app/controlplane/api/controlplane/v1/integrations.pb.go

Lines changed: 224 additions & 225 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controlplane/api/controlplane/v1/integrations.pb.validate.go

Lines changed: 30 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controlplane/api/controlplane/v1/integrations.proto

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ service IntegrationsService {
4848

4949
message IntegrationsServiceRegisterRequest {
5050
// Kind of integration to register
51-
// This should match the ID of an existing extension
52-
string extension_id = 1 [(validate.rules).string.min_len = 1];
51+
// This should match the ID of an existing plugin
52+
string plugin_id = 1 [(validate.rules).string.min_len = 1];
5353
// Arbitrary configuration for the integration
5454
google.protobuf.Struct config = 3 [(validate.rules).message.required = true];
5555
// Description of the registration, used for display purposes
@@ -85,12 +85,12 @@ message IntegrationAvailableItem {
8585
string description = 3;
8686

8787
oneof type {
88-
ExtensionFanout fanout = 4;
88+
PluginFanout fanout = 4;
8989
}
9090
}
9191

92-
// ExtensionFanout describes an extension that can be used to fanout attestation and materials to multiple integrations
93-
message ExtensionFanout {
92+
// PluginFanout describes a plugin that can be used to fanout attestation and materials to multiple integrations
93+
message PluginFanout {
9494
// Registration JSON schema
9595
bytes registration_schema = 4;
9696
// Attachment JSON schema

0 commit comments

Comments
 (0)