agones.dev/agones@v1.53.0/pkg/sdk/beta/beta_grpc.pb.go (about) 1 // Copyright 2024 Google LLC All Rights Reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // This code was autogenerated. Do not edit directly. 16 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 17 // versions: 18 // - protoc-gen-go-grpc v1.2.0 19 // - protoc v6.30.0 20 // source: beta.proto 21 22 package beta 23 24 import ( 25 context "context" 26 27 grpc "google.golang.org/grpc" 28 codes "google.golang.org/grpc/codes" 29 status "google.golang.org/grpc/status" 30 ) 31 32 // This is a compile-time assertion to ensure that this generated file 33 // is compatible with the grpc package it is being compiled against. 34 // Requires gRPC-Go v1.32.0 or later. 35 const _ = grpc.SupportPackageIsVersion7 36 37 // SDKClient is the client API for SDK service. 38 // 39 // 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. 40 type SDKClient interface { 41 // Gets a Counter. Returns NOT_FOUND if the Counter does not exist. 42 GetCounter(ctx context.Context, in *GetCounterRequest, opts ...grpc.CallOption) (*Counter, error) 43 // UpdateCounter returns the updated Counter. Returns NOT_FOUND if the Counter does not exist (name cannot be updated). 44 // Returns OUT_OF_RANGE if the Count is out of range [0,Capacity]. 45 UpdateCounter(ctx context.Context, in *UpdateCounterRequest, opts ...grpc.CallOption) (*Counter, error) 46 // Gets a List. Returns NOT_FOUND if the List does not exist. 47 GetList(ctx context.Context, in *GetListRequest, opts ...grpc.CallOption) (*List, error) 48 // UpdateList returns the updated List. Returns NOT_FOUND if the List does not exist (name cannot be updated). 49 // **THIS WILL OVERWRITE ALL EXISTING LIST.VALUES WITH ANY REQUEST LIST.VALUES** 50 // Use AddListValue() or RemoveListValue() for modifying the List.Values field. 51 // Returns INVALID_ARGUMENT if the field mask path(s) are not field(s) of the List. 52 // If a field mask path(s) is specified, but the value is not set in the request List object, 53 // then the default value for the variable will be set (i.e. 0 for "capacity", empty list for "values"). 54 UpdateList(ctx context.Context, in *UpdateListRequest, opts ...grpc.CallOption) (*List, error) 55 // Adds a value to a List and returns updated List. Returns NOT_FOUND if the List does not exist. 56 // Returns ALREADY_EXISTS if the value is already in the List. 57 // Returns OUT_OF_RANGE if the List is already at Capacity. 58 AddListValue(ctx context.Context, in *AddListValueRequest, opts ...grpc.CallOption) (*List, error) 59 // Removes a value from a List and returns updated List. Returns NOT_FOUND if the List does not exist. 60 // Returns NOT_FOUND if the value is not in the List. 61 RemoveListValue(ctx context.Context, in *RemoveListValueRequest, opts ...grpc.CallOption) (*List, error) 62 } 63 64 type sDKClient struct { 65 cc grpc.ClientConnInterface 66 } 67 68 func NewSDKClient(cc grpc.ClientConnInterface) SDKClient { 69 return &sDKClient{cc} 70 } 71 72 func (c *sDKClient) GetCounter(ctx context.Context, in *GetCounterRequest, opts ...grpc.CallOption) (*Counter, error) { 73 out := new(Counter) 74 err := c.cc.Invoke(ctx, "/agones.dev.sdk.beta.SDK/GetCounter", in, out, opts...) 75 if err != nil { 76 return nil, err 77 } 78 return out, nil 79 } 80 81 func (c *sDKClient) UpdateCounter(ctx context.Context, in *UpdateCounterRequest, opts ...grpc.CallOption) (*Counter, error) { 82 out := new(Counter) 83 err := c.cc.Invoke(ctx, "/agones.dev.sdk.beta.SDK/UpdateCounter", in, out, opts...) 84 if err != nil { 85 return nil, err 86 } 87 return out, nil 88 } 89 90 func (c *sDKClient) GetList(ctx context.Context, in *GetListRequest, opts ...grpc.CallOption) (*List, error) { 91 out := new(List) 92 err := c.cc.Invoke(ctx, "/agones.dev.sdk.beta.SDK/GetList", in, out, opts...) 93 if err != nil { 94 return nil, err 95 } 96 return out, nil 97 } 98 99 func (c *sDKClient) UpdateList(ctx context.Context, in *UpdateListRequest, opts ...grpc.CallOption) (*List, error) { 100 out := new(List) 101 err := c.cc.Invoke(ctx, "/agones.dev.sdk.beta.SDK/UpdateList", in, out, opts...) 102 if err != nil { 103 return nil, err 104 } 105 return out, nil 106 } 107 108 func (c *sDKClient) AddListValue(ctx context.Context, in *AddListValueRequest, opts ...grpc.CallOption) (*List, error) { 109 out := new(List) 110 err := c.cc.Invoke(ctx, "/agones.dev.sdk.beta.SDK/AddListValue", in, out, opts...) 111 if err != nil { 112 return nil, err 113 } 114 return out, nil 115 } 116 117 func (c *sDKClient) RemoveListValue(ctx context.Context, in *RemoveListValueRequest, opts ...grpc.CallOption) (*List, error) { 118 out := new(List) 119 err := c.cc.Invoke(ctx, "/agones.dev.sdk.beta.SDK/RemoveListValue", in, out, opts...) 120 if err != nil { 121 return nil, err 122 } 123 return out, nil 124 } 125 126 // SDKServer is the server API for SDK service. 127 // All implementations should embed UnimplementedSDKServer 128 // for forward compatibility 129 type SDKServer interface { 130 // Gets a Counter. Returns NOT_FOUND if the Counter does not exist. 131 GetCounter(context.Context, *GetCounterRequest) (*Counter, error) 132 // UpdateCounter returns the updated Counter. Returns NOT_FOUND if the Counter does not exist (name cannot be updated). 133 // Returns OUT_OF_RANGE if the Count is out of range [0,Capacity]. 134 UpdateCounter(context.Context, *UpdateCounterRequest) (*Counter, error) 135 // Gets a List. Returns NOT_FOUND if the List does not exist. 136 GetList(context.Context, *GetListRequest) (*List, error) 137 // UpdateList returns the updated List. Returns NOT_FOUND if the List does not exist (name cannot be updated). 138 // **THIS WILL OVERWRITE ALL EXISTING LIST.VALUES WITH ANY REQUEST LIST.VALUES** 139 // Use AddListValue() or RemoveListValue() for modifying the List.Values field. 140 // Returns INVALID_ARGUMENT if the field mask path(s) are not field(s) of the List. 141 // If a field mask path(s) is specified, but the value is not set in the request List object, 142 // then the default value for the variable will be set (i.e. 0 for "capacity", empty list for "values"). 143 UpdateList(context.Context, *UpdateListRequest) (*List, error) 144 // Adds a value to a List and returns updated List. Returns NOT_FOUND if the List does not exist. 145 // Returns ALREADY_EXISTS if the value is already in the List. 146 // Returns OUT_OF_RANGE if the List is already at Capacity. 147 AddListValue(context.Context, *AddListValueRequest) (*List, error) 148 // Removes a value from a List and returns updated List. Returns NOT_FOUND if the List does not exist. 149 // Returns NOT_FOUND if the value is not in the List. 150 RemoveListValue(context.Context, *RemoveListValueRequest) (*List, error) 151 } 152 153 // UnimplementedSDKServer should be embedded to have forward compatible implementations. 154 type UnimplementedSDKServer struct { 155 } 156 157 func (UnimplementedSDKServer) GetCounter(context.Context, *GetCounterRequest) (*Counter, error) { 158 return nil, status.Errorf(codes.Unimplemented, "method GetCounter not implemented") 159 } 160 func (UnimplementedSDKServer) UpdateCounter(context.Context, *UpdateCounterRequest) (*Counter, error) { 161 return nil, status.Errorf(codes.Unimplemented, "method UpdateCounter not implemented") 162 } 163 func (UnimplementedSDKServer) GetList(context.Context, *GetListRequest) (*List, error) { 164 return nil, status.Errorf(codes.Unimplemented, "method GetList not implemented") 165 } 166 func (UnimplementedSDKServer) UpdateList(context.Context, *UpdateListRequest) (*List, error) { 167 return nil, status.Errorf(codes.Unimplemented, "method UpdateList not implemented") 168 } 169 func (UnimplementedSDKServer) AddListValue(context.Context, *AddListValueRequest) (*List, error) { 170 return nil, status.Errorf(codes.Unimplemented, "method AddListValue not implemented") 171 } 172 func (UnimplementedSDKServer) RemoveListValue(context.Context, *RemoveListValueRequest) (*List, error) { 173 return nil, status.Errorf(codes.Unimplemented, "method RemoveListValue not implemented") 174 } 175 176 // UnsafeSDKServer may be embedded to opt out of forward compatibility for this service. 177 // Use of this interface is not recommended, as added methods to SDKServer will 178 // result in compilation errors. 179 type UnsafeSDKServer interface { 180 mustEmbedUnimplementedSDKServer() 181 } 182 183 func RegisterSDKServer(s grpc.ServiceRegistrar, srv SDKServer) { 184 s.RegisterService(&SDK_ServiceDesc, srv) 185 } 186 187 func _SDK_GetCounter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 188 in := new(GetCounterRequest) 189 if err := dec(in); err != nil { 190 return nil, err 191 } 192 if interceptor == nil { 193 return srv.(SDKServer).GetCounter(ctx, in) 194 } 195 info := &grpc.UnaryServerInfo{ 196 Server: srv, 197 FullMethod: "/agones.dev.sdk.beta.SDK/GetCounter", 198 } 199 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 200 return srv.(SDKServer).GetCounter(ctx, req.(*GetCounterRequest)) 201 } 202 return interceptor(ctx, in, info, handler) 203 } 204 205 func _SDK_UpdateCounter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 206 in := new(UpdateCounterRequest) 207 if err := dec(in); err != nil { 208 return nil, err 209 } 210 if interceptor == nil { 211 return srv.(SDKServer).UpdateCounter(ctx, in) 212 } 213 info := &grpc.UnaryServerInfo{ 214 Server: srv, 215 FullMethod: "/agones.dev.sdk.beta.SDK/UpdateCounter", 216 } 217 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 218 return srv.(SDKServer).UpdateCounter(ctx, req.(*UpdateCounterRequest)) 219 } 220 return interceptor(ctx, in, info, handler) 221 } 222 223 func _SDK_GetList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 224 in := new(GetListRequest) 225 if err := dec(in); err != nil { 226 return nil, err 227 } 228 if interceptor == nil { 229 return srv.(SDKServer).GetList(ctx, in) 230 } 231 info := &grpc.UnaryServerInfo{ 232 Server: srv, 233 FullMethod: "/agones.dev.sdk.beta.SDK/GetList", 234 } 235 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 236 return srv.(SDKServer).GetList(ctx, req.(*GetListRequest)) 237 } 238 return interceptor(ctx, in, info, handler) 239 } 240 241 func _SDK_UpdateList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 242 in := new(UpdateListRequest) 243 if err := dec(in); err != nil { 244 return nil, err 245 } 246 if interceptor == nil { 247 return srv.(SDKServer).UpdateList(ctx, in) 248 } 249 info := &grpc.UnaryServerInfo{ 250 Server: srv, 251 FullMethod: "/agones.dev.sdk.beta.SDK/UpdateList", 252 } 253 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 254 return srv.(SDKServer).UpdateList(ctx, req.(*UpdateListRequest)) 255 } 256 return interceptor(ctx, in, info, handler) 257 } 258 259 func _SDK_AddListValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 260 in := new(AddListValueRequest) 261 if err := dec(in); err != nil { 262 return nil, err 263 } 264 if interceptor == nil { 265 return srv.(SDKServer).AddListValue(ctx, in) 266 } 267 info := &grpc.UnaryServerInfo{ 268 Server: srv, 269 FullMethod: "/agones.dev.sdk.beta.SDK/AddListValue", 270 } 271 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 272 return srv.(SDKServer).AddListValue(ctx, req.(*AddListValueRequest)) 273 } 274 return interceptor(ctx, in, info, handler) 275 } 276 277 func _SDK_RemoveListValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 278 in := new(RemoveListValueRequest) 279 if err := dec(in); err != nil { 280 return nil, err 281 } 282 if interceptor == nil { 283 return srv.(SDKServer).RemoveListValue(ctx, in) 284 } 285 info := &grpc.UnaryServerInfo{ 286 Server: srv, 287 FullMethod: "/agones.dev.sdk.beta.SDK/RemoveListValue", 288 } 289 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 290 return srv.(SDKServer).RemoveListValue(ctx, req.(*RemoveListValueRequest)) 291 } 292 return interceptor(ctx, in, info, handler) 293 } 294 295 // SDK_ServiceDesc is the grpc.ServiceDesc for SDK service. 296 // It's only intended for direct use with grpc.RegisterService, 297 // and not to be introspected or modified (even as a copy) 298 var SDK_ServiceDesc = grpc.ServiceDesc{ 299 ServiceName: "agones.dev.sdk.beta.SDK", 300 HandlerType: (*SDKServer)(nil), 301 Methods: []grpc.MethodDesc{ 302 { 303 MethodName: "GetCounter", 304 Handler: _SDK_GetCounter_Handler, 305 }, 306 { 307 MethodName: "UpdateCounter", 308 Handler: _SDK_UpdateCounter_Handler, 309 }, 310 { 311 MethodName: "GetList", 312 Handler: _SDK_GetList_Handler, 313 }, 314 { 315 MethodName: "UpdateList", 316 Handler: _SDK_UpdateList_Handler, 317 }, 318 { 319 MethodName: "AddListValue", 320 Handler: _SDK_AddListValue_Handler, 321 }, 322 { 323 MethodName: "RemoveListValue", 324 Handler: _SDK_RemoveListValue_Handler, 325 }, 326 }, 327 Streams: []grpc.StreamDesc{}, 328 Metadata: "beta.proto", 329 }