unos/illust-data/illust/data/illust_data_grpc.pb.go

107 lines
3.8 KiB
Go
Raw Normal View History

2024-03-17 05:38:14 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v4.25.3
// source: illust/data/illust_data.proto
package data
import (
context "context"
illust "git.usbharu.dev/usbharu/unos/illust"
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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// IllustDataServiceClient is the client API for IllustDataService 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 IllustDataServiceClient interface {
Save(ctx context.Context, in *illust.Illust, opts ...grpc.CallOption) (*illust.Illust, error)
}
type illustDataServiceClient struct {
cc grpc.ClientConnInterface
}
func NewIllustDataServiceClient(cc grpc.ClientConnInterface) IllustDataServiceClient {
return &illustDataServiceClient{cc}
}
func (c *illustDataServiceClient) Save(ctx context.Context, in *illust.Illust, opts ...grpc.CallOption) (*illust.Illust, error) {
out := new(illust.Illust)
err := c.cc.Invoke(ctx, "/illust.data.IllustDataService/save", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// IllustDataServiceServer is the server API for IllustDataService service.
// All implementations must embed UnimplementedIllustDataServiceServer
// for forward compatibility
type IllustDataServiceServer interface {
Save(context.Context, *illust.Illust) (*illust.Illust, error)
mustEmbedUnimplementedIllustDataServiceServer()
}
// UnimplementedIllustDataServiceServer must be embedded to have forward compatible implementations.
type UnimplementedIllustDataServiceServer struct {
}
func (UnimplementedIllustDataServiceServer) Save(context.Context, *illust.Illust) (*illust.Illust, error) {
return nil, status.Errorf(codes.Unimplemented, "method Save not implemented")
}
func (UnimplementedIllustDataServiceServer) mustEmbedUnimplementedIllustDataServiceServer() {}
// UnsafeIllustDataServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to IllustDataServiceServer will
// result in compilation errors.
type UnsafeIllustDataServiceServer interface {
mustEmbedUnimplementedIllustDataServiceServer()
}
func RegisterIllustDataServiceServer(s grpc.ServiceRegistrar, srv IllustDataServiceServer) {
s.RegisterService(&IllustDataService_ServiceDesc, srv)
}
func _IllustDataService_Save_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(illust.Illust)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IllustDataServiceServer).Save(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/illust.data.IllustDataService/save",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IllustDataServiceServer).Save(ctx, req.(*illust.Illust))
}
return interceptor(ctx, in, info, handler)
}
// IllustDataService_ServiceDesc is the grpc.ServiceDesc for IllustDataService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var IllustDataService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "illust.data.IllustDataService",
HandlerType: (*IllustDataServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "save",
Handler: _IllustDataService_Save_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "illust/data/illust_data.proto",
}