358 lines
11 KiB
Go
358 lines
11 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.26.0
|
|
// protoc v3.17.1
|
|
// source: proto/user.proto
|
|
|
|
package proto
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type GetUserListRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
|
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"`
|
|
Page int64 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
|
|
PageSize int64 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
|
}
|
|
|
|
func (x *GetUserListRequest) Reset() {
|
|
*x = GetUserListRequest{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_proto_user_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *GetUserListRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetUserListRequest) ProtoMessage() {}
|
|
|
|
func (x *GetUserListRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_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 GetUserListRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetUserListRequest) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *GetUserListRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *GetUserListRequest) GetNickname() string {
|
|
if x != nil {
|
|
return x.Nickname
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *GetUserListRequest) GetPage() int64 {
|
|
if x != nil {
|
|
return x.Page
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *GetUserListRequest) GetPageSize() int64 {
|
|
if x != nil {
|
|
return x.PageSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type User struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
|
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
|
|
Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"`
|
|
IsAdmin bool `protobuf:"varint,5,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"`
|
|
}
|
|
|
|
func (x *User) Reset() {
|
|
*x = User{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_proto_user_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *User) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*User) ProtoMessage() {}
|
|
|
|
func (x *User) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_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 User.ProtoReflect.Descriptor instead.
|
|
func (*User) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *User) GetId() int64 {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetNickname() string {
|
|
if x != nil {
|
|
return x.Nickname
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetIsAdmin() bool {
|
|
if x != nil {
|
|
return x.IsAdmin
|
|
}
|
|
return false
|
|
}
|
|
|
|
type GetUserListReply struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
List []*User `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
|
|
Pager *Pager `protobuf:"bytes,2,opt,name=pager,proto3" json:"pager,omitempty"`
|
|
}
|
|
|
|
func (x *GetUserListReply) Reset() {
|
|
*x = GetUserListReply{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_proto_user_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *GetUserListReply) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetUserListReply) ProtoMessage() {}
|
|
|
|
func (x *GetUserListReply) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_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 GetUserListReply.ProtoReflect.Descriptor instead.
|
|
func (*GetUserListReply) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *GetUserListReply) GetList() []*User {
|
|
if x != nil {
|
|
return x.List
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *GetUserListReply) GetPager() *Pager {
|
|
if x != nil {
|
|
return x.Pager
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_proto_user_proto protoreflect.FileDescriptor
|
|
|
|
var file_proto_user_proto_rawDesc = []byte{
|
|
0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f,
|
|
0x74, 0x6f, 0x1a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
|
|
0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08,
|
|
0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
|
0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b,
|
|
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b,
|
|
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01,
|
|
0x28, 0x03, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65,
|
|
0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67,
|
|
0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x85, 0x01, 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, 0x70, 0x61,
|
|
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61,
|
|
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61,
|
|
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61,
|
|
0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05,
|
|
0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x4b, 0x0a,
|
|
0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c,
|
|
0x79, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
|
0x05, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x05,
|
|
0x70, 0x61, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x50, 0x61,
|
|
0x67, 0x65, 0x72, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x72, 0x32, 0x46, 0x0a, 0x0b, 0x55, 0x73,
|
|
0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x47, 0x65, 0x74,
|
|
0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73,
|
|
0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e,
|
|
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79,
|
|
0x22, 0x00, 0x42, 0x21, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
|
0x2f, 0x76, 0x69, 0x6c, 0x65, 0x74, 0x79, 0x79, 0x2f, 0x70, 0x6f, 0x74, 0x61, 0x74, 0x6f, 0x2f,
|
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_proto_user_proto_rawDescOnce sync.Once
|
|
file_proto_user_proto_rawDescData = file_proto_user_proto_rawDesc
|
|
)
|
|
|
|
func file_proto_user_proto_rawDescGZIP() []byte {
|
|
file_proto_user_proto_rawDescOnce.Do(func() {
|
|
file_proto_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_user_proto_rawDescData)
|
|
})
|
|
return file_proto_user_proto_rawDescData
|
|
}
|
|
|
|
var file_proto_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_proto_user_proto_goTypes = []interface{}{
|
|
(*GetUserListRequest)(nil), // 0: GetUserListRequest
|
|
(*User)(nil), // 1: User
|
|
(*GetUserListReply)(nil), // 2: GetUserListReply
|
|
(*Pager)(nil), // 3: Pager
|
|
}
|
|
var file_proto_user_proto_depIdxs = []int32{
|
|
1, // 0: GetUserListReply.list:type_name -> User
|
|
3, // 1: GetUserListReply.pager:type_name -> Pager
|
|
0, // 2: UserService.GetUserList:input_type -> GetUserListRequest
|
|
2, // 3: UserService.GetUserList:output_type -> GetUserListReply
|
|
3, // [3:4] is the sub-list for method output_type
|
|
2, // [2:3] 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_proto_user_proto_init() }
|
|
func file_proto_user_proto_init() {
|
|
if File_proto_user_proto != nil {
|
|
return
|
|
}
|
|
file_proto_common_proto_init()
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_proto_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*GetUserListRequest); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_proto_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*User); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_proto_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*GetUserListReply); 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_proto_user_proto_rawDesc,
|
|
NumEnums: 0,
|
|
NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_proto_user_proto_goTypes,
|
|
DependencyIndexes: file_proto_user_proto_depIdxs,
|
|
MessageInfos: file_proto_user_proto_msgTypes,
|
|
}.Build()
|
|
File_proto_user_proto = out.File
|
|
file_proto_user_proto_rawDesc = nil
|
|
file_proto_user_proto_goTypes = nil
|
|
file_proto_user_proto_depIdxs = nil
|
|
}
|