Skip to content
Draft
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
4 changes: 2 additions & 2 deletions buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
version: v2
deps:
- name: buf.build/bufbuild/protovalidate
commit: 80ab13bee0bf4272b6161a72bf7034e0
digest: b5:1aa6a965be5d02d64e1d81954fa2e78ef9d1e33a0c30f92bc2626039006a94deb3a5b05f14ed8893f5c3ffce444ac008f7e968188ad225c4c29c813aa5f2daa1
commit: 50325440f8f24053b047484a6bf60b76
digest: b5:74cb6f5c0853c3c10aafc701614194bbd63326bdb8ef4068214454b8894b03ba4113e04b3a33a8321cdf05336e37db4dc14a5e2495db8462566914f36086ba31
2 changes: 1 addition & 1 deletion cmd/protoc-gen-go-extension/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func generateServiceBridges(g *protogen.GeneratedFile, serviceName, serviceFullN
g.P()
g.P("const (")
if isPlugin {
g.P(" Type = ", strconv.Quote(serviceName))
g.P(" Type = ", strconv.Quote(strings.TrimSuffix(serviceName, "Service")))
}
g.P(" GRPCServiceFullName = ", strconv.Quote(serviceFullName))
g.P(")")
Expand Down
5 changes: 2 additions & 3 deletions internal/proto/service/init/v1/init.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions internal/proto/service/init/v1/init_ext_service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/proto/service/init/v1/init_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 14 additions & 33 deletions pkg/catalog/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,21 @@ import (
type PluginConfigs []PluginConfig

type PluginConfig struct {
// Name of the plugin
Name string

// Type is the plugin type
Type string

// Path is the path on disk to the plugin.
Path string

// Args are the command line arguments to supply to the plugin
Args []string

// Env is the environment variables to supply to the plugin
Env map[string]string

// Checksum is the hex-encoded SHA256 hash of the plugin binary.
Checksum string

Version uint32

DataSource DataSource

YamlConfiguration string

LogLevel string

Disabled bool

Logger *slog.Logger

Name string `yaml:"name" json:"name"`
Type string `yaml:"type" json:"type"`
Path string `yaml:"path" json:"path"`
Args []string `yaml:"args" json:"args"`
Env map[string]string `yaml:"env" json:"env"`
Checksum string `yaml:"checksum" json:"checksum"`
Version uint32 `yaml:"version" json:"version"`
YamlConfiguration string `yaml:"yamlConfiguration" json:"yamlConfiguration"`
LogLevel string `yaml:"logLevel" json:"logLevel"`
Disabled bool `yaml:"disabled" json:"disabled"`
Tags []string `yaml:"tags" json:"tags"`

Logger *slog.Logger
DataSource DataSource
HostServices []api.ServiceServer

// Tags are the metadata associated with a plugin these can be used to filter plugins later e.g. ['FeatureA'] on client side.
Tags []string
}

func (c *PluginConfig) IsExternal() bool {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading