✨ Third client query grpc endpoint
⬆️ Upgrade protobuf
This commit is contained in:
parent
7d1165b87b
commit
7dbb552dd2
24
.idea/workspace.xml
generated
24
.idea/workspace.xml
generated
@ -4,17 +4,17 @@
|
||||
<option name="autoReloadType" value="ALL" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":necktie: Limit max auth steps to 2 for normal users">
|
||||
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":recycle: Replace i18n services with nexus one">
|
||||
<change afterPath="$PROJECT_DIR$/pkg/internal/grpc/thrid_client.go" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/pkg/proto/third_client.proto" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/go.mod" beforeDir="false" afterPath="$PROJECT_DIR$/go.mod" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/go.sum" beforeDir="false" afterPath="$PROJECT_DIR$/go.sum" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/gap/server.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/gap/server.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/factors.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/factors.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/i18n.go" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/reports.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/reports.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/ticket.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/ticket.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/tokens.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/tokens.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/main.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/main.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/grpc/server.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/grpc/server.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/proto/notify.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/proto/notify.pb.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/proto/notify_grpc.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/proto/notify_grpc.pb.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/proto/realm.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/proto/realm.pb.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/proto/realm_grpc.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/proto/realm_grpc.pb.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/proto/record.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/proto/record.pb.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/proto/record_grpc.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/proto/record_grpc.pb.go" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -167,7 +167,6 @@
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<MESSAGE value=":sparkles: Better check in experience random algorithm" />
|
||||
<MESSAGE value=":sparkles: Better relationships stauts query" />
|
||||
<MESSAGE value=":truck: Move make friendship api" />
|
||||
<MESSAGE value=":boom: Move remove member api arguments from body to querystring just as messaging" />
|
||||
@ -192,7 +191,8 @@
|
||||
<MESSAGE value=":bug: Fix email html rendering" />
|
||||
<MESSAGE value=":sparkles: Register with preferred language" />
|
||||
<MESSAGE value=":necktie: Limit max auth steps to 2 for normal users" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value=":necktie: Limit max auth steps to 2 for normal users" />
|
||||
<MESSAGE value=":recycle: Replace i18n services with nexus one" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value=":recycle: Replace i18n services with nexus one" />
|
||||
<option name="GROUP_MULTIFILE_MERGE_BY_DIRECTORY" value="true" />
|
||||
</component>
|
||||
<component name="VgoProject">
|
||||
|
@ -20,6 +20,7 @@ type App struct {
|
||||
proto.UnimplementedRealmServiceServer
|
||||
proto.UnimplementedAuditServiceServer
|
||||
proto.UnimplementedNotifyServiceServer
|
||||
proto.UnimplementedThirdClientServiceServer
|
||||
health.UnimplementedHealthServer
|
||||
|
||||
srv *grpc.Server
|
||||
@ -36,6 +37,7 @@ func NewServer() *App {
|
||||
proto.RegisterNotifyServiceServer(server.srv, server)
|
||||
proto.RegisterRealmServiceServer(server.srv, server)
|
||||
proto.RegisterAuditServiceServer(server.srv, server)
|
||||
proto.RegisterThirdClientServiceServer(server.srv, server)
|
||||
health.RegisterHealthServer(server.srv, server)
|
||||
|
||||
reflection.Register(server.srv)
|
||||
|
31
pkg/internal/grpc/thrid_client.go
Normal file
31
pkg/internal/grpc/thrid_client.go
Normal file
@ -0,0 +1,31 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.solsynth.dev/hypernet/passport/pkg/authkit/models"
|
||||
"git.solsynth.dev/hypernet/passport/pkg/internal/database"
|
||||
"git.solsynth.dev/hypernet/passport/pkg/proto"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (v *App) GetThirdClient(ctx context.Context, request *proto.GetThirdClientRequest) (*proto.GetThirdClientResponse, error) {
|
||||
var client models.ThirdClient
|
||||
if err := database.C.Where("id = ?", request.ClientId).First(&client).Error; err != nil {
|
||||
return nil, status.Errorf(codes.NotFound, "requested client with id %d was not found", request.ClientId)
|
||||
}
|
||||
|
||||
if request.Secret != nil {
|
||||
if client.Secret != request.GetSecret() {
|
||||
return nil, status.Errorf(codes.PermissionDenied, "invalid secret")
|
||||
}
|
||||
}
|
||||
|
||||
return &proto.GetThirdClientResponse{
|
||||
Info: &proto.ThirdClientInfo{
|
||||
Id: uint64(client.ID),
|
||||
Name: client.Name,
|
||||
Description: client.Description,
|
||||
},
|
||||
}, nil
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.2
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v5.28.3
|
||||
// source: notify.proto
|
||||
|
||||
package proto
|
||||
@ -33,9 +33,11 @@ type NotifyInfoPayload struct {
|
||||
|
||||
func (x *NotifyInfoPayload) Reset() {
|
||||
*x = NotifyInfoPayload{}
|
||||
mi := &file_notify_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_notify_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NotifyInfoPayload) String() string {
|
||||
@ -46,7 +48,7 @@ func (*NotifyInfoPayload) ProtoMessage() {}
|
||||
|
||||
func (x *NotifyInfoPayload) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_notify_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -86,9 +88,11 @@ type NotifyUserRequest struct {
|
||||
|
||||
func (x *NotifyUserRequest) Reset() {
|
||||
*x = NotifyUserRequest{}
|
||||
mi := &file_notify_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_notify_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NotifyUserRequest) String() string {
|
||||
@ -99,7 +103,7 @@ func (*NotifyUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *NotifyUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_notify_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -139,9 +143,11 @@ type NotifyUserBatchRequest struct {
|
||||
|
||||
func (x *NotifyUserBatchRequest) Reset() {
|
||||
*x = NotifyUserBatchRequest{}
|
||||
mi := &file_notify_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_notify_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NotifyUserBatchRequest) String() string {
|
||||
@ -152,7 +158,7 @@ func (*NotifyUserBatchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *NotifyUserBatchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_notify_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -191,9 +197,11 @@ type NotifyResponse struct {
|
||||
|
||||
func (x *NotifyResponse) Reset() {
|
||||
*x = NotifyResponse{}
|
||||
mi := &file_notify_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_notify_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NotifyResponse) String() string {
|
||||
@ -204,7 +212,7 @@ func (*NotifyResponse) ProtoMessage() {}
|
||||
|
||||
func (x *NotifyResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_notify_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -281,7 +289,7 @@ func file_notify_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_notify_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_notify_proto_goTypes = []any{
|
||||
var file_notify_proto_goTypes = []interface{}{
|
||||
(*NotifyInfoPayload)(nil), // 0: proto.NotifyInfoPayload
|
||||
(*NotifyUserRequest)(nil), // 1: proto.NotifyUserRequest
|
||||
(*NotifyUserBatchRequest)(nil), // 2: proto.NotifyUserBatchRequest
|
||||
@ -308,6 +316,56 @@ func file_notify_proto_init() {
|
||||
if File_notify_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_notify_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NotifyInfoPayload); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_notify_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NotifyUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_notify_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NotifyUserBatchRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_notify_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NotifyResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.2
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v5.28.3
|
||||
// source: notify.proto
|
||||
|
||||
package proto
|
||||
@ -15,14 +15,8 @@ import (
|
||||
|
||||
// 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 (
|
||||
NotifyService_NotifyUser_FullMethodName = "/proto.NotifyService/NotifyUser"
|
||||
NotifyService_NotifyUserBatch_FullMethodName = "/proto.NotifyService/NotifyUserBatch"
|
||||
NotifyService_NotifyAllUser_FullMethodName = "/proto.NotifyService/NotifyAllUser"
|
||||
)
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// NotifyServiceClient is the client API for NotifyService service.
|
||||
//
|
||||
@ -42,9 +36,8 @@ func NewNotifyServiceClient(cc grpc.ClientConnInterface) NotifyServiceClient {
|
||||
}
|
||||
|
||||
func (c *notifyServiceClient) NotifyUser(ctx context.Context, in *NotifyUserRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(NotifyResponse)
|
||||
err := c.cc.Invoke(ctx, NotifyService_NotifyUser_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.NotifyService/NotifyUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -52,9 +45,8 @@ func (c *notifyServiceClient) NotifyUser(ctx context.Context, in *NotifyUserRequ
|
||||
}
|
||||
|
||||
func (c *notifyServiceClient) NotifyUserBatch(ctx context.Context, in *NotifyUserBatchRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(NotifyResponse)
|
||||
err := c.cc.Invoke(ctx, NotifyService_NotifyUserBatch_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.NotifyService/NotifyUserBatch", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -62,9 +54,8 @@ func (c *notifyServiceClient) NotifyUserBatch(ctx context.Context, in *NotifyUse
|
||||
}
|
||||
|
||||
func (c *notifyServiceClient) NotifyAllUser(ctx context.Context, in *NotifyInfoPayload, opts ...grpc.CallOption) (*NotifyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(NotifyResponse)
|
||||
err := c.cc.Invoke(ctx, NotifyService_NotifyAllUser_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.NotifyService/NotifyAllUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -73,7 +64,7 @@ func (c *notifyServiceClient) NotifyAllUser(ctx context.Context, in *NotifyInfoP
|
||||
|
||||
// NotifyServiceServer is the server API for NotifyService service.
|
||||
// All implementations must embed UnimplementedNotifyServiceServer
|
||||
// for forward compatibility.
|
||||
// for forward compatibility
|
||||
type NotifyServiceServer interface {
|
||||
NotifyUser(context.Context, *NotifyUserRequest) (*NotifyResponse, error)
|
||||
NotifyUserBatch(context.Context, *NotifyUserBatchRequest) (*NotifyResponse, error)
|
||||
@ -81,12 +72,9 @@ type NotifyServiceServer interface {
|
||||
mustEmbedUnimplementedNotifyServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedNotifyServiceServer 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 UnimplementedNotifyServiceServer struct{}
|
||||
// UnimplementedNotifyServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedNotifyServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedNotifyServiceServer) NotifyUser(context.Context, *NotifyUserRequest) (*NotifyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NotifyUser not implemented")
|
||||
@ -98,7 +86,6 @@ func (UnimplementedNotifyServiceServer) NotifyAllUser(context.Context, *NotifyIn
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NotifyAllUser not implemented")
|
||||
}
|
||||
func (UnimplementedNotifyServiceServer) mustEmbedUnimplementedNotifyServiceServer() {}
|
||||
func (UnimplementedNotifyServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeNotifyServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to NotifyServiceServer will
|
||||
@ -108,13 +95,6 @@ type UnsafeNotifyServiceServer interface {
|
||||
}
|
||||
|
||||
func RegisterNotifyServiceServer(s grpc.ServiceRegistrar, srv NotifyServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedNotifyServiceServer 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(&NotifyService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@ -128,7 +108,7 @@ func _NotifyService_NotifyUser_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotifyService_NotifyUser_FullMethodName,
|
||||
FullMethod: "/proto.NotifyService/NotifyUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotifyServiceServer).NotifyUser(ctx, req.(*NotifyUserRequest))
|
||||
@ -146,7 +126,7 @@ func _NotifyService_NotifyUserBatch_Handler(srv interface{}, ctx context.Context
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotifyService_NotifyUserBatch_FullMethodName,
|
||||
FullMethod: "/proto.NotifyService/NotifyUserBatch",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotifyServiceServer).NotifyUserBatch(ctx, req.(*NotifyUserBatchRequest))
|
||||
@ -164,7 +144,7 @@ func _NotifyService_NotifyAllUser_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotifyService_NotifyAllUser_FullMethodName,
|
||||
FullMethod: "/proto.NotifyService/NotifyAllUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotifyServiceServer).NotifyAllUser(ctx, req.(*NotifyInfoPayload))
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.2
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v5.28.3
|
||||
// source: realm.proto
|
||||
|
||||
package proto
|
||||
@ -38,9 +38,11 @@ type RealmInfo struct {
|
||||
|
||||
func (x *RealmInfo) Reset() {
|
||||
*x = RealmInfo{}
|
||||
mi := &file_realm_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RealmInfo) String() string {
|
||||
@ -51,7 +53,7 @@ func (*RealmInfo) ProtoMessage() {}
|
||||
|
||||
func (x *RealmInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -139,9 +141,11 @@ type ListRealmRequest struct {
|
||||
|
||||
func (x *ListRealmRequest) Reset() {
|
||||
*x = ListRealmRequest{}
|
||||
mi := &file_realm_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListRealmRequest) String() string {
|
||||
@ -152,7 +156,7 @@ func (*ListRealmRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListRealmRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -184,9 +188,11 @@ type LookupUserRealmRequest struct {
|
||||
|
||||
func (x *LookupUserRealmRequest) Reset() {
|
||||
*x = LookupUserRealmRequest{}
|
||||
mi := &file_realm_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LookupUserRealmRequest) String() string {
|
||||
@ -197,7 +203,7 @@ func (*LookupUserRealmRequest) ProtoMessage() {}
|
||||
|
||||
func (x *LookupUserRealmRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -232,9 +238,11 @@ type LookupRealmRequest struct {
|
||||
|
||||
func (x *LookupRealmRequest) Reset() {
|
||||
*x = LookupRealmRequest{}
|
||||
mi := &file_realm_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LookupRealmRequest) String() string {
|
||||
@ -245,7 +253,7 @@ func (*LookupRealmRequest) ProtoMessage() {}
|
||||
|
||||
func (x *LookupRealmRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -298,9 +306,11 @@ type ListRealmResponse struct {
|
||||
|
||||
func (x *ListRealmResponse) Reset() {
|
||||
*x = ListRealmResponse{}
|
||||
mi := &file_realm_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListRealmResponse) String() string {
|
||||
@ -311,7 +321,7 @@ func (*ListRealmResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListRealmResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -344,9 +354,11 @@ type RealmMemberLookupRequest struct {
|
||||
|
||||
func (x *RealmMemberLookupRequest) Reset() {
|
||||
*x = RealmMemberLookupRequest{}
|
||||
mi := &file_realm_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RealmMemberLookupRequest) String() string {
|
||||
@ -357,7 +369,7 @@ func (*RealmMemberLookupRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RealmMemberLookupRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -399,9 +411,11 @@ type RealmMemberInfo struct {
|
||||
|
||||
func (x *RealmMemberInfo) Reset() {
|
||||
*x = RealmMemberInfo{}
|
||||
mi := &file_realm_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RealmMemberInfo) String() string {
|
||||
@ -412,7 +426,7 @@ func (*RealmMemberInfo) ProtoMessage() {}
|
||||
|
||||
func (x *RealmMemberInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -465,9 +479,11 @@ type ListRealmMemberResponse struct {
|
||||
|
||||
func (x *ListRealmMemberResponse) Reset() {
|
||||
*x = ListRealmMemberResponse{}
|
||||
mi := &file_realm_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListRealmMemberResponse) String() string {
|
||||
@ -478,7 +494,7 @@ func (*ListRealmMemberResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListRealmMemberResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -512,9 +528,11 @@ type CheckRealmPermRequest struct {
|
||||
|
||||
func (x *CheckRealmPermRequest) Reset() {
|
||||
*x = CheckRealmPermRequest{}
|
||||
mi := &file_realm_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CheckRealmPermRequest) String() string {
|
||||
@ -525,7 +543,7 @@ func (*CheckRealmPermRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CheckRealmPermRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -571,9 +589,11 @@ type CheckRealmPermResponse struct {
|
||||
|
||||
func (x *CheckRealmPermResponse) Reset() {
|
||||
*x = CheckRealmPermResponse{}
|
||||
mi := &file_realm_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_realm_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CheckRealmPermResponse) String() string {
|
||||
@ -584,7 +604,7 @@ func (*CheckRealmPermResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CheckRealmPermResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_realm_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -728,7 +748,7 @@ func file_realm_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_realm_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_realm_proto_goTypes = []any{
|
||||
var file_realm_proto_goTypes = []interface{}{
|
||||
(*RealmInfo)(nil), // 0: proto.RealmInfo
|
||||
(*ListRealmRequest)(nil), // 1: proto.ListRealmRequest
|
||||
(*LookupUserRealmRequest)(nil), // 2: proto.LookupUserRealmRequest
|
||||
@ -769,8 +789,130 @@ func file_realm_proto_init() {
|
||||
if File_realm_proto != nil {
|
||||
return
|
||||
}
|
||||
file_realm_proto_msgTypes[3].OneofWrappers = []any{}
|
||||
file_realm_proto_msgTypes[5].OneofWrappers = []any{}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_realm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RealmInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListRealmRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LookupUserRealmRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LookupRealmRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListRealmResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RealmMemberLookupRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RealmMemberInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListRealmMemberResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CheckRealmPermRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CheckRealmPermResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_realm_proto_msgTypes[3].OneofWrappers = []interface{}{}
|
||||
file_realm_proto_msgTypes[5].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.2
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v5.28.3
|
||||
// source: realm.proto
|
||||
|
||||
package proto
|
||||
@ -15,18 +15,8 @@ import (
|
||||
|
||||
// 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 (
|
||||
RealmService_ListAvailableRealm_FullMethodName = "/proto.RealmService/ListAvailableRealm"
|
||||
RealmService_ListOwnedRealm_FullMethodName = "/proto.RealmService/ListOwnedRealm"
|
||||
RealmService_ListRealm_FullMethodName = "/proto.RealmService/ListRealm"
|
||||
RealmService_GetRealm_FullMethodName = "/proto.RealmService/GetRealm"
|
||||
RealmService_ListRealmMember_FullMethodName = "/proto.RealmService/ListRealmMember"
|
||||
RealmService_GetRealmMember_FullMethodName = "/proto.RealmService/GetRealmMember"
|
||||
RealmService_CheckRealmMemberPerm_FullMethodName = "/proto.RealmService/CheckRealmMemberPerm"
|
||||
)
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// RealmServiceClient is the client API for RealmService service.
|
||||
//
|
||||
@ -50,9 +40,8 @@ func NewRealmServiceClient(cc grpc.ClientConnInterface) RealmServiceClient {
|
||||
}
|
||||
|
||||
func (c *realmServiceClient) ListAvailableRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListRealmResponse)
|
||||
err := c.cc.Invoke(ctx, RealmService_ListAvailableRealm_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.RealmService/ListAvailableRealm", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -60,9 +49,8 @@ func (c *realmServiceClient) ListAvailableRealm(ctx context.Context, in *LookupU
|
||||
}
|
||||
|
||||
func (c *realmServiceClient) ListOwnedRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListRealmResponse)
|
||||
err := c.cc.Invoke(ctx, RealmService_ListOwnedRealm_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.RealmService/ListOwnedRealm", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -70,9 +58,8 @@ func (c *realmServiceClient) ListOwnedRealm(ctx context.Context, in *LookupUserR
|
||||
}
|
||||
|
||||
func (c *realmServiceClient) ListRealm(ctx context.Context, in *ListRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListRealmResponse)
|
||||
err := c.cc.Invoke(ctx, RealmService_ListRealm_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.RealmService/ListRealm", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -80,9 +67,8 @@ func (c *realmServiceClient) ListRealm(ctx context.Context, in *ListRealmRequest
|
||||
}
|
||||
|
||||
func (c *realmServiceClient) GetRealm(ctx context.Context, in *LookupRealmRequest, opts ...grpc.CallOption) (*RealmInfo, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RealmInfo)
|
||||
err := c.cc.Invoke(ctx, RealmService_GetRealm_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.RealmService/GetRealm", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -90,9 +76,8 @@ func (c *realmServiceClient) GetRealm(ctx context.Context, in *LookupRealmReques
|
||||
}
|
||||
|
||||
func (c *realmServiceClient) ListRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*ListRealmMemberResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListRealmMemberResponse)
|
||||
err := c.cc.Invoke(ctx, RealmService_ListRealmMember_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.RealmService/ListRealmMember", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -100,9 +85,8 @@ func (c *realmServiceClient) ListRealmMember(ctx context.Context, in *RealmMembe
|
||||
}
|
||||
|
||||
func (c *realmServiceClient) GetRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*RealmMemberInfo, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RealmMemberInfo)
|
||||
err := c.cc.Invoke(ctx, RealmService_GetRealmMember_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.RealmService/GetRealmMember", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -110,9 +94,8 @@ func (c *realmServiceClient) GetRealmMember(ctx context.Context, in *RealmMember
|
||||
}
|
||||
|
||||
func (c *realmServiceClient) CheckRealmMemberPerm(ctx context.Context, in *CheckRealmPermRequest, opts ...grpc.CallOption) (*CheckRealmPermResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CheckRealmPermResponse)
|
||||
err := c.cc.Invoke(ctx, RealmService_CheckRealmMemberPerm_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.RealmService/CheckRealmMemberPerm", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -121,7 +104,7 @@ func (c *realmServiceClient) CheckRealmMemberPerm(ctx context.Context, in *Check
|
||||
|
||||
// RealmServiceServer is the server API for RealmService service.
|
||||
// All implementations must embed UnimplementedRealmServiceServer
|
||||
// for forward compatibility.
|
||||
// for forward compatibility
|
||||
type RealmServiceServer interface {
|
||||
ListAvailableRealm(context.Context, *LookupUserRealmRequest) (*ListRealmResponse, error)
|
||||
ListOwnedRealm(context.Context, *LookupUserRealmRequest) (*ListRealmResponse, error)
|
||||
@ -133,12 +116,9 @@ type RealmServiceServer interface {
|
||||
mustEmbedUnimplementedRealmServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedRealmServiceServer 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 UnimplementedRealmServiceServer struct{}
|
||||
// UnimplementedRealmServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRealmServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRealmServiceServer) ListAvailableRealm(context.Context, *LookupUserRealmRequest) (*ListRealmResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListAvailableRealm not implemented")
|
||||
@ -162,7 +142,6 @@ func (UnimplementedRealmServiceServer) CheckRealmMemberPerm(context.Context, *Ch
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CheckRealmMemberPerm not implemented")
|
||||
}
|
||||
func (UnimplementedRealmServiceServer) mustEmbedUnimplementedRealmServiceServer() {}
|
||||
func (UnimplementedRealmServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeRealmServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RealmServiceServer will
|
||||
@ -172,13 +151,6 @@ type UnsafeRealmServiceServer interface {
|
||||
}
|
||||
|
||||
func RegisterRealmServiceServer(s grpc.ServiceRegistrar, srv RealmServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedRealmServiceServer 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(&RealmService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@ -192,7 +164,7 @@ func _RealmService_ListAvailableRealm_Handler(srv interface{}, ctx context.Conte
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RealmService_ListAvailableRealm_FullMethodName,
|
||||
FullMethod: "/proto.RealmService/ListAvailableRealm",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RealmServiceServer).ListAvailableRealm(ctx, req.(*LookupUserRealmRequest))
|
||||
@ -210,7 +182,7 @@ func _RealmService_ListOwnedRealm_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RealmService_ListOwnedRealm_FullMethodName,
|
||||
FullMethod: "/proto.RealmService/ListOwnedRealm",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RealmServiceServer).ListOwnedRealm(ctx, req.(*LookupUserRealmRequest))
|
||||
@ -228,7 +200,7 @@ func _RealmService_ListRealm_Handler(srv interface{}, ctx context.Context, dec f
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RealmService_ListRealm_FullMethodName,
|
||||
FullMethod: "/proto.RealmService/ListRealm",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RealmServiceServer).ListRealm(ctx, req.(*ListRealmRequest))
|
||||
@ -246,7 +218,7 @@ func _RealmService_GetRealm_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RealmService_GetRealm_FullMethodName,
|
||||
FullMethod: "/proto.RealmService/GetRealm",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RealmServiceServer).GetRealm(ctx, req.(*LookupRealmRequest))
|
||||
@ -264,7 +236,7 @@ func _RealmService_ListRealmMember_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RealmService_ListRealmMember_FullMethodName,
|
||||
FullMethod: "/proto.RealmService/ListRealmMember",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RealmServiceServer).ListRealmMember(ctx, req.(*RealmMemberLookupRequest))
|
||||
@ -282,7 +254,7 @@ func _RealmService_GetRealmMember_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RealmService_GetRealmMember_FullMethodName,
|
||||
FullMethod: "/proto.RealmService/GetRealmMember",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RealmServiceServer).GetRealmMember(ctx, req.(*RealmMemberLookupRequest))
|
||||
@ -300,7 +272,7 @@ func _RealmService_CheckRealmMemberPerm_Handler(srv interface{}, ctx context.Con
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RealmService_CheckRealmMemberPerm_FullMethodName,
|
||||
FullMethod: "/proto.RealmService/CheckRealmMemberPerm",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RealmServiceServer).CheckRealmMemberPerm(ctx, req.(*CheckRealmPermRequest))
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.2
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v5.28.3
|
||||
// source: record.proto
|
||||
|
||||
package proto
|
||||
@ -34,9 +34,11 @@ type RecordEventRequest struct {
|
||||
|
||||
func (x *RecordEventRequest) Reset() {
|
||||
*x = RecordEventRequest{}
|
||||
mi := &file_record_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_record_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RecordEventRequest) String() string {
|
||||
@ -47,7 +49,7 @@ func (*RecordEventRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RecordEventRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_record_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -107,9 +109,11 @@ type RecordEventResponse struct {
|
||||
|
||||
func (x *RecordEventResponse) Reset() {
|
||||
*x = RecordEventResponse{}
|
||||
mi := &file_record_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_record_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RecordEventResponse) String() string {
|
||||
@ -120,7 +124,7 @@ func (*RecordEventResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RecordEventResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_record_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -181,7 +185,7 @@ func file_record_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_record_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_record_proto_goTypes = []any{
|
||||
var file_record_proto_goTypes = []interface{}{
|
||||
(*RecordEventRequest)(nil), // 0: proto.RecordEventRequest
|
||||
(*RecordEventResponse)(nil), // 1: proto.RecordEventResponse
|
||||
}
|
||||
@ -200,6 +204,32 @@ func file_record_proto_init() {
|
||||
if File_record_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_record_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RecordEventRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_record_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RecordEventResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.2
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v5.28.3
|
||||
// source: record.proto
|
||||
|
||||
package proto
|
||||
@ -15,12 +15,8 @@ import (
|
||||
|
||||
// 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 (
|
||||
AuditService_RecordEvent_FullMethodName = "/proto.AuditService/RecordEvent"
|
||||
)
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// AuditServiceClient is the client API for AuditService service.
|
||||
//
|
||||
@ -38,9 +34,8 @@ func NewAuditServiceClient(cc grpc.ClientConnInterface) AuditServiceClient {
|
||||
}
|
||||
|
||||
func (c *auditServiceClient) RecordEvent(ctx context.Context, in *RecordEventRequest, opts ...grpc.CallOption) (*RecordEventResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RecordEventResponse)
|
||||
err := c.cc.Invoke(ctx, AuditService_RecordEvent_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, "/proto.AuditService/RecordEvent", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -49,24 +44,20 @@ func (c *auditServiceClient) RecordEvent(ctx context.Context, in *RecordEventReq
|
||||
|
||||
// AuditServiceServer is the server API for AuditService service.
|
||||
// All implementations must embed UnimplementedAuditServiceServer
|
||||
// for forward compatibility.
|
||||
// for forward compatibility
|
||||
type AuditServiceServer interface {
|
||||
RecordEvent(context.Context, *RecordEventRequest) (*RecordEventResponse, error)
|
||||
mustEmbedUnimplementedAuditServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedAuditServiceServer 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 UnimplementedAuditServiceServer struct{}
|
||||
// UnimplementedAuditServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedAuditServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedAuditServiceServer) RecordEvent(context.Context, *RecordEventRequest) (*RecordEventResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RecordEvent not implemented")
|
||||
}
|
||||
func (UnimplementedAuditServiceServer) mustEmbedUnimplementedAuditServiceServer() {}
|
||||
func (UnimplementedAuditServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAuditServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AuditServiceServer will
|
||||
@ -76,13 +67,6 @@ type UnsafeAuditServiceServer interface {
|
||||
}
|
||||
|
||||
func RegisterAuditServiceServer(s grpc.ServiceRegistrar, srv AuditServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedAuditServiceServer 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(&AuditService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@ -96,7 +80,7 @@ func _AuditService_RecordEvent_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuditService_RecordEvent_FullMethodName,
|
||||
FullMethod: "/proto.AuditService/RecordEvent",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuditServiceServer).RecordEvent(ctx, req.(*RecordEventRequest))
|
||||
|
310
pkg/proto/third_client.pb.go
Normal file
310
pkg/proto/third_client.pb.go
Normal file
@ -0,0 +1,310 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v5.28.3
|
||||
// source: third_client.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ThirdClientInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ThirdClientInfo) Reset() {
|
||||
*x = ThirdClientInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_third_client_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ThirdClientInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ThirdClientInfo) ProtoMessage() {}
|
||||
|
||||
func (x *ThirdClientInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_third_client_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ThirdClientInfo.ProtoReflect.Descriptor instead.
|
||||
func (*ThirdClientInfo) Descriptor() ([]byte, []int) {
|
||||
return file_third_client_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ThirdClientInfo) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ThirdClientInfo) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ThirdClientInfo) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetThirdClientRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ClientId uint64 `protobuf:"varint,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
Secret *string `protobuf:"bytes,2,opt,name=secret,proto3,oneof" json:"secret,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetThirdClientRequest) Reset() {
|
||||
*x = GetThirdClientRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_third_client_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetThirdClientRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetThirdClientRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetThirdClientRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_third_client_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetThirdClientRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetThirdClientRequest) Descriptor() ([]byte, []int) {
|
||||
return file_third_client_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetThirdClientRequest) GetClientId() uint64 {
|
||||
if x != nil {
|
||||
return x.ClientId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetThirdClientRequest) GetSecret() string {
|
||||
if x != nil && x.Secret != nil {
|
||||
return *x.Secret
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetThirdClientResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Info *ThirdClientInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetThirdClientResponse) Reset() {
|
||||
*x = GetThirdClientResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_third_client_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetThirdClientResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetThirdClientResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetThirdClientResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_third_client_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetThirdClientResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetThirdClientResponse) Descriptor() ([]byte, []int) {
|
||||
return file_third_client_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetThirdClientResponse) GetInfo() *ThirdClientInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_third_client_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_third_client_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x74, 0x68, 0x69, 0x72, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0f, 0x54,
|
||||
0x68, 0x69, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x68, 0x69, 0x72, 0x64,
|
||||
0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a,
|
||||
0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
||||
0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x65,
|
||||
0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x65,
|
||||
0x63, 0x72, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x65, 0x63, 0x72,
|
||||
0x65, 0x74, 0x22, 0x44, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x68, 0x69, 0x72, 0x64, 0x43, 0x6c,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04,
|
||||
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x2e, 0x54, 0x68, 0x69, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x32, 0x65, 0x0a, 0x12, 0x54, 0x68, 0x69, 0x72,
|
||||
0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f,
|
||||
0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x69, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
|
||||
0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x69, 0x72,
|
||||
0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x69, 0x72, 0x64, 0x43,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
|
||||
0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_third_client_proto_rawDescOnce sync.Once
|
||||
file_third_client_proto_rawDescData = file_third_client_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_third_client_proto_rawDescGZIP() []byte {
|
||||
file_third_client_proto_rawDescOnce.Do(func() {
|
||||
file_third_client_proto_rawDescData = protoimpl.X.CompressGZIP(file_third_client_proto_rawDescData)
|
||||
})
|
||||
return file_third_client_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_third_client_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_third_client_proto_goTypes = []interface{}{
|
||||
(*ThirdClientInfo)(nil), // 0: proto.ThirdClientInfo
|
||||
(*GetThirdClientRequest)(nil), // 1: proto.GetThirdClientRequest
|
||||
(*GetThirdClientResponse)(nil), // 2: proto.GetThirdClientResponse
|
||||
}
|
||||
var file_third_client_proto_depIdxs = []int32{
|
||||
0, // 0: proto.GetThirdClientResponse.info:type_name -> proto.ThirdClientInfo
|
||||
1, // 1: proto.ThirdClientService.GetThirdClient:input_type -> proto.GetThirdClientRequest
|
||||
2, // 2: proto.ThirdClientService.GetThirdClient:output_type -> proto.GetThirdClientResponse
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_third_client_proto_init() }
|
||||
func file_third_client_proto_init() {
|
||||
if File_third_client_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_third_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ThirdClientInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_third_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetThirdClientRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_third_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetThirdClientResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_third_client_proto_msgTypes[1].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_third_client_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_third_client_proto_goTypes,
|
||||
DependencyIndexes: file_third_client_proto_depIdxs,
|
||||
MessageInfos: file_third_client_proto_msgTypes,
|
||||
}.Build()
|
||||
File_third_client_proto = out.File
|
||||
file_third_client_proto_rawDesc = nil
|
||||
file_third_client_proto_goTypes = nil
|
||||
file_third_client_proto_depIdxs = nil
|
||||
}
|
24
pkg/proto/third_client.proto
Normal file
24
pkg/proto/third_client.proto
Normal file
@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = ".;proto";
|
||||
|
||||
package proto;
|
||||
|
||||
service ThirdClientService {
|
||||
rpc GetThirdClient(GetThirdClientRequest) returns (GetThirdClientResponse) {}
|
||||
}
|
||||
|
||||
message ThirdClientInfo {
|
||||
uint64 id = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
}
|
||||
|
||||
message GetThirdClientRequest {
|
||||
uint64 client_id = 1;
|
||||
optional string secret = 2;
|
||||
}
|
||||
|
||||
message GetThirdClientResponse {
|
||||
ThirdClientInfo info = 1;
|
||||
}
|
105
pkg/proto/third_client_grpc.pb.go
Normal file
105
pkg/proto/third_client_grpc.pb.go
Normal file
@ -0,0 +1,105 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v5.28.3
|
||||
// source: third_client.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.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// ThirdClientServiceClient is the client API for ThirdClientService 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 ThirdClientServiceClient interface {
|
||||
GetThirdClient(ctx context.Context, in *GetThirdClientRequest, opts ...grpc.CallOption) (*GetThirdClientResponse, error)
|
||||
}
|
||||
|
||||
type thirdClientServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewThirdClientServiceClient(cc grpc.ClientConnInterface) ThirdClientServiceClient {
|
||||
return &thirdClientServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *thirdClientServiceClient) GetThirdClient(ctx context.Context, in *GetThirdClientRequest, opts ...grpc.CallOption) (*GetThirdClientResponse, error) {
|
||||
out := new(GetThirdClientResponse)
|
||||
err := c.cc.Invoke(ctx, "/proto.ThirdClientService/GetThirdClient", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ThirdClientServiceServer is the server API for ThirdClientService service.
|
||||
// All implementations must embed UnimplementedThirdClientServiceServer
|
||||
// for forward compatibility
|
||||
type ThirdClientServiceServer interface {
|
||||
GetThirdClient(context.Context, *GetThirdClientRequest) (*GetThirdClientResponse, error)
|
||||
mustEmbedUnimplementedThirdClientServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedThirdClientServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedThirdClientServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedThirdClientServiceServer) GetThirdClient(context.Context, *GetThirdClientRequest) (*GetThirdClientResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetThirdClient not implemented")
|
||||
}
|
||||
func (UnimplementedThirdClientServiceServer) mustEmbedUnimplementedThirdClientServiceServer() {}
|
||||
|
||||
// UnsafeThirdClientServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ThirdClientServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeThirdClientServiceServer interface {
|
||||
mustEmbedUnimplementedThirdClientServiceServer()
|
||||
}
|
||||
|
||||
func RegisterThirdClientServiceServer(s grpc.ServiceRegistrar, srv ThirdClientServiceServer) {
|
||||
s.RegisterService(&ThirdClientService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ThirdClientService_GetThirdClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetThirdClientRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ThirdClientServiceServer).GetThirdClient(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.ThirdClientService/GetThirdClient",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ThirdClientServiceServer).GetThirdClient(ctx, req.(*GetThirdClientRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ThirdClientService_ServiceDesc is the grpc.ServiceDesc for ThirdClientService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ThirdClientService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "proto.ThirdClientService",
|
||||
HandlerType: (*ThirdClientServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetThirdClient",
|
||||
Handler: _ThirdClientService_GetThirdClient_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "third_client.proto",
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user