packer-cn/vendor/github.com/yandex-cloud/go-sdk/gen/containerregistry/image.go

51 lines
1.6 KiB
Go

// Code generated by sdkgen. DO NOT EDIT.
//nolint
package containerregistry
import (
"context"
"google.golang.org/grpc"
"github.com/yandex-cloud/go-genproto/yandex/cloud/containerregistry/v1"
"github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
)
//revive:disable
// ImageServiceClient is a containerregistry.ImageServiceClient with
// lazy GRPC connection initialization.
type ImageServiceClient struct {
getConn func(ctx context.Context) (*grpc.ClientConn, error)
}
var _ containerregistry.ImageServiceClient = &ImageServiceClient{}
// Delete implements containerregistry.ImageServiceClient
func (c *ImageServiceClient) Delete(ctx context.Context, in *containerregistry.DeleteImageRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return containerregistry.NewImageServiceClient(conn).Delete(ctx, in, opts...)
}
// Get implements containerregistry.ImageServiceClient
func (c *ImageServiceClient) Get(ctx context.Context, in *containerregistry.GetImageRequest, opts ...grpc.CallOption) (*containerregistry.Image, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return containerregistry.NewImageServiceClient(conn).Get(ctx, in, opts...)
}
// List implements containerregistry.ImageServiceClient
func (c *ImageServiceClient) List(ctx context.Context, in *containerregistry.ListImagesRequest, opts ...grpc.CallOption) (*containerregistry.ListImagesResponse, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return containerregistry.NewImageServiceClient(conn).List(ctx, in, opts...)
}