Skip to content

Commit

Permalink
Add deprecated field to curated plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman committed Oct 25, 2024
1 parent 3e990ec commit abe03c4
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ func createCuratedPluginRequest(
LicenseUrl: pluginConfig.LicenseURL,
Visibility: visibility,
IntegrationGuideUrl: pluginConfig.IntegrationGuideURL,
Deprecated: pluginConfig.Deprecated,
}, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ type Config struct {
// IntegrationGuideURL is an optional attribute used to specify where
// the plugin integration guide can be found.
IntegrationGuideURL string
// Deprecated specifies whether the plugin is deprecated.
Deprecated bool
}

// RegistryConfig is the configuration for the registry of a plugin.
Expand Down Expand Up @@ -407,6 +409,7 @@ type ExternalConfig struct {
SPDXLicenseID string `json:"spdx_license_id,omitempty" yaml:"spdx_license_id,omitempty"`
LicenseURL string `json:"license_url,omitempty" yaml:"license_url,omitempty"`
IntegrationGuideURL string `json:"integration_guide_url,omitempty" yaml:"integration_guide_url,omitempty"`
Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"`
}

// ExternalDependency represents a dependency on another plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func TestGetConfigForBucket(t *testing.T) {
SPDXLicenseID: "Apache-2.0",
LicenseURL: "https://github.com/grpc/grpc-go/blob/master/LICENSE",
IntegrationGuideURL: "https://grpc.io/docs/languages/go/quickstart",
Deprecated: true,
},
pluginConfig,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func newConfig(externalConfig ExternalConfig, options []ConfigOption) (*Config,
SPDXLicenseID: spdxLicenseID,
LicenseURL: externalConfig.LicenseURL,
IntegrationGuideURL: externalConfig.IntegrationGuideURL,
Deprecated: externalConfig.Deprecated,
}, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ registry:
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc-go/blob/master/LICENSE
integration_guide_url: https://grpc.io/docs/languages/go/quickstart
deprecated: true

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

2 changes: 2 additions & 0 deletions proto/buf/alpha/registry/v1alpha1/plugin_curation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ message CreateCuratedPluginRequest {
CuratedPluginVisibility visibility = 17;
// The URL leading to the integration guide of the plugin, if available.
string integration_guide_url = 18;
// The deprecation status of the plugin.
bool deprecated = 19;
}

message CreateCuratedPluginResponse {
Expand Down

0 comments on commit abe03c4

Please sign in to comment.