Skip to content

Commit

Permalink
Add plugin Resources client
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Nov 27, 2024
1 parent ee7326b commit 49ca691
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ var (
NopV1Beta1LabelServiceClientProvider V1Beta1LabelServiceClientProvider = nopClientProvider{}
// NopV1Beta1PluginServiceClientProvider is a V1Beta1PluginServiceClientProvider that provides unimplemented services for testing.
NopV1Beta1PluginServiceClientProvider V1Beta1PluginServiceClientProvider = nopClientProvider{}
// NopV1Beta1ResourceServiceClientProvider is a V1Beta1ResourceServiceClientProvider that provides unimplemented services for testing.
NopV1Beta1ResourceServiceClientProvider V1Beta1ResourceServiceClientProvider = nopClientProvider{}
// NopV1Beta1UploadServiceClientProvider is a V1Beta1UploadServiceClientProvider that provides unimplemented services for testing.
NopV1Beta1UploadServiceClientProvider V1Beta1UploadServiceClientProvider = nopClientProvider{}
// NopClientProvider is a ClientProvider that provides unimplemented services for testing.
Expand All @@ -56,6 +58,11 @@ type V1Beta1LabelServiceClientProvider interface {
V1Beta1LabelServiceClient(registry string) pluginv1beta1connect.LabelServiceClient
}

// V1Beta1ResourceServiceClientProvider provides ResourceServiceClients.
type V1Beta1ResourceServiceClientProvider interface {
V1Beta1ResourceServiceClient(registry string) pluginv1beta1connect.ResourceServiceClient
}

// V1Beta1PluginServiceClientProvider provides PluginServiceClients.
type V1Beta1PluginServiceClientProvider interface {
V1Beta1PluginServiceClient(registry string) pluginv1beta1connect.PluginServiceClient
Expand All @@ -72,6 +79,7 @@ type ClientProvider interface {
V1Beta1CommitServiceClientProvider
V1Beta1DownloadServiceClientProvider
V1Beta1LabelServiceClientProvider
V1Beta1ResourceServiceClientProvider
V1Beta1PluginServiceClientProvider
V1Beta1UploadServiceClientProvider
}
Expand Down Expand Up @@ -125,6 +133,14 @@ func (c *clientProvider) V1Beta1LabelServiceClient(registry string) pluginv1beta
)
}

func (c *clientProvider) V1Beta1ResourceServiceClient(registry string) pluginv1beta1connect.ResourceServiceClient {
return connectclient.Make(
c.clientConfig,
registry,
pluginv1beta1connect.NewResourceServiceClient,
)
}

func (c *clientProvider) V1Beta1PluginServiceClient(registry string) pluginv1beta1connect.PluginServiceClient {
return connectclient.Make(
c.clientConfig,
Expand Down Expand Up @@ -159,6 +175,10 @@ func (nopClientProvider) V1Beta1LabelServiceClient(registry string) pluginv1beta
return pluginv1beta1connect.UnimplementedLabelServiceHandler{}
}

func (nopClientProvider) V1Beta1ResourceServiceClient(registry string) pluginv1beta1connect.ResourceServiceClient {
return pluginv1beta1connect.UnimplementedResourceServiceHandler{}
}

func (nopClientProvider) V1Beta1PluginServiceClient(registry string) pluginv1beta1connect.PluginServiceClient {
return pluginv1beta1connect.UnimplementedPluginServiceHandler{}
}
Expand Down

0 comments on commit 49ca691

Please sign in to comment.