947 lines
30 KiB
Go
947 lines
30 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc (unknown)
|
|
// source: proto/user/v1/auth.proto
|
|
|
|
package userv1
|
|
|
|
import (
|
|
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)
|
|
)
|
|
|
|
// LoginPasswordRequest 使用当前 display_user_id 和已设置密码登录。
|
|
type LoginPasswordRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
|
|
DisplayUserId string `protobuf:"bytes,2,opt,name=display_user_id,json=displayUserId,proto3" json:"display_user_id,omitempty"`
|
|
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoginPasswordRequest) Reset() {
|
|
*x = LoginPasswordRequest{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoginPasswordRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoginPasswordRequest) ProtoMessage() {}
|
|
|
|
func (x *LoginPasswordRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_v1_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 LoginPasswordRequest.ProtoReflect.Descriptor instead.
|
|
func (*LoginPasswordRequest) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *LoginPasswordRequest) GetMeta() *RequestMeta {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *LoginPasswordRequest) GetDisplayUserId() string {
|
|
if x != nil {
|
|
return x.DisplayUserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginPasswordRequest) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// LoginThirdPartyRequest 使用三方凭证登录或注册。
|
|
type LoginThirdPartyRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
|
|
Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
|
|
Credential string `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`
|
|
Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
|
|
Gender string `protobuf:"bytes,5,opt,name=gender,proto3" json:"gender,omitempty"`
|
|
Country string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"`
|
|
InviteCode string `protobuf:"bytes,7,opt,name=invite_code,json=inviteCode,proto3" json:"invite_code,omitempty"`
|
|
DeviceId string `protobuf:"bytes,8,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
|
|
Device string `protobuf:"bytes,9,opt,name=device,proto3" json:"device,omitempty"`
|
|
Avatar string `protobuf:"bytes,10,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
|
Birth string `protobuf:"bytes,11,opt,name=birth,proto3" json:"birth,omitempty"`
|
|
AppVersion string `protobuf:"bytes,12,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
|
|
Source string `protobuf:"bytes,13,opt,name=source,proto3" json:"source,omitempty"`
|
|
Platform string `protobuf:"bytes,14,opt,name=platform,proto3" json:"platform,omitempty"`
|
|
Language string `protobuf:"bytes,15,opt,name=language,proto3" json:"language,omitempty"`
|
|
OsVersion string `protobuf:"bytes,16,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"`
|
|
BuildNumber string `protobuf:"bytes,17,opt,name=build_number,json=buildNumber,proto3" json:"build_number,omitempty"`
|
|
Timezone string `protobuf:"bytes,18,opt,name=timezone,proto3" json:"timezone,omitempty"`
|
|
InstallChannel string `protobuf:"bytes,19,opt,name=install_channel,json=installChannel,proto3" json:"install_channel,omitempty"`
|
|
Campaign string `protobuf:"bytes,20,opt,name=campaign,proto3" json:"campaign,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) Reset() {
|
|
*x = LoginThirdPartyRequest{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoginThirdPartyRequest) ProtoMessage() {}
|
|
|
|
func (x *LoginThirdPartyRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_v1_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 LoginThirdPartyRequest.ProtoReflect.Descriptor instead.
|
|
func (*LoginThirdPartyRequest) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetMeta() *RequestMeta {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetProvider() string {
|
|
if x != nil {
|
|
return x.Provider
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetCredential() string {
|
|
if x != nil {
|
|
return x.Credential
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetGender() string {
|
|
if x != nil {
|
|
return x.Gender
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetCountry() string {
|
|
if x != nil {
|
|
return x.Country
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetInviteCode() string {
|
|
if x != nil {
|
|
return x.InviteCode
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetDeviceId() string {
|
|
if x != nil {
|
|
return x.DeviceId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetDevice() string {
|
|
if x != nil {
|
|
return x.Device
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetAvatar() string {
|
|
if x != nil {
|
|
return x.Avatar
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetBirth() string {
|
|
if x != nil {
|
|
return x.Birth
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetAppVersion() string {
|
|
if x != nil {
|
|
return x.AppVersion
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetSource() string {
|
|
if x != nil {
|
|
return x.Source
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetPlatform() string {
|
|
if x != nil {
|
|
return x.Platform
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetLanguage() string {
|
|
if x != nil {
|
|
return x.Language
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetOsVersion() string {
|
|
if x != nil {
|
|
return x.OsVersion
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetBuildNumber() string {
|
|
if x != nil {
|
|
return x.BuildNumber
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetTimezone() string {
|
|
if x != nil {
|
|
return x.Timezone
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetInstallChannel() string {
|
|
if x != nil {
|
|
return x.InstallChannel
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginThirdPartyRequest) GetCampaign() string {
|
|
if x != nil {
|
|
return x.Campaign
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// AuthResponse 返回标准认证令牌。
|
|
type AuthResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Token *AuthToken `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
IsNewUser bool `protobuf:"varint,2,opt,name=is_new_user,json=isNewUser,proto3" json:"is_new_user,omitempty"`
|
|
ProfileCompleted bool `protobuf:"varint,3,opt,name=profile_completed,json=profileCompleted,proto3" json:"profile_completed,omitempty"`
|
|
OnboardingStatus string `protobuf:"bytes,4,opt,name=onboarding_status,json=onboardingStatus,proto3" json:"onboarding_status,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AuthResponse) Reset() {
|
|
*x = AuthResponse{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AuthResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AuthResponse) ProtoMessage() {}
|
|
|
|
func (x *AuthResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_v1_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 AuthResponse.ProtoReflect.Descriptor instead.
|
|
func (*AuthResponse) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *AuthResponse) GetToken() *AuthToken {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *AuthResponse) GetIsNewUser() bool {
|
|
if x != nil {
|
|
return x.IsNewUser
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *AuthResponse) GetProfileCompleted() bool {
|
|
if x != nil {
|
|
return x.ProfileCompleted
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *AuthResponse) GetOnboardingStatus() string {
|
|
if x != nil {
|
|
return x.OnboardingStatus
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// SetPasswordRequest 为已经三方登录的用户首次设置密码。
|
|
type SetPasswordRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
|
|
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SetPasswordRequest) Reset() {
|
|
*x = SetPasswordRequest{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SetPasswordRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SetPasswordRequest) ProtoMessage() {}
|
|
|
|
func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_v1_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 SetPasswordRequest.ProtoReflect.Descriptor instead.
|
|
func (*SetPasswordRequest) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *SetPasswordRequest) GetMeta() *RequestMeta {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *SetPasswordRequest) GetUserId() int64 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *SetPasswordRequest) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// SetPasswordResponse 返回密码是否已经成功设置。
|
|
type SetPasswordResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
PasswordSet bool `protobuf:"varint,1,opt,name=password_set,json=passwordSet,proto3" json:"password_set,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SetPasswordResponse) Reset() {
|
|
*x = SetPasswordResponse{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SetPasswordResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SetPasswordResponse) ProtoMessage() {}
|
|
|
|
func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_v1_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 SetPasswordResponse.ProtoReflect.Descriptor instead.
|
|
func (*SetPasswordResponse) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *SetPasswordResponse) GetPasswordSet() bool {
|
|
if x != nil {
|
|
return x.PasswordSet
|
|
}
|
|
return false
|
|
}
|
|
|
|
// RefreshTokenRequest 使用 refresh token 换取新 token。
|
|
type RefreshTokenRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
|
|
RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RefreshTokenRequest) Reset() {
|
|
*x = RefreshTokenRequest{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RefreshTokenRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RefreshTokenRequest) ProtoMessage() {}
|
|
|
|
func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_v1_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 RefreshTokenRequest.ProtoReflect.Descriptor instead.
|
|
func (*RefreshTokenRequest) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *RefreshTokenRequest) GetMeta() *RequestMeta {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RefreshTokenRequest) GetRefreshToken() string {
|
|
if x != nil {
|
|
return x.RefreshToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// RefreshTokenResponse 返回轮换后的令牌。
|
|
type RefreshTokenResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Token *AuthToken `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RefreshTokenResponse) Reset() {
|
|
*x = RefreshTokenResponse{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RefreshTokenResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RefreshTokenResponse) ProtoMessage() {}
|
|
|
|
func (x *RefreshTokenResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_v1_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 RefreshTokenResponse.ProtoReflect.Descriptor instead.
|
|
func (*RefreshTokenResponse) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *RefreshTokenResponse) GetToken() *AuthToken {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// LogoutRequest 失效指定会话或 refresh token。
|
|
type LogoutRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
|
|
SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
|
RefreshToken string `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LogoutRequest) Reset() {
|
|
*x = LogoutRequest{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[7]
|
|
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_proto_user_v1_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 LogoutRequest.ProtoReflect.Descriptor instead.
|
|
func (*LogoutRequest) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *LogoutRequest) GetMeta() *RequestMeta {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *LogoutRequest) GetSessionId() string {
|
|
if x != nil {
|
|
return x.SessionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LogoutRequest) GetRefreshToken() string {
|
|
if x != nil {
|
|
return x.RefreshToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// LogoutResponse 返回会话是否被失效。
|
|
type LogoutResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Revoked bool `protobuf:"varint,1,opt,name=revoked,proto3" json:"revoked,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LogoutResponse) Reset() {
|
|
*x = LogoutResponse{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[8]
|
|
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_proto_user_v1_auth_proto_msgTypes[8]
|
|
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_proto_user_v1_auth_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
func (x *LogoutResponse) GetRevoked() bool {
|
|
if x != nil {
|
|
return x.Revoked
|
|
}
|
|
return false
|
|
}
|
|
|
|
// RecordLoginBlockedRequest 记录 gateway 入口快拦拒绝的登录审计。
|
|
type RecordLoginBlockedRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
|
|
Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"`
|
|
Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
|
|
Language string `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"`
|
|
Timezone string `protobuf:"bytes,5,opt,name=timezone,proto3" json:"timezone,omitempty"`
|
|
BlockReason string `protobuf:"bytes,6,opt,name=block_reason,json=blockReason,proto3" json:"block_reason,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RecordLoginBlockedRequest) Reset() {
|
|
*x = RecordLoginBlockedRequest{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[9]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RecordLoginBlockedRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RecordLoginBlockedRequest) ProtoMessage() {}
|
|
|
|
func (x *RecordLoginBlockedRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[9]
|
|
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 RecordLoginBlockedRequest.ProtoReflect.Descriptor instead.
|
|
func (*RecordLoginBlockedRequest) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{9}
|
|
}
|
|
|
|
func (x *RecordLoginBlockedRequest) GetMeta() *RequestMeta {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RecordLoginBlockedRequest) GetChannel() string {
|
|
if x != nil {
|
|
return x.Channel
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RecordLoginBlockedRequest) GetPlatform() string {
|
|
if x != nil {
|
|
return x.Platform
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RecordLoginBlockedRequest) GetLanguage() string {
|
|
if x != nil {
|
|
return x.Language
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RecordLoginBlockedRequest) GetTimezone() string {
|
|
if x != nil {
|
|
return x.Timezone
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RecordLoginBlockedRequest) GetBlockReason() string {
|
|
if x != nil {
|
|
return x.BlockReason
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// RecordLoginBlockedResponse 返回审计写入是否成功。
|
|
type RecordLoginBlockedResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Recorded bool `protobuf:"varint,1,opt,name=recorded,proto3" json:"recorded,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RecordLoginBlockedResponse) Reset() {
|
|
*x = RecordLoginBlockedResponse{}
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[10]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RecordLoginBlockedResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RecordLoginBlockedResponse) ProtoMessage() {}
|
|
|
|
func (x *RecordLoginBlockedResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proto_user_v1_auth_proto_msgTypes[10]
|
|
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 RecordLoginBlockedResponse.ProtoReflect.Descriptor instead.
|
|
func (*RecordLoginBlockedResponse) Descriptor() ([]byte, []int) {
|
|
return file_proto_user_v1_auth_proto_rawDescGZIP(), []int{10}
|
|
}
|
|
|
|
func (x *RecordLoginBlockedResponse) GetRecorded() bool {
|
|
if x != nil {
|
|
return x.Recorded
|
|
}
|
|
return false
|
|
}
|
|
|
|
var File_proto_user_v1_auth_proto protoreflect.FileDescriptor
|
|
|
|
const file_proto_user_v1_auth_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x18proto/user/v1/auth.proto\x12\rhyapp.user.v1\x1a\x18proto/user/v1/user.proto\"\x8a\x01\n" +
|
|
"\x14LoginPasswordRequest\x12.\n" +
|
|
"\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12&\n" +
|
|
"\x0fdisplay_user_id\x18\x02 \x01(\tR\rdisplayUserId\x12\x1a\n" +
|
|
"\bpassword\x18\x03 \x01(\tR\bpassword\"\xea\x04\n" +
|
|
"\x16LoginThirdPartyRequest\x12.\n" +
|
|
"\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12\x1a\n" +
|
|
"\bprovider\x18\x02 \x01(\tR\bprovider\x12\x1e\n" +
|
|
"\n" +
|
|
"credential\x18\x03 \x01(\tR\n" +
|
|
"credential\x12\x1a\n" +
|
|
"\busername\x18\x04 \x01(\tR\busername\x12\x16\n" +
|
|
"\x06gender\x18\x05 \x01(\tR\x06gender\x12\x18\n" +
|
|
"\acountry\x18\x06 \x01(\tR\acountry\x12\x1f\n" +
|
|
"\vinvite_code\x18\a \x01(\tR\n" +
|
|
"inviteCode\x12\x1b\n" +
|
|
"\tdevice_id\x18\b \x01(\tR\bdeviceId\x12\x16\n" +
|
|
"\x06device\x18\t \x01(\tR\x06device\x12\x16\n" +
|
|
"\x06avatar\x18\n" +
|
|
" \x01(\tR\x06avatar\x12\x14\n" +
|
|
"\x05birth\x18\v \x01(\tR\x05birth\x12\x1f\n" +
|
|
"\vapp_version\x18\f \x01(\tR\n" +
|
|
"appVersion\x12\x16\n" +
|
|
"\x06source\x18\r \x01(\tR\x06source\x12\x1a\n" +
|
|
"\bplatform\x18\x0e \x01(\tR\bplatform\x12\x1a\n" +
|
|
"\blanguage\x18\x0f \x01(\tR\blanguage\x12\x1d\n" +
|
|
"\n" +
|
|
"os_version\x18\x10 \x01(\tR\tosVersion\x12!\n" +
|
|
"\fbuild_number\x18\x11 \x01(\tR\vbuildNumber\x12\x1a\n" +
|
|
"\btimezone\x18\x12 \x01(\tR\btimezone\x12'\n" +
|
|
"\x0finstall_channel\x18\x13 \x01(\tR\x0einstallChannel\x12\x1a\n" +
|
|
"\bcampaign\x18\x14 \x01(\tR\bcampaign\"\xb8\x01\n" +
|
|
"\fAuthResponse\x12.\n" +
|
|
"\x05token\x18\x01 \x01(\v2\x18.hyapp.user.v1.AuthTokenR\x05token\x12\x1e\n" +
|
|
"\vis_new_user\x18\x02 \x01(\bR\tisNewUser\x12+\n" +
|
|
"\x11profile_completed\x18\x03 \x01(\bR\x10profileCompleted\x12+\n" +
|
|
"\x11onboarding_status\x18\x04 \x01(\tR\x10onboardingStatus\"y\n" +
|
|
"\x12SetPasswordRequest\x12.\n" +
|
|
"\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12\x17\n" +
|
|
"\auser_id\x18\x02 \x01(\x03R\x06userId\x12\x1a\n" +
|
|
"\bpassword\x18\x03 \x01(\tR\bpassword\"8\n" +
|
|
"\x13SetPasswordResponse\x12!\n" +
|
|
"\fpassword_set\x18\x01 \x01(\bR\vpasswordSet\"j\n" +
|
|
"\x13RefreshTokenRequest\x12.\n" +
|
|
"\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12#\n" +
|
|
"\rrefresh_token\x18\x02 \x01(\tR\frefreshToken\"F\n" +
|
|
"\x14RefreshTokenResponse\x12.\n" +
|
|
"\x05token\x18\x01 \x01(\v2\x18.hyapp.user.v1.AuthTokenR\x05token\"\x83\x01\n" +
|
|
"\rLogoutRequest\x12.\n" +
|
|
"\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12\x1d\n" +
|
|
"\n" +
|
|
"session_id\x18\x02 \x01(\tR\tsessionId\x12#\n" +
|
|
"\rrefresh_token\x18\x03 \x01(\tR\frefreshToken\"*\n" +
|
|
"\x0eLogoutResponse\x12\x18\n" +
|
|
"\arevoked\x18\x01 \x01(\bR\arevoked\"\xdc\x01\n" +
|
|
"\x19RecordLoginBlockedRequest\x12.\n" +
|
|
"\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12\x18\n" +
|
|
"\achannel\x18\x02 \x01(\tR\achannel\x12\x1a\n" +
|
|
"\bplatform\x18\x03 \x01(\tR\bplatform\x12\x1a\n" +
|
|
"\blanguage\x18\x04 \x01(\tR\blanguage\x12\x1a\n" +
|
|
"\btimezone\x18\x05 \x01(\tR\btimezone\x12!\n" +
|
|
"\fblock_reason\x18\x06 \x01(\tR\vblockReason\"8\n" +
|
|
"\x1aRecordLoginBlockedResponse\x12\x1a\n" +
|
|
"\brecorded\x18\x01 \x01(\bR\brecorded2\x98\x04\n" +
|
|
"\vAuthService\x12Q\n" +
|
|
"\rLoginPassword\x12#.hyapp.user.v1.LoginPasswordRequest\x1a\x1b.hyapp.user.v1.AuthResponse\x12U\n" +
|
|
"\x0fLoginThirdParty\x12%.hyapp.user.v1.LoginThirdPartyRequest\x1a\x1b.hyapp.user.v1.AuthResponse\x12T\n" +
|
|
"\vSetPassword\x12!.hyapp.user.v1.SetPasswordRequest\x1a\".hyapp.user.v1.SetPasswordResponse\x12W\n" +
|
|
"\fRefreshToken\x12\".hyapp.user.v1.RefreshTokenRequest\x1a#.hyapp.user.v1.RefreshTokenResponse\x12E\n" +
|
|
"\x06Logout\x12\x1c.hyapp.user.v1.LogoutRequest\x1a\x1d.hyapp.user.v1.LogoutResponse\x12i\n" +
|
|
"\x12RecordLoginBlocked\x12(.hyapp.user.v1.RecordLoginBlockedRequest\x1a).hyapp.user.v1.RecordLoginBlockedResponseB&Z$hyapp.local/api/proto/user/v1;userv1b\x06proto3"
|
|
|
|
var (
|
|
file_proto_user_v1_auth_proto_rawDescOnce sync.Once
|
|
file_proto_user_v1_auth_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_proto_user_v1_auth_proto_rawDescGZIP() []byte {
|
|
file_proto_user_v1_auth_proto_rawDescOnce.Do(func() {
|
|
file_proto_user_v1_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_user_v1_auth_proto_rawDesc), len(file_proto_user_v1_auth_proto_rawDesc)))
|
|
})
|
|
return file_proto_user_v1_auth_proto_rawDescData
|
|
}
|
|
|
|
var file_proto_user_v1_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
|
var file_proto_user_v1_auth_proto_goTypes = []any{
|
|
(*LoginPasswordRequest)(nil), // 0: hyapp.user.v1.LoginPasswordRequest
|
|
(*LoginThirdPartyRequest)(nil), // 1: hyapp.user.v1.LoginThirdPartyRequest
|
|
(*AuthResponse)(nil), // 2: hyapp.user.v1.AuthResponse
|
|
(*SetPasswordRequest)(nil), // 3: hyapp.user.v1.SetPasswordRequest
|
|
(*SetPasswordResponse)(nil), // 4: hyapp.user.v1.SetPasswordResponse
|
|
(*RefreshTokenRequest)(nil), // 5: hyapp.user.v1.RefreshTokenRequest
|
|
(*RefreshTokenResponse)(nil), // 6: hyapp.user.v1.RefreshTokenResponse
|
|
(*LogoutRequest)(nil), // 7: hyapp.user.v1.LogoutRequest
|
|
(*LogoutResponse)(nil), // 8: hyapp.user.v1.LogoutResponse
|
|
(*RecordLoginBlockedRequest)(nil), // 9: hyapp.user.v1.RecordLoginBlockedRequest
|
|
(*RecordLoginBlockedResponse)(nil), // 10: hyapp.user.v1.RecordLoginBlockedResponse
|
|
(*RequestMeta)(nil), // 11: hyapp.user.v1.RequestMeta
|
|
(*AuthToken)(nil), // 12: hyapp.user.v1.AuthToken
|
|
}
|
|
var file_proto_user_v1_auth_proto_depIdxs = []int32{
|
|
11, // 0: hyapp.user.v1.LoginPasswordRequest.meta:type_name -> hyapp.user.v1.RequestMeta
|
|
11, // 1: hyapp.user.v1.LoginThirdPartyRequest.meta:type_name -> hyapp.user.v1.RequestMeta
|
|
12, // 2: hyapp.user.v1.AuthResponse.token:type_name -> hyapp.user.v1.AuthToken
|
|
11, // 3: hyapp.user.v1.SetPasswordRequest.meta:type_name -> hyapp.user.v1.RequestMeta
|
|
11, // 4: hyapp.user.v1.RefreshTokenRequest.meta:type_name -> hyapp.user.v1.RequestMeta
|
|
12, // 5: hyapp.user.v1.RefreshTokenResponse.token:type_name -> hyapp.user.v1.AuthToken
|
|
11, // 6: hyapp.user.v1.LogoutRequest.meta:type_name -> hyapp.user.v1.RequestMeta
|
|
11, // 7: hyapp.user.v1.RecordLoginBlockedRequest.meta:type_name -> hyapp.user.v1.RequestMeta
|
|
0, // 8: hyapp.user.v1.AuthService.LoginPassword:input_type -> hyapp.user.v1.LoginPasswordRequest
|
|
1, // 9: hyapp.user.v1.AuthService.LoginThirdParty:input_type -> hyapp.user.v1.LoginThirdPartyRequest
|
|
3, // 10: hyapp.user.v1.AuthService.SetPassword:input_type -> hyapp.user.v1.SetPasswordRequest
|
|
5, // 11: hyapp.user.v1.AuthService.RefreshToken:input_type -> hyapp.user.v1.RefreshTokenRequest
|
|
7, // 12: hyapp.user.v1.AuthService.Logout:input_type -> hyapp.user.v1.LogoutRequest
|
|
9, // 13: hyapp.user.v1.AuthService.RecordLoginBlocked:input_type -> hyapp.user.v1.RecordLoginBlockedRequest
|
|
2, // 14: hyapp.user.v1.AuthService.LoginPassword:output_type -> hyapp.user.v1.AuthResponse
|
|
2, // 15: hyapp.user.v1.AuthService.LoginThirdParty:output_type -> hyapp.user.v1.AuthResponse
|
|
4, // 16: hyapp.user.v1.AuthService.SetPassword:output_type -> hyapp.user.v1.SetPasswordResponse
|
|
6, // 17: hyapp.user.v1.AuthService.RefreshToken:output_type -> hyapp.user.v1.RefreshTokenResponse
|
|
8, // 18: hyapp.user.v1.AuthService.Logout:output_type -> hyapp.user.v1.LogoutResponse
|
|
10, // 19: hyapp.user.v1.AuthService.RecordLoginBlocked:output_type -> hyapp.user.v1.RecordLoginBlockedResponse
|
|
14, // [14:20] is the sub-list for method output_type
|
|
8, // [8:14] is the sub-list for method input_type
|
|
8, // [8:8] is the sub-list for extension type_name
|
|
8, // [8:8] is the sub-list for extension extendee
|
|
0, // [0:8] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_proto_user_v1_auth_proto_init() }
|
|
func file_proto_user_v1_auth_proto_init() {
|
|
if File_proto_user_v1_auth_proto != nil {
|
|
return
|
|
}
|
|
file_proto_user_v1_user_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_user_v1_auth_proto_rawDesc), len(file_proto_user_v1_auth_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 11,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_proto_user_v1_auth_proto_goTypes,
|
|
DependencyIndexes: file_proto_user_v1_auth_proto_depIdxs,
|
|
MessageInfos: file_proto_user_v1_auth_proto_msgTypes,
|
|
}.Build()
|
|
File_proto_user_v1_auth_proto = out.File
|
|
file_proto_user_v1_auth_proto_goTypes = nil
|
|
file_proto_user_v1_auth_proto_depIdxs = nil
|
|
}
|