@@ -17,31 +17,31 @@ type Interface interface {
1717}
1818
1919type Client struct {
20- client api.RegistryClient
21- health grpc_health_v1.HealthClient
22- conn * grpc.ClientConn
20+ Registry api.RegistryClient
21+ Health grpc_health_v1.HealthClient
22+ Conn * grpc.ClientConn
2323}
2424
2525var _ Interface = & Client {}
2626
2727func (c * Client ) GetBundleInPackageChannel (ctx context.Context , packageName , channelName string ) (* registry.Bundle , error ) {
28- bundle , err := c .client .GetBundleForChannel (ctx , & api.GetBundleInChannelRequest {PkgName : packageName , ChannelName : channelName })
28+ bundle , err := c .Registry .GetBundleForChannel (ctx , & api.GetBundleInChannelRequest {PkgName : packageName , ChannelName : channelName })
2929 if err != nil {
3030 return nil , err
3131 }
3232 return registry .NewBundleFromStrings (bundle .CsvName , packageName , channelName , bundle .Object )
3333}
3434
3535func (c * Client ) GetReplacementBundleInPackageChannel (ctx context.Context , currentName , packageName , channelName string ) (* registry.Bundle , error ) {
36- bundle , err := c .client .GetBundleThatReplaces (ctx , & api.GetReplacementRequest {CsvName : currentName , PkgName : packageName , ChannelName : channelName })
36+ bundle , err := c .Registry .GetBundleThatReplaces (ctx , & api.GetReplacementRequest {CsvName : currentName , PkgName : packageName , ChannelName : channelName })
3737 if err != nil {
3838 return nil , err
3939 }
4040 return registry .NewBundleFromStrings (bundle .CsvName , packageName , channelName , bundle .Object )
4141}
4242
4343func (c * Client ) GetBundleThatProvides (ctx context.Context , group , version , kind string ) (* registry.Bundle , error ) {
44- bundle , err := c .client .GetDefaultBundleThatProvides (ctx , & api.GetDefaultProviderRequest {Group : group , Version : version , Kind : kind })
44+ bundle , err := c .Registry .GetDefaultBundleThatProvides (ctx , & api.GetDefaultProviderRequest {Group : group , Version : version , Kind : kind })
4545 if err != nil {
4646 return nil , err
4747 }
@@ -58,8 +58,8 @@ func NewClient(address string) (*Client, error) {
5858 return nil , err
5959 }
6060 return & Client {
61- client : api .NewRegistryClient (conn ),
62- health : grpc_health_v1 .NewHealthClient (conn ),
63- conn : conn ,
61+ Registry : api .NewRegistryClient (conn ),
62+ Health : grpc_health_v1 .NewHealthClient (conn ),
63+ Conn : conn ,
6464 }, nil
6565}
0 commit comments