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

180 lines
6.6 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"
2024-03-25 02:32:18 +00:00
emptypb "google.golang.org/protobuf/types/known/emptypb"
2024-03-17 05:38:14 +00:00
)
// 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)
2024-03-25 02:32:18 +00:00
GetById(ctx context.Context, in *IllustGetById, opts ...grpc.CallOption) (*illust.Illust, error)
AddTag(ctx context.Context, in *IllustAddTag, opts ...grpc.CallOption) (*emptypb.Empty, error)
2024-03-17 05:38:14 +00:00
}
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
}
2024-03-25 02:32:18 +00:00
func (c *illustDataServiceClient) GetById(ctx context.Context, in *IllustGetById, opts ...grpc.CallOption) (*illust.Illust, error) {
out := new(illust.Illust)
err := c.cc.Invoke(ctx, "/illust.data.IllustDataService/getById", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *illustDataServiceClient) AddTag(ctx context.Context, in *IllustAddTag, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/illust.data.IllustDataService/addTag", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2024-03-17 05:38:14 +00:00
// 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)
2024-03-25 02:32:18 +00:00
GetById(context.Context, *IllustGetById) (*illust.Illust, error)
AddTag(context.Context, *IllustAddTag) (*emptypb.Empty, error)
2024-03-17 05:38:14 +00:00
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")
}
2024-03-25 02:32:18 +00:00
func (UnimplementedIllustDataServiceServer) GetById(context.Context, *IllustGetById) (*illust.Illust, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetById not implemented")
}
func (UnimplementedIllustDataServiceServer) AddTag(context.Context, *IllustAddTag) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddTag not implemented")
}
2024-03-17 05:38:14 +00:00
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)
}
2024-03-25 02:32:18 +00:00
func _IllustDataService_GetById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IllustGetById)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IllustDataServiceServer).GetById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/illust.data.IllustDataService/getById",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IllustDataServiceServer).GetById(ctx, req.(*IllustGetById))
}
return interceptor(ctx, in, info, handler)
}
func _IllustDataService_AddTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IllustAddTag)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IllustDataServiceServer).AddTag(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/illust.data.IllustDataService/addTag",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IllustDataServiceServer).AddTag(ctx, req.(*IllustAddTag))
}
return interceptor(ctx, in, info, handler)
}
2024-03-17 05:38:14 +00:00
// 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,
},
2024-03-25 02:32:18 +00:00
{
MethodName: "getById",
Handler: _IllustDataService_GetById_Handler,
},
{
MethodName: "addTag",
Handler: _IllustDataService_AddTag_Handler,
},
2024-03-17 05:38:14 +00:00
},
Streams: []grpc.StreamDesc{},
Metadata: "illust/data/illust_data.proto",
}