🎉 Initial Commit of Ring
This commit is contained in:
275
pkg/shared/proto/gen/leveling_grpc.pb.go
Normal file
275
pkg/shared/proto/gen/leveling_grpc.pb.go
Normal file
@@ -0,0 +1,275 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.0
|
||||
// - protoc v6.33.1
|
||||
// source: leveling.proto
|
||||
|
||||
package gen
|
||||
|
||||
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 (
|
||||
SocialCreditService_AddRecord_FullMethodName = "/proto.SocialCreditService/AddRecord"
|
||||
SocialCreditService_GetSocialCredit_FullMethodName = "/proto.SocialCreditService/GetSocialCredit"
|
||||
)
|
||||
|
||||
// SocialCreditServiceClient is the client API for SocialCreditService 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.
|
||||
//
|
||||
// SocialCreditService provides operations for managing social credit scores
|
||||
type SocialCreditServiceClient interface {
|
||||
// Adds a new social credit record for an account
|
||||
AddRecord(ctx context.Context, in *AddSocialCreditRecordRequest, opts ...grpc.CallOption) (*SocialCreditRecord, error)
|
||||
// Gets the current social credit score for an account
|
||||
GetSocialCredit(ctx context.Context, in *GetSocialCreditRequest, opts ...grpc.CallOption) (*SocialCreditResponse, error)
|
||||
}
|
||||
|
||||
type socialCreditServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSocialCreditServiceClient(cc grpc.ClientConnInterface) SocialCreditServiceClient {
|
||||
return &socialCreditServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *socialCreditServiceClient) AddRecord(ctx context.Context, in *AddSocialCreditRecordRequest, opts ...grpc.CallOption) (*SocialCreditRecord, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SocialCreditRecord)
|
||||
err := c.cc.Invoke(ctx, SocialCreditService_AddRecord_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *socialCreditServiceClient) GetSocialCredit(ctx context.Context, in *GetSocialCreditRequest, opts ...grpc.CallOption) (*SocialCreditResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SocialCreditResponse)
|
||||
err := c.cc.Invoke(ctx, SocialCreditService_GetSocialCredit_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SocialCreditServiceServer is the server API for SocialCreditService service.
|
||||
// All implementations must embed UnimplementedSocialCreditServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// SocialCreditService provides operations for managing social credit scores
|
||||
type SocialCreditServiceServer interface {
|
||||
// Adds a new social credit record for an account
|
||||
AddRecord(context.Context, *AddSocialCreditRecordRequest) (*SocialCreditRecord, error)
|
||||
// Gets the current social credit score for an account
|
||||
GetSocialCredit(context.Context, *GetSocialCreditRequest) (*SocialCreditResponse, error)
|
||||
mustEmbedUnimplementedSocialCreditServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedSocialCreditServiceServer 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 UnimplementedSocialCreditServiceServer struct{}
|
||||
|
||||
func (UnimplementedSocialCreditServiceServer) AddRecord(context.Context, *AddSocialCreditRecordRequest) (*SocialCreditRecord, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AddRecord not implemented")
|
||||
}
|
||||
func (UnimplementedSocialCreditServiceServer) GetSocialCredit(context.Context, *GetSocialCreditRequest) (*SocialCreditResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetSocialCredit not implemented")
|
||||
}
|
||||
func (UnimplementedSocialCreditServiceServer) mustEmbedUnimplementedSocialCreditServiceServer() {}
|
||||
func (UnimplementedSocialCreditServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSocialCreditServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SocialCreditServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSocialCreditServiceServer interface {
|
||||
mustEmbedUnimplementedSocialCreditServiceServer()
|
||||
}
|
||||
|
||||
func RegisterSocialCreditServiceServer(s grpc.ServiceRegistrar, srv SocialCreditServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedSocialCreditServiceServer 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(&SocialCreditService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _SocialCreditService_AddRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddSocialCreditRecordRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SocialCreditServiceServer).AddRecord(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: SocialCreditService_AddRecord_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SocialCreditServiceServer).AddRecord(ctx, req.(*AddSocialCreditRecordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SocialCreditService_GetSocialCredit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetSocialCreditRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SocialCreditServiceServer).GetSocialCredit(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: SocialCreditService_GetSocialCredit_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SocialCreditServiceServer).GetSocialCredit(ctx, req.(*GetSocialCreditRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// SocialCreditService_ServiceDesc is the grpc.ServiceDesc for SocialCreditService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var SocialCreditService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "proto.SocialCreditService",
|
||||
HandlerType: (*SocialCreditServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AddRecord",
|
||||
Handler: _SocialCreditService_AddRecord_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetSocialCredit",
|
||||
Handler: _SocialCreditService_GetSocialCredit_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "leveling.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
ExperienceService_AddRecord_FullMethodName = "/proto.ExperienceService/AddRecord"
|
||||
)
|
||||
|
||||
// ExperienceServiceClient is the client API for ExperienceService 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.
|
||||
//
|
||||
// ExperienceService provides operations for managing experience points
|
||||
type ExperienceServiceClient interface {
|
||||
// Adds a new experience record for an account
|
||||
AddRecord(ctx context.Context, in *AddExperienceRecordRequest, opts ...grpc.CallOption) (*ExperienceRecord, error)
|
||||
}
|
||||
|
||||
type experienceServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewExperienceServiceClient(cc grpc.ClientConnInterface) ExperienceServiceClient {
|
||||
return &experienceServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *experienceServiceClient) AddRecord(ctx context.Context, in *AddExperienceRecordRequest, opts ...grpc.CallOption) (*ExperienceRecord, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExperienceRecord)
|
||||
err := c.cc.Invoke(ctx, ExperienceService_AddRecord_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ExperienceServiceServer is the server API for ExperienceService service.
|
||||
// All implementations must embed UnimplementedExperienceServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// ExperienceService provides operations for managing experience points
|
||||
type ExperienceServiceServer interface {
|
||||
// Adds a new experience record for an account
|
||||
AddRecord(context.Context, *AddExperienceRecordRequest) (*ExperienceRecord, error)
|
||||
mustEmbedUnimplementedExperienceServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedExperienceServiceServer 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 UnimplementedExperienceServiceServer struct{}
|
||||
|
||||
func (UnimplementedExperienceServiceServer) AddRecord(context.Context, *AddExperienceRecordRequest) (*ExperienceRecord, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AddRecord not implemented")
|
||||
}
|
||||
func (UnimplementedExperienceServiceServer) mustEmbedUnimplementedExperienceServiceServer() {}
|
||||
func (UnimplementedExperienceServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeExperienceServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ExperienceServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeExperienceServiceServer interface {
|
||||
mustEmbedUnimplementedExperienceServiceServer()
|
||||
}
|
||||
|
||||
func RegisterExperienceServiceServer(s grpc.ServiceRegistrar, srv ExperienceServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedExperienceServiceServer 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(&ExperienceService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ExperienceService_AddRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddExperienceRecordRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ExperienceServiceServer).AddRecord(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ExperienceService_AddRecord_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ExperienceServiceServer).AddRecord(ctx, req.(*AddExperienceRecordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ExperienceService_ServiceDesc is the grpc.ServiceDesc for ExperienceService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ExperienceService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "proto.ExperienceService",
|
||||
HandlerType: (*ExperienceServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AddRecord",
|
||||
Handler: _ExperienceService_AddRecord_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "leveling.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user