278 lines
12 KiB
Go
278 lines
12 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v6.30.0--rc2
|
|
// source: protoFiles/orangeProto/server_visit.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 (
|
|
ServerVisitService_AddServerVisitRecode_FullMethodName = "/serverVisit.ServerVisitService/AddServerVisitRecode"
|
|
ServerVisitService_GetUserPoints_FullMethodName = "/serverVisit.ServerVisitService/GetUserPoints"
|
|
ServerVisitService_GetUserServerVisitLog_FullMethodName = "/serverVisit.ServerVisitService/GetUserServerVisitLog"
|
|
ServerVisitService_GetUserInfoByToken_FullMethodName = "/serverVisit.ServerVisitService/GetUserInfoByToken"
|
|
ServerVisitService_GetUserPointsRank_FullMethodName = "/serverVisit.ServerVisitService/GetUserPointsRank"
|
|
)
|
|
|
|
// ServerVisitServiceClient is the client API for ServerVisitService 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 ServerVisitServiceClient interface {
|
|
AddServerVisitRecode(ctx context.Context, in *ServerVisitRequest, opts ...grpc.CallOption) (*ServerVisitResponse, error)
|
|
GetUserPoints(ctx context.Context, in *UserPointsRequest, opts ...grpc.CallOption) (*UserPointsResponse, error)
|
|
GetUserServerVisitLog(ctx context.Context, in *UserServerVisitLogRequest, opts ...grpc.CallOption) (*UserServerVisitLogResponse, error)
|
|
GetUserInfoByToken(ctx context.Context, in *UserInfoByTokenRequest, opts ...grpc.CallOption) (*UserInfoByTokenResponse, error)
|
|
GetUserPointsRank(ctx context.Context, in *UserPointsRankRequest, opts ...grpc.CallOption) (*UserPointsRankResponse, error)
|
|
}
|
|
|
|
type serverVisitServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewServerVisitServiceClient(cc grpc.ClientConnInterface) ServerVisitServiceClient {
|
|
return &serverVisitServiceClient{cc}
|
|
}
|
|
|
|
func (c *serverVisitServiceClient) AddServerVisitRecode(ctx context.Context, in *ServerVisitRequest, opts ...grpc.CallOption) (*ServerVisitResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ServerVisitResponse)
|
|
err := c.cc.Invoke(ctx, ServerVisitService_AddServerVisitRecode_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *serverVisitServiceClient) GetUserPoints(ctx context.Context, in *UserPointsRequest, opts ...grpc.CallOption) (*UserPointsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserPointsResponse)
|
|
err := c.cc.Invoke(ctx, ServerVisitService_GetUserPoints_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *serverVisitServiceClient) GetUserServerVisitLog(ctx context.Context, in *UserServerVisitLogRequest, opts ...grpc.CallOption) (*UserServerVisitLogResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserServerVisitLogResponse)
|
|
err := c.cc.Invoke(ctx, ServerVisitService_GetUserServerVisitLog_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *serverVisitServiceClient) GetUserInfoByToken(ctx context.Context, in *UserInfoByTokenRequest, opts ...grpc.CallOption) (*UserInfoByTokenResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserInfoByTokenResponse)
|
|
err := c.cc.Invoke(ctx, ServerVisitService_GetUserInfoByToken_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *serverVisitServiceClient) GetUserPointsRank(ctx context.Context, in *UserPointsRankRequest, opts ...grpc.CallOption) (*UserPointsRankResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserPointsRankResponse)
|
|
err := c.cc.Invoke(ctx, ServerVisitService_GetUserPointsRank_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ServerVisitServiceServer is the server API for ServerVisitService service.
|
|
// All implementations must embed UnimplementedServerVisitServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// 定义服务
|
|
type ServerVisitServiceServer interface {
|
|
AddServerVisitRecode(context.Context, *ServerVisitRequest) (*ServerVisitResponse, error)
|
|
GetUserPoints(context.Context, *UserPointsRequest) (*UserPointsResponse, error)
|
|
GetUserServerVisitLog(context.Context, *UserServerVisitLogRequest) (*UserServerVisitLogResponse, error)
|
|
GetUserInfoByToken(context.Context, *UserInfoByTokenRequest) (*UserInfoByTokenResponse, error)
|
|
GetUserPointsRank(context.Context, *UserPointsRankRequest) (*UserPointsRankResponse, error)
|
|
mustEmbedUnimplementedServerVisitServiceServer()
|
|
}
|
|
|
|
// UnimplementedServerVisitServiceServer 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 UnimplementedServerVisitServiceServer struct{}
|
|
|
|
func (UnimplementedServerVisitServiceServer) AddServerVisitRecode(context.Context, *ServerVisitRequest) (*ServerVisitResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AddServerVisitRecode not implemented")
|
|
}
|
|
func (UnimplementedServerVisitServiceServer) GetUserPoints(context.Context, *UserPointsRequest) (*UserPointsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserPoints not implemented")
|
|
}
|
|
func (UnimplementedServerVisitServiceServer) GetUserServerVisitLog(context.Context, *UserServerVisitLogRequest) (*UserServerVisitLogResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserServerVisitLog not implemented")
|
|
}
|
|
func (UnimplementedServerVisitServiceServer) GetUserInfoByToken(context.Context, *UserInfoByTokenRequest) (*UserInfoByTokenResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserInfoByToken not implemented")
|
|
}
|
|
func (UnimplementedServerVisitServiceServer) GetUserPointsRank(context.Context, *UserPointsRankRequest) (*UserPointsRankResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserPointsRank not implemented")
|
|
}
|
|
func (UnimplementedServerVisitServiceServer) mustEmbedUnimplementedServerVisitServiceServer() {}
|
|
func (UnimplementedServerVisitServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeServerVisitServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ServerVisitServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeServerVisitServiceServer interface {
|
|
mustEmbedUnimplementedServerVisitServiceServer()
|
|
}
|
|
|
|
func RegisterServerVisitServiceServer(s grpc.ServiceRegistrar, srv ServerVisitServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedServerVisitServiceServer 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(&ServerVisitService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ServerVisitService_AddServerVisitRecode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ServerVisitRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ServerVisitServiceServer).AddServerVisitRecode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ServerVisitService_AddServerVisitRecode_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ServerVisitServiceServer).AddServerVisitRecode(ctx, req.(*ServerVisitRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ServerVisitService_GetUserPoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UserPointsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ServerVisitServiceServer).GetUserPoints(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ServerVisitService_GetUserPoints_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ServerVisitServiceServer).GetUserPoints(ctx, req.(*UserPointsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ServerVisitService_GetUserServerVisitLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UserServerVisitLogRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ServerVisitServiceServer).GetUserServerVisitLog(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ServerVisitService_GetUserServerVisitLog_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ServerVisitServiceServer).GetUserServerVisitLog(ctx, req.(*UserServerVisitLogRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ServerVisitService_GetUserInfoByToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UserInfoByTokenRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ServerVisitServiceServer).GetUserInfoByToken(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ServerVisitService_GetUserInfoByToken_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ServerVisitServiceServer).GetUserInfoByToken(ctx, req.(*UserInfoByTokenRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ServerVisitService_GetUserPointsRank_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UserPointsRankRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ServerVisitServiceServer).GetUserPointsRank(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ServerVisitService_GetUserPointsRank_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ServerVisitServiceServer).GetUserPointsRank(ctx, req.(*UserPointsRankRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ServerVisitService_ServiceDesc is the grpc.ServiceDesc for ServerVisitService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ServerVisitService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "serverVisit.ServerVisitService",
|
|
HandlerType: (*ServerVisitServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "AddServerVisitRecode",
|
|
Handler: _ServerVisitService_AddServerVisitRecode_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserPoints",
|
|
Handler: _ServerVisitService_GetUserPoints_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserServerVisitLog",
|
|
Handler: _ServerVisitService_GetUserServerVisitLog_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserInfoByToken",
|
|
Handler: _ServerVisitService_GetUserInfoByToken_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserPointsRank",
|
|
Handler: _ServerVisitService_GetUserPointsRank_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "protoFiles/orangeProto/server_visit.proto",
|
|
}
|