✨ Redis cache
This commit is contained in:
parent
f3f9ebb5af
commit
1651328a74
3
go.mod
3
go.mod
@ -33,8 +33,10 @@ require (
|
||||
require (
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/andybalholm/brotli v1.1.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/coreos/go-semver v0.3.1 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/fasthttp/websocket v1.5.10 // indirect
|
||||
github.com/fsnotify/fsnotify v1.8.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
||||
@ -65,6 +67,7 @@ require (
|
||||
github.com/nats-io/nuid v1.0.1 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
||||
github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect
|
||||
github.com/redis/go-redis/v9 v9.7.3 // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/rogpeppe/go-internal v1.11.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.6.0 // indirect
|
||||
|
6
go.sum
6
go.sum
@ -4,6 +4,8 @@ github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0
|
||||
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
|
||||
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
|
||||
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
|
||||
@ -12,6 +14,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fasthttp/websocket v1.5.10 h1:bc7NIGyrg1L6sd5pRzCIbXpro54SZLEluZCu0rOpcN4=
|
||||
github.com/fasthttp/websocket v1.5.10/go.mod h1:BwHeuXGWzCW1/BIKUKD3+qfCl+cTdsHu/f243NcAI/Q=
|
||||
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
||||
@ -129,6 +133,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM=
|
||||
github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
|
0
ip_block.list
Normal file
0
ip_block.list
Normal file
14
pkg/internal/cache/redis.go
vendored
Normal file
14
pkg/internal/cache/redis.go
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
package cache
|
||||
|
||||
import "github.com/redis/go-redis/v9"
|
||||
|
||||
var Rdb *redis.Client
|
||||
|
||||
func ConnectRedis(addr, password string, db int) error {
|
||||
Rdb = redis.NewClient(&redis.Options{
|
||||
Addr: addr,
|
||||
Password: password,
|
||||
DB: db,
|
||||
})
|
||||
return nil
|
||||
}
|
@ -2,6 +2,8 @@ package grpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/cache"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/kv"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/mq"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/proto"
|
||||
@ -31,3 +33,16 @@ func (v *Server) AllocKv(ctx context.Context, request *proto.AllocKvRequest) (*p
|
||||
Endpoints: viper.GetStringSlice("kv.endpoints"),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (v *Server) AllocCache(ctx context.Context, request *proto.AllocCacheRequest) (*proto.AllocCacheResponse, error) {
|
||||
if cache.Rdb == nil {
|
||||
return &proto.AllocCacheResponse{IsSuccess: false}, status.Error(codes.Unavailable, "cache wasn't configured")
|
||||
}
|
||||
|
||||
return &proto.AllocCacheResponse{
|
||||
IsSuccess: true,
|
||||
Addr: viper.GetString("cache.addr"),
|
||||
Password: viper.GetString("cache.password"),
|
||||
Db: request.GetDb(),
|
||||
}, nil
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"syscall"
|
||||
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/auth"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/cache"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/database"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/directory"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/kv"
|
||||
@ -71,6 +72,14 @@ func main() {
|
||||
log.Info().Msg("Connected to MQ (nats)!")
|
||||
}
|
||||
|
||||
// Connect to cache (redis)
|
||||
log.Info().Msg("Connecting to cache (redis)...")
|
||||
if err := cache.ConnectRedis(viper.GetString("cache.addr"), viper.GetString("cache.password"), 0); err != nil {
|
||||
log.Error().Err(err).Msg("An error occurred when connecting to cache (redis). Cache related features will be disabled.")
|
||||
} else {
|
||||
log.Info().Msg("Connected to cache (redis)!")
|
||||
}
|
||||
|
||||
// Connect to database
|
||||
log.Info().Msg("Connecting to database...")
|
||||
if db, err := database.Connect(viper.GetString("database.dsn")); err != nil {
|
||||
|
@ -2,14 +2,17 @@ package nex
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/proto"
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
type AllocatableResourceType = string
|
||||
|
||||
const (
|
||||
AllocatableResourceMq = AllocatableResourceType("mq")
|
||||
AllocatableResourceKv = AllocatableResourceType("kv")
|
||||
AllocatableResourceMq = AllocatableResourceType("mq")
|
||||
AllocatableResourceKv = AllocatableResourceType("kv")
|
||||
AllocatableResourceCache = AllocatableResourceType("cache")
|
||||
)
|
||||
|
||||
func (v *Conn) AllocResource(t AllocatableResourceType) any {
|
||||
@ -28,6 +31,17 @@ func (v *Conn) AllocResource(t AllocatableResourceType) any {
|
||||
return nil
|
||||
}
|
||||
return resp.Endpoints
|
||||
case AllocatableResourceCache:
|
||||
conn := v.GetNexusGrpcConn()
|
||||
resp, err := proto.NewAllocatorServiceClient(conn).AllocCache(context.Background(), &proto.AllocCacheRequest{})
|
||||
if err != nil || !resp.IsSuccess {
|
||||
return nil
|
||||
}
|
||||
return redis.NewClient(&redis.Options{
|
||||
Addr: resp.GetAddr(),
|
||||
Password: resp.GetPassword(),
|
||||
DB: int(resp.GetDb()),
|
||||
})
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
87
pkg/nex/cachekit/rdb.go
Normal file
87
pkg/nex/cachekit/rdb.go
Normal file
@ -0,0 +1,87 @@
|
||||
package cachekit
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/nex"
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
type CaConn struct {
|
||||
n *nex.Conn
|
||||
Rd *redis.Client
|
||||
Timeout time.Duration
|
||||
}
|
||||
|
||||
func NewCaConn(conn *nex.Conn, timeout time.Duration) (*CaConn, error) {
|
||||
c := &CaConn{
|
||||
n: conn,
|
||||
Timeout: timeout,
|
||||
}
|
||||
|
||||
rdb := conn.AllocResource(nex.AllocatableResourceCache)
|
||||
if rdb == nil {
|
||||
return nil, fmt.Errorf("unable to allocate resource: cache")
|
||||
} else if client, ok := rdb.(*redis.Client); !ok {
|
||||
return nil, fmt.Errorf("allocated cache resource is not a redis client")
|
||||
} else {
|
||||
c.Rd = client
|
||||
}
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func (c *CaConn) withTimeout() (context.Context, context.CancelFunc) {
|
||||
return context.WithTimeout(context.Background(), c.Timeout)
|
||||
}
|
||||
|
||||
// Set stores a key-value pair in Redis with an optional expiration time
|
||||
func (c *CaConn) Set(key string, value any, ttl time.Duration) error {
|
||||
ctx, cancel := c.withTimeout()
|
||||
defer cancel()
|
||||
return c.Rd.Set(ctx, key, value, ttl).Err()
|
||||
}
|
||||
|
||||
// Get retrieves a value from Redis by key
|
||||
func (c *CaConn) Get(key string) (string, error) {
|
||||
ctx, cancel := c.withTimeout()
|
||||
defer cancel()
|
||||
return c.Rd.Get(ctx, key).Result()
|
||||
}
|
||||
|
||||
// Delete removes a key from Redis
|
||||
func (c *CaConn) Delete(key string) error {
|
||||
ctx, cancel := c.withTimeout()
|
||||
defer cancel()
|
||||
return c.Rd.Del(ctx, key).Err()
|
||||
}
|
||||
|
||||
// Exists checks if a key exists in Redis
|
||||
func (c *CaConn) Exists(key string) (bool, error) {
|
||||
ctx, cancel := c.withTimeout()
|
||||
defer cancel()
|
||||
exists, err := c.Rd.Exists(ctx, key).Result()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return exists > 0, nil
|
||||
}
|
||||
|
||||
// ClearCacheByPrefix deletes all keys matching a given prefix
|
||||
func (c *CaConn) DeleteByPrefix(prefix string) error {
|
||||
ctx, cancel := c.withTimeout()
|
||||
defer cancel()
|
||||
|
||||
iter := c.Rd.Scan(ctx, 0, prefix+"*", 0).Iterator()
|
||||
for iter.Next(ctx) {
|
||||
if err := c.Rd.Del(ctx, iter.Val()).Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := iter.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: allocator.proto
|
||||
|
||||
package proto
|
||||
@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -21,9 +22,9 @@ const (
|
||||
)
|
||||
|
||||
type AllocMqRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AllocMqRequest) Reset() {
|
||||
@ -57,12 +58,11 @@ func (*AllocMqRequest) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
type AllocMqResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AllocMqResponse) Reset() {
|
||||
@ -110,9 +110,9 @@ func (x *AllocMqResponse) GetAddr() string {
|
||||
}
|
||||
|
||||
type AllocKvRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AllocKvRequest) Reset() {
|
||||
@ -146,12 +146,11 @@ func (*AllocKvRequest) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
type AllocKvResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
Endpoints []string `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
Endpoints []string `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AllocKvResponse) Reset() {
|
||||
@ -198,61 +197,177 @@ func (x *AllocKvResponse) GetEndpoints() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
type AllocCacheRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Db int32 `protobuf:"varint,1,opt,name=db,proto3" json:"db,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AllocCacheRequest) Reset() {
|
||||
*x = AllocCacheRequest{}
|
||||
mi := &file_allocator_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AllocCacheRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AllocCacheRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AllocCacheRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_allocator_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AllocCacheRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AllocCacheRequest) Descriptor() ([]byte, []int) {
|
||||
return file_allocator_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *AllocCacheRequest) GetDb() int32 {
|
||||
if x != nil {
|
||||
return x.Db
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type AllocCacheResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
|
||||
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
|
||||
Db int32 `protobuf:"varint,4,opt,name=db,proto3" json:"db,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AllocCacheResponse) Reset() {
|
||||
*x = AllocCacheResponse{}
|
||||
mi := &file_allocator_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AllocCacheResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AllocCacheResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AllocCacheResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_allocator_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AllocCacheResponse.ProtoReflect.Descriptor instead.
|
||||
func (*AllocCacheResponse) Descriptor() ([]byte, []int) {
|
||||
return file_allocator_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *AllocCacheResponse) GetIsSuccess() bool {
|
||||
if x != nil {
|
||||
return x.IsSuccess
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *AllocCacheResponse) GetAddr() string {
|
||||
if x != nil {
|
||||
return x.Addr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AllocCacheResponse) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AllocCacheResponse) GetDb() int32 {
|
||||
if x != nil {
|
||||
return x.Db
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_allocator_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_allocator_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x6c, 0x6c, 0x6f,
|
||||
0x63, 0x4d, 0x71, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, 0x0f, 0x41, 0x6c,
|
||||
0x6c, 0x6f, 0x63, 0x4d, 0x71, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72,
|
||||
0x22, 0x10, 0x0a, 0x0e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x4b, 0x76, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x22, 0x4e, 0x0a, 0x0f, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x4b, 0x76, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e,
|
||||
0x74, 0x73, 0x32, 0x94, 0x01, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x11, 0x41, 0x6c, 0x6c, 0x6f, 0x63,
|
||||
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x15, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x4d, 0x71, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f,
|
||||
0x63, 0x4d, 0x71, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a,
|
||||
0x07, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x4b, 0x76, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x4b, 0x76, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x4b, 0x76, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_allocator_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0fallocator.proto\x12\x05proto\"\x10\n" +
|
||||
"\x0eAllocMqRequest\"D\n" +
|
||||
"\x0fAllocMqResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_success\x18\x01 \x01(\bR\tisSuccess\x12\x12\n" +
|
||||
"\x04addr\x18\x02 \x01(\tR\x04addr\"\x10\n" +
|
||||
"\x0eAllocKvRequest\"N\n" +
|
||||
"\x0fAllocKvResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_success\x18\x01 \x01(\bR\tisSuccess\x12\x1c\n" +
|
||||
"\tendpoints\x18\x02 \x03(\tR\tendpoints\"#\n" +
|
||||
"\x11AllocCacheRequest\x12\x0e\n" +
|
||||
"\x02db\x18\x01 \x01(\x05R\x02db\"s\n" +
|
||||
"\x12AllocCacheResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_success\x18\x01 \x01(\bR\tisSuccess\x12\x12\n" +
|
||||
"\x04addr\x18\x02 \x01(\tR\x04addr\x12\x1a\n" +
|
||||
"\bpassword\x18\x03 \x01(\tR\bpassword\x12\x0e\n" +
|
||||
"\x02db\x18\x04 \x01(\x05R\x02db2\xd9\x01\n" +
|
||||
"\x10AllocatorService\x12D\n" +
|
||||
"\x11AllocMessageQueue\x12\x15.proto.AllocMqRequest\x1a\x16.proto.AllocMqResponse\"\x00\x12:\n" +
|
||||
"\aAllocKv\x12\x15.proto.AllocKvRequest\x1a\x16.proto.AllocKvResponse\"\x00\x12C\n" +
|
||||
"\n" +
|
||||
"AllocCache\x12\x18.proto.AllocCacheRequest\x1a\x19.proto.AllocCacheResponse\"\x00B\tZ\a.;protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_allocator_proto_rawDescOnce sync.Once
|
||||
file_allocator_proto_rawDescData = file_allocator_proto_rawDesc
|
||||
file_allocator_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_allocator_proto_rawDescGZIP() []byte {
|
||||
file_allocator_proto_rawDescOnce.Do(func() {
|
||||
file_allocator_proto_rawDescData = protoimpl.X.CompressGZIP(file_allocator_proto_rawDescData)
|
||||
file_allocator_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_allocator_proto_rawDesc), len(file_allocator_proto_rawDesc)))
|
||||
})
|
||||
return file_allocator_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_allocator_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_allocator_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_allocator_proto_goTypes = []any{
|
||||
(*AllocMqRequest)(nil), // 0: proto.AllocMqRequest
|
||||
(*AllocMqResponse)(nil), // 1: proto.AllocMqResponse
|
||||
(*AllocKvRequest)(nil), // 2: proto.AllocKvRequest
|
||||
(*AllocKvResponse)(nil), // 3: proto.AllocKvResponse
|
||||
(*AllocMqRequest)(nil), // 0: proto.AllocMqRequest
|
||||
(*AllocMqResponse)(nil), // 1: proto.AllocMqResponse
|
||||
(*AllocKvRequest)(nil), // 2: proto.AllocKvRequest
|
||||
(*AllocKvResponse)(nil), // 3: proto.AllocKvResponse
|
||||
(*AllocCacheRequest)(nil), // 4: proto.AllocCacheRequest
|
||||
(*AllocCacheResponse)(nil), // 5: proto.AllocCacheResponse
|
||||
}
|
||||
var file_allocator_proto_depIdxs = []int32{
|
||||
0, // 0: proto.AllocatorService.AllocMessageQueue:input_type -> proto.AllocMqRequest
|
||||
2, // 1: proto.AllocatorService.AllocKv:input_type -> proto.AllocKvRequest
|
||||
1, // 2: proto.AllocatorService.AllocMessageQueue:output_type -> proto.AllocMqResponse
|
||||
3, // 3: proto.AllocatorService.AllocKv:output_type -> proto.AllocKvResponse
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
4, // 2: proto.AllocatorService.AllocCache:input_type -> proto.AllocCacheRequest
|
||||
1, // 3: proto.AllocatorService.AllocMessageQueue:output_type -> proto.AllocMqResponse
|
||||
3, // 4: proto.AllocatorService.AllocKv:output_type -> proto.AllocKvResponse
|
||||
5, // 5: proto.AllocatorService.AllocCache:output_type -> proto.AllocCacheResponse
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
@ -267,9 +382,9 @@ func file_allocator_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_allocator_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_allocator_proto_rawDesc), len(file_allocator_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
@ -278,7 +393,6 @@ func file_allocator_proto_init() {
|
||||
MessageInfos: file_allocator_proto_msgTypes,
|
||||
}.Build()
|
||||
File_allocator_proto = out.File
|
||||
file_allocator_proto_rawDesc = nil
|
||||
file_allocator_proto_goTypes = nil
|
||||
file_allocator_proto_depIdxs = nil
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ package proto;
|
||||
service AllocatorService {
|
||||
rpc AllocMessageQueue(AllocMqRequest) returns (AllocMqResponse) {}
|
||||
rpc AllocKv(AllocKvRequest) returns (AllocKvResponse) {}
|
||||
rpc AllocCache(AllocCacheRequest) returns (AllocCacheResponse) {}
|
||||
}
|
||||
|
||||
message AllocMqRequest {
|
||||
@ -23,4 +24,15 @@ message AllocKvRequest {
|
||||
message AllocKvResponse {
|
||||
bool is_success = 1;
|
||||
repeated string endpoints = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message AllocCacheRequest {
|
||||
int32 db = 1;
|
||||
}
|
||||
|
||||
message AllocCacheResponse {
|
||||
bool is_success = 1;
|
||||
string addr = 2;
|
||||
string password = 3;
|
||||
int32 db = 4;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.3
|
||||
// source: allocator.proto
|
||||
|
||||
package proto
|
||||
@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion9
|
||||
const (
|
||||
AllocatorService_AllocMessageQueue_FullMethodName = "/proto.AllocatorService/AllocMessageQueue"
|
||||
AllocatorService_AllocKv_FullMethodName = "/proto.AllocatorService/AllocKv"
|
||||
AllocatorService_AllocCache_FullMethodName = "/proto.AllocatorService/AllocCache"
|
||||
)
|
||||
|
||||
// AllocatorServiceClient is the client API for AllocatorService service.
|
||||
@ -29,6 +30,7 @@ const (
|
||||
type AllocatorServiceClient interface {
|
||||
AllocMessageQueue(ctx context.Context, in *AllocMqRequest, opts ...grpc.CallOption) (*AllocMqResponse, error)
|
||||
AllocKv(ctx context.Context, in *AllocKvRequest, opts ...grpc.CallOption) (*AllocKvResponse, error)
|
||||
AllocCache(ctx context.Context, in *AllocCacheRequest, opts ...grpc.CallOption) (*AllocCacheResponse, error)
|
||||
}
|
||||
|
||||
type allocatorServiceClient struct {
|
||||
@ -59,12 +61,23 @@ func (c *allocatorServiceClient) AllocKv(ctx context.Context, in *AllocKvRequest
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *allocatorServiceClient) AllocCache(ctx context.Context, in *AllocCacheRequest, opts ...grpc.CallOption) (*AllocCacheResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AllocCacheResponse)
|
||||
err := c.cc.Invoke(ctx, AllocatorService_AllocCache_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AllocatorServiceServer is the server API for AllocatorService service.
|
||||
// All implementations must embed UnimplementedAllocatorServiceServer
|
||||
// for forward compatibility.
|
||||
type AllocatorServiceServer interface {
|
||||
AllocMessageQueue(context.Context, *AllocMqRequest) (*AllocMqResponse, error)
|
||||
AllocKv(context.Context, *AllocKvRequest) (*AllocKvResponse, error)
|
||||
AllocCache(context.Context, *AllocCacheRequest) (*AllocCacheResponse, error)
|
||||
mustEmbedUnimplementedAllocatorServiceServer()
|
||||
}
|
||||
|
||||
@ -81,6 +94,9 @@ func (UnimplementedAllocatorServiceServer) AllocMessageQueue(context.Context, *A
|
||||
func (UnimplementedAllocatorServiceServer) AllocKv(context.Context, *AllocKvRequest) (*AllocKvResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AllocKv not implemented")
|
||||
}
|
||||
func (UnimplementedAllocatorServiceServer) AllocCache(context.Context, *AllocCacheRequest) (*AllocCacheResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AllocCache not implemented")
|
||||
}
|
||||
func (UnimplementedAllocatorServiceServer) mustEmbedUnimplementedAllocatorServiceServer() {}
|
||||
func (UnimplementedAllocatorServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
@ -138,6 +154,24 @@ func _AllocatorService_AllocKv_Handler(srv interface{}, ctx context.Context, dec
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AllocatorService_AllocCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AllocCacheRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AllocatorServiceServer).AllocCache(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AllocatorService_AllocCache_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AllocatorServiceServer).AllocCache(ctx, req.(*AllocCacheRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AllocatorService_ServiceDesc is the grpc.ServiceDesc for AllocatorService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -153,6 +187,10 @@ var AllocatorService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "AllocKv",
|
||||
Handler: _AllocatorService_AllocKv_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AllocCache",
|
||||
Handler: _AllocatorService_AllocCache_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "allocator.proto",
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: authenticate.proto
|
||||
|
||||
package proto
|
||||
@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -21,12 +22,11 @@ const (
|
||||
)
|
||||
|
||||
type AuthInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Info *UserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
|
||||
SessionId uint64 `protobuf:"varint,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Info *UserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
|
||||
SessionId uint64 `protobuf:"varint,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AuthInfo) Reset() {
|
||||
@ -74,11 +74,10 @@ func (x *AuthInfo) GetSessionId() uint64 {
|
||||
}
|
||||
|
||||
type AuthRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SessionId uint64 `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SessionId uint64 `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AuthRequest) Reset() {
|
||||
@ -119,12 +118,11 @@ func (x *AuthRequest) GetSessionId() uint64 {
|
||||
}
|
||||
|
||||
type AuthReply struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
|
||||
Info *AuthInfo `protobuf:"bytes,2,opt,name=info,proto3,oneof" json:"info,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
|
||||
Info *AuthInfo `protobuf:"bytes,2,opt,name=info,proto3,oneof" json:"info,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AuthReply) Reset() {
|
||||
@ -172,13 +170,12 @@ func (x *AuthReply) GetInfo() *AuthInfo {
|
||||
}
|
||||
|
||||
type CheckPermRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SessionId uint64 `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SessionId uint64 `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckPermRequest) Reset() {
|
||||
@ -233,11 +230,10 @@ func (x *CheckPermRequest) GetValue() []byte {
|
||||
}
|
||||
|
||||
type CheckPermResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckPermResponse) Reset() {
|
||||
@ -278,14 +274,13 @@ func (x *CheckPermResponse) GetIsValid() bool {
|
||||
}
|
||||
|
||||
type CheckUserPermRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
OtherId uint64 `protobuf:"varint,2,opt,name=other_id,json=otherId,proto3" json:"other_id,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
OtherId uint64 `protobuf:"varint,2,opt,name=other_id,json=otherId,proto3" json:"other_id,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckUserPermRequest) Reset() {
|
||||
@ -347,11 +342,10 @@ func (x *CheckUserPermRequest) GetValue() []byte {
|
||||
}
|
||||
|
||||
type CheckUserPermResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckUserPermResponse) Reset() {
|
||||
@ -393,68 +387,48 @@ func (x *CheckUserPermResponse) GetIsValid() bool {
|
||||
|
||||
var File_authenticate_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_authenticate_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x75, 0x73, 0x65,
|
||||
0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x59, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x70,
|
||||
0x6c, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x28, 0x0a,
|
||||
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, 0x52, 0x04,
|
||||
0x69, 0x6e, 0x66, 0x6f, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x22, 0x59, 0x0a, 0x10, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2e, 0x0a, 0x11, 0x43,
|
||||
0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x72, 0x0a, 0x14, 0x43,
|
||||
0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08,
|
||||
0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07,
|
||||
0x6f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
|
||||
0x32, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76,
|
||||
0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x32, 0xe5, 0x01, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63,
|
||||
0x61, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x75, 0x74, 0x68,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
|
||||
0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x11, 0x45,
|
||||
0x6e, 0x73, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64,
|
||||
0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65,
|
||||
0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x15, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x55,
|
||||
0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x1b,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72,
|
||||
0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72,
|
||||
0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e,
|
||||
0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_authenticate_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x12authenticate.proto\x12\x05proto\x1a\n" +
|
||||
"user.proto\"N\n" +
|
||||
"\bAuthInfo\x12#\n" +
|
||||
"\x04info\x18\x01 \x01(\v2\x0f.proto.UserInfoR\x04info\x12\x1d\n" +
|
||||
"\n" +
|
||||
"session_id\x18\x03 \x01(\x04R\tsessionId\",\n" +
|
||||
"\vAuthRequest\x12\x1d\n" +
|
||||
"\n" +
|
||||
"session_id\x18\x01 \x01(\x04R\tsessionId\"Y\n" +
|
||||
"\tAuthReply\x12\x19\n" +
|
||||
"\bis_valid\x18\x01 \x01(\bR\aisValid\x12(\n" +
|
||||
"\x04info\x18\x02 \x01(\v2\x0f.proto.AuthInfoH\x00R\x04info\x88\x01\x01B\a\n" +
|
||||
"\x05_info\"Y\n" +
|
||||
"\x10CheckPermRequest\x12\x1d\n" +
|
||||
"\n" +
|
||||
"session_id\x18\x01 \x01(\x04R\tsessionId\x12\x10\n" +
|
||||
"\x03key\x18\x02 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x03 \x01(\fR\x05value\".\n" +
|
||||
"\x11CheckPermResponse\x12\x19\n" +
|
||||
"\bis_valid\x18\x01 \x01(\bR\aisValid\"r\n" +
|
||||
"\x14CheckUserPermRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x04R\x06userId\x12\x19\n" +
|
||||
"\bother_id\x18\x02 \x01(\x04R\aotherId\x12\x10\n" +
|
||||
"\x03key\x18\x03 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x04 \x01(\fR\x05value\"2\n" +
|
||||
"\x15CheckUserPermResponse\x12\x19\n" +
|
||||
"\bis_valid\x18\x01 \x01(\bR\aisValid2\xe5\x01\n" +
|
||||
"\vAuthService\x126\n" +
|
||||
"\fAuthenticate\x12\x12.proto.AuthRequest\x1a\x10.proto.AuthReply\"\x00\x12H\n" +
|
||||
"\x11EnsurePermGranted\x12\x17.proto.CheckPermRequest\x1a\x18.proto.CheckPermResponse\"\x00\x12T\n" +
|
||||
"\x15EnsureUserPermGranted\x12\x1b.proto.CheckUserPermRequest\x1a\x1c.proto.CheckUserPermResponse\"\x00B\tZ\a.;protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_authenticate_proto_rawDescOnce sync.Once
|
||||
file_authenticate_proto_rawDescData = file_authenticate_proto_rawDesc
|
||||
file_authenticate_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_authenticate_proto_rawDescGZIP() []byte {
|
||||
file_authenticate_proto_rawDescOnce.Do(func() {
|
||||
file_authenticate_proto_rawDescData = protoimpl.X.CompressGZIP(file_authenticate_proto_rawDescData)
|
||||
file_authenticate_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authenticate_proto_rawDesc), len(file_authenticate_proto_rawDesc)))
|
||||
})
|
||||
return file_authenticate_proto_rawDescData
|
||||
}
|
||||
@ -497,7 +471,7 @@ func file_authenticate_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_authenticate_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_authenticate_proto_rawDesc), len(file_authenticate_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
@ -508,7 +482,6 @@ func file_authenticate_proto_init() {
|
||||
MessageInfos: file_authenticate_proto_msgTypes,
|
||||
}.Build()
|
||||
File_authenticate_proto = out.File
|
||||
file_authenticate_proto_rawDesc = nil
|
||||
file_authenticate_proto_goTypes = nil
|
||||
file_authenticate_proto_depIdxs = nil
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.3
|
||||
// source: authenticate.proto
|
||||
|
||||
package proto
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: captcha.proto
|
||||
|
||||
package proto
|
||||
@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -21,12 +22,11 @@ const (
|
||||
)
|
||||
|
||||
type CheckCaptchaRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
RemoteIp string `protobuf:"bytes,2,opt,name=remote_ip,json=remoteIp,proto3" json:"remote_ip,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
RemoteIp string `protobuf:"bytes,2,opt,name=remote_ip,json=remoteIp,proto3" json:"remote_ip,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckCaptchaRequest) Reset() {
|
||||
@ -74,11 +74,10 @@ func (x *CheckCaptchaRequest) GetRemoteIp() string {
|
||||
}
|
||||
|
||||
type CheckCaptchaResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckCaptchaResponse) Reset() {
|
||||
@ -120,34 +119,25 @@ func (x *CheckCaptchaResponse) GetIsValid() bool {
|
||||
|
||||
var File_captcha_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_captcha_proto_rawDesc = []byte{
|
||||
0x0a, 0x0d, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x13, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43,
|
||||
0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70,
|
||||
0x22, 0x31, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76,
|
||||
0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x32, 0x5b, 0x0a, 0x0e, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x61,
|
||||
0x70, 0x74, 0x63, 0x68, 0x61, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68,
|
||||
0x65, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43,
|
||||
0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_captcha_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\rcaptcha.proto\x12\x05proto\"H\n" +
|
||||
"\x13CheckCaptchaRequest\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\x12\x1b\n" +
|
||||
"\tremote_ip\x18\x02 \x01(\tR\bremoteIp\"1\n" +
|
||||
"\x14CheckCaptchaResponse\x12\x19\n" +
|
||||
"\bis_valid\x18\x01 \x01(\bR\aisValid2[\n" +
|
||||
"\x0eCaptchaService\x12I\n" +
|
||||
"\fCheckCaptcha\x12\x1a.proto.CheckCaptchaRequest\x1a\x1b.proto.CheckCaptchaResponse\"\x00B\tZ\a.;protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_captcha_proto_rawDescOnce sync.Once
|
||||
file_captcha_proto_rawDescData = file_captcha_proto_rawDesc
|
||||
file_captcha_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_captcha_proto_rawDescGZIP() []byte {
|
||||
file_captcha_proto_rawDescOnce.Do(func() {
|
||||
file_captcha_proto_rawDescData = protoimpl.X.CompressGZIP(file_captcha_proto_rawDescData)
|
||||
file_captcha_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_captcha_proto_rawDesc), len(file_captcha_proto_rawDesc)))
|
||||
})
|
||||
return file_captcha_proto_rawDescData
|
||||
}
|
||||
@ -176,7 +166,7 @@ func file_captcha_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_captcha_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_captcha_proto_rawDesc), len(file_captcha_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
@ -187,7 +177,6 @@ func file_captcha_proto_init() {
|
||||
MessageInfos: file_captcha_proto_msgTypes,
|
||||
}.Build()
|
||||
File_captcha_proto = out.File
|
||||
file_captcha_proto_rawDesc = nil
|
||||
file_captcha_proto_goTypes = nil
|
||||
file_captcha_proto_depIdxs = nil
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.3
|
||||
// source: captcha.proto
|
||||
|
||||
package proto
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: command.proto
|
||||
|
||||
package proto
|
||||
@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -21,13 +22,12 @@ const (
|
||||
)
|
||||
|
||||
type CommandInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
|
||||
Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
|
||||
Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CommandInfo) Reset() {
|
||||
@ -82,12 +82,11 @@ func (x *CommandInfo) GetTags() []string {
|
||||
}
|
||||
|
||||
type CommandLookupRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CommandLookupRequest) Reset() {
|
||||
@ -135,11 +134,10 @@ func (x *CommandLookupRequest) GetMethod() string {
|
||||
}
|
||||
|
||||
type AddCommandResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AddCommandResponse) Reset() {
|
||||
@ -180,11 +178,10 @@ func (x *AddCommandResponse) GetIsSuccess() bool {
|
||||
}
|
||||
|
||||
type RemoveCommandResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RemoveCommandResponse) Reset() {
|
||||
@ -225,13 +222,12 @@ func (x *RemoveCommandResponse) GetIsSuccess() bool {
|
||||
}
|
||||
|
||||
type CommandArgument struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
|
||||
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
|
||||
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3,oneof" json:"payload,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
|
||||
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
|
||||
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3,oneof" json:"payload,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CommandArgument) Reset() {
|
||||
@ -286,14 +282,13 @@ func (x *CommandArgument) GetPayload() []byte {
|
||||
}
|
||||
|
||||
type CommandReturn struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsDelivered bool `protobuf:"varint,1,opt,name=is_delivered,json=isDelivered,proto3" json:"is_delivered,omitempty"`
|
||||
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
|
||||
ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
|
||||
Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3,oneof" json:"payload,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsDelivered bool `protobuf:"varint,1,opt,name=is_delivered,json=isDelivered,proto3" json:"is_delivered,omitempty"`
|
||||
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
|
||||
ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
|
||||
Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3,oneof" json:"payload,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CommandReturn) Reset() {
|
||||
@ -356,71 +351,50 @@ func (x *CommandReturn) GetPayload() []byte {
|
||||
|
||||
var File_command_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_command_proto_rawDesc = []byte{
|
||||
0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
|
||||
0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67,
|
||||
0x73, 0x22, 0x3e, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x6f, 0x6f, 0x6b,
|
||||
0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74,
|
||||
0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
|
||||
0x64, 0x22, 0x33, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x75,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53,
|
||||
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x36, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x6e,
|
||||
0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d,
|
||||
0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74,
|
||||
0x68, 0x6f, 0x64, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x88,
|
||||
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x98,
|
||||
0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x65, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65,
|
||||
0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d,
|
||||
0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48,
|
||||
0x00, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a,
|
||||
0x08, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x32, 0xa6, 0x02, 0x0a, 0x0f, 0x43, 0x6f,
|
||||
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x3d, 0x0a,
|
||||
0x0a, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x1a,
|
||||
0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61,
|
||||
0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0d,
|
||||
0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1b, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x6f, 0x6f,
|
||||
0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0b, 0x53, 0x65,
|
||||
0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
|
||||
0x64, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x11, 0x53, 0x65, 0x6e,
|
||||
0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x16,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x41, 0x72,
|
||||
0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x22, 0x00, 0x28, 0x01,
|
||||
0x30, 0x01, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_command_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\rcommand.proto\x12\x05proto\"I\n" +
|
||||
"\vCommandInfo\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
|
||||
"\x06method\x18\x02 \x01(\tR\x06method\x12\x12\n" +
|
||||
"\x04tags\x18\x03 \x03(\tR\x04tags\">\n" +
|
||||
"\x14CommandLookupRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
|
||||
"\x06method\x18\x02 \x01(\tR\x06method\"3\n" +
|
||||
"\x12AddCommandResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_success\x18\x01 \x01(\bR\tisSuccess\"6\n" +
|
||||
"\x15RemoveCommandResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_success\x18\x01 \x01(\bR\tisSuccess\"n\n" +
|
||||
"\x0fCommandArgument\x12\x18\n" +
|
||||
"\acommand\x18\x01 \x01(\tR\acommand\x12\x16\n" +
|
||||
"\x06method\x18\x02 \x01(\tR\x06method\x12\x1d\n" +
|
||||
"\apayload\x18\x03 \x01(\fH\x00R\apayload\x88\x01\x01B\n" +
|
||||
"\n" +
|
||||
"\b_payload\"\x98\x01\n" +
|
||||
"\rCommandReturn\x12!\n" +
|
||||
"\fis_delivered\x18\x01 \x01(\bR\visDelivered\x12\x16\n" +
|
||||
"\x06status\x18\x02 \x01(\x05R\x06status\x12!\n" +
|
||||
"\fcontent_type\x18\x03 \x01(\tR\vcontentType\x12\x1d\n" +
|
||||
"\apayload\x18\x04 \x01(\fH\x00R\apayload\x88\x01\x01B\n" +
|
||||
"\n" +
|
||||
"\b_payload2\xa6\x02\n" +
|
||||
"\x0fCommandProvider\x12=\n" +
|
||||
"\n" +
|
||||
"AddCommand\x12\x12.proto.CommandInfo\x1a\x19.proto.AddCommandResponse\"\x00\x12L\n" +
|
||||
"\rRemoveCommand\x12\x1b.proto.CommandLookupRequest\x1a\x1c.proto.RemoveCommandResponse\"\x00\x12=\n" +
|
||||
"\vSendCommand\x12\x16.proto.CommandArgument\x1a\x14.proto.CommandReturn\"\x00\x12G\n" +
|
||||
"\x11SendStreamCommand\x12\x16.proto.CommandArgument\x1a\x14.proto.CommandReturn\"\x00(\x010\x01B\tZ\a.;protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_command_proto_rawDescOnce sync.Once
|
||||
file_command_proto_rawDescData = file_command_proto_rawDesc
|
||||
file_command_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_command_proto_rawDescGZIP() []byte {
|
||||
file_command_proto_rawDescOnce.Do(func() {
|
||||
file_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_command_proto_rawDescData)
|
||||
file_command_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_command_proto_rawDesc), len(file_command_proto_rawDesc)))
|
||||
})
|
||||
return file_command_proto_rawDescData
|
||||
}
|
||||
@ -461,7 +435,7 @@ func file_command_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_command_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_command_proto_rawDesc), len(file_command_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
@ -472,7 +446,6 @@ func file_command_proto_init() {
|
||||
MessageInfos: file_command_proto_msgTypes,
|
||||
}.Build()
|
||||
File_command_proto = out.File
|
||||
file_command_proto_rawDesc = nil
|
||||
file_command_proto_goTypes = nil
|
||||
file_command_proto_depIdxs = nil
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.3
|
||||
// source: command.proto
|
||||
|
||||
package proto
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: database.proto
|
||||
|
||||
package proto
|
||||
@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -21,11 +22,10 @@ const (
|
||||
)
|
||||
|
||||
type AllocDatabaseRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AllocDatabaseRequest) Reset() {
|
||||
@ -66,12 +66,11 @@ func (x *AllocDatabaseRequest) GetName() string {
|
||||
}
|
||||
|
||||
type AllocDatabaseResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
Dsn string `protobuf:"bytes,2,opt,name=dsn,proto3" json:"dsn,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
Dsn string `protobuf:"bytes,2,opt,name=dsn,proto3" json:"dsn,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AllocDatabaseResponse) Reset() {
|
||||
@ -120,34 +119,26 @@ func (x *AllocDatabaseResponse) GetDsn() string {
|
||||
|
||||
var File_database_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_database_proto_rawDesc = []byte{
|
||||
0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2a, 0x0a, 0x14, 0x41, 0x6c, 0x6c, 0x6f, 0x63,
|
||||
0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x22, 0x48, 0x0a, 0x15, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
|
||||
0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64,
|
||||
0x73, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x32, 0x5f, 0x0a,
|
||||
0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x4c, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
|
||||
0x65, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09,
|
||||
0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
const file_database_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0edatabase.proto\x12\x05proto\"*\n" +
|
||||
"\x14AllocDatabaseRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\"H\n" +
|
||||
"\x15AllocDatabaseResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_success\x18\x01 \x01(\bR\tisSuccess\x12\x10\n" +
|
||||
"\x03dsn\x18\x02 \x01(\tR\x03dsn2_\n" +
|
||||
"\x0fDatabaseService\x12L\n" +
|
||||
"\rAllocDatabase\x12\x1b.proto.AllocDatabaseRequest\x1a\x1c.proto.AllocDatabaseResponse\"\x00B\tZ\a.;protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_database_proto_rawDescOnce sync.Once
|
||||
file_database_proto_rawDescData = file_database_proto_rawDesc
|
||||
file_database_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_database_proto_rawDescGZIP() []byte {
|
||||
file_database_proto_rawDescOnce.Do(func() {
|
||||
file_database_proto_rawDescData = protoimpl.X.CompressGZIP(file_database_proto_rawDescData)
|
||||
file_database_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_database_proto_rawDesc), len(file_database_proto_rawDesc)))
|
||||
})
|
||||
return file_database_proto_rawDescData
|
||||
}
|
||||
@ -176,7 +167,7 @@ func file_database_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_database_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_database_proto_rawDesc), len(file_database_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
@ -187,7 +178,6 @@ func file_database_proto_init() {
|
||||
MessageInfos: file_database_proto_msgTypes,
|
||||
}.Build()
|
||||
File_database_proto = out.File
|
||||
file_database_proto_rawDesc = nil
|
||||
file_database_proto_goTypes = nil
|
||||
file_database_proto_depIdxs = nil
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.3
|
||||
// source: database.proto
|
||||
|
||||
package proto
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: services.proto
|
||||
|
||||
package proto
|
||||
@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -21,15 +22,14 @@ const (
|
||||
)
|
||||
|
||||
type ServiceInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
|
||||
GrpcAddr string `protobuf:"bytes,4,opt,name=grpc_addr,json=grpcAddr,proto3" json:"grpc_addr,omitempty"`
|
||||
HttpAddr *string `protobuf:"bytes,5,opt,name=http_addr,json=httpAddr,proto3,oneof" json:"http_addr,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
|
||||
GrpcAddr string `protobuf:"bytes,4,opt,name=grpc_addr,json=grpcAddr,proto3" json:"grpc_addr,omitempty"`
|
||||
HttpAddr *string `protobuf:"bytes,5,opt,name=http_addr,json=httpAddr,proto3,oneof" json:"http_addr,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ServiceInfo) Reset() {
|
||||
@ -98,12 +98,11 @@ func (x *ServiceInfo) GetHttpAddr() string {
|
||||
}
|
||||
|
||||
type GetServiceRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"`
|
||||
Type *string `protobuf:"bytes,2,opt,name=type,proto3,oneof" json:"type,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"`
|
||||
Type *string `protobuf:"bytes,2,opt,name=type,proto3,oneof" json:"type,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetServiceRequest) Reset() {
|
||||
@ -151,11 +150,10 @@ func (x *GetServiceRequest) GetType() string {
|
||||
}
|
||||
|
||||
type GetServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data *ServiceInfo `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *ServiceInfo `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetServiceResponse) Reset() {
|
||||
@ -196,11 +194,10 @@ func (x *GetServiceResponse) GetData() *ServiceInfo {
|
||||
}
|
||||
|
||||
type ListServiceRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Type *string `protobuf:"bytes,1,opt,name=type,proto3,oneof" json:"type,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Type *string `protobuf:"bytes,1,opt,name=type,proto3,oneof" json:"type,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListServiceRequest) Reset() {
|
||||
@ -241,11 +238,10 @@ func (x *ListServiceRequest) GetType() string {
|
||||
}
|
||||
|
||||
type ListServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data []*ServiceInfo `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data []*ServiceInfo `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListServiceResponse) Reset() {
|
||||
@ -286,11 +282,10 @@ func (x *ListServiceResponse) GetData() []*ServiceInfo {
|
||||
}
|
||||
|
||||
type AddServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AddServiceResponse) Reset() {
|
||||
@ -331,11 +326,10 @@ func (x *AddServiceResponse) GetIsSuccess() bool {
|
||||
}
|
||||
|
||||
type RemoveServiceRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RemoveServiceRequest) Reset() {
|
||||
@ -376,11 +370,10 @@ func (x *RemoveServiceRequest) GetId() string {
|
||||
}
|
||||
|
||||
type RemoveServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RemoveServiceResponse) Reset() {
|
||||
@ -421,12 +414,11 @@ func (x *RemoveServiceResponse) GetIsSuccess() bool {
|
||||
}
|
||||
|
||||
type EventInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
|
||||
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
|
||||
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *EventInfo) Reset() {
|
||||
@ -474,9 +466,9 @@ func (x *EventInfo) GetData() []byte {
|
||||
}
|
||||
|
||||
type EventResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *EventResponse) Reset() {
|
||||
@ -511,83 +503,58 @@ func (*EventResponse) Descriptor() ([]byte, []int) {
|
||||
|
||||
var File_services_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_services_proto_rawDesc = []byte{
|
||||
0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c,
|
||||
0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65,
|
||||
0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x70, 0x63, 0x41, 0x64, 0x64, 0x72, 0x12, 0x20,
|
||||
0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x09, 0x48, 0x00, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x41, 0x64, 0x64, 0x72, 0x88, 0x01, 0x01,
|
||||
0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x22, 0x51,
|
||||
0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48,
|
||||
0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
|
||||
0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70,
|
||||
0x65, 0x22, 0x3c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
|
||||
0x36, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07,
|
||||
0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x33, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
|
||||
0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x26, 0x0a, 0x14, 0x52,
|
||||
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x02, 0x69, 0x64, 0x22, 0x36, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
|
||||
0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x35, 0x0a, 0x09, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x22, 0x0f, 0x0a, 0x0d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x32, 0xe8, 0x02, 0x0a, 0x10, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72,
|
||||
0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a,
|
||||
0x0b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x19, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
|
||||
0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65,
|
||||
0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76,
|
||||
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09,
|
||||
0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
const file_services_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0eservices.proto\x12\x05proto\"\x94\x01\n" +
|
||||
"\vServiceInfo\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
||||
"\x04type\x18\x02 \x01(\tR\x04type\x12\x14\n" +
|
||||
"\x05label\x18\x03 \x01(\tR\x05label\x12\x1b\n" +
|
||||
"\tgrpc_addr\x18\x04 \x01(\tR\bgrpcAddr\x12 \n" +
|
||||
"\thttp_addr\x18\x05 \x01(\tH\x00R\bhttpAddr\x88\x01\x01B\f\n" +
|
||||
"\n" +
|
||||
"_http_addr\"Q\n" +
|
||||
"\x11GetServiceRequest\x12\x13\n" +
|
||||
"\x02id\x18\x01 \x01(\tH\x00R\x02id\x88\x01\x01\x12\x17\n" +
|
||||
"\x04type\x18\x02 \x01(\tH\x01R\x04type\x88\x01\x01B\x05\n" +
|
||||
"\x03_idB\a\n" +
|
||||
"\x05_type\"<\n" +
|
||||
"\x12GetServiceResponse\x12&\n" +
|
||||
"\x04data\x18\x01 \x01(\v2\x12.proto.ServiceInfoR\x04data\"6\n" +
|
||||
"\x12ListServiceRequest\x12\x17\n" +
|
||||
"\x04type\x18\x01 \x01(\tH\x00R\x04type\x88\x01\x01B\a\n" +
|
||||
"\x05_type\"=\n" +
|
||||
"\x13ListServiceResponse\x12&\n" +
|
||||
"\x04data\x18\x01 \x03(\v2\x12.proto.ServiceInfoR\x04data\"3\n" +
|
||||
"\x12AddServiceResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_success\x18\x01 \x01(\bR\tisSuccess\"&\n" +
|
||||
"\x14RemoveServiceRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\"6\n" +
|
||||
"\x15RemoveServiceResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_success\x18\x01 \x01(\bR\tisSuccess\"5\n" +
|
||||
"\tEventInfo\x12\x14\n" +
|
||||
"\x05event\x18\x01 \x01(\tR\x05event\x12\x12\n" +
|
||||
"\x04data\x18\x02 \x01(\fR\x04data\"\x0f\n" +
|
||||
"\rEventResponse2\xe8\x02\n" +
|
||||
"\x10DirectoryService\x12C\n" +
|
||||
"\n" +
|
||||
"GetService\x12\x18.proto.GetServiceRequest\x1a\x19.proto.GetServiceResponse\"\x00\x12F\n" +
|
||||
"\vListService\x12\x19.proto.ListServiceRequest\x1a\x1a.proto.ListServiceResponse\"\x00\x12=\n" +
|
||||
"\n" +
|
||||
"AddService\x12\x12.proto.ServiceInfo\x1a\x19.proto.AddServiceResponse\"\x00\x12L\n" +
|
||||
"\rRemoveService\x12\x1b.proto.RemoveServiceRequest\x1a\x1c.proto.RemoveServiceResponse\"\x00\x12:\n" +
|
||||
"\x0eBroadcastEvent\x12\x10.proto.EventInfo\x1a\x14.proto.EventResponse\"\x00B\tZ\a.;protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_services_proto_rawDescOnce sync.Once
|
||||
file_services_proto_rawDescData = file_services_proto_rawDesc
|
||||
file_services_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_services_proto_rawDescGZIP() []byte {
|
||||
file_services_proto_rawDescOnce.Do(func() {
|
||||
file_services_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_proto_rawDescData)
|
||||
file_services_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_services_proto_rawDesc), len(file_services_proto_rawDesc)))
|
||||
})
|
||||
return file_services_proto_rawDescData
|
||||
}
|
||||
@ -637,7 +604,7 @@ func file_services_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_services_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_services_proto_rawDesc), len(file_services_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 10,
|
||||
NumExtensions: 0,
|
||||
@ -648,7 +615,6 @@ func file_services_proto_init() {
|
||||
MessageInfos: file_services_proto_msgTypes,
|
||||
}.Build()
|
||||
File_services_proto = out.File
|
||||
file_services_proto_rawDesc = nil
|
||||
file_services_proto_goTypes = nil
|
||||
file_services_proto_depIdxs = nil
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.3
|
||||
// source: services.proto
|
||||
|
||||
package proto
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: stream.proto
|
||||
|
||||
package proto
|
||||
@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -21,11 +22,10 @@ const (
|
||||
)
|
||||
|
||||
type CountConnectionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CountConnectionRequest) Reset() {
|
||||
@ -66,11 +66,10 @@ func (x *CountConnectionRequest) GetUserId() uint64 {
|
||||
}
|
||||
|
||||
type CountConnectionResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CountConnectionResponse) Reset() {
|
||||
@ -111,13 +110,12 @@ func (x *CountConnectionResponse) GetCount() int64 {
|
||||
}
|
||||
|
||||
type PushStreamRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId *uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"`
|
||||
ClientId *string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3,oneof" json:"client_id,omitempty"`
|
||||
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserId *uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"`
|
||||
ClientId *string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3,oneof" json:"client_id,omitempty"`
|
||||
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PushStreamRequest) Reset() {
|
||||
@ -172,13 +170,12 @@ func (x *PushStreamRequest) GetBody() []byte {
|
||||
}
|
||||
|
||||
type PushStreamBatchRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId []uint64 `protobuf:"varint,1,rep,packed,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
ClientId []string `protobuf:"bytes,2,rep,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserId []uint64 `protobuf:"varint,1,rep,packed,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
ClientId []string `protobuf:"bytes,2,rep,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PushStreamBatchRequest) Reset() {
|
||||
@ -233,14 +230,13 @@ func (x *PushStreamBatchRequest) GetBody() []byte {
|
||||
}
|
||||
|
||||
type PushStreamResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsAllSuccess bool `protobuf:"varint,1,opt,name=is_all_success,json=isAllSuccess,proto3" json:"is_all_success,omitempty"`
|
||||
AffectedCount int64 `protobuf:"varint,2,opt,name=affected_count,json=affectedCount,proto3" json:"affected_count,omitempty"`
|
||||
FailedCount int64 `protobuf:"varint,3,opt,name=failed_count,json=failedCount,proto3" json:"failed_count,omitempty"`
|
||||
SuccessList []string `protobuf:"bytes,4,rep,name=success_list,json=successList,proto3" json:"success_list,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IsAllSuccess bool `protobuf:"varint,1,opt,name=is_all_success,json=isAllSuccess,proto3" json:"is_all_success,omitempty"`
|
||||
AffectedCount int64 `protobuf:"varint,2,opt,name=affected_count,json=affectedCount,proto3" json:"affected_count,omitempty"`
|
||||
FailedCount int64 `protobuf:"varint,3,opt,name=failed_count,json=failedCount,proto3" json:"failed_count,omitempty"`
|
||||
SuccessList []string `protobuf:"bytes,4,rep,name=success_list,json=successList,proto3" json:"success_list,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PushStreamResponse) Reset() {
|
||||
@ -302,14 +298,13 @@ func (x *PushStreamResponse) GetSuccessList() []string {
|
||||
}
|
||||
|
||||
type StreamEventRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
|
||||
UserId uint64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
|
||||
UserId uint64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *StreamEventRequest) Reset() {
|
||||
@ -371,9 +366,9 @@ func (x *StreamEventRequest) GetPayload() []byte {
|
||||
}
|
||||
|
||||
type StreamEventResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *StreamEventResponse) Reset() {
|
||||
@ -408,77 +403,50 @@ func (*StreamEventResponse) Descriptor() ([]byte, []int) {
|
||||
|
||||
var File_stream_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_stream_proto_rawDesc = []byte{
|
||||
0x0a, 0x0c, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x16, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x6f,
|
||||
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
||||
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x17, 0x43, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x50, 0x75,
|
||||
0x73, 0x68, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x1c, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
||||
0x48, 0x00, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a,
|
||||
0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x48, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62,
|
||||
0x6f, 0x64, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42,
|
||||
0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x62, 0x0a,
|
||||
0x16, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x61, 0x74, 0x63, 0x68,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
|
||||
0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64,
|
||||
0x79, 0x22, 0xa7, 0x01, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x61,
|
||||
0x6c, 0x6c, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x0c, 0x69, 0x73, 0x41, 0x6c, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x25,
|
||||
0x0a, 0x0e, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x61, 0x69,
|
||||
0x6c, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b,
|
||||
0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x12, 0x53,
|
||||
0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
|
||||
0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
|
||||
0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61,
|
||||
0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xfd,
|
||||
0x01, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x58, 0x0a, 0x15, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43,
|
||||
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x50, 0x75,
|
||||
0x73, 0x68, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53,
|
||||
0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x4d, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x61, 0x74,
|
||||
0x63, 0x68, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53,
|
||||
0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74,
|
||||
0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09,
|
||||
0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
const file_stream_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\fstream.proto\x12\x05proto\"1\n" +
|
||||
"\x16CountConnectionRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x04R\x06userId\"/\n" +
|
||||
"\x17CountConnectionResponse\x12\x14\n" +
|
||||
"\x05count\x18\x01 \x01(\x03R\x05count\"\x81\x01\n" +
|
||||
"\x11PushStreamRequest\x12\x1c\n" +
|
||||
"\auser_id\x18\x01 \x01(\x04H\x00R\x06userId\x88\x01\x01\x12 \n" +
|
||||
"\tclient_id\x18\x02 \x01(\tH\x01R\bclientId\x88\x01\x01\x12\x12\n" +
|
||||
"\x04body\x18\x03 \x01(\fR\x04bodyB\n" +
|
||||
"\n" +
|
||||
"\b_user_idB\f\n" +
|
||||
"\n" +
|
||||
"_client_id\"b\n" +
|
||||
"\x16PushStreamBatchRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x03(\x04R\x06userId\x12\x1b\n" +
|
||||
"\tclient_id\x18\x02 \x03(\tR\bclientId\x12\x12\n" +
|
||||
"\x04body\x18\x03 \x01(\fR\x04body\"\xa7\x01\n" +
|
||||
"\x12PushStreamResponse\x12$\n" +
|
||||
"\x0eis_all_success\x18\x01 \x01(\bR\fisAllSuccess\x12%\n" +
|
||||
"\x0eaffected_count\x18\x02 \x01(\x03R\raffectedCount\x12!\n" +
|
||||
"\ffailed_count\x18\x03 \x01(\x03R\vfailedCount\x12!\n" +
|
||||
"\fsuccess_list\x18\x04 \x03(\tR\vsuccessList\"z\n" +
|
||||
"\x12StreamEventRequest\x12\x14\n" +
|
||||
"\x05event\x18\x01 \x01(\tR\x05event\x12\x17\n" +
|
||||
"\auser_id\x18\x02 \x01(\x04R\x06userId\x12\x1b\n" +
|
||||
"\tclient_id\x18\x03 \x01(\tR\bclientId\x12\x18\n" +
|
||||
"\apayload\x18\x04 \x01(\fR\apayload\"\x15\n" +
|
||||
"\x13StreamEventResponse2\xfd\x01\n" +
|
||||
"\rStreamService\x12X\n" +
|
||||
"\x15CountStreamConnection\x12\x1d.proto.CountConnectionRequest\x1a\x1e.proto.CountConnectionResponse\"\x00\x12C\n" +
|
||||
"\n" +
|
||||
"PushStream\x12\x18.proto.PushStreamRequest\x1a\x19.proto.PushStreamResponse\"\x00\x12M\n" +
|
||||
"\x0fPushStreamBatch\x12\x1d.proto.PushStreamBatchRequest\x1a\x19.proto.PushStreamResponse\"\x00B\tZ\a.;protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_stream_proto_rawDescOnce sync.Once
|
||||
file_stream_proto_rawDescData = file_stream_proto_rawDesc
|
||||
file_stream_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_stream_proto_rawDescGZIP() []byte {
|
||||
file_stream_proto_rawDescOnce.Do(func() {
|
||||
file_stream_proto_rawDescData = protoimpl.X.CompressGZIP(file_stream_proto_rawDescData)
|
||||
file_stream_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_stream_proto_rawDesc), len(file_stream_proto_rawDesc)))
|
||||
})
|
||||
return file_stream_proto_rawDescData
|
||||
}
|
||||
@ -517,7 +485,7 @@ func file_stream_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_stream_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_stream_proto_rawDesc), len(file_stream_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
@ -528,7 +496,6 @@ func file_stream_proto_init() {
|
||||
MessageInfos: file_stream_proto_msgTypes,
|
||||
}.Build()
|
||||
File_stream_proto = out.File
|
||||
file_stream_proto_rawDesc = nil
|
||||
file_stream_proto_goTypes = nil
|
||||
file_stream_proto_depIdxs = nil
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.3
|
||||
// source: stream.proto
|
||||
|
||||
package proto
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: user.proto
|
||||
|
||||
package proto
|
||||
@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -21,15 +22,14 @@ const (
|
||||
)
|
||||
|
||||
type UserInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Language string `protobuf:"bytes,5,opt,name=language,proto3" json:"language,omitempty"`
|
||||
PermNodes []byte `protobuf:"bytes,3,opt,name=perm_nodes,json=permNodes,proto3,oneof" json:"perm_nodes,omitempty"`
|
||||
Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Language string `protobuf:"bytes,5,opt,name=language,proto3" json:"language,omitempty"`
|
||||
PermNodes []byte `protobuf:"bytes,3,opt,name=perm_nodes,json=permNodes,proto3,oneof" json:"perm_nodes,omitempty"`
|
||||
Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UserInfo) Reset() {
|
||||
@ -98,11 +98,10 @@ func (x *UserInfo) GetMetadata() []byte {
|
||||
}
|
||||
|
||||
type MultipleUserInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data []*UserInfo `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data []*UserInfo `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *MultipleUserInfo) Reset() {
|
||||
@ -143,12 +142,11 @@ func (x *MultipleUserInfo) GetData() []*UserInfo {
|
||||
}
|
||||
|
||||
type GetUserRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId *uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"`
|
||||
Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserId *uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"`
|
||||
Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserRequest) Reset() {
|
||||
@ -196,11 +194,10 @@ func (x *GetUserRequest) GetName() string {
|
||||
}
|
||||
|
||||
type ListUserRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId []uint64 `protobuf:"varint,1,rep,packed,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserId []uint64 `protobuf:"varint,1,rep,packed,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListUserRequest) Reset() {
|
||||
@ -241,13 +238,12 @@ func (x *ListUserRequest) GetUserId() []uint64 {
|
||||
}
|
||||
|
||||
type ListUserRelativeRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
|
||||
IsRelated bool `protobuf:"varint,3,opt,name=is_related,json=isRelated,proto3" json:"is_related,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
|
||||
IsRelated bool `protobuf:"varint,3,opt,name=is_related,json=isRelated,proto3" json:"is_related,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListUserRelativeRequest) Reset() {
|
||||
@ -302,11 +298,10 @@ func (x *ListUserRelativeRequest) GetIsRelated() bool {
|
||||
}
|
||||
|
||||
type ListUserRelativeResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data []*UserInfo `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data []*UserInfo `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListUserRelativeResponse) Reset() {
|
||||
@ -348,67 +343,49 @@ func (x *ListUserRelativeResponse) GetData() []*UserInfo {
|
||||
|
||||
var File_user_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_user_proto_rawDesc = []byte{
|
||||
0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65,
|
||||
0x12, 0x22, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x09, 0x70, 0x65, 0x72, 0x6d, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x73, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||
0x74, 0x61, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x5f, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x22, 0x37, 0x0a, 0x10, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x55, 0x73, 0x65,
|
||||
0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5c, 0x0a, 0x0e, 0x47, 0x65,
|
||||
0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x07,
|
||||
0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52,
|
||||
0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42,
|
||||
0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75,
|
||||
0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x75, 0x73,
|
||||
0x65, 0x72, 0x49, 0x64, 0x22, 0x69, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72,
|
||||
0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
||||
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x22,
|
||||
0x3f, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74,
|
||||
0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x64,
|
||||
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x32, 0xd8, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x33, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,
|
||||
0x72, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73,
|
||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72,
|
||||
0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e,
|
||||
0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_user_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
"user.proto\x12\x05proto\"\xab\x01\n" +
|
||||
"\bUserInfo\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x04R\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12\x1a\n" +
|
||||
"\blanguage\x18\x05 \x01(\tR\blanguage\x12\"\n" +
|
||||
"\n" +
|
||||
"perm_nodes\x18\x03 \x01(\fH\x00R\tpermNodes\x88\x01\x01\x12\x1f\n" +
|
||||
"\bmetadata\x18\x04 \x01(\fH\x01R\bmetadata\x88\x01\x01B\r\n" +
|
||||
"\v_perm_nodesB\v\n" +
|
||||
"\t_metadata\"7\n" +
|
||||
"\x10MultipleUserInfo\x12#\n" +
|
||||
"\x04data\x18\x01 \x03(\v2\x0f.proto.UserInfoR\x04data\"\\\n" +
|
||||
"\x0eGetUserRequest\x12\x1c\n" +
|
||||
"\auser_id\x18\x01 \x01(\x04H\x00R\x06userId\x88\x01\x01\x12\x17\n" +
|
||||
"\x04name\x18\x02 \x01(\tH\x01R\x04name\x88\x01\x01B\n" +
|
||||
"\n" +
|
||||
"\b_user_idB\a\n" +
|
||||
"\x05_name\"*\n" +
|
||||
"\x0fListUserRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x03(\x04R\x06userId\"i\n" +
|
||||
"\x17ListUserRelativeRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x04R\x06userId\x12\x16\n" +
|
||||
"\x06status\x18\x02 \x01(\x05R\x06status\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_related\x18\x03 \x01(\bR\tisRelated\"?\n" +
|
||||
"\x18ListUserRelativeResponse\x12#\n" +
|
||||
"\x04data\x18\x01 \x03(\v2\x0f.proto.UserInfoR\x04data2\xd8\x01\n" +
|
||||
"\vUserService\x123\n" +
|
||||
"\aGetUser\x12\x15.proto.GetUserRequest\x1a\x0f.proto.UserInfo\"\x00\x12=\n" +
|
||||
"\bListUser\x12\x16.proto.ListUserRequest\x1a\x17.proto.MultipleUserInfo\"\x00\x12U\n" +
|
||||
"\x10ListUserRelative\x12\x1e.proto.ListUserRelativeRequest\x1a\x1f.proto.ListUserRelativeResponse\"\x00B\tZ\a.;protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_user_proto_rawDescOnce sync.Once
|
||||
file_user_proto_rawDescData = file_user_proto_rawDesc
|
||||
file_user_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_user_proto_rawDescGZIP() []byte {
|
||||
file_user_proto_rawDescOnce.Do(func() {
|
||||
file_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_proto_rawDescData)
|
||||
file_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_user_proto_rawDesc), len(file_user_proto_rawDesc)))
|
||||
})
|
||||
return file_user_proto_rawDescData
|
||||
}
|
||||
@ -449,7 +426,7 @@ func file_user_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_user_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_user_proto_rawDesc), len(file_user_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
@ -460,7 +437,6 @@ func file_user_proto_init() {
|
||||
MessageInfos: file_user_proto_msgTypes,
|
||||
}.Build()
|
||||
File_user_proto = out.File
|
||||
file_user_proto_rawDesc = nil
|
||||
file_user_proto_goTypes = nil
|
||||
file_user_proto_depIdxs = nil
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.3
|
||||
// source: user.proto
|
||||
|
||||
package proto
|
||||
|
@ -17,10 +17,14 @@ dsn = "host=localhost user=postgres dbname=postgres password=password port=5432
|
||||
prefix = "sn_"
|
||||
|
||||
[mq]
|
||||
addr = "localhost:4222"
|
||||
addr = "nats.orb.local:4222"
|
||||
|
||||
[kv]
|
||||
endpoints = ["localhost:2379"]
|
||||
endpoints = ["etcd.orb.local:2379"]
|
||||
|
||||
[cache]
|
||||
addr = "redis.orb.local:6379"
|
||||
password = ""
|
||||
|
||||
[security]
|
||||
public_key = "keys/public_key.pem"
|
||||
|
Loading…
x
Reference in New Issue
Block a user