Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/content-service-api/go/content_grpc.pb.go
2496 views
1
// Copyright (c) 2023 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
6
// versions:
7
// - protoc-gen-go-grpc v1.2.0
8
// - protoc (unknown)
9
// source: content.proto
10
11
package api
12
13
import (
14
context "context"
15
grpc "google.golang.org/grpc"
16
codes "google.golang.org/grpc/codes"
17
status "google.golang.org/grpc/status"
18
)
19
20
// This is a compile-time assertion to ensure that this generated file
21
// is compatible with the grpc package it is being compiled against.
22
// Requires gRPC-Go v1.32.0 or later.
23
const _ = grpc.SupportPackageIsVersion7
24
25
// ContentServiceClient is the client API for ContentService service.
26
//
27
// 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.
28
type ContentServiceClient interface {
29
// DeleteUserContent deletes all content associated with a user.
30
DeleteUserContent(ctx context.Context, in *DeleteUserContentRequest, opts ...grpc.CallOption) (*DeleteUserContentResponse, error)
31
}
32
33
type contentServiceClient struct {
34
cc grpc.ClientConnInterface
35
}
36
37
func NewContentServiceClient(cc grpc.ClientConnInterface) ContentServiceClient {
38
return &contentServiceClient{cc}
39
}
40
41
func (c *contentServiceClient) DeleteUserContent(ctx context.Context, in *DeleteUserContentRequest, opts ...grpc.CallOption) (*DeleteUserContentResponse, error) {
42
out := new(DeleteUserContentResponse)
43
err := c.cc.Invoke(ctx, "/contentservice.ContentService/DeleteUserContent", in, out, opts...)
44
if err != nil {
45
return nil, err
46
}
47
return out, nil
48
}
49
50
// ContentServiceServer is the server API for ContentService service.
51
// All implementations must embed UnimplementedContentServiceServer
52
// for forward compatibility
53
type ContentServiceServer interface {
54
// DeleteUserContent deletes all content associated with a user.
55
DeleteUserContent(context.Context, *DeleteUserContentRequest) (*DeleteUserContentResponse, error)
56
mustEmbedUnimplementedContentServiceServer()
57
}
58
59
// UnimplementedContentServiceServer must be embedded to have forward compatible implementations.
60
type UnimplementedContentServiceServer struct {
61
}
62
63
func (UnimplementedContentServiceServer) DeleteUserContent(context.Context, *DeleteUserContentRequest) (*DeleteUserContentResponse, error) {
64
return nil, status.Errorf(codes.Unimplemented, "method DeleteUserContent not implemented")
65
}
66
func (UnimplementedContentServiceServer) mustEmbedUnimplementedContentServiceServer() {}
67
68
// UnsafeContentServiceServer may be embedded to opt out of forward compatibility for this service.
69
// Use of this interface is not recommended, as added methods to ContentServiceServer will
70
// result in compilation errors.
71
type UnsafeContentServiceServer interface {
72
mustEmbedUnimplementedContentServiceServer()
73
}
74
75
func RegisterContentServiceServer(s grpc.ServiceRegistrar, srv ContentServiceServer) {
76
s.RegisterService(&ContentService_ServiceDesc, srv)
77
}
78
79
func _ContentService_DeleteUserContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
80
in := new(DeleteUserContentRequest)
81
if err := dec(in); err != nil {
82
return nil, err
83
}
84
if interceptor == nil {
85
return srv.(ContentServiceServer).DeleteUserContent(ctx, in)
86
}
87
info := &grpc.UnaryServerInfo{
88
Server: srv,
89
FullMethod: "/contentservice.ContentService/DeleteUserContent",
90
}
91
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
92
return srv.(ContentServiceServer).DeleteUserContent(ctx, req.(*DeleteUserContentRequest))
93
}
94
return interceptor(ctx, in, info, handler)
95
}
96
97
// ContentService_ServiceDesc is the grpc.ServiceDesc for ContentService service.
98
// It's only intended for direct use with grpc.RegisterService,
99
// and not to be introspected or modified (even as a copy)
100
var ContentService_ServiceDesc = grpc.ServiceDesc{
101
ServiceName: "contentservice.ContentService",
102
HandlerType: (*ContentServiceServer)(nil),
103
Methods: []grpc.MethodDesc{
104
{
105
MethodName: "DeleteUserContent",
106
Handler: _ContentService_DeleteUserContent_Handler,
107
},
108
},
109
Streams: []grpc.StreamDesc{},
110
Metadata: "content.proto",
111
}
112
113