Compare commits
4 Commits
427fca7ed1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 0ca8a0ccbb | |||
| 5a0f4b71d4 | |||
| 44ebbe4449 | |||
| 5dc5391b07 |
@@ -37,6 +37,10 @@ func GetClient() *Client {
|
|||||||
return instance
|
return instance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Client) Raw() *clientv3.Client {
|
||||||
|
return c.cli
|
||||||
|
}
|
||||||
|
|
||||||
// Get 获取数据
|
// Get 获取数据
|
||||||
func (c *Client) Get(key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) {
|
func (c *Client) Get(key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
||||||
|
|||||||
@@ -32,13 +32,13 @@ var (
|
|||||||
// ServiceProvider 服务提供者
|
// ServiceProvider 服务提供者
|
||||||
type ServiceProvider struct {
|
type ServiceProvider struct {
|
||||||
Target string
|
Target string
|
||||||
SID string
|
SID int64
|
||||||
Addr string
|
Addr string
|
||||||
}
|
}
|
||||||
|
|
||||||
// InstanceProvider 副本提供者
|
// InstanceProvider 副本提供者
|
||||||
type InstanceProvider struct {
|
type InstanceProvider struct {
|
||||||
InstanceID int // 副本ID
|
InstanceID int // 副本ID
|
||||||
UniqueNo string // 副本唯一编号
|
UniqueNo int64 // 副本唯一编号
|
||||||
SID string
|
SID int64
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/db/etcd"
|
"git.hlsq.asia/mmorpg/service-common/db/etcd"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
@@ -12,8 +13,8 @@ import (
|
|||||||
// 大量读少量写的情况下,读写锁比同步Map更高效
|
// 大量读少量写的情况下,读写锁比同步Map更高效
|
||||||
var (
|
var (
|
||||||
instanceMU = sync.RWMutex{}
|
instanceMU = sync.RWMutex{}
|
||||||
instanceM = make(map[string]string) // [uniqueNo]sid
|
instanceM = make(map[int64]int64) // [uniqueNo]sid
|
||||||
instanceLeaseM = make(map[string]clientv3.LeaseID) // [uniqueNo]
|
instanceLeaseM = make(map[int64]clientv3.LeaseID) // [uniqueNo]
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -22,7 +23,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FindInstanceByUniqueNo 根据唯一标识查询副本
|
// FindInstanceByUniqueNo 根据唯一标识查询副本
|
||||||
func FindInstanceByUniqueNo(uniqueNO string) (sid string) {
|
func FindInstanceByUniqueNo(uniqueNO int64) (sid int64) {
|
||||||
instanceMU.RLock()
|
instanceMU.RLock()
|
||||||
defer instanceMU.RUnlock()
|
defer instanceMU.RUnlock()
|
||||||
if c, ok := instanceM[uniqueNO]; ok {
|
if c, ok := instanceM[uniqueNO]; ok {
|
||||||
@@ -32,7 +33,7 @@ func FindInstanceByUniqueNo(uniqueNO string) (sid string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RegisterInstance 注册副本
|
// RegisterInstance 注册副本
|
||||||
func RegisterInstance(sid string, instanceID int32, uniqueNo string, ttl int64) error {
|
func RegisterInstance(sid int64, instanceID int32, uniqueNo int64, ttl int64) error {
|
||||||
serverMU.Lock()
|
serverMU.Lock()
|
||||||
defer serverMU.Unlock()
|
defer serverMU.Unlock()
|
||||||
leaseID, err := common.NewLeaseAndKeepAlive(ttl)
|
leaseID, err := common.NewLeaseAndKeepAlive(ttl)
|
||||||
@@ -40,7 +41,7 @@ func RegisterInstance(sid string, instanceID int32, uniqueNo string, ttl int64)
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
key := fmt.Sprintf("%v/%v/%v", common.KeyDiscoverInstance, instanceID, uniqueNo)
|
key := fmt.Sprintf("%v/%v/%v", common.KeyDiscoverInstance, instanceID, uniqueNo)
|
||||||
_, err = etcd.GetClient().Put(key, sid, clientv3.WithLease(leaseID))
|
_, err = etcd.GetClient().Put(key, utils.Int64ToString(sid), clientv3.WithLease(leaseID))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -49,7 +50,7 @@ func RegisterInstance(sid string, instanceID int32, uniqueNo string, ttl int64)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UnRegisterInstance 解注册副本
|
// UnRegisterInstance 解注册副本
|
||||||
func UnRegisterInstance(uniqueNo string) {
|
func UnRegisterInstance(uniqueNo int64) {
|
||||||
serverMU.Lock()
|
serverMU.Lock()
|
||||||
defer serverMU.Unlock()
|
defer serverMU.Unlock()
|
||||||
if leaseID, ok := instanceLeaseM[uniqueNo]; ok {
|
if leaseID, ok := instanceLeaseM[uniqueNo]; ok {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/db/etcd"
|
"git.hlsq.asia/mmorpg/service-common/db/etcd"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
"go.etcd.io/etcd/api/v3/mvccpb"
|
"go.etcd.io/etcd/api/v3/mvccpb"
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -89,13 +90,13 @@ func onServerChange(t mvccpb.Event_EventType, key, value string) {
|
|||||||
case clientv3.EventTypePut:
|
case clientv3.EventTypePut:
|
||||||
onCBByType(common.ListenerTypeNewServer, &common.ServiceProvider{
|
onCBByType(common.ListenerTypeNewServer, &common.ServiceProvider{
|
||||||
Target: common.KeyDiscoverService + "/" + split[2],
|
Target: common.KeyDiscoverService + "/" + split[2],
|
||||||
SID: split[3],
|
SID: utils.StringToInt64(split[3]),
|
||||||
Addr: value,
|
Addr: value,
|
||||||
})
|
})
|
||||||
case clientv3.EventTypeDelete:
|
case clientv3.EventTypeDelete:
|
||||||
onCBByType(common.ListenerTypeCloseServer, &common.ServiceProvider{
|
onCBByType(common.ListenerTypeCloseServer, &common.ServiceProvider{
|
||||||
Target: common.KeyDiscoverService + "/" + split[2],
|
Target: common.KeyDiscoverService + "/" + split[2],
|
||||||
SID: split[3],
|
SID: utils.StringToInt64(split[3]),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,14 +112,14 @@ func onInstanceChange(t mvccpb.Event_EventType, key, value string, preKv *mvccpb
|
|||||||
case clientv3.EventTypePut:
|
case clientv3.EventTypePut:
|
||||||
onCBByType(common.ListenerTypeNewInstance, &common.InstanceProvider{
|
onCBByType(common.ListenerTypeNewInstance, &common.InstanceProvider{
|
||||||
InstanceID: instanceID,
|
InstanceID: instanceID,
|
||||||
UniqueNo: split[3],
|
UniqueNo: utils.StringToInt64(split[3]),
|
||||||
SID: value,
|
SID: utils.StringToInt64(value),
|
||||||
})
|
})
|
||||||
case clientv3.EventTypeDelete:
|
case clientv3.EventTypeDelete:
|
||||||
onCBByType(common.ListenerTypeCloseInstance, &common.InstanceProvider{
|
onCBByType(common.ListenerTypeCloseInstance, &common.InstanceProvider{
|
||||||
InstanceID: instanceID,
|
InstanceID: instanceID,
|
||||||
UniqueNo: split[3],
|
UniqueNo: utils.StringToInt64(split[3]),
|
||||||
SID: string(preKv.Value),
|
SID: utils.StringToInt64(string(preKv.Value)),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
serverMU = sync.RWMutex{}
|
serverMU = sync.RWMutex{}
|
||||||
conn = make(map[string]*grpc_conn.GrpcConnectionMgr)
|
conn = make(map[string]*grpc_conn.GrpcConnectionMgr)
|
||||||
serverLeaseM = make(map[string]clientv3.LeaseID)
|
serverLeaseM = make(map[int64]clientv3.LeaseID)
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -24,7 +24,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FindServer 根据SID或随机查找服务
|
// FindServer 根据SID或随机查找服务
|
||||||
func FindServer(target string, sid ...string) (*grpc.ClientConn, error) {
|
func FindServer(target string, sid ...int64) (*grpc.ClientConn, error) {
|
||||||
serverMU.RLock()
|
serverMU.RLock()
|
||||||
defer serverMU.RUnlock()
|
defer serverMU.RUnlock()
|
||||||
if v, ok := conn[target]; ok {
|
if v, ok := conn[target]; ok {
|
||||||
@@ -33,17 +33,17 @@ func FindServer(target string, sid ...string) (*grpc.ClientConn, error) {
|
|||||||
return nil, fmt.Errorf("cannot find server")
|
return nil, fmt.Errorf("cannot find server")
|
||||||
}
|
}
|
||||||
|
|
||||||
func FindServerAll(target string) map[string]*grpc.ClientConn {
|
func FindServerAll(target string) map[int64]*grpc.ClientConn {
|
||||||
serverMU.RLock()
|
serverMU.RLock()
|
||||||
defer serverMU.RUnlock()
|
defer serverMU.RUnlock()
|
||||||
if v, ok := conn[target]; ok {
|
if v, ok := conn[target]; ok {
|
||||||
return v.LoadAll()
|
return v.LoadAll()
|
||||||
}
|
}
|
||||||
return make(map[string]*grpc.ClientConn)
|
return make(map[int64]*grpc.ClientConn)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterGrpcServer 注册服务提供者
|
// RegisterGrpcServer 注册服务提供者
|
||||||
func RegisterGrpcServer(target string, sid string, addr string, ttl int64) error {
|
func RegisterGrpcServer(target string, sid int64, addr string, ttl int64) error {
|
||||||
serverMU.Lock()
|
serverMU.Lock()
|
||||||
defer serverMU.Unlock()
|
defer serverMU.Unlock()
|
||||||
leaseID, err := common.NewLeaseAndKeepAlive(ttl)
|
leaseID, err := common.NewLeaseAndKeepAlive(ttl)
|
||||||
@@ -59,7 +59,7 @@ func RegisterGrpcServer(target string, sid string, addr string, ttl int64) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UnRegisterGrpcServer 解注册服务提供者
|
// UnRegisterGrpcServer 解注册服务提供者
|
||||||
func UnRegisterGrpcServer(sid string) {
|
func UnRegisterGrpcServer(sid int64) {
|
||||||
serverMU.Lock()
|
serverMU.Lock()
|
||||||
defer serverMU.Unlock()
|
defer serverMU.Unlock()
|
||||||
if leaseID, ok := serverLeaseM[sid]; ok {
|
if leaseID, ok := serverLeaseM[sid]; ok {
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package log
|
package log
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/config"
|
||||||
"github.com/natefinch/lumberjack"
|
"github.com/natefinch/lumberjack"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Init(debug bool, maxSize, maxBackups, maxAge int32, level string) {
|
func Init(cfg *config.LogConfig) {
|
||||||
// 格式配置
|
// 格式配置
|
||||||
jsonConfig := zapcore.EncoderConfig{
|
jsonConfig := zapcore.EncoderConfig{
|
||||||
MessageKey: "M",
|
MessageKey: "M",
|
||||||
@@ -30,19 +31,19 @@ func Init(debug bool, maxSize, maxBackups, maxAge int32, level string) {
|
|||||||
|
|
||||||
// 日志输出到控制台和文件
|
// 日志输出到控制台和文件
|
||||||
writeSyncer := []zapcore.WriteSyncer{zapcore.AddSync(os.Stdout)}
|
writeSyncer := []zapcore.WriteSyncer{zapcore.AddSync(os.Stdout)}
|
||||||
if !debug {
|
if !cfg.Debug {
|
||||||
writeSyncer = append(writeSyncer, zapcore.AddSync(&lumberjack.Logger{
|
writeSyncer = append(writeSyncer, zapcore.AddSync(&lumberjack.Logger{
|
||||||
Filename: "./logs/log.log", // 日志文件位置
|
Filename: "./logs/log.log", // 日志文件位置
|
||||||
MaxSize: int(maxSize), // 最大文件大小(MB)
|
MaxSize: int(cfg.MaxSize), // 最大文件大小(MB)
|
||||||
MaxBackups: int(maxBackups), // 保留旧文件的最大个数
|
MaxBackups: int(cfg.MaxBackups), // 保留旧文件的最大个数
|
||||||
MaxAge: int(maxAge), // 保留旧文件的最大天数
|
MaxAge: int(cfg.MaxAge), // 保留旧文件的最大天数
|
||||||
Compress: false, // 是否压缩/归档旧文件
|
Compress: false, // 是否压缩/归档旧文件
|
||||||
LocalTime: true,
|
LocalTime: true,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
var encoder zapcore.Encoder
|
var encoder zapcore.Encoder
|
||||||
if debug {
|
if cfg.Debug {
|
||||||
encoder = zapcore.NewConsoleEncoder(jsonConfig)
|
encoder = zapcore.NewConsoleEncoder(jsonConfig)
|
||||||
} else {
|
} else {
|
||||||
encoder = zapcore.NewJSONEncoder(jsonConfig)
|
encoder = zapcore.NewJSONEncoder(jsonConfig)
|
||||||
@@ -50,9 +51,9 @@ func Init(debug bool, maxSize, maxBackups, maxAge int32, level string) {
|
|||||||
logger := zap.New(zapcore.NewCore(
|
logger := zap.New(zapcore.NewCore(
|
||||||
encoder,
|
encoder,
|
||||||
zapcore.NewMultiWriteSyncer(writeSyncer...),
|
zapcore.NewMultiWriteSyncer(writeSyncer...),
|
||||||
zap.NewAtomicLevelAt(GetLogLevel(level)),
|
zap.NewAtomicLevelAt(GetLogLevel(cfg.Level)),
|
||||||
))
|
))
|
||||||
if debug {
|
if cfg.Debug {
|
||||||
logger = logger.WithOptions(
|
logger = logger.WithOptions(
|
||||||
zap.AddCaller(),
|
zap.AddCaller(),
|
||||||
zap.AddCallerSkip(1),
|
zap.AddCallerSkip(1),
|
||||||
|
|||||||
33
module/db.go
33
module/db.go
@@ -12,32 +12,32 @@ import (
|
|||||||
// DB 数据库模块
|
// DB 数据库模块
|
||||||
type DB struct {
|
type DB struct {
|
||||||
DefaultModule
|
DefaultModule
|
||||||
cfg *config.DBConfig
|
Cfg *config.DBConfig
|
||||||
appName string
|
AppName string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DB) Init() error {
|
func (m *DB) Init() error {
|
||||||
// ETCD
|
// ETCD
|
||||||
if m.cfg.Etcd != nil {
|
if m.Cfg.Etcd != nil {
|
||||||
if err := etcd.Init(m.cfg.Etcd); err != nil {
|
if err := etcd.Init(m.Cfg.Etcd); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// MYSQL
|
// MYSQL
|
||||||
if m.cfg.MySQL != nil {
|
if m.Cfg.MySQL != nil {
|
||||||
if err := mysql.Init(m.cfg.MySQL); err != nil {
|
if err := mysql.Init(m.Cfg.MySQL); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// REDIS
|
// REDIS
|
||||||
if m.cfg.Redis != nil {
|
if m.Cfg.Redis != nil {
|
||||||
if err := redis.Init(m.cfg.Redis); err != nil {
|
if err := redis.Init(m.Cfg.Redis); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// KAFKA
|
// KAFKA
|
||||||
if m.cfg.Kafka != nil {
|
if m.Cfg.Kafka != nil {
|
||||||
if err := kafka.Init(m.cfg.Kafka, m.appName); err != nil {
|
if err := kafka.Init(m.Cfg.Kafka, m.AppName); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,16 +59,3 @@ func (m *DB) Stop() error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DB) Bind(data ...any) Module {
|
|
||||||
if data == nil || len(data) == 0 {
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
if cfg, ok := data[0].(*config.DBConfig); ok {
|
|
||||||
m.cfg = cfg
|
|
||||||
}
|
|
||||||
if appName, ok := data[1].(string); ok {
|
|
||||||
m.appName = appName
|
|
||||||
}
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -8,30 +8,20 @@ import (
|
|||||||
// Grpc Grpc模块
|
// Grpc Grpc模块
|
||||||
type Grpc struct {
|
type Grpc struct {
|
||||||
DefaultModule
|
DefaultModule
|
||||||
server service.IService
|
Server service.IService
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Grpc) Start(ready *sync.WaitGroup) error {
|
func (m *Grpc) Start(ready *sync.WaitGroup) error {
|
||||||
m.server.Init(ready)
|
m.Server.Init(ready)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Grpc) AfterStart() error {
|
func (m *Grpc) AfterStart() error {
|
||||||
m.server.SetReady()
|
m.Server.SetReady()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Grpc) Stop() error {
|
func (m *Grpc) Stop() error {
|
||||||
m.server.Close()
|
m.Server.Close()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Grpc) Bind(data ...any) Module {
|
|
||||||
if data == nil || len(data) == 0 {
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
if ser, ok := data[0].(service.IService); ok {
|
|
||||||
m.server = ser
|
|
||||||
}
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|||||||
17
module/log.go
Normal file
17
module/log.go
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
package module
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/config"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Log 日志模块
|
||||||
|
type Log struct {
|
||||||
|
DefaultModule
|
||||||
|
Cfg *config.LogConfig
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Log) Init() error {
|
||||||
|
log.Init(m.Cfg)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -9,7 +9,6 @@ type Module interface {
|
|||||||
Start(ready *sync.WaitGroup) error // 启动
|
Start(ready *sync.WaitGroup) error // 启动
|
||||||
AfterStart() error // 启动之后
|
AfterStart() error // 启动之后
|
||||||
Stop() error // 停止
|
Stop() error // 停止
|
||||||
Bind(data ...any) Module // 绑定数据
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type DefaultModule struct {
|
type DefaultModule struct {
|
||||||
@@ -31,7 +30,3 @@ func (m *DefaultModule) AfterStart() error {
|
|||||||
func (m *DefaultModule) Stop() error {
|
func (m *DefaultModule) Stop() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DefaultModule) Bind(_ ...any) Module {
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ import (
|
|||||||
// Prometheus 普罗米修斯模块
|
// Prometheus 普罗米修斯模块
|
||||||
type Prometheus struct {
|
type Prometheus struct {
|
||||||
DefaultModule
|
DefaultModule
|
||||||
wg *sync.WaitGroup
|
Cfg *config.MetricConfig
|
||||||
server *http.Server
|
wg *sync.WaitGroup
|
||||||
metricCfg *config.MetricConfig
|
server *http.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Prometheus) Init() error {
|
func (m *Prometheus) Init() error {
|
||||||
@@ -29,7 +29,7 @@ func (m *Prometheus) Start(ready *sync.WaitGroup) error {
|
|||||||
go func() {
|
go func() {
|
||||||
defer m.wg.Done()
|
defer m.wg.Done()
|
||||||
m.server = &http.Server{
|
m.server = &http.Server{
|
||||||
Addr: fmt.Sprintf("%v:%v", m.metricCfg.Prometheus.Address, m.metricCfg.Prometheus.Port),
|
Addr: fmt.Sprintf("%v:%v", m.Cfg.Prometheus.Address, m.Cfg.Prometheus.Port),
|
||||||
Handler: promhttp.Handler(),
|
Handler: promhttp.Handler(),
|
||||||
}
|
}
|
||||||
ready.Done()
|
ready.Done()
|
||||||
@@ -48,13 +48,3 @@ func (m *Prometheus) Stop() error {
|
|||||||
m.wg.Wait()
|
m.wg.Wait()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Prometheus) Bind(data ...any) Module {
|
|
||||||
if data == nil || len(data) == 0 {
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
if mc, ok := data[0].(*config.MetricConfig); ok {
|
|
||||||
m.metricCfg = mc
|
|
||||||
}
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|||||||
64
module/snowflake.go
Normal file
64
module/snowflake.go
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
package module
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/db/etcd"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
|
"go.etcd.io/etcd/client/v3/concurrency"
|
||||||
|
"math/rand"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Snowflake 雪花模块
|
||||||
|
type Snowflake struct {
|
||||||
|
DefaultModule
|
||||||
|
snowflakeSession *concurrency.Session
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Snowflake) Init() error {
|
||||||
|
node, session, err := acquire(context.Background(), 1, 1000)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
m.snowflakeSession = session
|
||||||
|
utils.InitSnowflake(node)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Snowflake) Stop() error {
|
||||||
|
_ = m.snowflakeSession.Close()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func acquire(ctx context.Context, min, max int) (int64, *concurrency.Session, error) {
|
||||||
|
nums := rand.Perm(max - min + 1)
|
||||||
|
for i := range nums {
|
||||||
|
nums[i] += min
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, n := range nums {
|
||||||
|
key := fmt.Sprintf("node/num/%d", n)
|
||||||
|
|
||||||
|
session, err := concurrency.NewSession(
|
||||||
|
etcd.GetClient().Raw(),
|
||||||
|
concurrency.WithContext(ctx),
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return 0, nil, utils.ErrorsWrap(fmt.Errorf("etcd NewSession error: %v", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
txnResp, _ := etcd.GetClient().Raw().Txn(ctx).
|
||||||
|
If(clientv3.Compare(clientv3.CreateRevision(key), "=", 0)).
|
||||||
|
Then(clientv3.OpPut(key, "", clientv3.WithLease(session.Lease()))).
|
||||||
|
Commit()
|
||||||
|
|
||||||
|
if txnResp.Succeeded {
|
||||||
|
return int64(n), session, nil
|
||||||
|
} else {
|
||||||
|
_ = session.Close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, nil, utils.ErrorsWrap(errors.New("etcd num empty"), "acquire error")
|
||||||
|
}
|
||||||
@@ -15,16 +15,16 @@ import (
|
|||||||
// Tracer 链路追踪模块
|
// Tracer 链路追踪模块
|
||||||
type Tracer struct {
|
type Tracer struct {
|
||||||
DefaultModule
|
DefaultModule
|
||||||
|
Cfg *config.MetricConfig
|
||||||
|
ServiceName string
|
||||||
tp *sdktrace.TracerProvider
|
tp *sdktrace.TracerProvider
|
||||||
metricCfg *config.MetricConfig
|
|
||||||
serviceName string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Tracer) Init() error {
|
func (m *Tracer) Init() error {
|
||||||
exporter, err := otlptracegrpc.New(
|
exporter, err := otlptracegrpc.New(
|
||||||
context.Background(),
|
context.Background(),
|
||||||
otlptracegrpc.WithInsecure(),
|
otlptracegrpc.WithInsecure(),
|
||||||
otlptracegrpc.WithEndpoint(m.metricCfg.Jaeger.Endpoint),
|
otlptracegrpc.WithEndpoint(m.Cfg.Jaeger.Endpoint),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -34,7 +34,7 @@ func (m *Tracer) Init() error {
|
|||||||
sdktrace.WithBatcher(exporter),
|
sdktrace.WithBatcher(exporter),
|
||||||
sdktrace.WithResource(resource.NewWithAttributes(
|
sdktrace.WithResource(resource.NewWithAttributes(
|
||||||
semconv.SchemaURL,
|
semconv.SchemaURL,
|
||||||
semconv.ServiceNameKey.String(m.serviceName),
|
semconv.ServiceNameKey.String(m.ServiceName),
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
otel.SetTracerProvider(m.tp)
|
otel.SetTracerProvider(m.tp)
|
||||||
@@ -51,16 +51,3 @@ func (m *Tracer) Stop() error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Tracer) Bind(data ...any) Module {
|
|
||||||
if data == nil || len(data) == 0 {
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
if mc, ok := data[0].(*config.MetricConfig); ok {
|
|
||||||
m.metricCfg = mc
|
|
||||||
}
|
|
||||||
if name, ok := data[1].(string); ok {
|
|
||||||
m.serviceName = name
|
|
||||||
}
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GatewayNewClient(sid ...string) (grpc_pb.GatewayClient, error) {
|
func GatewayNewClient(sid ...int64) (grpc_pb.GatewayClient, error) {
|
||||||
c, err := discover.FindServer(common.KeyDiscoverGateway, sid...)
|
c, err := discover.FindServer(common.KeyDiscoverGateway, sid...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -14,8 +14,8 @@ func GatewayNewClient(sid ...string) (grpc_pb.GatewayClient, error) {
|
|||||||
return grpc_pb.NewGatewayClient(c), nil
|
return grpc_pb.NewGatewayClient(c), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GatewayNewBroadcastClient() map[string]grpc_pb.GatewayClient {
|
func GatewayNewBroadcastClient() map[int64]grpc_pb.GatewayClient {
|
||||||
clientM := make(map[string]grpc_pb.GatewayClient)
|
clientM := make(map[int64]grpc_pb.GatewayClient)
|
||||||
connM := discover.FindServerAll(common.KeyDiscoverGateway)
|
connM := discover.FindServerAll(common.KeyDiscoverGateway)
|
||||||
for sid, conn := range connM {
|
for sid, conn := range connM {
|
||||||
clientM[sid] = grpc_pb.NewGatewayClient(conn)
|
clientM[sid] = grpc_pb.NewGatewayClient(conn)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func QgdzsNewClient(sid ...string) (grpc_pb.QgdzsClient, error) {
|
func QgdzsNewClient(sid ...int64) (grpc_pb.QgdzsClient, error) {
|
||||||
c, err := discover.FindServer(common.KeyDiscoverQgdzs, sid...)
|
c, err := discover.FindServer(common.KeyDiscoverQgdzs, sid...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SceneNewClient(sid ...string) (grpc_pb.SceneClient, error) {
|
func SceneNewClient(sid ...int64) (grpc_pb.SceneClient, error) {
|
||||||
c, err := discover.FindServer(common.KeyDiscoverScene, sid...)
|
c, err := discover.FindServer(common.KeyDiscoverScene, sid...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -23,8 +23,8 @@ func SceneNewClientLB() (grpc_pb.SceneClient, error) {
|
|||||||
return grpc_pb.NewSceneClient(c), nil
|
return grpc_pb.NewSceneClient(c), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func SceneNewBroadcastClient() map[string]grpc_pb.SceneClient {
|
func SceneNewBroadcastClient() map[int64]grpc_pb.SceneClient {
|
||||||
clientM := make(map[string]grpc_pb.SceneClient)
|
clientM := make(map[int64]grpc_pb.SceneClient)
|
||||||
connM := discover.FindServerAll(common.KeyDiscoverScene)
|
connM := discover.FindServerAll(common.KeyDiscoverScene)
|
||||||
for sid, conn := range connM {
|
for sid, conn := range connM {
|
||||||
clientM[sid] = grpc_pb.NewSceneClient(conn)
|
clientM[sid] = grpc_pb.NewSceneClient(conn)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func UserNewClient(sid ...string) (grpc_pb.UserClient, error) {
|
func UserNewClient(sid ...int64) (grpc_pb.UserClient, error) {
|
||||||
c, err := discover.FindServer(common.KeyDiscoverUser, sid...)
|
c, err := discover.FindServer(common.KeyDiscoverUser, sid...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package grpc_client
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"strconv"
|
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ type gatewayStream struct {
|
|||||||
stream grpc.ClientStream
|
stream grpc.ClientStream
|
||||||
}
|
}
|
||||||
|
|
||||||
func findGatewayBySID(sid string, fun GatewayFun) (*gatewayStream, error) {
|
func findGatewayBySID(sid int64, fun GatewayFun) (*gatewayStream, error) {
|
||||||
key := gatewayKey(sid, fun)
|
key := gatewayKey(sid, fun)
|
||||||
|
|
||||||
if v, ok := gatewayServer.Load(key); ok {
|
if v, ok := gatewayServer.Load(key); ok {
|
||||||
@@ -53,7 +53,7 @@ func findGatewayBySID(sid string, fun GatewayFun) (*gatewayStream, error) {
|
|||||||
return ss, nil
|
return ss, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func SendMessageToGateway(sid string, fun GatewayFun, msg proto.Message, re ...bool) error {
|
func SendMessageToGateway(sid int64, fun GatewayFun, msg proto.Message, re ...bool) error {
|
||||||
ss, err := findGatewayBySID(sid, fun)
|
ss, err := findGatewayBySID(sid, fun)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -78,6 +78,6 @@ func SendMessageToGateway(sid string, fun GatewayFun, msg proto.Message, re ...b
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func gatewayKey(sid string, fun GatewayFun) string {
|
func gatewayKey(sid int64, fun GatewayFun) string {
|
||||||
return sid + "-" + strconv.Itoa(int(fun))
|
return fmt.Sprintf("%v-%v", sid, fun)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package grpc_client
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"strconv"
|
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ type sceneStream struct {
|
|||||||
stream grpc.ClientStream
|
stream grpc.ClientStream
|
||||||
}
|
}
|
||||||
|
|
||||||
func findSceneBySID(sid string, fun SceneFun) (*sceneStream, error) {
|
func findSceneBySID(sid int64, fun SceneFun) (*sceneStream, error) {
|
||||||
key := sceneKey(sid, fun)
|
key := sceneKey(sid, fun)
|
||||||
|
|
||||||
if v, ok := sceneServer.Load(key); ok {
|
if v, ok := sceneServer.Load(key); ok {
|
||||||
@@ -53,7 +53,7 @@ func findSceneBySID(sid string, fun SceneFun) (*sceneStream, error) {
|
|||||||
return ss, nil
|
return ss, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func SendMessageToScene(sid string, fun SceneFun, msg proto.Message, re ...bool) error {
|
func SendMessageToScene(sid int64, fun SceneFun, msg proto.Message, re ...bool) error {
|
||||||
ss, err := findSceneBySID(sid, fun)
|
ss, err := findSceneBySID(sid, fun)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -78,6 +78,6 @@ func SendMessageToScene(sid string, fun SceneFun, msg proto.Message, re ...bool)
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func sceneKey(sid string, fun SceneFun) string {
|
func sceneKey(sid int64, fun SceneFun) string {
|
||||||
return sid + "-" + strconv.Itoa(int(fun))
|
return fmt.Sprintf("%v-%v", sid, fun)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type GrpcConnection struct {
|
type GrpcConnection struct {
|
||||||
sid string
|
sid int64
|
||||||
conn *grpc.ClientConn
|
conn *grpc.ClientConn
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGrpcConnection(sid string, address string) (*GrpcConnection, error) {
|
func NewGrpcConnection(sid int64, address string) (*GrpcConnection, error) {
|
||||||
p := &GrpcConnection{
|
p := &GrpcConnection{
|
||||||
sid: sid,
|
sid: sid,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,18 +8,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type GrpcConnectionMgr struct {
|
type GrpcConnectionMgr struct {
|
||||||
poolM map[string]*GrpcConnection
|
poolM map[int64]*GrpcConnection
|
||||||
poolS []*GrpcConnection
|
poolS []*GrpcConnection
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGrpcConnectionMgr() *GrpcConnectionMgr {
|
func NewGrpcConnectionMgr() *GrpcConnectionMgr {
|
||||||
return &GrpcConnectionMgr{
|
return &GrpcConnectionMgr{
|
||||||
poolM: make(map[string]*GrpcConnection),
|
poolM: make(map[int64]*GrpcConnection),
|
||||||
poolS: make([]*GrpcConnection, 0),
|
poolS: make([]*GrpcConnection, 0),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *GrpcConnectionMgr) Store(sid string, addr string) {
|
func (p *GrpcConnectionMgr) Store(sid int64, addr string) {
|
||||||
pool, err := NewGrpcConnection(sid, addr)
|
pool, err := NewGrpcConnection(sid, addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("create grpc err: %v, sid: %v, addr: %v", err, sid, addr)
|
log.Errorf("create grpc err: %v, sid: %v, addr: %v", err, sid, addr)
|
||||||
@@ -29,7 +29,7 @@ func (p *GrpcConnectionMgr) Store(sid string, addr string) {
|
|||||||
p.poolS = append(p.poolS, pool)
|
p.poolS = append(p.poolS, pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *GrpcConnectionMgr) Delete(sid string) int {
|
func (p *GrpcConnectionMgr) Delete(sid int64) int {
|
||||||
delete(p.poolM, sid)
|
delete(p.poolM, sid)
|
||||||
for i, pool := range p.poolS {
|
for i, pool := range p.poolS {
|
||||||
if pool.sid == sid {
|
if pool.sid == sid {
|
||||||
@@ -40,9 +40,9 @@ func (p *GrpcConnectionMgr) Delete(sid string) int {
|
|||||||
return len(p.poolS)
|
return len(p.poolS)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *GrpcConnectionMgr) Load(sid ...string) (*grpc.ClientConn, error) {
|
func (p *GrpcConnectionMgr) Load(sid ...int64) (*grpc.ClientConn, error) {
|
||||||
var pool *GrpcConnection
|
var pool *GrpcConnection
|
||||||
if len(sid) > 0 && sid[0] != "" {
|
if len(sid) > 0 && sid[0] != 0 {
|
||||||
pool = p.poolM[sid[0]]
|
pool = p.poolM[sid[0]]
|
||||||
} else {
|
} else {
|
||||||
pool = p.poolS[rand.Intn(len(p.poolS))]
|
pool = p.poolS[rand.Intn(len(p.poolS))]
|
||||||
@@ -53,8 +53,8 @@ func (p *GrpcConnectionMgr) Load(sid ...string) (*grpc.ClientConn, error) {
|
|||||||
return pool.GetConnection(), nil
|
return pool.GetConnection(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *GrpcConnectionMgr) LoadAll() map[string]*grpc.ClientConn {
|
func (p *GrpcConnectionMgr) LoadAll() map[int64]*grpc.ClientConn {
|
||||||
sidM := make(map[string]*grpc.ClientConn)
|
sidM := make(map[int64]*grpc.ClientConn)
|
||||||
for sid, pool := range p.poolM {
|
for sid, pool := range p.poolM {
|
||||||
sidM[sid] = pool.GetConnection()
|
sidM[sid] = pool.GetConnection()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ type IService interface {
|
|||||||
type Base struct {
|
type Base struct {
|
||||||
Target string
|
Target string
|
||||||
ServiceName string
|
ServiceName string
|
||||||
SID string
|
SID int64
|
||||||
Serve *grpc.Server
|
Serve *grpc.Server
|
||||||
Cfg *config.GrpcConfig
|
Cfg *config.GrpcConfig
|
||||||
OnCustomGrpcServerOption func() []grpc.ServerOption
|
OnCustomGrpcServerOption func() []grpc.ServerOption
|
||||||
@@ -39,7 +39,7 @@ type Base struct {
|
|||||||
func (s *Base) Init(ready *sync.WaitGroup) {
|
func (s *Base) Init(ready *sync.WaitGroup) {
|
||||||
s.wg = &sync.WaitGroup{}
|
s.wg = &sync.WaitGroup{}
|
||||||
s.wg.Add(1)
|
s.wg.Add(1)
|
||||||
s.SID = utils.SnowflakeInstance().Generate().String()
|
s.SID = utils.SnowflakeInstance().Generate().Int64()
|
||||||
go func() {
|
go func() {
|
||||||
defer s.wg.Done()
|
defer s.wg.Done()
|
||||||
defer s.OnClose()
|
defer s.OnClose()
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ type ToClientReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||||
MessageID int32 `protobuf:"varint,2,opt,name=MessageID,proto3" json:"MessageID,omitempty"`
|
MessageID int32 `protobuf:"varint,2,opt,name=MessageID,proto3" json:"MessageID,omitempty"`
|
||||||
Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"`
|
Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -63,11 +63,11 @@ func (*ToClientReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_gateway_proto_rawDescGZIP(), []int{0}
|
return file_service_gateway_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ToClientReq) GetUSN() string {
|
func (x *ToClientReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ToClientReq) GetMessageID() int32 {
|
func (x *ToClientReq) GetMessageID() int32 {
|
||||||
@@ -127,7 +127,7 @@ type KickUserReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *KickUserReq) Reset() {
|
func (x *KickUserReq) Reset() {
|
||||||
@@ -162,11 +162,11 @@ func (*KickUserReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_gateway_proto_rawDescGZIP(), []int{2}
|
return file_service_gateway_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *KickUserReq) GetUSN() string {
|
func (x *KickUserReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type KickUserResp struct {
|
type KickUserResp struct {
|
||||||
@@ -214,13 +214,13 @@ var file_service_gateway_proto_rawDesc = []byte{
|
|||||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d,
|
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d,
|
||||||
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x54, 0x6f, 0x43, 0x6c,
|
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x54, 0x6f, 0x43, 0x6c,
|
||||||
0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01,
|
0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73,
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x65,
|
0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x65,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f,
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f,
|
||||||
0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
||||||
0x64, 0x22, 0x0e, 0x0a, 0x0c, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
0x64, 0x22, 0x0e, 0x0a, 0x0c, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
||||||
0x70, 0x22, 0x1f, 0x0a, 0x0b, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
|
0x70, 0x22, 0x1f, 0x0a, 0x0b, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||||
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55,
|
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55,
|
||||||
0x53, 0x4e, 0x22, 0x0e, 0x0a, 0x0c, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
|
0x53, 0x4e, 0x22, 0x0e, 0x0a, 0x0c, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
|
||||||
0x73, 0x70, 0x32, 0x61, 0x0a, 0x07, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2b, 0x0a,
|
0x73, 0x70, 0x32, 0x61, 0x0a, 0x07, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2b, 0x0a,
|
||||||
0x08, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x54, 0x6f, 0x43, 0x6c,
|
0x08, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x54, 0x6f, 0x43, 0x6c,
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ type RandomGetQuestionResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Sn string `protobuf:"bytes,1,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
Sn int64 `protobuf:"varint,1,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
||||||
Question string `protobuf:"bytes,2,opt,name=Question,json=question,proto3" json:"Question,omitempty"` // 题干
|
Question string `protobuf:"bytes,2,opt,name=Question,json=question,proto3" json:"Question,omitempty"` // 题干
|
||||||
Options []string `protobuf:"bytes,3,rep,name=Options,json=options,proto3" json:"Options,omitempty"` // 选项
|
Options []string `protobuf:"bytes,3,rep,name=Options,json=options,proto3" json:"Options,omitempty"` // 选项
|
||||||
Category string `protobuf:"bytes,4,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 题目类型
|
Category string `protobuf:"bytes,4,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 题目类型
|
||||||
@@ -191,11 +191,11 @@ func (*RandomGetQuestionResp) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{3}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RandomGetQuestionResp) GetSn() string {
|
func (x *RandomGetQuestionResp) GetSn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Sn
|
return x.Sn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RandomGetQuestionResp) GetQuestion() string {
|
func (x *RandomGetQuestionResp) GetQuestion() string {
|
||||||
@@ -232,8 +232,8 @@ type RandomAnswerQuestionReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||||
Sn string `protobuf:"bytes,2,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
Sn int64 `protobuf:"varint,2,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
||||||
Answer string `protobuf:"bytes,3,opt,name=Answer,json=answer,proto3" json:"Answer,omitempty"` // 答案
|
Answer string `protobuf:"bytes,3,opt,name=Answer,json=answer,proto3" json:"Answer,omitempty"` // 答案
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,18 +269,18 @@ func (*RandomAnswerQuestionReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{4}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RandomAnswerQuestionReq) GetUSN() string {
|
func (x *RandomAnswerQuestionReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RandomAnswerQuestionReq) GetSn() string {
|
func (x *RandomAnswerQuestionReq) GetSn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Sn
|
return x.Sn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RandomAnswerQuestionReq) GetAnswer() string {
|
func (x *RandomAnswerQuestionReq) GetAnswer() string {
|
||||||
@@ -436,7 +436,7 @@ type GetAllCategoryItem struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Sn string `protobuf:"bytes,1,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 唯一标识
|
Sn int64 `protobuf:"varint,1,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 唯一标识
|
||||||
Category string `protobuf:"bytes,2,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 类目
|
Category string `protobuf:"bytes,2,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 类目
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,11 +472,11 @@ func (*GetAllCategoryItem) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{8}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{8}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetAllCategoryItem) GetSn() string {
|
func (x *GetAllCategoryItem) GetSn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Sn
|
return x.Sn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetAllCategoryItem) GetCategory() string {
|
func (x *GetAllCategoryItem) GetCategory() string {
|
||||||
@@ -492,7 +492,7 @@ type CategoryGetQuestionReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
CategorySn string `protobuf:"bytes,1,opt,name=CategorySn,json=category_sn,proto3" json:"CategorySn,omitempty"` // 类目唯一标识
|
CategorySn int64 `protobuf:"varint,1,opt,name=CategorySn,json=category_sn,proto3" json:"CategorySn,omitempty"` // 类目唯一标识
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CategoryGetQuestionReq) Reset() {
|
func (x *CategoryGetQuestionReq) Reset() {
|
||||||
@@ -527,11 +527,11 @@ func (*CategoryGetQuestionReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{9}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{9}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CategoryGetQuestionReq) GetCategorySn() string {
|
func (x *CategoryGetQuestionReq) GetCategorySn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.CategorySn
|
return x.CategorySn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type CategoryGetQuestionResp struct {
|
type CategoryGetQuestionResp struct {
|
||||||
@@ -539,7 +539,7 @@ type CategoryGetQuestionResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Sn string `protobuf:"bytes,1,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
Sn int64 `protobuf:"varint,1,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
||||||
Question string `protobuf:"bytes,2,opt,name=Question,json=question,proto3" json:"Question,omitempty"` // 题干
|
Question string `protobuf:"bytes,2,opt,name=Question,json=question,proto3" json:"Question,omitempty"` // 题干
|
||||||
Options []string `protobuf:"bytes,3,rep,name=Options,json=options,proto3" json:"Options,omitempty"` // 选项
|
Options []string `protobuf:"bytes,3,rep,name=Options,json=options,proto3" json:"Options,omitempty"` // 选项
|
||||||
Category string `protobuf:"bytes,4,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 题目类型
|
Category string `protobuf:"bytes,4,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 题目类型
|
||||||
@@ -578,11 +578,11 @@ func (*CategoryGetQuestionResp) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{10}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{10}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CategoryGetQuestionResp) GetSn() string {
|
func (x *CategoryGetQuestionResp) GetSn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Sn
|
return x.Sn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CategoryGetQuestionResp) GetQuestion() string {
|
func (x *CategoryGetQuestionResp) GetQuestion() string {
|
||||||
@@ -619,8 +619,8 @@ type CategoryAnswerQuestionReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||||
Sn string `protobuf:"bytes,2,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
Sn int64 `protobuf:"varint,2,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
||||||
Answer string `protobuf:"bytes,3,opt,name=Answer,json=answer,proto3" json:"Answer,omitempty"` // 答案
|
Answer string `protobuf:"bytes,3,opt,name=Answer,json=answer,proto3" json:"Answer,omitempty"` // 答案
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -656,18 +656,18 @@ func (*CategoryAnswerQuestionReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{11}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{11}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CategoryAnswerQuestionReq) GetUSN() string {
|
func (x *CategoryAnswerQuestionReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CategoryAnswerQuestionReq) GetSn() string {
|
func (x *CategoryAnswerQuestionReq) GetSn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Sn
|
return x.Sn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CategoryAnswerQuestionReq) GetAnswer() string {
|
func (x *CategoryAnswerQuestionReq) GetAnswer() string {
|
||||||
@@ -776,7 +776,7 @@ type QuicklyGetQuestionResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Sn string `protobuf:"bytes,1,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
Sn int64 `protobuf:"varint,1,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
||||||
Question string `protobuf:"bytes,2,opt,name=Question,json=question,proto3" json:"Question,omitempty"` // 题干
|
Question string `protobuf:"bytes,2,opt,name=Question,json=question,proto3" json:"Question,omitempty"` // 题干
|
||||||
Options []string `protobuf:"bytes,3,rep,name=Options,json=options,proto3" json:"Options,omitempty"` // 选项
|
Options []string `protobuf:"bytes,3,rep,name=Options,json=options,proto3" json:"Options,omitempty"` // 选项
|
||||||
Category string `protobuf:"bytes,4,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 题目类型
|
Category string `protobuf:"bytes,4,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 题目类型
|
||||||
@@ -815,11 +815,11 @@ func (*QuicklyGetQuestionResp) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{14}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{14}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *QuicklyGetQuestionResp) GetSn() string {
|
func (x *QuicklyGetQuestionResp) GetSn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Sn
|
return x.Sn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *QuicklyGetQuestionResp) GetQuestion() string {
|
func (x *QuicklyGetQuestionResp) GetQuestion() string {
|
||||||
@@ -856,8 +856,8 @@ type QuicklyAnswerQuestionReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||||
Sn string `protobuf:"bytes,2,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
Sn int64 `protobuf:"varint,2,opt,name=Sn,json=sn,proto3" json:"Sn,omitempty"` // 题目唯一标识
|
||||||
Answer string `protobuf:"bytes,3,opt,name=Answer,json=answer,proto3" json:"Answer,omitempty"` // 答案
|
Answer string `protobuf:"bytes,3,opt,name=Answer,json=answer,proto3" json:"Answer,omitempty"` // 答案
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -893,18 +893,18 @@ func (*QuicklyAnswerQuestionReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{15}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{15}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *QuicklyAnswerQuestionReq) GetUSN() string {
|
func (x *QuicklyAnswerQuestionReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *QuicklyAnswerQuestionReq) GetSn() string {
|
func (x *QuicklyAnswerQuestionReq) GetSn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Sn
|
return x.Sn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *QuicklyAnswerQuestionReq) GetAnswer() string {
|
func (x *QuicklyAnswerQuestionReq) GetAnswer() string {
|
||||||
@@ -975,9 +975,9 @@ type GetRecordReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||||
Page int32 `protobuf:"varint,2,opt,name=Page,json=page,proto3" json:"Page,omitempty"`
|
Page int32 `protobuf:"varint,2,opt,name=Page,json=page,proto3" json:"Page,omitempty"`
|
||||||
PageSize int32 `protobuf:"varint,3,opt,name=PageSize,json=page_size,proto3" json:"PageSize,omitempty"`
|
PageSize int32 `protobuf:"varint,3,opt,name=PageSize,json=page_size,proto3" json:"PageSize,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetRecordReq) Reset() {
|
func (x *GetRecordReq) Reset() {
|
||||||
@@ -1012,11 +1012,11 @@ func (*GetRecordReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{17}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{17}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetRecordReq) GetUSN() string {
|
func (x *GetRecordReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetRecordReq) GetPage() int32 {
|
func (x *GetRecordReq) GetPage() int32 {
|
||||||
@@ -1093,7 +1093,7 @@ type GetRecordItem struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
QuestionSn string `protobuf:"bytes,1,opt,name=QuestionSn,json=question_sn,proto3" json:"QuestionSn,omitempty"` // 题目唯一标识
|
QuestionSn int64 `protobuf:"varint,1,opt,name=QuestionSn,json=question_sn,proto3" json:"QuestionSn,omitempty"` // 题目唯一标识
|
||||||
Question string `protobuf:"bytes,2,opt,name=Question,json=question,proto3" json:"Question,omitempty"` // 题干
|
Question string `protobuf:"bytes,2,opt,name=Question,json=question,proto3" json:"Question,omitempty"` // 题干
|
||||||
Difficulty int32 `protobuf:"varint,3,opt,name=Difficulty,json=difficulty,proto3" json:"Difficulty,omitempty"` // 难度
|
Difficulty int32 `protobuf:"varint,3,opt,name=Difficulty,json=difficulty,proto3" json:"Difficulty,omitempty"` // 难度
|
||||||
Category string `protobuf:"bytes,4,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 题目类型
|
Category string `protobuf:"bytes,4,opt,name=Category,json=category,proto3" json:"Category,omitempty"` // 题目类型
|
||||||
@@ -1134,11 +1134,11 @@ func (*GetRecordItem) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{19}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{19}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetRecordItem) GetQuestionSn() string {
|
func (x *GetRecordItem) GetQuestionSn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.QuestionSn
|
return x.QuestionSn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetRecordItem) GetQuestion() string {
|
func (x *GetRecordItem) GetQuestion() string {
|
||||||
@@ -1189,7 +1189,7 @@ type GetQuestionInfoReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
QuestionSn string `protobuf:"bytes,1,opt,name=QuestionSn,json=question_sn,proto3" json:"QuestionSn,omitempty"` // 题目唯一标识
|
QuestionSn int64 `protobuf:"varint,1,opt,name=QuestionSn,json=question_sn,proto3" json:"QuestionSn,omitempty"` // 题目唯一标识
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetQuestionInfoReq) Reset() {
|
func (x *GetQuestionInfoReq) Reset() {
|
||||||
@@ -1224,11 +1224,11 @@ func (*GetQuestionInfoReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_qgdzs_proto_rawDescGZIP(), []int{20}
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{20}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetQuestionInfoReq) GetQuestionSn() string {
|
func (x *GetQuestionInfoReq) GetQuestionSn() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.QuestionSn
|
return x.QuestionSn
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetQuestionInfoResp struct {
|
type GetQuestionInfoResp struct {
|
||||||
@@ -1310,6 +1310,283 @@ func (x *GetQuestionInfoResp) GetExplanation() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---------- GetPointRecord ----------
|
||||||
|
type GetPointRecordReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||||
|
Page int32 `protobuf:"varint,2,opt,name=Page,json=page,proto3" json:"Page,omitempty"`
|
||||||
|
PageSize int32 `protobuf:"varint,3,opt,name=PageSize,json=page_size,proto3" json:"PageSize,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordReq) Reset() {
|
||||||
|
*x = GetPointRecordReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[22]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetPointRecordReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetPointRecordReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[22]
|
||||||
|
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 GetPointRecordReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetPointRecordReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{22}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordReq) GetUSN() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.USN
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordReq) GetPage() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Page
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordReq) GetPageSize() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.PageSize
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetPointRecordResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Count int32 `protobuf:"varint,1,opt,name=Count,json=count,proto3" json:"Count,omitempty"` // 总数
|
||||||
|
Records []*GetPointRecordItem `protobuf:"bytes,2,rep,name=Records,json=records,proto3" json:"Records,omitempty"` // 记录
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordResp) Reset() {
|
||||||
|
*x = GetPointRecordResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[23]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetPointRecordResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetPointRecordResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[23]
|
||||||
|
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 GetPointRecordResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetPointRecordResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{23}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordResp) GetCount() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Count
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordResp) GetRecords() []*GetPointRecordItem {
|
||||||
|
if x != nil {
|
||||||
|
return x.Records
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetPointRecordItem struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Source int32 `protobuf:"varint,1,opt,name=Source,json=source,proto3" json:"Source,omitempty"` // 来源
|
||||||
|
Point int64 `protobuf:"varint,2,opt,name=Point,json=point,proto3" json:"Point,omitempty"` // 学识分
|
||||||
|
CreateTime int64 `protobuf:"varint,3,opt,name=CreateTime,json=create_time,proto3" json:"CreateTime,omitempty"` // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordItem) Reset() {
|
||||||
|
*x = GetPointRecordItem{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[24]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordItem) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetPointRecordItem) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetPointRecordItem) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[24]
|
||||||
|
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 GetPointRecordItem.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetPointRecordItem) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{24}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordItem) GetSource() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Source
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordItem) GetPoint() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Point
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointRecordItem) GetCreateTime() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.CreateTime
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------- GetPoint ----------
|
||||||
|
type GetPointReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointReq) Reset() {
|
||||||
|
*x = GetPointReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[25]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetPointReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetPointReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[25]
|
||||||
|
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 GetPointReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetPointReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{25}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointReq) GetUSN() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.USN
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetPointResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Point int64 `protobuf:"varint,1,opt,name=Point,json=point,proto3" json:"Point,omitempty"` // 学识分
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointResp) Reset() {
|
||||||
|
*x = GetPointResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[26]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetPointResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetPointResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_qgdzs_proto_msgTypes[26]
|
||||||
|
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 GetPointResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetPointResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_qgdzs_proto_rawDescGZIP(), []int{26}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPointResp) GetPoint() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Point
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_service_qgdzs_proto protoreflect.FileDescriptor
|
var File_service_qgdzs_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_service_qgdzs_proto_rawDesc = []byte{
|
var file_service_qgdzs_proto_rawDesc = []byte{
|
||||||
@@ -1325,7 +1602,7 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x99, 0x01,
|
0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x99, 0x01,
|
||||||
0x0a, 0x15, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74,
|
0x0a, 0x15, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e, 0x18, 0x01, 0x20,
|
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74,
|
0x01, 0x28, 0x03, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03,
|
0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03,
|
||||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a,
|
0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a,
|
||||||
@@ -1335,8 +1612,8 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x22, 0x53, 0x0a, 0x17, 0x52, 0x61, 0x6e,
|
0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x22, 0x53, 0x0a, 0x17, 0x52, 0x61, 0x6e,
|
||||||
0x64, 0x6f, 0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f,
|
0x64, 0x6f, 0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f,
|
||||||
0x6e, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x6e, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x09, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e, 0x18, 0x02, 0x20, 0x01,
|
0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x28, 0x09, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72,
|
0x28, 0x03, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72,
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x54,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x54,
|
||||||
0x0a, 0x18, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75,
|
0x0a, 0x18, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75,
|
||||||
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6e,
|
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6e,
|
||||||
@@ -1351,15 +1628,15 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x67, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
0x67, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
||||||
0x72, 0x69, 0x65, 0x73, 0x22, 0x40, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x61,
|
0x72, 0x69, 0x65, 0x73, 0x22, 0x40, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x61,
|
||||||
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e,
|
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x61,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x61,
|
||||||
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61,
|
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61,
|
||||||
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x39, 0x0a, 0x16, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x39, 0x0a, 0x16, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
||||||
0x72, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
|
0x72, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
|
||||||
0x12, 0x1f, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x6e, 0x18, 0x01,
|
0x12, 0x1f, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x6e, 0x18, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x73,
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x73,
|
||||||
0x6e, 0x22, 0x9b, 0x01, 0x0a, 0x17, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65,
|
0x6e, 0x22, 0x9b, 0x01, 0x0a, 0x17, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65,
|
||||||
0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a,
|
0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a,
|
||||||
0x02, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x1a, 0x0a,
|
0x02, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x1a, 0x0a,
|
||||||
0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x70, 0x74,
|
0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x70, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69,
|
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69,
|
||||||
@@ -1369,8 +1646,8 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x22,
|
0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x22,
|
||||||
0x55, 0x0a, 0x19, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65,
|
0x55, 0x0a, 0x19, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65,
|
||||||
0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03,
|
0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x0e,
|
0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x0e,
|
||||||
0x0a, 0x02, 0x53, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x16,
|
0x0a, 0x02, 0x53, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x73, 0x6e, 0x12, 0x16,
|
||||||
0x0a, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
0x0a, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||||
0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x56, 0x0a, 0x1a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x56, 0x0a, 0x1a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
||||||
0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,
|
0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
@@ -1381,7 +1658,7 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73,
|
0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x9a, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x69, 0x63,
|
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x9a, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x69, 0x63,
|
||||||
0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||||
0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
|
0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
|
||||||
0x73, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
|
0x73, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18,
|
||||||
0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52,
|
0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||||
@@ -1391,8 +1668,8 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63,
|
0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63,
|
||||||
0x75, 0x6c, 0x74, 0x79, 0x22, 0x54, 0x0a, 0x18, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41,
|
0x75, 0x6c, 0x74, 0x79, 0x22, 0x54, 0x0a, 0x18, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41,
|
||||||
0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
|
0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
|
||||||
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75,
|
||||||
0x73, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
|
0x73, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
|
||||||
0x73, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01,
|
0x73, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x55, 0x0a, 0x19, 0x51, 0x75,
|
0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x55, 0x0a, 0x19, 0x51, 0x75,
|
||||||
0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74,
|
0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74,
|
||||||
@@ -1401,7 +1678,7 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x20, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
|
0x20, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f,
|
||||||
0x6e, 0x22, 0x51, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65,
|
0x6e, 0x22, 0x51, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65,
|
||||||
0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03,
|
||||||
0x75, 0x73, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x75, 0x73, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53,
|
0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53,
|
||||||
0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f,
|
0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f,
|
||||||
@@ -1412,7 +1689,7 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x72, 0x65,
|
0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x72, 0x65,
|
||||||
0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0xea, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63,
|
0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0xea, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63,
|
||||||
0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1f, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x73, 0x74,
|
0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1f, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x73, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71, 0x75, 0x65,
|
0x69, 0x6f, 0x6e, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x71, 0x75, 0x65,
|
||||||
0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73,
|
0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73,
|
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c,
|
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c,
|
||||||
@@ -1427,7 +1704,7 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
|
0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
|
||||||
0x6d, 0x65, 0x22, 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f,
|
0x6d, 0x65, 0x22, 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f,
|
||||||
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x73,
|
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x73,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71, 0x75,
|
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x71, 0x75,
|
||||||
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6e, 0x22, 0xa9, 0x01, 0x0a, 0x13, 0x47, 0x65,
|
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6e, 0x22, 0xa9, 0x01, 0x0a, 0x13, 0x47, 0x65,
|
||||||
0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73,
|
0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73,
|
||||||
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
|
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
|
||||||
@@ -1439,79 +1716,112 @@ var file_service_qgdzs_proto_rawDesc = []byte{
|
|||||||
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75,
|
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75,
|
||||||
0x6c, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69,
|
0x6c, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69,
|
||||||
0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e,
|
0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e,
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xc7, 0x08, 0x0a, 0x05, 0x51, 0x67, 0x64, 0x7a, 0x73, 0x12,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x56, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e,
|
||||||
0x69, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74,
|
0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53,
|
||||||
0x69, 0x6f, 0x6e, 0x12, 0x14, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75,
|
0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x47, 0x65, 0x6e, 0x65,
|
0x50, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65,
|
||||||
0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
0x12, 0x1b, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x71, 0x67,
|
0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x59, 0x0a,
|
||||||
0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
|
0x12, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52,
|
||||||
0x65, 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6a, 0x0a, 0x11, 0x52, 0x61,
|
0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x52, 0x65, 0x63,
|
||||||
0x15, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74,
|
0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x47, 0x65, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47,
|
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52,
|
||||||
0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x26,
|
0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x63, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50,
|
||||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x71, 0x67, 0x64, 0x7a,
|
0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x16,
|
||||||
0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x2f, 0x71, 0x75,
|
0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||||
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, 0x14, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d,
|
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18,
|
||||||
0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18,
|
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0a,
|
||||||
0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65,
|
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
|
||||||
0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f,
|
0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x1f, 0x0a,
|
||||||
0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
0x0b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x65, 0x73, 0x70, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19,
|
0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x22, 0x24,
|
||||||
0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x6e, 0x64,
|
0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14,
|
||||||
0x6f, 0x6d, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x74,
|
0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70,
|
||||||
0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x2e, 0x47, 0x65,
|
0x6f, 0x69, 0x6e, 0x74, 0x32, 0xf3, 0x09, 0x0a, 0x05, 0x51, 0x67, 0x64, 0x7a, 0x73, 0x12, 0x69,
|
||||||
0x74, 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a,
|
0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69,
|
||||||
0x13, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
|
0x6f, 0x6e, 0x12, 0x14, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22,
|
0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72,
|
||||||
0x21, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x63, 0x61, 0x74,
|
0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22,
|
||||||
0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x71, 0x67, 0x64,
|
||||||
0x72, 0x79, 0x12, 0x72, 0x0a, 0x13, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65,
|
0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||||
0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x43, 0x61, 0x74, 0x65,
|
0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6a, 0x0a, 0x11, 0x52, 0x61, 0x6e,
|
||||||
0x67, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15,
|
||||||
0x65, 0x71, 0x1a, 0x18, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74,
|
0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69,
|
||||||
0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x82, 0xd3,
|
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65,
|
||||||
0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f,
|
0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x26, 0x82,
|
||||||
0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x71, 0x75,
|
0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73,
|
||||||
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, 0x16, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x2f, 0x71, 0x75, 0x65,
|
||||||
0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,
|
0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, 0x14, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x41,
|
||||||
0x12, 0x1a, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65,
|
0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e,
|
||||||
0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x43,
|
0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73,
|
||||||
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65,
|
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d,
|
||||||
0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||||
0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65,
|
0x73, 0x70, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f,
|
||||||
0x6e, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65,
|
0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x6e, 0x64, 0x6f,
|
||||||
0x72, 0x12, 0x6e, 0x0a, 0x12, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51,
|
0x6d, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c,
|
0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74,
|
||||||
0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a,
|
0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x13,
|
||||||
0x17, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73,
|
0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21,
|
0x65, 0x73, 0x70, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, 0x21,
|
||||||
0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
|
0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x63, 0x61, 0x74, 0x65,
|
||||||
0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f,
|
0x67, 0x6f, 0x72, 0x79, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
|
||||||
0x6e, 0x12, 0x75, 0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77,
|
0x79, 0x12, 0x72, 0x0a, 0x13, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74,
|
||||||
0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x51, 0x75, 0x69,
|
0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67,
|
||||||
0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69,
|
0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||||
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41,
|
0x71, 0x1a, 0x18, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x51,
|
||||||
0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
|
0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x82, 0xd3, 0xe4,
|
||||||
0x70, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x71,
|
0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f,
|
||||||
0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x6c,
|
0x70, 0x65, 0x6e, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x71, 0x75, 0x65,
|
||||||
0x79, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52,
|
0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, 0x16, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
|
||||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||||
0x64, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
0x1a, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22,
|
0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x43, 0x61,
|
||||||
0x16, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74,
|
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73,
|
||||||
0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x66, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x51, 0x75,
|
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20,
|
||||||
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74,
|
0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
|
||||||
0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a,
|
0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72,
|
||||||
0x14, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
0x12, 0x6e, 0x0a, 0x12, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75,
|
||||||
0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a,
|
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79,
|
||||||
0x22, 0x1d, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x67, 0x65,
|
0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x17,
|
||||||
0x74, 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x42,
|
0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74,
|
||||||
0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61,
|
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a,
|
||||||
0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d,
|
0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f,
|
||||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f,
|
0x71, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x67, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x12, 0x75, 0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65,
|
||||||
|
0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x51, 0x75, 0x69, 0x63,
|
||||||
|
0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f,
|
||||||
|
0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e,
|
||||||
|
0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||||
|
0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x71, 0x67,
|
||||||
|
0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79,
|
||||||
|
0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x65,
|
||||||
|
0x63, 0x6f, 0x72, 0x64, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||||
|
0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16,
|
||||||
|
0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74, 0x5f,
|
||||||
|
0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x66, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65,
|
||||||
|
0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x51,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x14,
|
||||||
|
0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
|
||||||
|
0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22,
|
||||||
|
0x1d, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x74,
|
||||||
|
0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x5e,
|
||||||
|
0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||||
|
0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
||||||
|
0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52,
|
||||||
|
0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||||
|
0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74,
|
||||||
|
0x68, 0x2f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x4a,
|
||||||
|
0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x47, 0x65, 0x74,
|
||||||
|
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
|
||||||
|
0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a,
|
||||||
|
0x01, 0x2a, 0x22, 0x16, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f,
|
||||||
|
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69,
|
||||||
|
0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72,
|
||||||
|
0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||||
|
0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f,
|
||||||
|
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -1526,7 +1836,7 @@ func file_service_qgdzs_proto_rawDescGZIP() []byte {
|
|||||||
return file_service_qgdzs_proto_rawDescData
|
return file_service_qgdzs_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_service_qgdzs_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
|
var file_service_qgdzs_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
|
||||||
var file_service_qgdzs_proto_goTypes = []interface{}{
|
var file_service_qgdzs_proto_goTypes = []interface{}{
|
||||||
(*GenerateQuestionReq)(nil), // 0: GenerateQuestionReq
|
(*GenerateQuestionReq)(nil), // 0: GenerateQuestionReq
|
||||||
(*GenerateQuestionResp)(nil), // 1: GenerateQuestionResp
|
(*GenerateQuestionResp)(nil), // 1: GenerateQuestionResp
|
||||||
@@ -1550,35 +1860,45 @@ var file_service_qgdzs_proto_goTypes = []interface{}{
|
|||||||
(*GetRecordItem)(nil), // 19: GetRecordItem
|
(*GetRecordItem)(nil), // 19: GetRecordItem
|
||||||
(*GetQuestionInfoReq)(nil), // 20: GetQuestionInfoReq
|
(*GetQuestionInfoReq)(nil), // 20: GetQuestionInfoReq
|
||||||
(*GetQuestionInfoResp)(nil), // 21: GetQuestionInfoResp
|
(*GetQuestionInfoResp)(nil), // 21: GetQuestionInfoResp
|
||||||
|
(*GetPointRecordReq)(nil), // 22: GetPointRecordReq
|
||||||
|
(*GetPointRecordResp)(nil), // 23: GetPointRecordResp
|
||||||
|
(*GetPointRecordItem)(nil), // 24: GetPointRecordItem
|
||||||
|
(*GetPointReq)(nil), // 25: GetPointReq
|
||||||
|
(*GetPointResp)(nil), // 26: GetPointResp
|
||||||
}
|
}
|
||||||
var file_service_qgdzs_proto_depIdxs = []int32{
|
var file_service_qgdzs_proto_depIdxs = []int32{
|
||||||
8, // 0: GetAllCategoryResp.Categories:type_name -> GetAllCategoryItem
|
8, // 0: GetAllCategoryResp.Categories:type_name -> GetAllCategoryItem
|
||||||
19, // 1: GetRecordResp.Records:type_name -> GetRecordItem
|
19, // 1: GetRecordResp.Records:type_name -> GetRecordItem
|
||||||
0, // 2: Qgdzs.GenerateQuestion:input_type -> GenerateQuestionReq
|
24, // 2: GetPointRecordResp.Records:type_name -> GetPointRecordItem
|
||||||
2, // 3: Qgdzs.RandomGetQuestion:input_type -> RandomGetQuestionReq
|
0, // 3: Qgdzs.GenerateQuestion:input_type -> GenerateQuestionReq
|
||||||
4, // 4: Qgdzs.RandomAnswerQuestion:input_type -> RandomAnswerQuestionReq
|
2, // 4: Qgdzs.RandomGetQuestion:input_type -> RandomGetQuestionReq
|
||||||
6, // 5: Qgdzs.GetAllCategory:input_type -> GetAllCategoryReq
|
4, // 5: Qgdzs.RandomAnswerQuestion:input_type -> RandomAnswerQuestionReq
|
||||||
9, // 6: Qgdzs.CategoryGetQuestion:input_type -> CategoryGetQuestionReq
|
6, // 6: Qgdzs.GetAllCategory:input_type -> GetAllCategoryReq
|
||||||
11, // 7: Qgdzs.CategoryAnswerQuestion:input_type -> CategoryAnswerQuestionReq
|
9, // 7: Qgdzs.CategoryGetQuestion:input_type -> CategoryGetQuestionReq
|
||||||
13, // 8: Qgdzs.QuicklyGetQuestion:input_type -> QuicklyGetQuestionReq
|
11, // 8: Qgdzs.CategoryAnswerQuestion:input_type -> CategoryAnswerQuestionReq
|
||||||
15, // 9: Qgdzs.QuicklyAnswerQuestion:input_type -> QuicklyAnswerQuestionReq
|
13, // 9: Qgdzs.QuicklyGetQuestion:input_type -> QuicklyGetQuestionReq
|
||||||
17, // 10: Qgdzs.GetRecord:input_type -> GetRecordReq
|
15, // 10: Qgdzs.QuicklyAnswerQuestion:input_type -> QuicklyAnswerQuestionReq
|
||||||
20, // 11: Qgdzs.GetQuestionInfo:input_type -> GetQuestionInfoReq
|
17, // 11: Qgdzs.GetRecord:input_type -> GetRecordReq
|
||||||
1, // 12: Qgdzs.GenerateQuestion:output_type -> GenerateQuestionResp
|
20, // 12: Qgdzs.GetQuestionInfo:input_type -> GetQuestionInfoReq
|
||||||
3, // 13: Qgdzs.RandomGetQuestion:output_type -> RandomGetQuestionResp
|
22, // 13: Qgdzs.GetPointRecord:input_type -> GetPointRecordReq
|
||||||
5, // 14: Qgdzs.RandomAnswerQuestion:output_type -> RandomAnswerQuestionResp
|
25, // 14: Qgdzs.GetPoint:input_type -> GetPointReq
|
||||||
7, // 15: Qgdzs.GetAllCategory:output_type -> GetAllCategoryResp
|
1, // 15: Qgdzs.GenerateQuestion:output_type -> GenerateQuestionResp
|
||||||
10, // 16: Qgdzs.CategoryGetQuestion:output_type -> CategoryGetQuestionResp
|
3, // 16: Qgdzs.RandomGetQuestion:output_type -> RandomGetQuestionResp
|
||||||
12, // 17: Qgdzs.CategoryAnswerQuestion:output_type -> CategoryAnswerQuestionResp
|
5, // 17: Qgdzs.RandomAnswerQuestion:output_type -> RandomAnswerQuestionResp
|
||||||
14, // 18: Qgdzs.QuicklyGetQuestion:output_type -> QuicklyGetQuestionResp
|
7, // 18: Qgdzs.GetAllCategory:output_type -> GetAllCategoryResp
|
||||||
16, // 19: Qgdzs.QuicklyAnswerQuestion:output_type -> QuicklyAnswerQuestionResp
|
10, // 19: Qgdzs.CategoryGetQuestion:output_type -> CategoryGetQuestionResp
|
||||||
18, // 20: Qgdzs.GetRecord:output_type -> GetRecordResp
|
12, // 20: Qgdzs.CategoryAnswerQuestion:output_type -> CategoryAnswerQuestionResp
|
||||||
21, // 21: Qgdzs.GetQuestionInfo:output_type -> GetQuestionInfoResp
|
14, // 21: Qgdzs.QuicklyGetQuestion:output_type -> QuicklyGetQuestionResp
|
||||||
12, // [12:22] is the sub-list for method output_type
|
16, // 22: Qgdzs.QuicklyAnswerQuestion:output_type -> QuicklyAnswerQuestionResp
|
||||||
2, // [2:12] is the sub-list for method input_type
|
18, // 23: Qgdzs.GetRecord:output_type -> GetRecordResp
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
21, // 24: Qgdzs.GetQuestionInfo:output_type -> GetQuestionInfoResp
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
23, // 25: Qgdzs.GetPointRecord:output_type -> GetPointRecordResp
|
||||||
0, // [0:2] is the sub-list for field type_name
|
26, // 26: Qgdzs.GetPoint:output_type -> GetPointResp
|
||||||
|
15, // [15:27] is the sub-list for method output_type
|
||||||
|
3, // [3:15] is the sub-list for method input_type
|
||||||
|
3, // [3:3] is the sub-list for extension type_name
|
||||||
|
3, // [3:3] is the sub-list for extension extendee
|
||||||
|
0, // [0:3] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_service_qgdzs_proto_init() }
|
func init() { file_service_qgdzs_proto_init() }
|
||||||
@@ -1851,6 +2171,66 @@ func file_service_qgdzs_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_service_qgdzs_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GetPointRecordReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_service_qgdzs_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GetPointRecordResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_service_qgdzs_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GetPointRecordItem); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_service_qgdzs_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GetPointReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_service_qgdzs_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GetPointResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@@ -1858,7 +2238,7 @@ func file_service_qgdzs_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_service_qgdzs_proto_rawDesc,
|
RawDescriptor: file_service_qgdzs_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 22,
|
NumMessages: 27,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -275,6 +275,54 @@ func local_request_Qgdzs_GetQuestionInfo_0(ctx context.Context, marshaler runtim
|
|||||||
return msg, metadata, err
|
return msg, metadata, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func request_Qgdzs_GetPointRecord_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var (
|
||||||
|
protoReq GetPointRecordReq
|
||||||
|
metadata runtime.ServerMetadata
|
||||||
|
)
|
||||||
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
msg, err := client.GetPointRecord(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Qgdzs_GetPointRecord_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var (
|
||||||
|
protoReq GetPointRecordReq
|
||||||
|
metadata runtime.ServerMetadata
|
||||||
|
)
|
||||||
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
msg, err := server.GetPointRecord(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func request_Qgdzs_GetPoint_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var (
|
||||||
|
protoReq GetPointReq
|
||||||
|
metadata runtime.ServerMetadata
|
||||||
|
)
|
||||||
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
msg, err := client.GetPoint(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Qgdzs_GetPoint_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var (
|
||||||
|
protoReq GetPointReq
|
||||||
|
metadata runtime.ServerMetadata
|
||||||
|
)
|
||||||
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
msg, err := server.GetPoint(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
}
|
||||||
|
|
||||||
// RegisterQgdzsHandlerServer registers the http handlers for service Qgdzs to "mux".
|
// RegisterQgdzsHandlerServer registers the http handlers for service Qgdzs to "mux".
|
||||||
// UnaryRPC :call QgdzsServer directly.
|
// UnaryRPC :call QgdzsServer directly.
|
||||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
@@ -481,6 +529,46 @@ func RegisterQgdzsHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
}
|
}
|
||||||
forward_Qgdzs_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
forward_Qgdzs_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
})
|
})
|
||||||
|
mux.Handle(http.MethodPost, pattern_Qgdzs_GetPointRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.Qgdzs/GetPointRecord", runtime.WithHTTPPathPattern("/qgdzs/auth/point/record"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Qgdzs_GetPointRecord_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
forward_Qgdzs_GetPointRecord_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
})
|
||||||
|
mux.Handle(http.MethodPost, pattern_Qgdzs_GetPoint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.Qgdzs/GetPoint", runtime.WithHTTPPathPattern("/qgdzs/auth/point/info"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Qgdzs_GetPoint_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
forward_Qgdzs_GetPoint_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -691,6 +779,40 @@ func RegisterQgdzsHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
}
|
}
|
||||||
forward_Qgdzs_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
forward_Qgdzs_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
})
|
})
|
||||||
|
mux.Handle(http.MethodPost, pattern_Qgdzs_GetPointRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.Qgdzs/GetPointRecord", runtime.WithHTTPPathPattern("/qgdzs/auth/point/record"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Qgdzs_GetPointRecord_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
forward_Qgdzs_GetPointRecord_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
})
|
||||||
|
mux.Handle(http.MethodPost, pattern_Qgdzs_GetPoint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.Qgdzs/GetPoint", runtime.WithHTTPPathPattern("/qgdzs/auth/point/info"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Qgdzs_GetPoint_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
forward_Qgdzs_GetPoint_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -705,6 +827,8 @@ var (
|
|||||||
pattern_Qgdzs_QuicklyAnswerQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "open", "quickly", "answer"}, ""))
|
pattern_Qgdzs_QuicklyAnswerQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "open", "quickly", "answer"}, ""))
|
||||||
pattern_Qgdzs_GetRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "auth", "get_record"}, ""))
|
pattern_Qgdzs_GetRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "auth", "get_record"}, ""))
|
||||||
pattern_Qgdzs_GetQuestionInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "open", "get_question_info"}, ""))
|
pattern_Qgdzs_GetQuestionInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "open", "get_question_info"}, ""))
|
||||||
|
pattern_Qgdzs_GetPointRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "auth", "point", "record"}, ""))
|
||||||
|
pattern_Qgdzs_GetPoint_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "auth", "point", "info"}, ""))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -718,4 +842,6 @@ var (
|
|||||||
forward_Qgdzs_QuicklyAnswerQuestion_0 = runtime.ForwardResponseMessage
|
forward_Qgdzs_QuicklyAnswerQuestion_0 = runtime.ForwardResponseMessage
|
||||||
forward_Qgdzs_GetRecord_0 = runtime.ForwardResponseMessage
|
forward_Qgdzs_GetRecord_0 = runtime.ForwardResponseMessage
|
||||||
forward_Qgdzs_GetQuestionInfo_0 = runtime.ForwardResponseMessage
|
forward_Qgdzs_GetQuestionInfo_0 = runtime.ForwardResponseMessage
|
||||||
|
forward_Qgdzs_GetPointRecord_0 = runtime.ForwardResponseMessage
|
||||||
|
forward_Qgdzs_GetPoint_0 = runtime.ForwardResponseMessage
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ type QgdzsClient interface {
|
|||||||
GetRecord(ctx context.Context, in *GetRecordReq, opts ...grpc.CallOption) (*GetRecordResp, error)
|
GetRecord(ctx context.Context, in *GetRecordReq, opts ...grpc.CallOption) (*GetRecordResp, error)
|
||||||
// 获取具体的题目
|
// 获取具体的题目
|
||||||
GetQuestionInfo(ctx context.Context, in *GetQuestionInfoReq, opts ...grpc.CallOption) (*GetQuestionInfoResp, error)
|
GetQuestionInfo(ctx context.Context, in *GetQuestionInfoReq, opts ...grpc.CallOption) (*GetQuestionInfoResp, error)
|
||||||
|
// ---------- 学识分 ----------
|
||||||
|
// 获取学识分获取记录
|
||||||
|
GetPointRecord(ctx context.Context, in *GetPointRecordReq, opts ...grpc.CallOption) (*GetPointRecordResp, error)
|
||||||
|
// 获取学识分
|
||||||
|
GetPoint(ctx context.Context, in *GetPointReq, opts ...grpc.CallOption) (*GetPointResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type qgdzsClient struct {
|
type qgdzsClient struct {
|
||||||
@@ -146,6 +151,24 @@ func (c *qgdzsClient) GetQuestionInfo(ctx context.Context, in *GetQuestionInfoRe
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *qgdzsClient) GetPointRecord(ctx context.Context, in *GetPointRecordReq, opts ...grpc.CallOption) (*GetPointRecordResp, error) {
|
||||||
|
out := new(GetPointRecordResp)
|
||||||
|
err := c.cc.Invoke(ctx, "/Qgdzs/GetPointRecord", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *qgdzsClient) GetPoint(ctx context.Context, in *GetPointReq, opts ...grpc.CallOption) (*GetPointResp, error) {
|
||||||
|
out := new(GetPointResp)
|
||||||
|
err := c.cc.Invoke(ctx, "/Qgdzs/GetPoint", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// QgdzsServer is the server API for Qgdzs service.
|
// QgdzsServer is the server API for Qgdzs service.
|
||||||
// All implementations must embed UnimplementedQgdzsServer
|
// All implementations must embed UnimplementedQgdzsServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@@ -174,6 +197,11 @@ type QgdzsServer interface {
|
|||||||
GetRecord(context.Context, *GetRecordReq) (*GetRecordResp, error)
|
GetRecord(context.Context, *GetRecordReq) (*GetRecordResp, error)
|
||||||
// 获取具体的题目
|
// 获取具体的题目
|
||||||
GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error)
|
GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error)
|
||||||
|
// ---------- 学识分 ----------
|
||||||
|
// 获取学识分获取记录
|
||||||
|
GetPointRecord(context.Context, *GetPointRecordReq) (*GetPointRecordResp, error)
|
||||||
|
// 获取学识分
|
||||||
|
GetPoint(context.Context, *GetPointReq) (*GetPointResp, error)
|
||||||
mustEmbedUnimplementedQgdzsServer()
|
mustEmbedUnimplementedQgdzsServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,6 +239,12 @@ func (UnimplementedQgdzsServer) GetRecord(context.Context, *GetRecordReq) (*GetR
|
|||||||
func (UnimplementedQgdzsServer) GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error) {
|
func (UnimplementedQgdzsServer) GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetQuestionInfo not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetQuestionInfo not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedQgdzsServer) GetPointRecord(context.Context, *GetPointRecordReq) (*GetPointRecordResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetPointRecord not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedQgdzsServer) GetPoint(context.Context, *GetPointReq) (*GetPointResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetPoint not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedQgdzsServer) mustEmbedUnimplementedQgdzsServer() {}
|
func (UnimplementedQgdzsServer) mustEmbedUnimplementedQgdzsServer() {}
|
||||||
|
|
||||||
// UnsafeQgdzsServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeQgdzsServer may be embedded to opt out of forward compatibility for this service.
|
||||||
@@ -404,6 +438,42 @@ func _Qgdzs_GetQuestionInfo_Handler(srv interface{}, ctx context.Context, dec fu
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Qgdzs_GetPointRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetPointRecordReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QgdzsServer).GetPointRecord(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/Qgdzs/GetPointRecord",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QgdzsServer).GetPointRecord(ctx, req.(*GetPointRecordReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Qgdzs_GetPoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetPointReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QgdzsServer).GetPoint(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/Qgdzs/GetPoint",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QgdzsServer).GetPoint(ctx, req.(*GetPointReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Qgdzs_ServiceDesc is the grpc.ServiceDesc for Qgdzs service.
|
// Qgdzs_ServiceDesc is the grpc.ServiceDesc for Qgdzs service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@@ -451,6 +521,14 @@ var Qgdzs_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "GetQuestionInfo",
|
MethodName: "GetQuestionInfo",
|
||||||
Handler: _Qgdzs_GetQuestionInfo_Handler,
|
Handler: _Qgdzs_GetQuestionInfo_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetPointRecord",
|
||||||
|
Handler: _Qgdzs_GetPointRecord_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetPoint",
|
||||||
|
Handler: _Qgdzs_GetPoint_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "service_qgdzs.proto",
|
Metadata: "service_qgdzs.proto",
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ type EnterReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||||
GatewaySID string `protobuf:"bytes,2,opt,name=GatewaySID,proto3" json:"GatewaySID,omitempty"` // 网关服务ID
|
GatewaySID int64 `protobuf:"varint,2,opt,name=GatewaySID,proto3" json:"GatewaySID,omitempty"` // 网关服务ID
|
||||||
InstanceID int32 `protobuf:"varint,3,opt,name=InstanceID,proto3" json:"InstanceID,omitempty"` // 副本ID
|
InstanceID int32 `protobuf:"varint,3,opt,name=InstanceID,proto3" json:"InstanceID,omitempty"` // 副本ID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EnterReq) Reset() {
|
func (x *EnterReq) Reset() {
|
||||||
@@ -63,18 +63,18 @@ func (*EnterReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_scene_proto_rawDescGZIP(), []int{0}
|
return file_service_scene_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EnterReq) GetUSN() string {
|
func (x *EnterReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EnterReq) GetGatewaySID() string {
|
func (x *EnterReq) GetGatewaySID() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.GatewaySID
|
return x.GatewaySID
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EnterReq) GetInstanceID() int32 {
|
func (x *EnterReq) GetInstanceID() int32 {
|
||||||
@@ -89,8 +89,8 @@ type EnterResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
SceneSID string `protobuf:"bytes,1,opt,name=SceneSID,proto3" json:"SceneSID,omitempty"` // 场景服务ID
|
SceneSID int64 `protobuf:"varint,1,opt,name=SceneSID,proto3" json:"SceneSID,omitempty"` // 场景服务ID
|
||||||
UniqueNo string `protobuf:"bytes,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
UniqueNo int64 `protobuf:"varint,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||||
MessageID int32 `protobuf:"varint,3,opt,name=MessageID,proto3" json:"MessageID,omitempty"` // 发送给客户端的消息ID
|
MessageID int32 `protobuf:"varint,3,opt,name=MessageID,proto3" json:"MessageID,omitempty"` // 发送给客户端的消息ID
|
||||||
Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` // 消息负载
|
Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` // 消息负载
|
||||||
}
|
}
|
||||||
@@ -127,18 +127,18 @@ func (*EnterResp) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_scene_proto_rawDescGZIP(), []int{1}
|
return file_service_scene_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EnterResp) GetSceneSID() string {
|
func (x *EnterResp) GetSceneSID() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.SceneSID
|
return x.SceneSID
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EnterResp) GetUniqueNo() string {
|
func (x *EnterResp) GetUniqueNo() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.UniqueNo
|
return x.UniqueNo
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EnterResp) GetMessageID() int32 {
|
func (x *EnterResp) GetMessageID() int32 {
|
||||||
@@ -160,8 +160,8 @@ type LeaveReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||||
UniqueNo string `protobuf:"bytes,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
UniqueNo int64 `protobuf:"varint,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *LeaveReq) Reset() {
|
func (x *LeaveReq) Reset() {
|
||||||
@@ -196,18 +196,18 @@ func (*LeaveReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_scene_proto_rawDescGZIP(), []int{2}
|
return file_service_scene_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *LeaveReq) GetUSN() string {
|
func (x *LeaveReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *LeaveReq) GetUniqueNo() string {
|
func (x *LeaveReq) GetUniqueNo() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.UniqueNo
|
return x.UniqueNo
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type LeaveResp struct {
|
type LeaveResp struct {
|
||||||
@@ -253,12 +253,12 @@ type ActionReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
UniqueNo string `protobuf:"bytes,1,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
UniqueNo int64 `protobuf:"varint,1,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||||
USN string `protobuf:"bytes,2,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
USN int64 `protobuf:"varint,2,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||||
Action int32 `protobuf:"varint,3,opt,name=Action,proto3" json:"Action,omitempty"` // 指令ID
|
Action int32 `protobuf:"varint,3,opt,name=Action,proto3" json:"Action,omitempty"` // 指令ID
|
||||||
DirX int32 `protobuf:"zigzag32,4,opt,name=DirX,proto3" json:"DirX,omitempty"` // 移动-X方向(×1000 缩放)
|
DirX int32 `protobuf:"zigzag32,4,opt,name=DirX,proto3" json:"DirX,omitempty"` // 移动-X方向(×1000 缩放)
|
||||||
DirY int32 `protobuf:"zigzag32,5,opt,name=DirY,proto3" json:"DirY,omitempty"` // 移动-Y方向(×1000 缩放)
|
DirY int32 `protobuf:"zigzag32,5,opt,name=DirY,proto3" json:"DirY,omitempty"` // 移动-Y方向(×1000 缩放)
|
||||||
SkillID int32 `protobuf:"varint,6,opt,name=SkillID,proto3" json:"SkillID,omitempty"` // 攻击-技能ID
|
SkillID int32 `protobuf:"varint,6,opt,name=SkillID,proto3" json:"SkillID,omitempty"` // 攻击-技能ID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ActionReq) Reset() {
|
func (x *ActionReq) Reset() {
|
||||||
@@ -293,18 +293,18 @@ func (*ActionReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_scene_proto_rawDescGZIP(), []int{4}
|
return file_service_scene_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ActionReq) GetUniqueNo() string {
|
func (x *ActionReq) GetUniqueNo() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.UniqueNo
|
return x.UniqueNo
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ActionReq) GetUSN() string {
|
func (x *ActionReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ActionReq) GetAction() int32 {
|
func (x *ActionReq) GetAction() int32 {
|
||||||
@@ -379,27 +379,27 @@ var file_service_scene_proto_rawDesc = []byte{
|
|||||||
0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x2e,
|
0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x2e,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x08, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x08, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52,
|
||||||
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
0x03, 0x55, 0x53, 0x4e, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53,
|
0x03, 0x55, 0x53, 0x4e, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53,
|
||||||
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
|
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
|
||||||
0x79, 0x53, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
0x79, 0x53, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||||
0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
|
0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
|
||||||
0x63, 0x65, 0x49, 0x44, 0x22, 0x7b, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
|
0x63, 0x65, 0x49, 0x44, 0x22, 0x7b, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||||
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x18, 0x01, 0x20,
|
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x12, 0x1a, 0x0a,
|
0x01, 0x28, 0x03, 0x52, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x12, 0x1a, 0x0a,
|
||||||
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73,
|
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x65,
|
0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x65,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f,
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f,
|
||||||
0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
||||||
0x64, 0x22, 0x38, 0x0a, 0x08, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a,
|
0x64, 0x22, 0x38, 0x0a, 0x08, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a,
|
||||||
0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12,
|
0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12,
|
||||||
0x1a, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x1a, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x09, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x4c,
|
0x03, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x4c,
|
||||||
0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x93, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x74,
|
0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x93, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
|
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
|
||||||
0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
|
0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
|
||||||
0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
0x03, 0x55, 0x53, 0x4e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
0x03, 0x55, 0x53, 0x4e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x44, 0x69, 0x72, 0x58, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x44, 0x69, 0x72, 0x58,
|
0x44, 0x69, 0x72, 0x58, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x44, 0x69, 0x72, 0x58,
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ type PhoneLoginResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID
|
||||||
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"` // 用户名
|
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"` // 用户名
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,11 +119,11 @@ func (*PhoneLoginResp) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_user_proto_rawDescGZIP(), []int{1}
|
return file_service_user_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PhoneLoginResp) GetUSN() string {
|
func (x *PhoneLoginResp) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PhoneLoginResp) GetName() string {
|
func (x *PhoneLoginResp) GetName() string {
|
||||||
@@ -186,7 +186,7 @@ type WxMiniLoginResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID
|
||||||
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"` // 用户名
|
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"` // 用户名
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,11 +222,11 @@ func (*WxMiniLoginResp) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_user_proto_rawDescGZIP(), []int{3}
|
return file_service_user_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WxMiniLoginResp) GetUSN() string {
|
func (x *WxMiniLoginResp) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WxMiniLoginResp) GetName() string {
|
func (x *WxMiniLoginResp) GetName() string {
|
||||||
@@ -242,7 +242,7 @@ type GetUserInfoReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetUserInfoReq) Reset() {
|
func (x *GetUserInfoReq) Reset() {
|
||||||
@@ -277,11 +277,11 @@ func (*GetUserInfoReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_user_proto_rawDescGZIP(), []int{4}
|
return file_service_user_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetUserInfoReq) GetUSN() string {
|
func (x *GetUserInfoReq) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetUserInfoResp struct {
|
type GetUserInfoResp struct {
|
||||||
@@ -289,7 +289,7 @@ type GetUserInfoResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||||
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"`
|
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,11 +325,11 @@ func (*GetUserInfoResp) Descriptor() ([]byte, []int) {
|
|||||||
return file_service_user_proto_rawDescGZIP(), []int{5}
|
return file_service_user_proto_rawDescGZIP(), []int{5}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetUserInfoResp) GetUSN() string {
|
func (x *GetUserInfoResp) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetUserInfoResp) GetName() string {
|
func (x *GetUserInfoResp) GetName() string {
|
||||||
@@ -351,19 +351,19 @@ var file_service_user_proto_rawDesc = []byte{
|
|||||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f,
|
0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f,
|
||||||
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x36,
|
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x36,
|
||||||
0x0a, 0x0e, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
0x0a, 0x0e, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75,
|
||||||
0x73, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
0x73, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0e, 0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69,
|
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0e, 0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69,
|
||||||
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65,
|
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x37, 0x0a, 0x0f,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x37, 0x0a, 0x0f,
|
||||||
0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
|
0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||||
0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73,
|
0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73,
|
||||||
0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x22, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
|
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x22, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
|
||||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01,
|
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x22, 0x37, 0x0a, 0x0f, 0x47, 0x65, 0x74,
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x22, 0x37, 0x0a, 0x0f, 0x47, 0x65, 0x74,
|
||||||
0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03,
|
0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x12,
|
0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x12,
|
||||||
0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||||
0x6d, 0x65, 0x32, 0xb9, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x0a, 0x50,
|
0x6d, 0x65, 0x32, 0xb9, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x0a, 0x50,
|
||||||
0x68, 0x6f, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x2e, 0x50, 0x68, 0x6f, 0x6e,
|
0x68, 0x6f, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x2e, 0x50, 0x68, 0x6f, 0x6e,
|
||||||
|
|||||||
@@ -259,9 +259,9 @@ type PositionInfo struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||||
X int32 `protobuf:"zigzag32,2,opt,name=X,proto3" json:"X,omitempty"`
|
X int32 `protobuf:"zigzag32,2,opt,name=X,proto3" json:"X,omitempty"`
|
||||||
Y int32 `protobuf:"zigzag32,3,opt,name=Y,proto3" json:"Y,omitempty"`
|
Y int32 `protobuf:"zigzag32,3,opt,name=Y,proto3" json:"Y,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PositionInfo) Reset() {
|
func (x *PositionInfo) Reset() {
|
||||||
@@ -296,11 +296,11 @@ func (*PositionInfo) Descriptor() ([]byte, []int) {
|
|||||||
return file_action_proto_rawDescGZIP(), []int{3}
|
return file_action_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PositionInfo) GetUSN() string {
|
func (x *PositionInfo) GetUSN() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.USN
|
return x.USN
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PositionInfo) GetX() int32 {
|
func (x *PositionInfo) GetX() int32 {
|
||||||
@@ -388,7 +388,7 @@ var file_action_proto_rawDesc = []byte{
|
|||||||
0x12, 0x18, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28,
|
0x12, 0x18, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||||
0x05, 0x52, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x22, 0x3c, 0x0a, 0x0c, 0x50, 0x6f,
|
0x05, 0x52, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x22, 0x3c, 0x0a, 0x0c, 0x50, 0x6f,
|
||||||
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53,
|
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53,
|
||||||
0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x0c, 0x0a, 0x01,
|
0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x0c, 0x0a, 0x01,
|
||||||
0x58, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x58, 0x12, 0x0c, 0x0a, 0x01, 0x59, 0x18,
|
0x58, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x58, 0x12, 0x0c, 0x0a, 0x01, 0x59, 0x18,
|
||||||
0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x59, 0x22, 0x31, 0x0a, 0x0c, 0x53, 0x32, 0x43, 0x5f,
|
0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x59, 0x22, 0x31, 0x0a, 0x0c, 0x53, 0x32, 0x43, 0x5f,
|
||||||
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f,
|
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f,
|
||||||
|
|||||||
17
utils/jwt.go
17
utils/jwt.go
@@ -1,19 +1,17 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/golang-jwt/jwt/v5"
|
"github.com/golang-jwt/jwt/v5"
|
||||||
"google.golang.org/grpc/metadata"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Claims struct {
|
type Claims struct {
|
||||||
USN string `json:"usn"`
|
USN int64 `json:"usn"`
|
||||||
jwt.RegisteredClaims
|
jwt.RegisteredClaims
|
||||||
}
|
}
|
||||||
|
|
||||||
func GenToken(usn string, secret string, expires time.Duration) (string, error) {
|
func GenToken(usn int64, secret string, expires time.Duration) (string, error) {
|
||||||
token := jwt.NewWithClaims(jwt.SigningMethodHS256, Claims{
|
token := jwt.NewWithClaims(jwt.SigningMethodHS256, Claims{
|
||||||
USN: usn,
|
USN: usn,
|
||||||
RegisteredClaims: jwt.RegisteredClaims{
|
RegisteredClaims: jwt.RegisteredClaims{
|
||||||
@@ -39,14 +37,3 @@ func ParseToken(tokenString string, secret string) (*Claims, error) {
|
|||||||
}
|
}
|
||||||
return claims, nil
|
return claims, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ShouldBindUsn(ctx context.Context, usn *string) bool {
|
|
||||||
if md, ok := metadata.FromIncomingContext(ctx); ok {
|
|
||||||
usnArr := md.Get("X-Usn")
|
|
||||||
if len(usnArr) == 0 || usnArr[0] == "" {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
*usn = usnArr[0]
|
|
||||||
}
|
|
||||||
return *usn != ""
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -21,3 +21,8 @@ func StringToInt64(s string) int64 {
|
|||||||
}
|
}
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Int64ToString converts int64 to string
|
||||||
|
func Int64ToString(i int64) string {
|
||||||
|
return strconv.FormatInt(i, 10)
|
||||||
|
}
|
||||||
|
|||||||
29
utils/session.go
Normal file
29
utils/session.go
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"google.golang.org/grpc/metadata"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UserSession struct {
|
||||||
|
USN int64 `json:"usn" redis:"usn"`
|
||||||
|
IP string `json:"ip" redis:"ip"`
|
||||||
|
UserAgent string `json:"ua" redis:"ua"`
|
||||||
|
AccessToken string `json:"at" redis:"at"`
|
||||||
|
RefreshToken string `json:"rt" redis:"rt"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (us *UserSession) GetUsnKey() string {
|
||||||
|
return "usn"
|
||||||
|
}
|
||||||
|
|
||||||
|
func ShouldBindUsn(ctx context.Context, usn *int64) bool {
|
||||||
|
if md, ok := metadata.FromIncomingContext(ctx); ok {
|
||||||
|
usnArr := md.Get("X-Usn")
|
||||||
|
if len(usnArr) == 0 || usnArr[0] == "" {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
*usn = StringToInt64(usnArr[0])
|
||||||
|
}
|
||||||
|
return *usn != 0
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user