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 2a4fa3b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.2-20241031151143-70
buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.2-20241031151143-70f632351282.1/go.mod h1:vKDy7lD1bsN2UjeLhqklPEjIsHfHAPgMb/PbRx2EFDc=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.2-20240920164238-5a7b106cbb87.1 h1:7QIeAuTdLp173vC/9JojRMDFcpmqtoYrxPmvdHAOynw=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.2-20240920164238-5a7b106cbb87.1/go.mod h1:mnHCFccv4HwuIAOHNGdiIc5ZYbBCvbTWZcodLN5wITI=
buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1 h1:FHQXg3T7S2jp8yc7/bQJgqEH1yza/rrDHXITUK2Tm0g=
buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1/go.mod h1:5iwF5l+9lKCnvr1zLvDgUHrv6X+vU5nNPjvig1sbnao=
buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241125212318-4a305dc3b757.1 h1:q3PKZJfOuSZR8KC0asyo7EFID/3613pDFzFYAAO+Gd4=
buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241125212318-4a305dc3b757.1/go.mod h1:w+XYJEgdkHK5XJ+44Eq2YD02DZVLFNFjfwFKPz0nZcg=
buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.2-20241025140216-aa40f2c93090.1 h1:a1OY15kRBrD1AF0SYIPYFLE8GCC1d85zqENnzUC3lNM=
buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.2-20241025140216-aa40f2c93090.1/go.mod h1:EQCcR04Wp6ffVPfxNb4ZXAVJXrZJopDNKQWp37BDCgU=
buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.2-20241125212318-4a305dc3b757.1 h1:m2QVURqXvfedovCeWV5CsWm3VIrD87RHL+9P9o7HB84=
buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.2-20241125212318-4a305dc3b757.1/go.mod h1:EQCcR04Wp6ffVPfxNb4ZXAVJXrZJopDNKQWp37BDCgU=
buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.2-20241007202033-cf42259fcbfc.1 h1:FcoYwX9eJhc73MdVlqyJjMOQ863akpHK0VEQ/+Zkt9U=
Expand Down
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 2a4fa3b

Please sign in to comment.