mirror of
https://github.com/crazy-max/diun.git
synced 2025-01-12 11:38:11 +00:00
235 lines
9.1 KiB
Go
235 lines
9.1 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v3.17.3
|
|
// source: image.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
ImageService_ImageList_FullMethodName = "/pb.ImageService/ImageList"
|
|
ImageService_ImageInspect_FullMethodName = "/pb.ImageService/ImageInspect"
|
|
ImageService_ImageRemove_FullMethodName = "/pb.ImageService/ImageRemove"
|
|
ImageService_ImagePrune_FullMethodName = "/pb.ImageService/ImagePrune"
|
|
)
|
|
|
|
// ImageServiceClient is the client API for ImageService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type ImageServiceClient interface {
|
|
ImageList(ctx context.Context, in *ImageListRequest, opts ...grpc.CallOption) (*ImageListResponse, error)
|
|
ImageInspect(ctx context.Context, in *ImageInspectRequest, opts ...grpc.CallOption) (*ImageInspectResponse, error)
|
|
ImageRemove(ctx context.Context, in *ImageRemoveRequest, opts ...grpc.CallOption) (*ImageRemoveResponse, error)
|
|
ImagePrune(ctx context.Context, in *ImagePruneRequest, opts ...grpc.CallOption) (*ImagePruneResponse, error)
|
|
}
|
|
|
|
type imageServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewImageServiceClient(cc grpc.ClientConnInterface) ImageServiceClient {
|
|
return &imageServiceClient{cc}
|
|
}
|
|
|
|
func (c *imageServiceClient) ImageList(ctx context.Context, in *ImageListRequest, opts ...grpc.CallOption) (*ImageListResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ImageListResponse)
|
|
err := c.cc.Invoke(ctx, ImageService_ImageList_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *imageServiceClient) ImageInspect(ctx context.Context, in *ImageInspectRequest, opts ...grpc.CallOption) (*ImageInspectResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ImageInspectResponse)
|
|
err := c.cc.Invoke(ctx, ImageService_ImageInspect_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *imageServiceClient) ImageRemove(ctx context.Context, in *ImageRemoveRequest, opts ...grpc.CallOption) (*ImageRemoveResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ImageRemoveResponse)
|
|
err := c.cc.Invoke(ctx, ImageService_ImageRemove_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *imageServiceClient) ImagePrune(ctx context.Context, in *ImagePruneRequest, opts ...grpc.CallOption) (*ImagePruneResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ImagePruneResponse)
|
|
err := c.cc.Invoke(ctx, ImageService_ImagePrune_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ImageServiceServer is the server API for ImageService service.
|
|
// All implementations must embed UnimplementedImageServiceServer
|
|
// for forward compatibility.
|
|
type ImageServiceServer interface {
|
|
ImageList(context.Context, *ImageListRequest) (*ImageListResponse, error)
|
|
ImageInspect(context.Context, *ImageInspectRequest) (*ImageInspectResponse, error)
|
|
ImageRemove(context.Context, *ImageRemoveRequest) (*ImageRemoveResponse, error)
|
|
ImagePrune(context.Context, *ImagePruneRequest) (*ImagePruneResponse, error)
|
|
mustEmbedUnimplementedImageServiceServer()
|
|
}
|
|
|
|
// UnimplementedImageServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedImageServiceServer struct{}
|
|
|
|
func (UnimplementedImageServiceServer) ImageList(context.Context, *ImageListRequest) (*ImageListResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ImageList not implemented")
|
|
}
|
|
func (UnimplementedImageServiceServer) ImageInspect(context.Context, *ImageInspectRequest) (*ImageInspectResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ImageInspect not implemented")
|
|
}
|
|
func (UnimplementedImageServiceServer) ImageRemove(context.Context, *ImageRemoveRequest) (*ImageRemoveResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ImageRemove not implemented")
|
|
}
|
|
func (UnimplementedImageServiceServer) ImagePrune(context.Context, *ImagePruneRequest) (*ImagePruneResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ImagePrune not implemented")
|
|
}
|
|
func (UnimplementedImageServiceServer) mustEmbedUnimplementedImageServiceServer() {}
|
|
func (UnimplementedImageServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeImageServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ImageServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeImageServiceServer interface {
|
|
mustEmbedUnimplementedImageServiceServer()
|
|
}
|
|
|
|
func RegisterImageServiceServer(s grpc.ServiceRegistrar, srv ImageServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedImageServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&ImageService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ImageService_ImageList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ImageListRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ImageServiceServer).ImageList(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ImageService_ImageList_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ImageServiceServer).ImageList(ctx, req.(*ImageListRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ImageService_ImageInspect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ImageInspectRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ImageServiceServer).ImageInspect(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ImageService_ImageInspect_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ImageServiceServer).ImageInspect(ctx, req.(*ImageInspectRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ImageService_ImageRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ImageRemoveRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ImageServiceServer).ImageRemove(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ImageService_ImageRemove_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ImageServiceServer).ImageRemove(ctx, req.(*ImageRemoveRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ImageService_ImagePrune_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ImagePruneRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ImageServiceServer).ImagePrune(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ImageService_ImagePrune_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ImageServiceServer).ImagePrune(ctx, req.(*ImagePruneRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ImageService_ServiceDesc is the grpc.ServiceDesc for ImageService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ImageService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pb.ImageService",
|
|
HandlerType: (*ImageServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ImageList",
|
|
Handler: _ImageService_ImageList_Handler,
|
|
},
|
|
{
|
|
MethodName: "ImageInspect",
|
|
Handler: _ImageService_ImageInspect_Handler,
|
|
},
|
|
{
|
|
MethodName: "ImageRemove",
|
|
Handler: _ImageService_ImageRemove_Handler,
|
|
},
|
|
{
|
|
MethodName: "ImagePrune",
|
|
Handler: _ImageService_ImagePrune_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "image.proto",
|
|
}
|