mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-10 03:56:00 +08:00
feat: use robot to migrate code
Signed-off-by: kubbot & kubecub <3293172751ysy@gmail.com>
This commit is contained in:
+583
-314
@@ -1,353 +1,612 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.29.1
|
||||
// protoc v4.22.0
|
||||
// source: auth/auth.proto
|
||||
|
||||
package pbAuth // import "./auth"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import sdk_ws "Open_IM/pkg/proto/sdk_ws"
|
||||
package auth
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
context "context"
|
||||
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"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type CommonResp struct {
|
||||
ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"`
|
||||
ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CommonResp) Reset() { *m = CommonResp{} }
|
||||
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CommonResp) ProtoMessage() {}
|
||||
func (*CommonResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_auth_88965eda3ab7f34d, []int{0}
|
||||
}
|
||||
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *CommonResp) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CommonResp.Merge(dst, src)
|
||||
}
|
||||
func (m *CommonResp) XXX_Size() int {
|
||||
return xxx_messageInfo_CommonResp.Size(m)
|
||||
}
|
||||
func (m *CommonResp) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CommonResp.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CommonResp proto.InternalMessageInfo
|
||||
|
||||
func (m *CommonResp) GetErrCode() int32 {
|
||||
if m != nil {
|
||||
return m.ErrCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CommonResp) GetErrMsg() string {
|
||||
if m != nil {
|
||||
return m.ErrMsg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UserRegisterReq struct {
|
||||
UserInfo *sdk_ws.UserInfo `protobuf:"bytes,1,opt,name=UserInfo" json:"UserInfo,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *UserRegisterReq) Reset() { *m = UserRegisterReq{} }
|
||||
func (m *UserRegisterReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserRegisterReq) ProtoMessage() {}
|
||||
func (*UserRegisterReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_auth_88965eda3ab7f34d, []int{1}
|
||||
}
|
||||
func (m *UserRegisterReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserRegisterReq.Unmarshal(m, b)
|
||||
}
|
||||
func (m *UserRegisterReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_UserRegisterReq.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *UserRegisterReq) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_UserRegisterReq.Merge(dst, src)
|
||||
}
|
||||
func (m *UserRegisterReq) XXX_Size() int {
|
||||
return xxx_messageInfo_UserRegisterReq.Size(m)
|
||||
}
|
||||
func (m *UserRegisterReq) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_UserRegisterReq.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_UserRegisterReq proto.InternalMessageInfo
|
||||
|
||||
func (m *UserRegisterReq) GetUserInfo() *sdk_ws.UserInfo {
|
||||
if m != nil {
|
||||
return m.UserInfo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UserRegisterReq) GetOperationID() string {
|
||||
if m != nil {
|
||||
return m.OperationID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UserRegisterResp struct {
|
||||
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *UserRegisterResp) Reset() { *m = UserRegisterResp{} }
|
||||
func (m *UserRegisterResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserRegisterResp) ProtoMessage() {}
|
||||
func (*UserRegisterResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_auth_88965eda3ab7f34d, []int{2}
|
||||
}
|
||||
func (m *UserRegisterResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserRegisterResp.Unmarshal(m, b)
|
||||
}
|
||||
func (m *UserRegisterResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_UserRegisterResp.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *UserRegisterResp) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_UserRegisterResp.Merge(dst, src)
|
||||
}
|
||||
func (m *UserRegisterResp) XXX_Size() int {
|
||||
return xxx_messageInfo_UserRegisterResp.Size(m)
|
||||
}
|
||||
func (m *UserRegisterResp) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_UserRegisterResp.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_UserRegisterResp proto.InternalMessageInfo
|
||||
|
||||
func (m *UserRegisterResp) GetCommonResp() *CommonResp {
|
||||
if m != nil {
|
||||
return m.CommonResp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
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 UserTokenReq struct {
|
||||
Platform int32 `protobuf:"varint,1,opt,name=Platform" json:"Platform,omitempty"`
|
||||
FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"`
|
||||
OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"`
|
||||
OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"`
|
||||
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
|
||||
}
|
||||
|
||||
func (m *UserTokenReq) Reset() { *m = UserTokenReq{} }
|
||||
func (m *UserTokenReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserTokenReq) ProtoMessage() {}
|
||||
func (x *UserTokenReq) Reset() {
|
||||
*x = UserTokenReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_auth_auth_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserTokenReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserTokenReq) ProtoMessage() {}
|
||||
|
||||
func (x *UserTokenReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_auth_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 UserTokenReq.ProtoReflect.Descriptor instead.
|
||||
func (*UserTokenReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_auth_88965eda3ab7f34d, []int{3}
|
||||
}
|
||||
func (m *UserTokenReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserTokenReq.Unmarshal(m, b)
|
||||
}
|
||||
func (m *UserTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_UserTokenReq.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *UserTokenReq) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_UserTokenReq.Merge(dst, src)
|
||||
}
|
||||
func (m *UserTokenReq) XXX_Size() int {
|
||||
return xxx_messageInfo_UserTokenReq.Size(m)
|
||||
}
|
||||
func (m *UserTokenReq) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_UserTokenReq.DiscardUnknown(m)
|
||||
return file_auth_auth_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var xxx_messageInfo_UserTokenReq proto.InternalMessageInfo
|
||||
|
||||
func (m *UserTokenReq) GetPlatform() int32 {
|
||||
if m != nil {
|
||||
return m.Platform
|
||||
func (x *UserTokenReq) GetPlatformID() int32 {
|
||||
if x != nil {
|
||||
return x.PlatformID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *UserTokenReq) GetFromUserID() string {
|
||||
if m != nil {
|
||||
return m.FromUserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserTokenReq) GetOpUserID() string {
|
||||
if m != nil {
|
||||
return m.OpUserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserTokenReq) GetOperationID() string {
|
||||
if m != nil {
|
||||
return m.OperationID
|
||||
func (x *UserTokenReq) GetUserID() string {
|
||||
if x != nil {
|
||||
return x.UserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UserTokenResp struct {
|
||||
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"`
|
||||
Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"`
|
||||
ExpiredTime int64 `protobuf:"varint,3,opt,name=ExpiredTime" json:"ExpiredTime,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
|
||||
ExpireTimeSeconds int64 `protobuf:"varint,3,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"`
|
||||
}
|
||||
|
||||
func (m *UserTokenResp) Reset() { *m = UserTokenResp{} }
|
||||
func (m *UserTokenResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserTokenResp) ProtoMessage() {}
|
||||
func (*UserTokenResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_auth_88965eda3ab7f34d, []int{4}
|
||||
}
|
||||
func (m *UserTokenResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserTokenResp.Unmarshal(m, b)
|
||||
}
|
||||
func (m *UserTokenResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_UserTokenResp.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *UserTokenResp) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_UserTokenResp.Merge(dst, src)
|
||||
}
|
||||
func (m *UserTokenResp) XXX_Size() int {
|
||||
return xxx_messageInfo_UserTokenResp.Size(m)
|
||||
}
|
||||
func (m *UserTokenResp) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_UserTokenResp.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_UserTokenResp proto.InternalMessageInfo
|
||||
|
||||
func (m *UserTokenResp) GetCommonResp() *CommonResp {
|
||||
if m != nil {
|
||||
return m.CommonResp
|
||||
func (x *UserTokenResp) Reset() {
|
||||
*x = UserTokenResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_auth_auth_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UserTokenResp) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
func (x *UserTokenResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserTokenResp) ProtoMessage() {}
|
||||
|
||||
func (x *UserTokenResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_auth_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 UserTokenResp.ProtoReflect.Descriptor instead.
|
||||
func (*UserTokenResp) Descriptor() ([]byte, []int) {
|
||||
return file_auth_auth_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *UserTokenResp) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserTokenResp) GetExpiredTime() int64 {
|
||||
if m != nil {
|
||||
return m.ExpiredTime
|
||||
func (x *UserTokenResp) GetExpireTimeSeconds() int64 {
|
||||
if x != nil {
|
||||
return x.ExpireTimeSeconds
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CommonResp)(nil), "pbAuth.CommonResp")
|
||||
proto.RegisterType((*UserRegisterReq)(nil), "pbAuth.UserRegisterReq")
|
||||
proto.RegisterType((*UserRegisterResp)(nil), "pbAuth.UserRegisterResp")
|
||||
proto.RegisterType((*UserTokenReq)(nil), "pbAuth.UserTokenReq")
|
||||
proto.RegisterType((*UserTokenResp)(nil), "pbAuth.UserTokenResp")
|
||||
type ForceLogoutReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"`
|
||||
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
|
||||
}
|
||||
|
||||
func (x *ForceLogoutReq) Reset() {
|
||||
*x = ForceLogoutReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_auth_auth_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ForceLogoutReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ForceLogoutReq) ProtoMessage() {}
|
||||
|
||||
func (x *ForceLogoutReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_auth_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 ForceLogoutReq.ProtoReflect.Descriptor instead.
|
||||
func (*ForceLogoutReq) Descriptor() ([]byte, []int) {
|
||||
return file_auth_auth_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ForceLogoutReq) GetPlatformID() int32 {
|
||||
if x != nil {
|
||||
return x.PlatformID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ForceLogoutReq) GetUserID() string {
|
||||
if x != nil {
|
||||
return x.UserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ForceLogoutResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *ForceLogoutResp) Reset() {
|
||||
*x = ForceLogoutResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_auth_auth_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ForceLogoutResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ForceLogoutResp) ProtoMessage() {}
|
||||
|
||||
func (x *ForceLogoutResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_auth_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 ForceLogoutResp.ProtoReflect.Descriptor instead.
|
||||
func (*ForceLogoutResp) Descriptor() ([]byte, []int) {
|
||||
return file_auth_auth_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type ParseTokenReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
|
||||
}
|
||||
|
||||
func (x *ParseTokenReq) Reset() {
|
||||
*x = ParseTokenReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_auth_auth_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ParseTokenReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ParseTokenReq) ProtoMessage() {}
|
||||
|
||||
func (x *ParseTokenReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_auth_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 ParseTokenReq.ProtoReflect.Descriptor instead.
|
||||
func (*ParseTokenReq) Descriptor() ([]byte, []int) {
|
||||
return file_auth_auth_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ParseTokenReq) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ParseTokenResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
|
||||
Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform"`
|
||||
ExpireTimeSeconds int64 `protobuf:"varint,4,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"`
|
||||
}
|
||||
|
||||
func (x *ParseTokenResp) Reset() {
|
||||
*x = ParseTokenResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_auth_auth_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ParseTokenResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ParseTokenResp) ProtoMessage() {}
|
||||
|
||||
func (x *ParseTokenResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_auth_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 ParseTokenResp.ProtoReflect.Descriptor instead.
|
||||
func (*ParseTokenResp) Descriptor() ([]byte, []int) {
|
||||
return file_auth_auth_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ParseTokenResp) GetUserID() string {
|
||||
if x != nil {
|
||||
return x.UserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ParseTokenResp) GetPlatform() string {
|
||||
if x != nil {
|
||||
return x.Platform
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ParseTokenResp) GetExpireTimeSeconds() int64 {
|
||||
if x != nil {
|
||||
return x.ExpireTimeSeconds
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_auth_auth_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_auth_auth_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
||||
0x61, 0x75, 0x74, 0x68, 0x22, 0x46, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x53, 0x0a, 0x0d,
|
||||
0x75, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11,
|
||||
0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64,
|
||||
0x73, 0x22, 0x48, 0x0a, 0x0e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74,
|
||||
0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49,
|
||||
0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
|
||||
0x6d, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x11, 0x0a, 0x0f, 0x66,
|
||||
0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x25,
|
||||
0x0a, 0x0d, 0x70, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x72, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
|
||||
0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2c, 0x0a, 0x11, 0x65,
|
||||
0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x32, 0xff, 0x01, 0x0a, 0x04, 0x41, 0x75,
|
||||
0x74, 0x68, 0x12, 0x4e, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
|
||||
0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61,
|
||||
0x75, 0x74, 0x68, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71,
|
||||
0x1a, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
||||
0x61, 0x75, 0x74, 0x68, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75,
|
||||
0x74, 0x12, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75,
|
||||
0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f,
|
||||
0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x73,
|
||||
0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65,
|
||||
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49,
|
||||
0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x61, 0x72,
|
||||
0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x34, 0x5a, 0x32, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d,
|
||||
0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76,
|
||||
0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74,
|
||||
0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_auth_auth_proto_rawDescOnce sync.Once
|
||||
file_auth_auth_proto_rawDescData = file_auth_auth_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_auth_auth_proto_rawDescGZIP() []byte {
|
||||
file_auth_auth_proto_rawDescOnce.Do(func() {
|
||||
file_auth_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_auth_proto_rawDescData)
|
||||
})
|
||||
return file_auth_auth_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_auth_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_auth_auth_proto_goTypes = []interface{}{
|
||||
(*UserTokenReq)(nil), // 0: OpenIMServer.auth.userTokenReq
|
||||
(*UserTokenResp)(nil), // 1: OpenIMServer.auth.userTokenResp
|
||||
(*ForceLogoutReq)(nil), // 2: OpenIMServer.auth.forceLogoutReq
|
||||
(*ForceLogoutResp)(nil), // 3: OpenIMServer.auth.forceLogoutResp
|
||||
(*ParseTokenReq)(nil), // 4: OpenIMServer.auth.parseTokenReq
|
||||
(*ParseTokenResp)(nil), // 5: OpenIMServer.auth.parseTokenResp
|
||||
}
|
||||
var file_auth_auth_proto_depIdxs = []int32{
|
||||
0, // 0: OpenIMServer.auth.Auth.userToken:input_type -> OpenIMServer.auth.userTokenReq
|
||||
2, // 1: OpenIMServer.auth.Auth.forceLogout:input_type -> OpenIMServer.auth.forceLogoutReq
|
||||
4, // 2: OpenIMServer.auth.Auth.parseToken:input_type -> OpenIMServer.auth.parseTokenReq
|
||||
1, // 3: OpenIMServer.auth.Auth.userToken:output_type -> OpenIMServer.auth.userTokenResp
|
||||
3, // 4: OpenIMServer.auth.Auth.forceLogout:output_type -> OpenIMServer.auth.forceLogoutResp
|
||||
5, // 5: OpenIMServer.auth.Auth.parseToken:output_type -> OpenIMServer.auth.parseTokenResp
|
||||
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
|
||||
}
|
||||
|
||||
func init() { file_auth_auth_proto_init() }
|
||||
func file_auth_auth_proto_init() {
|
||||
if File_auth_auth_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_auth_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserTokenReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_auth_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserTokenResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_auth_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ForceLogoutReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_auth_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ForceLogoutResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_auth_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ParseTokenReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_auth_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ParseTokenResp); 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_auth_auth_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_auth_auth_proto_goTypes,
|
||||
DependencyIndexes: file_auth_auth_proto_depIdxs,
|
||||
MessageInfos: file_auth_auth_proto_msgTypes,
|
||||
}.Build()
|
||||
File_auth_auth_proto = out.File
|
||||
file_auth_auth_proto_rawDesc = nil
|
||||
file_auth_auth_proto_goTypes = nil
|
||||
file_auth_auth_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
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.SupportPackageIsVersion4
|
||||
|
||||
// Client API for Auth service
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// AuthClient is the client API for Auth service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type AuthClient interface {
|
||||
UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error)
|
||||
// 生成token
|
||||
UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error)
|
||||
// 强制退出登录
|
||||
ForceLogout(ctx context.Context, in *ForceLogoutReq, opts ...grpc.CallOption) (*ForceLogoutResp, error)
|
||||
// 解析token
|
||||
ParseToken(ctx context.Context, in *ParseTokenReq, opts ...grpc.CallOption) (*ParseTokenResp, error)
|
||||
}
|
||||
|
||||
type authClient struct {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAuthClient(cc *grpc.ClientConn) AuthClient {
|
||||
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient {
|
||||
return &authClient{cc}
|
||||
}
|
||||
|
||||
func (c *authClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) {
|
||||
out := new(UserRegisterResp)
|
||||
err := grpc.Invoke(ctx, "/pbAuth.Auth/UserRegister", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error) {
|
||||
out := new(UserTokenResp)
|
||||
err := grpc.Invoke(ctx, "/pbAuth.Auth/UserToken", in, out, c.cc, opts...)
|
||||
err := c.cc.Invoke(ctx, "/OpenIMServer.auth.Auth/userToken", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for Auth service
|
||||
func (c *authClient) ForceLogout(ctx context.Context, in *ForceLogoutReq, opts ...grpc.CallOption) (*ForceLogoutResp, error) {
|
||||
out := new(ForceLogoutResp)
|
||||
err := c.cc.Invoke(ctx, "/OpenIMServer.auth.Auth/forceLogout", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) ParseToken(ctx context.Context, in *ParseTokenReq, opts ...grpc.CallOption) (*ParseTokenResp, error) {
|
||||
out := new(ParseTokenResp)
|
||||
err := c.cc.Invoke(ctx, "/OpenIMServer.auth.Auth/parseToken", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthServer is the server API for Auth service.
|
||||
type AuthServer interface {
|
||||
UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error)
|
||||
// 生成token
|
||||
UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error)
|
||||
// 强制退出登录
|
||||
ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error)
|
||||
// 解析token
|
||||
ParseToken(context.Context, *ParseTokenReq) (*ParseTokenResp, error)
|
||||
}
|
||||
|
||||
// UnimplementedAuthServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedAuthServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedAuthServer) UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UserToken not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthServer) ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ForceLogout not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthServer) ParseToken(context.Context, *ParseTokenReq) (*ParseTokenResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ParseToken not implemented")
|
||||
}
|
||||
|
||||
func RegisterAuthServer(s *grpc.Server, srv AuthServer) {
|
||||
s.RegisterService(&_Auth_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Auth_UserRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UserRegisterReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).UserRegister(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbAuth.Auth/UserRegister",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).UserRegister(ctx, req.(*UserRegisterReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_UserToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UserTokenReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -358,7 +617,7 @@ func _Auth_UserToken_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbAuth.Auth/UserToken",
|
||||
FullMethod: "/OpenIMServer.auth.Auth/UserToken",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).UserToken(ctx, req.(*UserTokenReq))
|
||||
@@ -366,49 +625,59 @@ func _Auth_UserToken_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_ForceLogout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ForceLogoutReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).ForceLogout(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/OpenIMServer.auth.Auth/ForceLogout",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).ForceLogout(ctx, req.(*ForceLogoutReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_ParseToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ParseTokenReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).ParseToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/OpenIMServer.auth.Auth/ParseToken",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).ParseToken(ctx, req.(*ParseTokenReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Auth_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pbAuth.Auth",
|
||||
ServiceName: "OpenIMServer.auth.Auth",
|
||||
HandlerType: (*AuthServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "UserRegister",
|
||||
Handler: _Auth_UserRegister_Handler,
|
||||
MethodName: "userToken",
|
||||
Handler: _Auth_UserToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UserToken",
|
||||
Handler: _Auth_UserToken_Handler,
|
||||
MethodName: "forceLogout",
|
||||
Handler: _Auth_ForceLogout_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "parseToken",
|
||||
Handler: _Auth_ParseToken_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "auth/auth.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_88965eda3ab7f34d) }
|
||||
|
||||
var fileDescriptor_auth_88965eda3ab7f34d = []byte{
|
||||
// 369 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x4d, 0x4b, 0xc3, 0x40,
|
||||
0x10, 0x25, 0xf6, 0xc3, 0x76, 0x6a, 0xa9, 0x2c, 0x55, 0x43, 0x04, 0xa9, 0x39, 0xf5, 0x94, 0x40,
|
||||
0x3d, 0x28, 0x08, 0x42, 0xad, 0x16, 0x7a, 0x28, 0x95, 0xa5, 0x5e, 0xbc, 0x84, 0x94, 0x6e, 0xdb,
|
||||
0x90, 0x26, 0xbb, 0xee, 0xa6, 0x56, 0xf0, 0xe8, 0xc5, 0x9f, 0x2d, 0xbb, 0xf9, 0x70, 0xad, 0x3d,
|
||||
0x79, 0x49, 0x98, 0x79, 0x2f, 0xf3, 0xde, 0x9b, 0x0c, 0xb4, 0xfc, 0x4d, 0xb2, 0x72, 0xe5, 0xc3,
|
||||
0x61, 0x9c, 0x26, 0x14, 0x55, 0xd9, 0xac, 0xbf, 0x49, 0x56, 0xd6, 0xe5, 0x84, 0x91, 0xd8, 0x1b,
|
||||
0x8d, 0x5d, 0x16, 0x2e, 0x5d, 0x05, 0xb9, 0x62, 0x1e, 0x7a, 0x5b, 0xe1, 0x6e, 0x45, 0x4a, 0xb5,
|
||||
0xef, 0x00, 0x06, 0x34, 0x8a, 0x68, 0x8c, 0x89, 0x60, 0xc8, 0x84, 0x43, 0xc2, 0xf9, 0x80, 0xce,
|
||||
0x89, 0x69, 0x74, 0x8c, 0x6e, 0x05, 0xe7, 0x25, 0x3a, 0x85, 0x2a, 0xe1, 0x7c, 0x2c, 0x96, 0xe6,
|
||||
0x41, 0xc7, 0xe8, 0xd6, 0x71, 0x56, 0xd9, 0x6b, 0x68, 0x3d, 0x0b, 0xc2, 0x31, 0x59, 0x06, 0x22,
|
||||
0x91, 0xef, 0x57, 0x74, 0x0d, 0x35, 0xd9, 0x1a, 0xc5, 0x0b, 0xaa, 0xa6, 0x34, 0x7a, 0xe7, 0x8e,
|
||||
0x20, 0xfc, 0x8d, 0x70, 0xcf, 0x67, 0x81, 0xc7, 0x7c, 0xee, 0x47, 0xc2, 0xc9, 0x29, 0xb8, 0x20,
|
||||
0xa3, 0x0e, 0x34, 0x26, 0x8c, 0x70, 0x3f, 0x09, 0x68, 0x3c, 0x7a, 0xc8, 0x84, 0xf4, 0x96, 0x3d,
|
||||
0x84, 0xe3, 0xdf, 0x6a, 0x82, 0xa1, 0x9e, 0x9e, 0x20, 0x13, 0x44, 0x4e, 0xba, 0x01, 0xe7, 0x07,
|
||||
0xc1, 0x1a, 0xcb, 0xfe, 0x32, 0xe0, 0x48, 0x0e, 0x9a, 0xd2, 0x90, 0xc4, 0xd2, 0xb3, 0x05, 0xb5,
|
||||
0xa7, 0xb5, 0x9f, 0x2c, 0x28, 0x8f, 0xb2, 0xe4, 0x45, 0x8d, 0x2e, 0x00, 0x86, 0x9c, 0x46, 0xca,
|
||||
0x66, 0xee, 0x4a, 0xeb, 0xc8, 0x6f, 0x27, 0x2c, 0x43, 0x4b, 0x0a, 0x2d, 0xea, 0xdd, 0x48, 0xe5,
|
||||
0xbf, 0x91, 0x3e, 0xa0, 0xa9, 0x39, 0xf9, 0x5f, 0x1e, 0xd4, 0x86, 0x8a, 0x1a, 0x90, 0xb9, 0x4b,
|
||||
0x0b, 0x29, 0xfe, 0xf8, 0xce, 0x02, 0x4e, 0xe6, 0xd3, 0x20, 0x22, 0xca, 0x5b, 0x09, 0xeb, 0xad,
|
||||
0xde, 0xa7, 0x01, 0x65, 0x39, 0x17, 0xf5, 0xd3, 0x7d, 0xe4, 0x8b, 0x45, 0x67, 0xb9, 0xe0, 0xce,
|
||||
0xcf, 0xb5, 0xcc, 0xfd, 0x80, 0x60, 0xe8, 0x06, 0xea, 0x45, 0x10, 0xd4, 0xd6, 0x69, 0xf9, 0x96,
|
||||
0xad, 0x93, 0x3d, 0x5d, 0xc1, 0xee, 0x5b, 0x2f, 0x4d, 0x47, 0x9d, 0xef, 0x6d, 0x0a, 0xcf, 0xaa,
|
||||
0xea, 0x36, 0xaf, 0xbe, 0x03, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x20, 0x74, 0x9f, 0xd9, 0x02, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user