mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-27 05:35:57 +08:00
540 lines
15 KiB
Go
540 lines
15 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v6.31.1
|
|
// source: auth.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
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 LoginRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
|
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoginRequest) Reset() {
|
|
*x = LoginRequest{}
|
|
mi := &file_auth_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoginRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoginRequest) ProtoMessage() {}
|
|
|
|
func (x *LoginRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[0]
|
|
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 LoginRequest.ProtoReflect.Descriptor instead.
|
|
func (*LoginRequest) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *LoginRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginRequest) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type LoginSuccess struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
UserInfo *UserInfo `protobuf:"bytes,2,opt,name=userInfo,proto3" json:"userInfo,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoginSuccess) Reset() {
|
|
*x = LoginSuccess{}
|
|
mi := &file_auth_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoginSuccess) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoginSuccess) ProtoMessage() {}
|
|
|
|
func (x *LoginSuccess) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[1]
|
|
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 LoginSuccess.ProtoReflect.Descriptor instead.
|
|
func (*LoginSuccess) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *LoginSuccess) GetToken() string {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginSuccess) GetUserInfo() *UserInfo {
|
|
if x != nil {
|
|
return x.UserInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
|
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
|
Data *LoginSuccess `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoginResponse) Reset() {
|
|
*x = LoginResponse{}
|
|
mi := &file_auth_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoginResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoginResponse) ProtoMessage() {}
|
|
|
|
func (x *LoginResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[2]
|
|
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 LoginResponse.ProtoReflect.Descriptor instead.
|
|
func (*LoginResponse) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *LoginResponse) GetCode() int32 {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *LoginResponse) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginResponse) GetData() *LoginSuccess {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type LogoutRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LogoutRequest) Reset() {
|
|
*x = LogoutRequest{}
|
|
mi := &file_auth_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LogoutRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LogoutRequest) ProtoMessage() {}
|
|
|
|
func (x *LogoutRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[3]
|
|
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 LogoutRequest.ProtoReflect.Descriptor instead.
|
|
func (*LogoutRequest) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *LogoutRequest) GetToken() string {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type LogoutResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
|
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LogoutResponse) Reset() {
|
|
*x = LogoutResponse{}
|
|
mi := &file_auth_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LogoutResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LogoutResponse) ProtoMessage() {}
|
|
|
|
func (x *LogoutResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_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 LogoutResponse.ProtoReflect.Descriptor instead.
|
|
func (*LogoutResponse) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *LogoutResponse) GetCode() int32 {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *LogoutResponse) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UserInfoRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserInfoRequest) Reset() {
|
|
*x = UserInfoRequest{}
|
|
mi := &file_auth_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserInfoRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserInfoRequest) ProtoMessage() {}
|
|
|
|
func (x *UserInfoRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_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 UserInfoRequest.ProtoReflect.Descriptor instead.
|
|
func (*UserInfoRequest) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *UserInfoRequest) GetToken() string {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UserInfo struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
|
ExpiresAt int64 `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // Token expiration timestamp
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserInfo) Reset() {
|
|
*x = UserInfo{}
|
|
mi := &file_auth_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserInfo) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserInfo) ProtoMessage() {}
|
|
|
|
func (x *UserInfo) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[6]
|
|
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 UserInfo.ProtoReflect.Descriptor instead.
|
|
func (*UserInfo) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *UserInfo) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInfo) GetExpiresAt() int64 {
|
|
if x != nil {
|
|
return x.ExpiresAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type UserInfoResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
|
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
|
Data *UserInfo `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserInfoResponse) Reset() {
|
|
*x = UserInfoResponse{}
|
|
mi := &file_auth_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserInfoResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserInfoResponse) ProtoMessage() {}
|
|
|
|
func (x *UserInfoResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[7]
|
|
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 UserInfoResponse.ProtoReflect.Descriptor instead.
|
|
func (*UserInfoResponse) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *UserInfoResponse) GetCode() int32 {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *UserInfoResponse) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInfoResponse) GetData() *UserInfo {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_auth_proto protoreflect.FileDescriptor
|
|
|
|
const file_auth_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\n" +
|
|
"auth.proto\x12\x02pb\x1a\x1cgoogle/api/annotations.proto\"F\n" +
|
|
"\fLoginRequest\x12\x1a\n" +
|
|
"\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
|
|
"\bpassword\x18\x02 \x01(\tR\bpassword\"N\n" +
|
|
"\fLoginSuccess\x12\x14\n" +
|
|
"\x05token\x18\x01 \x01(\tR\x05token\x12(\n" +
|
|
"\buserInfo\x18\x02 \x01(\v2\f.pb.UserInfoR\buserInfo\"c\n" +
|
|
"\rLoginResponse\x12\x12\n" +
|
|
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
|
|
"\amessage\x18\x02 \x01(\tR\amessage\x12$\n" +
|
|
"\x04data\x18\x03 \x01(\v2\x10.pb.LoginSuccessR\x04data\"%\n" +
|
|
"\rLogoutRequest\x12\x14\n" +
|
|
"\x05token\x18\x01 \x01(\tR\x05token\">\n" +
|
|
"\x0eLogoutResponse\x12\x12\n" +
|
|
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
|
|
"\amessage\x18\x02 \x01(\tR\amessage\"'\n" +
|
|
"\x0fUserInfoRequest\x12\x14\n" +
|
|
"\x05token\x18\x01 \x01(\tR\x05token\"E\n" +
|
|
"\bUserInfo\x12\x1a\n" +
|
|
"\busername\x18\x01 \x01(\tR\busername\x12\x1d\n" +
|
|
"\n" +
|
|
"expires_at\x18\x02 \x01(\x03R\texpiresAt\"b\n" +
|
|
"\x10UserInfoResponse\x12\x12\n" +
|
|
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
|
|
"\amessage\x18\x02 \x01(\tR\amessage\x12 \n" +
|
|
"\x04data\x18\x03 \x01(\v2\f.pb.UserInfoR\x04data2\xf4\x01\n" +
|
|
"\x04Auth\x12H\n" +
|
|
"\x05Login\x12\x10.pb.LoginRequest\x1a\x11.pb.LoginResponse\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/api/auth/login\x12L\n" +
|
|
"\x06Logout\x12\x11.pb.LogoutRequest\x1a\x12.pb.LogoutResponse\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/api/auth/logout\x12T\n" +
|
|
"\vGetUserInfo\x12\x13.pb.UserInfoRequest\x1a\x14.pb.UserInfoResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/api/auth/userinfoB\x10Z\x0em7s.live/v5/pbb\x06proto3"
|
|
|
|
var (
|
|
file_auth_proto_rawDescOnce sync.Once
|
|
file_auth_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_auth_proto_rawDescGZIP() []byte {
|
|
file_auth_proto_rawDescOnce.Do(func() {
|
|
file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc)))
|
|
})
|
|
return file_auth_proto_rawDescData
|
|
}
|
|
|
|
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
|
var file_auth_proto_goTypes = []any{
|
|
(*LoginRequest)(nil), // 0: pb.LoginRequest
|
|
(*LoginSuccess)(nil), // 1: pb.LoginSuccess
|
|
(*LoginResponse)(nil), // 2: pb.LoginResponse
|
|
(*LogoutRequest)(nil), // 3: pb.LogoutRequest
|
|
(*LogoutResponse)(nil), // 4: pb.LogoutResponse
|
|
(*UserInfoRequest)(nil), // 5: pb.UserInfoRequest
|
|
(*UserInfo)(nil), // 6: pb.UserInfo
|
|
(*UserInfoResponse)(nil), // 7: pb.UserInfoResponse
|
|
}
|
|
var file_auth_proto_depIdxs = []int32{
|
|
6, // 0: pb.LoginSuccess.userInfo:type_name -> pb.UserInfo
|
|
1, // 1: pb.LoginResponse.data:type_name -> pb.LoginSuccess
|
|
6, // 2: pb.UserInfoResponse.data:type_name -> pb.UserInfo
|
|
0, // 3: pb.Auth.Login:input_type -> pb.LoginRequest
|
|
3, // 4: pb.Auth.Logout:input_type -> pb.LogoutRequest
|
|
5, // 5: pb.Auth.GetUserInfo:input_type -> pb.UserInfoRequest
|
|
2, // 6: pb.Auth.Login:output_type -> pb.LoginResponse
|
|
4, // 7: pb.Auth.Logout:output_type -> pb.LogoutResponse
|
|
7, // 8: pb.Auth.GetUserInfo:output_type -> pb.UserInfoResponse
|
|
6, // [6:9] is the sub-list for method output_type
|
|
3, // [3:6] is the sub-list for method input_type
|
|
3, // [3:3] is the sub-list for extension type_name
|
|
3, // [3:3] is the sub-list for extension extendee
|
|
0, // [0:3] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_auth_proto_init() }
|
|
func file_auth_proto_init() {
|
|
if File_auth_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 8,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_auth_proto_goTypes,
|
|
DependencyIndexes: file_auth_proto_depIdxs,
|
|
MessageInfos: file_auth_proto_msgTypes,
|
|
}.Build()
|
|
File_auth_proto = out.File
|
|
file_auth_proto_goTypes = nil
|
|
file_auth_proto_depIdxs = nil
|
|
}
|