110 lines
3.8 KiB
Go
110 lines
3.8 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.3.0
|
|
// - protoc v5.26.1
|
|
// source: attachments.proto
|
|
|
|
package proto
|
|
|
|
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.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
const (
|
|
Attachments_GetAttachment_FullMethodName = "/proto.Attachments/GetAttachment"
|
|
)
|
|
|
|
// AttachmentsClient is the client API for Attachments 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 AttachmentsClient interface {
|
|
GetAttachment(ctx context.Context, in *AttachmentLookupRequest, opts ...grpc.CallOption) (*Attachment, error)
|
|
}
|
|
|
|
type attachmentsClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAttachmentsClient(cc grpc.ClientConnInterface) AttachmentsClient {
|
|
return &attachmentsClient{cc}
|
|
}
|
|
|
|
func (c *attachmentsClient) GetAttachment(ctx context.Context, in *AttachmentLookupRequest, opts ...grpc.CallOption) (*Attachment, error) {
|
|
out := new(Attachment)
|
|
err := c.cc.Invoke(ctx, Attachments_GetAttachment_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AttachmentsServer is the server API for Attachments service.
|
|
// All implementations must embed UnimplementedAttachmentsServer
|
|
// for forward compatibility
|
|
type AttachmentsServer interface {
|
|
GetAttachment(context.Context, *AttachmentLookupRequest) (*Attachment, error)
|
|
mustEmbedUnimplementedAttachmentsServer()
|
|
}
|
|
|
|
// UnimplementedAttachmentsServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedAttachmentsServer struct {
|
|
}
|
|
|
|
func (UnimplementedAttachmentsServer) GetAttachment(context.Context, *AttachmentLookupRequest) (*Attachment, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetAttachment not implemented")
|
|
}
|
|
func (UnimplementedAttachmentsServer) mustEmbedUnimplementedAttachmentsServer() {}
|
|
|
|
// UnsafeAttachmentsServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AttachmentsServer will
|
|
// result in compilation errors.
|
|
type UnsafeAttachmentsServer interface {
|
|
mustEmbedUnimplementedAttachmentsServer()
|
|
}
|
|
|
|
func RegisterAttachmentsServer(s grpc.ServiceRegistrar, srv AttachmentsServer) {
|
|
s.RegisterService(&Attachments_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Attachments_GetAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AttachmentLookupRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AttachmentsServer).GetAttachment(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Attachments_GetAttachment_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AttachmentsServer).GetAttachment(ctx, req.(*AttachmentLookupRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Attachments_ServiceDesc is the grpc.ServiceDesc for Attachments service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Attachments_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "proto.Attachments",
|
|
HandlerType: (*AttachmentsServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetAttachment",
|
|
Handler: _Attachments_GetAttachment_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "attachments.proto",
|
|
}
|