// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v5.28.3 // source: attachment.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.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( AttachmentService_GetAttachment_FullMethodName = "/proto.AttachmentService/GetAttachment" AttachmentService_ListAttachment_FullMethodName = "/proto.AttachmentService/ListAttachment" AttachmentService_UpdateVisibility_FullMethodName = "/proto.AttachmentService/UpdateVisibility" AttachmentService_DeleteAttachment_FullMethodName = "/proto.AttachmentService/DeleteAttachment" ) // AttachmentServiceClient is the client API for AttachmentService 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 AttachmentServiceClient interface { GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*GetAttachmentResponse, error) ListAttachment(ctx context.Context, in *ListAttachmentRequest, opts ...grpc.CallOption) (*ListAttachmentResponse, error) UpdateVisibility(ctx context.Context, in *UpdateVisibilityRequest, opts ...grpc.CallOption) (*UpdateVisibilityResponse, error) DeleteAttachment(ctx context.Context, in *DeleteAttachmentRequest, opts ...grpc.CallOption) (*DeleteAttachmentResponse, error) } type attachmentServiceClient struct { cc grpc.ClientConnInterface } func NewAttachmentServiceClient(cc grpc.ClientConnInterface) AttachmentServiceClient { return &attachmentServiceClient{cc} } func (c *attachmentServiceClient) GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*GetAttachmentResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAttachmentResponse) err := c.cc.Invoke(ctx, AttachmentService_GetAttachment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *attachmentServiceClient) ListAttachment(ctx context.Context, in *ListAttachmentRequest, opts ...grpc.CallOption) (*ListAttachmentResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListAttachmentResponse) err := c.cc.Invoke(ctx, AttachmentService_ListAttachment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *attachmentServiceClient) UpdateVisibility(ctx context.Context, in *UpdateVisibilityRequest, opts ...grpc.CallOption) (*UpdateVisibilityResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateVisibilityResponse) err := c.cc.Invoke(ctx, AttachmentService_UpdateVisibility_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *attachmentServiceClient) DeleteAttachment(ctx context.Context, in *DeleteAttachmentRequest, opts ...grpc.CallOption) (*DeleteAttachmentResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteAttachmentResponse) err := c.cc.Invoke(ctx, AttachmentService_DeleteAttachment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // AttachmentServiceServer is the server API for AttachmentService service. // All implementations must embed UnimplementedAttachmentServiceServer // for forward compatibility. type AttachmentServiceServer interface { GetAttachment(context.Context, *GetAttachmentRequest) (*GetAttachmentResponse, error) ListAttachment(context.Context, *ListAttachmentRequest) (*ListAttachmentResponse, error) UpdateVisibility(context.Context, *UpdateVisibilityRequest) (*UpdateVisibilityResponse, error) DeleteAttachment(context.Context, *DeleteAttachmentRequest) (*DeleteAttachmentResponse, error) mustEmbedUnimplementedAttachmentServiceServer() } // UnimplementedAttachmentServiceServer 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 UnimplementedAttachmentServiceServer struct{} func (UnimplementedAttachmentServiceServer) GetAttachment(context.Context, *GetAttachmentRequest) (*GetAttachmentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAttachment not implemented") } func (UnimplementedAttachmentServiceServer) ListAttachment(context.Context, *ListAttachmentRequest) (*ListAttachmentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAttachment not implemented") } func (UnimplementedAttachmentServiceServer) UpdateVisibility(context.Context, *UpdateVisibilityRequest) (*UpdateVisibilityResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateVisibility not implemented") } func (UnimplementedAttachmentServiceServer) DeleteAttachment(context.Context, *DeleteAttachmentRequest) (*DeleteAttachmentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteAttachment not implemented") } func (UnimplementedAttachmentServiceServer) mustEmbedUnimplementedAttachmentServiceServer() {} func (UnimplementedAttachmentServiceServer) testEmbeddedByValue() {} // UnsafeAttachmentServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AttachmentServiceServer will // result in compilation errors. type UnsafeAttachmentServiceServer interface { mustEmbedUnimplementedAttachmentServiceServer() } func RegisterAttachmentServiceServer(s grpc.ServiceRegistrar, srv AttachmentServiceServer) { // If the following call pancis, it indicates UnimplementedAttachmentServiceServer 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(&AttachmentService_ServiceDesc, srv) } func _AttachmentService_GetAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetAttachmentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AttachmentServiceServer).GetAttachment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AttachmentService_GetAttachment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AttachmentServiceServer).GetAttachment(ctx, req.(*GetAttachmentRequest)) } return interceptor(ctx, in, info, handler) } func _AttachmentService_ListAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListAttachmentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AttachmentServiceServer).ListAttachment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AttachmentService_ListAttachment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AttachmentServiceServer).ListAttachment(ctx, req.(*ListAttachmentRequest)) } return interceptor(ctx, in, info, handler) } func _AttachmentService_UpdateVisibility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateVisibilityRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AttachmentServiceServer).UpdateVisibility(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AttachmentService_UpdateVisibility_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AttachmentServiceServer).UpdateVisibility(ctx, req.(*UpdateVisibilityRequest)) } return interceptor(ctx, in, info, handler) } func _AttachmentService_DeleteAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteAttachmentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AttachmentServiceServer).DeleteAttachment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AttachmentService_DeleteAttachment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AttachmentServiceServer).DeleteAttachment(ctx, req.(*DeleteAttachmentRequest)) } return interceptor(ctx, in, info, handler) } // AttachmentService_ServiceDesc is the grpc.ServiceDesc for AttachmentService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AttachmentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.AttachmentService", HandlerType: (*AttachmentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAttachment", Handler: _AttachmentService_GetAttachment_Handler, }, { MethodName: "ListAttachment", Handler: _AttachmentService_ListAttachment_Handler, }, { MethodName: "UpdateVisibility", Handler: _AttachmentService_UpdateVisibility_Handler, }, { MethodName: "DeleteAttachment", Handler: _AttachmentService_DeleteAttachment_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "attachment.proto", }