Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/public-api/go/experimental/v1/stats_grpc.pb.go
2501 views
1
// Copyright (c) 2025 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: gitpod/experimental/v1/stats.proto
10
11
package v1
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
// StatsServiceClient is the client API for StatsService 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 StatsServiceClient interface {
29
// Retrieves the current user stats
30
GetUserStats(ctx context.Context, in *GetUserStatsRequest, opts ...grpc.CallOption) (*GetUserStatsResponse, error)
31
}
32
33
type statsServiceClient struct {
34
cc grpc.ClientConnInterface
35
}
36
37
func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClient {
38
return &statsServiceClient{cc}
39
}
40
41
func (c *statsServiceClient) GetUserStats(ctx context.Context, in *GetUserStatsRequest, opts ...grpc.CallOption) (*GetUserStatsResponse, error) {
42
out := new(GetUserStatsResponse)
43
err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.StatsService/GetUserStats", in, out, opts...)
44
if err != nil {
45
return nil, err
46
}
47
return out, nil
48
}
49
50
// StatsServiceServer is the server API for StatsService service.
51
// All implementations must embed UnimplementedStatsServiceServer
52
// for forward compatibility
53
type StatsServiceServer interface {
54
// Retrieves the current user stats
55
GetUserStats(context.Context, *GetUserStatsRequest) (*GetUserStatsResponse, error)
56
mustEmbedUnimplementedStatsServiceServer()
57
}
58
59
// UnimplementedStatsServiceServer must be embedded to have forward compatible implementations.
60
type UnimplementedStatsServiceServer struct {
61
}
62
63
func (UnimplementedStatsServiceServer) GetUserStats(context.Context, *GetUserStatsRequest) (*GetUserStatsResponse, error) {
64
return nil, status.Errorf(codes.Unimplemented, "method GetUserStats not implemented")
65
}
66
func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {}
67
68
// UnsafeStatsServiceServer may be embedded to opt out of forward compatibility for this service.
69
// Use of this interface is not recommended, as added methods to StatsServiceServer will
70
// result in compilation errors.
71
type UnsafeStatsServiceServer interface {
72
mustEmbedUnimplementedStatsServiceServer()
73
}
74
75
func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer) {
76
s.RegisterService(&StatsService_ServiceDesc, srv)
77
}
78
79
func _StatsService_GetUserStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
80
in := new(GetUserStatsRequest)
81
if err := dec(in); err != nil {
82
return nil, err
83
}
84
if interceptor == nil {
85
return srv.(StatsServiceServer).GetUserStats(ctx, in)
86
}
87
info := &grpc.UnaryServerInfo{
88
Server: srv,
89
FullMethod: "/gitpod.experimental.v1.StatsService/GetUserStats",
90
}
91
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
92
return srv.(StatsServiceServer).GetUserStats(ctx, req.(*GetUserStatsRequest))
93
}
94
return interceptor(ctx, in, info, handler)
95
}
96
97
// StatsService_ServiceDesc is the grpc.ServiceDesc for StatsService 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 StatsService_ServiceDesc = grpc.ServiceDesc{
101
ServiceName: "gitpod.experimental.v1.StatsService",
102
HandlerType: (*StatsServiceServer)(nil),
103
Methods: []grpc.MethodDesc{
104
{
105
MethodName: "GetUserStats",
106
Handler: _StatsService_GetUserStats_Handler,
107
},
108
},
109
Streams: []grpc.StreamDesc{},
110
Metadata: "gitpod/experimental/v1/stats.proto",
111
}
112
113