mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-24 02:46:36 +08:00
[用户]增加可用功能控制、AccessKey管理
This commit is contained in:
@@ -40,6 +40,7 @@ type User struct {
|
||||
IsOn bool `protobuf:"varint,8,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,9,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
NodeCluster *NodeCluster `protobuf:"bytes,10,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"`
|
||||
Features []*UserFeature `protobuf:"bytes,11,rep,name=features,proto3" json:"features,omitempty"`
|
||||
}
|
||||
|
||||
func (x *User) Reset() {
|
||||
@@ -144,30 +145,42 @@ func (x *User) GetNodeCluster() *NodeCluster {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *User) GetFeatures() []*UserFeature {
|
||||
if x != nil {
|
||||
return x.Features
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_model_user_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_model_user_proto_rawDesc = []byte{
|
||||
0x0a, 0x10, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0x8b, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65,
|
||||
0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65,
|
||||
0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x65, 0x6c,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65,
|
||||
0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69,
|
||||
0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f,
|
||||
0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x31, 0x0a, 0x0b, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||
0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x1a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb8, 0x02, 0x0a, 0x04, 0x55,
|
||||
0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d,
|
||||
0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62,
|
||||
0x69, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x74, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72,
|
||||
0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d,
|
||||
0x61, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75,
|
||||
0x73, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74,
|
||||
0x75, 0x72, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -186,14 +199,16 @@ var file_model_user_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_model_user_proto_goTypes = []interface{}{
|
||||
(*User)(nil), // 0: pb.User
|
||||
(*NodeCluster)(nil), // 1: pb.NodeCluster
|
||||
(*UserFeature)(nil), // 2: pb.UserFeature
|
||||
}
|
||||
var file_model_user_proto_depIdxs = []int32{
|
||||
1, // 0: pb.User.nodeCluster:type_name -> pb.NodeCluster
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
2, // 1: pb.User.features:type_name -> pb.UserFeature
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_model_user_proto_init() }
|
||||
@@ -202,6 +217,7 @@ func file_model_user_proto_init() {
|
||||
return
|
||||
}
|
||||
file_model_node_cluster_proto_init()
|
||||
file_model_user_feature_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_model_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*User); i {
|
||||
|
||||
206
pkg/rpc/pb/model_user_access_key.pb.go
Normal file
206
pkg/rpc/pb/model_user_access_key.pb.go
Normal file
@@ -0,0 +1,206 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.12.3
|
||||
// source: model_user_access_key.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 用户AccessKey
|
||||
type UserAccessKey struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
SubUserId int64 `protobuf:"varint,3,opt,name=subUserId,proto3" json:"subUserId,omitempty"`
|
||||
IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
UniqueId string `protobuf:"bytes,5,opt,name=uniqueId,proto3" json:"uniqueId,omitempty"`
|
||||
Secret string `protobuf:"bytes,6,opt,name=secret,proto3" json:"secret,omitempty"`
|
||||
Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UserAccessKey) Reset() {
|
||||
*x = UserAccessKey{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_model_user_access_key_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserAccessKey) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserAccessKey) ProtoMessage() {}
|
||||
|
||||
func (x *UserAccessKey) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_model_user_access_key_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserAccessKey.ProtoReflect.Descriptor instead.
|
||||
func (*UserAccessKey) Descriptor() ([]byte, []int) {
|
||||
return file_model_user_access_key_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UserAccessKey) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAccessKey) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAccessKey) GetSubUserId() int64 {
|
||||
if x != nil {
|
||||
return x.SubUserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAccessKey) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *UserAccessKey) GetUniqueId() string {
|
||||
if x != nil {
|
||||
return x.UniqueId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserAccessKey) GetSecret() string {
|
||||
if x != nil {
|
||||
return x.Secret
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserAccessKey) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_model_user_access_key_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_model_user_access_key_proto_rawDesc = []byte{
|
||||
0x0a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70,
|
||||
0x62, 0x22, 0xbf, 0x01, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73,
|
||||
0x75, 0x62, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
|
||||
0x73, 0x75, 0x62, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f,
|
||||
0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63,
|
||||
0x72, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65,
|
||||
0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_model_user_access_key_proto_rawDescOnce sync.Once
|
||||
file_model_user_access_key_proto_rawDescData = file_model_user_access_key_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_model_user_access_key_proto_rawDescGZIP() []byte {
|
||||
file_model_user_access_key_proto_rawDescOnce.Do(func() {
|
||||
file_model_user_access_key_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_user_access_key_proto_rawDescData)
|
||||
})
|
||||
return file_model_user_access_key_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_model_user_access_key_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_model_user_access_key_proto_goTypes = []interface{}{
|
||||
(*UserAccessKey)(nil), // 0: pb.UserAccessKey
|
||||
}
|
||||
var file_model_user_access_key_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] 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
|
||||
}
|
||||
|
||||
func init() { file_model_user_access_key_proto_init() }
|
||||
func file_model_user_access_key_proto_init() {
|
||||
if File_model_user_access_key_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_model_user_access_key_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserAccessKey); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_model_user_access_key_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_model_user_access_key_proto_goTypes,
|
||||
DependencyIndexes: file_model_user_access_key_proto_depIdxs,
|
||||
MessageInfos: file_model_user_access_key_proto_msgTypes,
|
||||
}.Build()
|
||||
File_model_user_access_key_proto = out.File
|
||||
file_model_user_access_key_proto_rawDesc = nil
|
||||
file_model_user_access_key_proto_goTypes = nil
|
||||
file_model_user_access_key_proto_depIdxs = nil
|
||||
}
|
||||
166
pkg/rpc/pb/model_user_feature.pb.go
Normal file
166
pkg/rpc/pb/model_user_feature.pb.go
Normal file
@@ -0,0 +1,166 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.12.3
|
||||
// source: model_user_feature.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type UserFeature struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UserFeature) Reset() {
|
||||
*x = UserFeature{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_model_user_feature_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserFeature) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserFeature) ProtoMessage() {}
|
||||
|
||||
func (x *UserFeature) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_model_user_feature_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserFeature.ProtoReflect.Descriptor instead.
|
||||
func (*UserFeature) Descriptor() ([]byte, []int) {
|
||||
return file_model_user_feature_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UserFeature) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserFeature) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserFeature) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_model_user_feature_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_model_user_feature_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x57,
|
||||
0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
|
||||
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_model_user_feature_proto_rawDescOnce sync.Once
|
||||
file_model_user_feature_proto_rawDescData = file_model_user_feature_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_model_user_feature_proto_rawDescGZIP() []byte {
|
||||
file_model_user_feature_proto_rawDescOnce.Do(func() {
|
||||
file_model_user_feature_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_user_feature_proto_rawDescData)
|
||||
})
|
||||
return file_model_user_feature_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_model_user_feature_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_model_user_feature_proto_goTypes = []interface{}{
|
||||
(*UserFeature)(nil), // 0: pb.UserFeature
|
||||
}
|
||||
var file_model_user_feature_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] 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
|
||||
}
|
||||
|
||||
func init() { file_model_user_feature_proto_init() }
|
||||
func file_model_user_feature_proto_init() {
|
||||
if File_model_user_feature_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_model_user_feature_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserFeature); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_model_user_feature_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_model_user_feature_proto_goTypes,
|
||||
DependencyIndexes: file_model_user_feature_proto_depIdxs,
|
||||
MessageInfos: file_model_user_feature_proto_msgTypes,
|
||||
}.Build()
|
||||
File_model_user_feature_proto = out.File
|
||||
file_model_user_feature_proto_rawDesc = nil
|
||||
file_model_user_feature_proto_goTypes = nil
|
||||
file_model_user_feature_proto_depIdxs = nil
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
735
pkg/rpc/pb/service_user_access_key.pb.go
Normal file
735
pkg/rpc/pb/service_user_access_key.pb.go
Normal file
@@ -0,0 +1,735 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.12.3
|
||||
// source: service_user_access_key.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 创建AccessKey
|
||||
type CreateUserAccessKeyRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateUserAccessKeyRequest) Reset() {
|
||||
*x = CreateUserAccessKeyRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateUserAccessKeyRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateUserAccessKeyRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateUserAccessKeyRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateUserAccessKeyRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateUserAccessKeyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_access_key_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CreateUserAccessKeyRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateUserAccessKeyRequest) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateUserAccessKeyResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserAccessKeyId int64 `protobuf:"varint,1,opt,name=userAccessKeyId,proto3" json:"userAccessKeyId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateUserAccessKeyResponse) Reset() {
|
||||
*x = CreateUserAccessKeyResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateUserAccessKeyResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateUserAccessKeyResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateUserAccessKeyResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateUserAccessKeyResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreateUserAccessKeyResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_access_key_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CreateUserAccessKeyResponse) GetUserAccessKeyId() int64 {
|
||||
if x != nil {
|
||||
return x.UserAccessKeyId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 查找所有的AccessKey
|
||||
type FindAllEnabledUserAccessKeysRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledUserAccessKeysRequest) Reset() {
|
||||
*x = FindAllEnabledUserAccessKeysRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledUserAccessKeysRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindAllEnabledUserAccessKeysRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FindAllEnabledUserAccessKeysRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FindAllEnabledUserAccessKeysRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FindAllEnabledUserAccessKeysRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_access_key_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledUserAccessKeysRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type FindAllEnabledUserAccessKeysResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserAccessKeys []*UserAccessKey `protobuf:"bytes,1,rep,name=userAccessKeys,proto3" json:"userAccessKeys,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledUserAccessKeysResponse) Reset() {
|
||||
*x = FindAllEnabledUserAccessKeysResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledUserAccessKeysResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindAllEnabledUserAccessKeysResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FindAllEnabledUserAccessKeysResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FindAllEnabledUserAccessKeysResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FindAllEnabledUserAccessKeysResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_access_key_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledUserAccessKeysResponse) GetUserAccessKeys() []*UserAccessKey {
|
||||
if x != nil {
|
||||
return x.UserAccessKeys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 删除AccessKey
|
||||
type DeleteUserAccessKeyRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserAccessKeyId int64 `protobuf:"varint,1,opt,name=userAccessKeyId,proto3" json:"userAccessKeyId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteUserAccessKeyRequest) Reset() {
|
||||
*x = DeleteUserAccessKeyRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteUserAccessKeyRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteUserAccessKeyRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteUserAccessKeyRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteUserAccessKeyRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteUserAccessKeyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_access_key_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *DeleteUserAccessKeyRequest) GetUserAccessKeyId() int64 {
|
||||
if x != nil {
|
||||
return x.UserAccessKeyId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 设置是否启用AccessKey
|
||||
type UpdateUserAccessKeyIsOnRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserAccessKeyId int64 `protobuf:"varint,1,opt,name=userAccessKeyId,proto3" json:"userAccessKeyId,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdateUserAccessKeyIsOnRequest) Reset() {
|
||||
*x = UpdateUserAccessKeyIsOnRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdateUserAccessKeyIsOnRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateUserAccessKeyIsOnRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateUserAccessKeyIsOnRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_user_access_key_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateUserAccessKeyIsOnRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateUserAccessKeyIsOnRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_access_key_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *UpdateUserAccessKeyIsOnRequest) GetUserAccessKeyId() int64 {
|
||||
if x != nil {
|
||||
return x.UserAccessKeyId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateUserAccessKeyIsOnRequest) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_service_user_access_key_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_user_access_key_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x02, 0x70, 0x62, 0x1a, 0x12, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
|
||||
0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73,
|
||||
0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x47, 0x0a, 0x1b,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x75,
|
||||
0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x4b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x23, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73,
|
||||
0x73, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73,
|
||||
0x65, 0x72, 0x49, 0x64, 0x22, 0x61, 0x0a, 0x24, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45,
|
||||
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e,
|
||||
0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x46, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f,
|
||||
0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x22,
|
||||
0x5e, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x73, 0x4f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x28, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b,
|
||||
0x65, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72,
|
||||
0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69,
|
||||
0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x32,
|
||||
0xf7, 0x02, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65,
|
||||
0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12,
|
||||
0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x71, 0x0a, 0x1c, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x73,
|
||||
0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65,
|
||||
0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x46,
|
||||
0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65,
|
||||
0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,
|
||||
0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x75, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65,
|
||||
0x79, 0x49, 0x73, 0x4f, 0x6e, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x73,
|
||||
0x4f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
|
||||
0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_service_user_access_key_proto_rawDescOnce sync.Once
|
||||
file_service_user_access_key_proto_rawDescData = file_service_user_access_key_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_service_user_access_key_proto_rawDescGZIP() []byte {
|
||||
file_service_user_access_key_proto_rawDescOnce.Do(func() {
|
||||
file_service_user_access_key_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_user_access_key_proto_rawDescData)
|
||||
})
|
||||
return file_service_user_access_key_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_user_access_key_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_service_user_access_key_proto_goTypes = []interface{}{
|
||||
(*CreateUserAccessKeyRequest)(nil), // 0: pb.CreateUserAccessKeyRequest
|
||||
(*CreateUserAccessKeyResponse)(nil), // 1: pb.CreateUserAccessKeyResponse
|
||||
(*FindAllEnabledUserAccessKeysRequest)(nil), // 2: pb.FindAllEnabledUserAccessKeysRequest
|
||||
(*FindAllEnabledUserAccessKeysResponse)(nil), // 3: pb.FindAllEnabledUserAccessKeysResponse
|
||||
(*DeleteUserAccessKeyRequest)(nil), // 4: pb.DeleteUserAccessKeyRequest
|
||||
(*UpdateUserAccessKeyIsOnRequest)(nil), // 5: pb.UpdateUserAccessKeyIsOnRequest
|
||||
(*UserAccessKey)(nil), // 6: pb.UserAccessKey
|
||||
(*RPCSuccess)(nil), // 7: pb.RPCSuccess
|
||||
}
|
||||
var file_service_user_access_key_proto_depIdxs = []int32{
|
||||
6, // 0: pb.FindAllEnabledUserAccessKeysResponse.userAccessKeys:type_name -> pb.UserAccessKey
|
||||
0, // 1: pb.UserAccessKeyService.createUserAccessKey:input_type -> pb.CreateUserAccessKeyRequest
|
||||
2, // 2: pb.UserAccessKeyService.findAllEnabledUserAccessKeys:input_type -> pb.FindAllEnabledUserAccessKeysRequest
|
||||
4, // 3: pb.UserAccessKeyService.deleteUserAccessKey:input_type -> pb.DeleteUserAccessKeyRequest
|
||||
5, // 4: pb.UserAccessKeyService.updateUserAccessKeyIsOn:input_type -> pb.UpdateUserAccessKeyIsOnRequest
|
||||
1, // 5: pb.UserAccessKeyService.createUserAccessKey:output_type -> pb.CreateUserAccessKeyResponse
|
||||
3, // 6: pb.UserAccessKeyService.findAllEnabledUserAccessKeys:output_type -> pb.FindAllEnabledUserAccessKeysResponse
|
||||
7, // 7: pb.UserAccessKeyService.deleteUserAccessKey:output_type -> pb.RPCSuccess
|
||||
7, // 8: pb.UserAccessKeyService.updateUserAccessKeyIsOn:output_type -> pb.RPCSuccess
|
||||
5, // [5:9] is the sub-list for method output_type
|
||||
1, // [1:5] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_service_user_access_key_proto_init() }
|
||||
func file_service_user_access_key_proto_init() {
|
||||
if File_service_user_access_key_proto != nil {
|
||||
return
|
||||
}
|
||||
file_rpc_messages_proto_init()
|
||||
file_model_user_access_key_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_service_user_access_key_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateUserAccessKeyRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_user_access_key_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateUserAccessKeyResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_user_access_key_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindAllEnabledUserAccessKeysRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_user_access_key_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindAllEnabledUserAccessKeysResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_user_access_key_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteUserAccessKeyRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_user_access_key_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateUserAccessKeyIsOnRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_user_access_key_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_service_user_access_key_proto_goTypes,
|
||||
DependencyIndexes: file_service_user_access_key_proto_depIdxs,
|
||||
MessageInfos: file_service_user_access_key_proto_msgTypes,
|
||||
}.Build()
|
||||
File_service_user_access_key_proto = out.File
|
||||
file_service_user_access_key_proto_rawDesc = nil
|
||||
file_service_user_access_key_proto_goTypes = nil
|
||||
file_service_user_access_key_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// UserAccessKeyServiceClient is the client API for UserAccessKeyService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type UserAccessKeyServiceClient interface {
|
||||
// 创建AccessKey
|
||||
CreateUserAccessKey(ctx context.Context, in *CreateUserAccessKeyRequest, opts ...grpc.CallOption) (*CreateUserAccessKeyResponse, error)
|
||||
// 查找所有的AccessKey
|
||||
FindAllEnabledUserAccessKeys(ctx context.Context, in *FindAllEnabledUserAccessKeysRequest, opts ...grpc.CallOption) (*FindAllEnabledUserAccessKeysResponse, error)
|
||||
// 删除AccessKey
|
||||
DeleteUserAccessKey(ctx context.Context, in *DeleteUserAccessKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 设置是否启用AccessKey
|
||||
UpdateUserAccessKeyIsOn(ctx context.Context, in *UpdateUserAccessKeyIsOnRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
}
|
||||
|
||||
type userAccessKeyServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUserAccessKeyServiceClient(cc grpc.ClientConnInterface) UserAccessKeyServiceClient {
|
||||
return &userAccessKeyServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *userAccessKeyServiceClient) CreateUserAccessKey(ctx context.Context, in *CreateUserAccessKeyRequest, opts ...grpc.CallOption) (*CreateUserAccessKeyResponse, error) {
|
||||
out := new(CreateUserAccessKeyResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.UserAccessKeyService/createUserAccessKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userAccessKeyServiceClient) FindAllEnabledUserAccessKeys(ctx context.Context, in *FindAllEnabledUserAccessKeysRequest, opts ...grpc.CallOption) (*FindAllEnabledUserAccessKeysResponse, error) {
|
||||
out := new(FindAllEnabledUserAccessKeysResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.UserAccessKeyService/findAllEnabledUserAccessKeys", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userAccessKeyServiceClient) DeleteUserAccessKey(ctx context.Context, in *DeleteUserAccessKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.UserAccessKeyService/deleteUserAccessKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userAccessKeyServiceClient) UpdateUserAccessKeyIsOn(ctx context.Context, in *UpdateUserAccessKeyIsOnRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.UserAccessKeyService/updateUserAccessKeyIsOn", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UserAccessKeyServiceServer is the server API for UserAccessKeyService service.
|
||||
type UserAccessKeyServiceServer interface {
|
||||
// 创建AccessKey
|
||||
CreateUserAccessKey(context.Context, *CreateUserAccessKeyRequest) (*CreateUserAccessKeyResponse, error)
|
||||
// 查找所有的AccessKey
|
||||
FindAllEnabledUserAccessKeys(context.Context, *FindAllEnabledUserAccessKeysRequest) (*FindAllEnabledUserAccessKeysResponse, error)
|
||||
// 删除AccessKey
|
||||
DeleteUserAccessKey(context.Context, *DeleteUserAccessKeyRequest) (*RPCSuccess, error)
|
||||
// 设置是否启用AccessKey
|
||||
UpdateUserAccessKeyIsOn(context.Context, *UpdateUserAccessKeyIsOnRequest) (*RPCSuccess, error)
|
||||
}
|
||||
|
||||
// UnimplementedUserAccessKeyServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedUserAccessKeyServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedUserAccessKeyServiceServer) CreateUserAccessKey(context.Context, *CreateUserAccessKeyRequest) (*CreateUserAccessKeyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateUserAccessKey not implemented")
|
||||
}
|
||||
func (*UnimplementedUserAccessKeyServiceServer) FindAllEnabledUserAccessKeys(context.Context, *FindAllEnabledUserAccessKeysRequest) (*FindAllEnabledUserAccessKeysResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledUserAccessKeys not implemented")
|
||||
}
|
||||
func (*UnimplementedUserAccessKeyServiceServer) DeleteUserAccessKey(context.Context, *DeleteUserAccessKeyRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteUserAccessKey not implemented")
|
||||
}
|
||||
func (*UnimplementedUserAccessKeyServiceServer) UpdateUserAccessKeyIsOn(context.Context, *UpdateUserAccessKeyIsOnRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserAccessKeyIsOn not implemented")
|
||||
}
|
||||
|
||||
func RegisterUserAccessKeyServiceServer(s *grpc.Server, srv UserAccessKeyServiceServer) {
|
||||
s.RegisterService(&_UserAccessKeyService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _UserAccessKeyService_CreateUserAccessKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateUserAccessKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserAccessKeyServiceServer).CreateUserAccessKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.UserAccessKeyService/CreateUserAccessKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserAccessKeyServiceServer).CreateUserAccessKey(ctx, req.(*CreateUserAccessKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserAccessKeyService_FindAllEnabledUserAccessKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindAllEnabledUserAccessKeysRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserAccessKeyServiceServer).FindAllEnabledUserAccessKeys(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.UserAccessKeyService/FindAllEnabledUserAccessKeys",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserAccessKeyServiceServer).FindAllEnabledUserAccessKeys(ctx, req.(*FindAllEnabledUserAccessKeysRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserAccessKeyService_DeleteUserAccessKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteUserAccessKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserAccessKeyServiceServer).DeleteUserAccessKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.UserAccessKeyService/DeleteUserAccessKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserAccessKeyServiceServer).DeleteUserAccessKey(ctx, req.(*DeleteUserAccessKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserAccessKeyService_UpdateUserAccessKeyIsOn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateUserAccessKeyIsOnRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserAccessKeyServiceServer).UpdateUserAccessKeyIsOn(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.UserAccessKeyService/UpdateUserAccessKeyIsOn",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserAccessKeyServiceServer).UpdateUserAccessKeyIsOn(ctx, req.(*UpdateUserAccessKeyIsOnRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _UserAccessKeyService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.UserAccessKeyService",
|
||||
HandlerType: (*UserAccessKeyServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "createUserAccessKey",
|
||||
Handler: _UserAccessKeyService_CreateUserAccessKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findAllEnabledUserAccessKeys",
|
||||
Handler: _UserAccessKeyService_FindAllEnabledUserAccessKeys_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "deleteUserAccessKey",
|
||||
Handler: _UserAccessKeyService_DeleteUserAccessKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "updateUserAccessKeyIsOn",
|
||||
Handler: _UserAccessKeyService_UpdateUserAccessKeyIsOn_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_user_access_key.proto",
|
||||
}
|
||||
@@ -4,6 +4,7 @@ option go_package = "./pb";
|
||||
package pb;
|
||||
|
||||
import "model_node_cluster.proto";
|
||||
import "model_user_feature.proto";
|
||||
|
||||
message User {
|
||||
int64 id = 1;
|
||||
@@ -16,4 +17,5 @@ message User {
|
||||
bool isOn = 8;
|
||||
int64 createdAt = 9;
|
||||
NodeCluster nodeCluster = 10;
|
||||
repeated UserFeature features = 11;
|
||||
}
|
||||
15
pkg/rpc/protos/model_user_access_key.proto
Normal file
15
pkg/rpc/protos/model_user_access_key.proto
Normal file
@@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
// 用户AccessKey
|
||||
message UserAccessKey {
|
||||
int64 id = 1;
|
||||
int64 userId = 2;
|
||||
int64 subUserId = 3;
|
||||
bool isOn = 4;
|
||||
string uniqueId = 5;
|
||||
string secret = 6;
|
||||
string description = 7;
|
||||
}
|
||||
10
pkg/rpc/protos/model_user_feature.proto
Normal file
10
pkg/rpc/protos/model_user_feature.proto
Normal file
@@ -0,0 +1,10 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
message UserFeature {
|
||||
string code = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
}
|
||||
@@ -5,6 +5,7 @@ package pb;
|
||||
|
||||
import "rpc_messages.proto";
|
||||
import "model_user.proto";
|
||||
import "model_user_feature.proto";
|
||||
|
||||
// 用户相关服务
|
||||
service UserService {
|
||||
@@ -43,6 +44,15 @@ service UserService {
|
||||
|
||||
// 获取用户所在的集群ID
|
||||
rpc findUserNodeClusterId (FindUserNodeClusterIdRequest) returns (FindUserNodeClusterIdResponse);
|
||||
|
||||
// 设置用户能使用的功能
|
||||
rpc updateUserFeatures (UpdateUserFeaturesRequest) returns (RPCSuccess);
|
||||
|
||||
// 获取用户所有的功能列表
|
||||
rpc findUserFeatures (FindUserFeaturesRequest) returns (FindUserFeaturesResponse);
|
||||
|
||||
// 获取所有的功能定义
|
||||
rpc findAllUserFeatureDefinitions (FindAllUserFeatureDefinitionsRequest) returns (FindAllUserFeatureDefinitionsResponse);
|
||||
}
|
||||
|
||||
// 创建用户
|
||||
@@ -167,3 +177,27 @@ message FindUserNodeClusterIdRequest {
|
||||
message FindUserNodeClusterIdResponse {
|
||||
int64 nodeClusterId = 1;
|
||||
}
|
||||
|
||||
// 设置用户能使用的功能
|
||||
message UpdateUserFeaturesRequest {
|
||||
int64 userId = 1;
|
||||
repeated string featureCodes = 2;
|
||||
}
|
||||
|
||||
// 获取用户所有的功能列表
|
||||
message FindUserFeaturesRequest {
|
||||
int64 userId = 1;
|
||||
}
|
||||
|
||||
message FindUserFeaturesResponse {
|
||||
repeated UserFeature features = 1;
|
||||
}
|
||||
|
||||
// 获取所有的功能定义
|
||||
message FindAllUserFeatureDefinitionsRequest {
|
||||
|
||||
}
|
||||
|
||||
message FindAllUserFeatureDefinitionsResponse {
|
||||
repeated UserFeature features = 1;
|
||||
}
|
||||
52
pkg/rpc/protos/service_user_access_key.proto
Normal file
52
pkg/rpc/protos/service_user_access_key.proto
Normal file
@@ -0,0 +1,52 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "rpc_messages.proto";
|
||||
import "model_user_access_key.proto";
|
||||
|
||||
// 用户AccessKey相关服务
|
||||
service UserAccessKeyService {
|
||||
// 创建AccessKey
|
||||
rpc createUserAccessKey (CreateUserAccessKeyRequest) returns (CreateUserAccessKeyResponse);
|
||||
|
||||
// 查找所有的AccessKey
|
||||
rpc findAllEnabledUserAccessKeys (FindAllEnabledUserAccessKeysRequest) returns (FindAllEnabledUserAccessKeysResponse);
|
||||
|
||||
// 删除AccessKey
|
||||
rpc deleteUserAccessKey (DeleteUserAccessKeyRequest) returns (RPCSuccess);
|
||||
|
||||
// 设置是否启用AccessKey
|
||||
rpc updateUserAccessKeyIsOn (UpdateUserAccessKeyIsOnRequest) returns (RPCSuccess);
|
||||
}
|
||||
|
||||
// 创建AccessKey
|
||||
message CreateUserAccessKeyRequest {
|
||||
int64 userId = 1;
|
||||
string description = 2;
|
||||
}
|
||||
|
||||
message CreateUserAccessKeyResponse {
|
||||
int64 userAccessKeyId = 1;
|
||||
}
|
||||
|
||||
// 查找所有的AccessKey
|
||||
message FindAllEnabledUserAccessKeysRequest {
|
||||
int64 userId = 1;
|
||||
}
|
||||
|
||||
message FindAllEnabledUserAccessKeysResponse {
|
||||
repeated UserAccessKey userAccessKeys = 1;
|
||||
}
|
||||
|
||||
// 删除AccessKey
|
||||
message DeleteUserAccessKeyRequest {
|
||||
int64 userAccessKeyId = 1;
|
||||
}
|
||||
|
||||
// 设置是否启用AccessKey
|
||||
message UpdateUserAccessKeyIsOnRequest {
|
||||
int64 userAccessKeyId = 1;
|
||||
bool isOn = 2;
|
||||
}
|
||||
@@ -76,3 +76,15 @@ var HTTPAccessLogFields = []maps.Map{
|
||||
"name": "响应Body",
|
||||
},
|
||||
}
|
||||
|
||||
// 精简版的日志字段,用来用
|
||||
var HTTPAccessLogShortFields = []maps.Map{
|
||||
{
|
||||
"code": HTTPAccessLogFieldHeader,
|
||||
"name": "请求Header列表",
|
||||
},
|
||||
{
|
||||
"code": HTTPAccessLogFieldSentHeader,
|
||||
"name": "响应Header列表",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user