2023-07-29 20:35:00 +03:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
// versions:
|
|
|
|
// protoc-gen-go v1.31.0
|
|
|
|
// protoc (unknown)
|
|
|
|
// source: api/v2/user_service.proto
|
|
|
|
|
|
|
|
package apiv2
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
2023-09-10 13:56:24 +03:00
|
|
|
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
2023-07-29 20:35:00 +03:00
|
|
|
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)
|
|
|
|
)
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
type User_Role int32
|
2023-07-29 20:35:00 +03:00
|
|
|
|
|
|
|
const (
|
2023-09-10 13:56:24 +03:00
|
|
|
User_ROLE_UNSPECIFIED User_Role = 0
|
|
|
|
User_HOST User_Role = 1
|
|
|
|
User_ADMIN User_Role = 2
|
|
|
|
User_USER User_Role = 3
|
2023-07-29 20:35:00 +03:00
|
|
|
)
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
// Enum value maps for User_Role.
|
2023-07-29 20:35:00 +03:00
|
|
|
var (
|
2023-09-10 13:56:24 +03:00
|
|
|
User_Role_name = map[int32]string{
|
2023-07-29 20:35:00 +03:00
|
|
|
0: "ROLE_UNSPECIFIED",
|
|
|
|
1: "HOST",
|
|
|
|
2: "ADMIN",
|
|
|
|
3: "USER",
|
|
|
|
}
|
2023-09-10 13:56:24 +03:00
|
|
|
User_Role_value = map[string]int32{
|
2023-07-29 20:35:00 +03:00
|
|
|
"ROLE_UNSPECIFIED": 0,
|
|
|
|
"HOST": 1,
|
|
|
|
"ADMIN": 2,
|
|
|
|
"USER": 3,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (x User_Role) Enum() *User_Role {
|
|
|
|
p := new(User_Role)
|
2023-07-29 20:35:00 +03:00
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (x User_Role) String() string {
|
2023-07-29 20:35:00 +03:00
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (User_Role) Descriptor() protoreflect.EnumDescriptor {
|
2023-07-29 20:35:00 +03:00
|
|
|
return file_api_v2_user_service_proto_enumTypes[0].Descriptor()
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (User_Role) Type() protoreflect.EnumType {
|
2023-07-29 20:35:00 +03:00
|
|
|
return &file_api_v2_user_service_proto_enumTypes[0]
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (x User_Role) Number() protoreflect.EnumNumber {
|
2023-07-29 20:35:00 +03:00
|
|
|
return protoreflect.EnumNumber(x)
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
// Deprecated: Use User_Role.Descriptor instead.
|
|
|
|
func (User_Role) EnumDescriptor() ([]byte, []int) {
|
|
|
|
return file_api_v2_user_service_proto_rawDescGZIP(), []int{0, 0}
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
|
2023-07-30 04:53:24 +03:00
|
|
|
type UserSetting_Key int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
UserSetting_KEY_UNSPECIFIED UserSetting_Key = 0
|
|
|
|
// The preferred locale.
|
|
|
|
UserSetting_LOCALE UserSetting_Key = 1
|
|
|
|
// The preferred appearance.
|
|
|
|
UserSetting_APPEARANCE UserSetting_Key = 2
|
|
|
|
// The default visibility of the memo when creating a new memo.
|
|
|
|
UserSetting_MEMO_VISIBILITY UserSetting_Key = 3
|
|
|
|
// User's telegram id
|
|
|
|
UserSetting_TELEGRAM_USER_ID UserSetting_Key = 4
|
|
|
|
)
|
|
|
|
|
|
|
|
// Enum value maps for UserSetting_Key.
|
|
|
|
var (
|
|
|
|
UserSetting_Key_name = map[int32]string{
|
|
|
|
0: "KEY_UNSPECIFIED",
|
|
|
|
1: "LOCALE",
|
|
|
|
2: "APPEARANCE",
|
|
|
|
3: "MEMO_VISIBILITY",
|
|
|
|
4: "TELEGRAM_USER_ID",
|
|
|
|
}
|
|
|
|
UserSetting_Key_value = map[string]int32{
|
|
|
|
"KEY_UNSPECIFIED": 0,
|
|
|
|
"LOCALE": 1,
|
|
|
|
"APPEARANCE": 2,
|
|
|
|
"MEMO_VISIBILITY": 3,
|
|
|
|
"TELEGRAM_USER_ID": 4,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func (x UserSetting_Key) Enum() *UserSetting_Key {
|
|
|
|
p := new(UserSetting_Key)
|
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x UserSetting_Key) String() string {
|
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (UserSetting_Key) Descriptor() protoreflect.EnumDescriptor {
|
2023-08-05 04:32:52 +03:00
|
|
|
return file_api_v2_user_service_proto_enumTypes[1].Descriptor()
|
2023-07-30 04:53:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (UserSetting_Key) Type() protoreflect.EnumType {
|
2023-08-05 04:32:52 +03:00
|
|
|
return &file_api_v2_user_service_proto_enumTypes[1]
|
2023-07-30 04:53:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x UserSetting_Key) Number() protoreflect.EnumNumber {
|
|
|
|
return protoreflect.EnumNumber(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: Use UserSetting_Key.Descriptor instead.
|
|
|
|
func (UserSetting_Key) EnumDescriptor() ([]byte, []int) {
|
2023-09-10 13:56:24 +03:00
|
|
|
return file_api_v2_user_service_proto_rawDescGZIP(), []int{5, 0}
|
2023-07-30 04:53:24 +03:00
|
|
|
}
|
|
|
|
|
2023-07-29 20:35:00 +03:00
|
|
|
type User struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
|
|
RowStatus RowStatus `protobuf:"varint,2,opt,name=row_status,json=rowStatus,proto3,enum=memos.api.v2.RowStatus" json:"row_status,omitempty"`
|
|
|
|
CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
|
|
|
|
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
|
|
|
|
Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"`
|
|
|
|
Role User_Role `protobuf:"varint,6,opt,name=role,proto3,enum=memos.api.v2.User_Role" json:"role,omitempty"`
|
|
|
|
Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
|
|
|
|
Nickname string `protobuf:"bytes,8,opt,name=nickname,proto3" json:"nickname,omitempty"`
|
|
|
|
OpenId string `protobuf:"bytes,9,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"`
|
|
|
|
AvatarUrl string `protobuf:"bytes,10,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
|
|
|
|
Password string `protobuf:"bytes,11,opt,name=password,proto3" json:"password,omitempty"`
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *User) Reset() {
|
|
|
|
*x = User{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
|
|
|
mi := &file_api_v2_user_service_proto_msgTypes[0]
|
|
|
|
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_api_v2_user_service_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 User.ProtoReflect.Descriptor instead.
|
|
|
|
func (*User) Descriptor() ([]byte, []int) {
|
|
|
|
return file_api_v2_user_service_proto_rawDescGZIP(), []int{0}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *User) GetId() int32 {
|
|
|
|
if x != nil {
|
|
|
|
return x.Id
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *User) GetRowStatus() RowStatus {
|
|
|
|
if x != nil {
|
|
|
|
return x.RowStatus
|
|
|
|
}
|
|
|
|
return RowStatus_ROW_STATUS_UNSPECIFIED
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (x *User) GetCreateTime() *timestamppb.Timestamp {
|
2023-07-29 20:35:00 +03:00
|
|
|
if x != nil {
|
2023-09-10 13:56:24 +03:00
|
|
|
return x.CreateTime
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
2023-09-10 13:56:24 +03:00
|
|
|
return nil
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (x *User) GetUpdateTime() *timestamppb.Timestamp {
|
2023-07-29 20:35:00 +03:00
|
|
|
if x != nil {
|
2023-09-10 13:56:24 +03:00
|
|
|
return x.UpdateTime
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
2023-09-10 13:56:24 +03:00
|
|
|
return nil
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *User) GetUsername() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Username
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (x *User) GetRole() User_Role {
|
2023-07-29 20:35:00 +03:00
|
|
|
if x != nil {
|
|
|
|
return x.Role
|
|
|
|
}
|
2023-09-10 13:56:24 +03:00
|
|
|
return User_ROLE_UNSPECIFIED
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *User) GetEmail() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Email
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *User) GetNickname() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Nickname
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *User) GetOpenId() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.OpenId
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *User) GetAvatarUrl() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.AvatarUrl
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (x *User) GetPassword() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Password
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2023-07-29 20:35:00 +03:00
|
|
|
type GetUserRequest struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *GetUserRequest) Reset() {
|
|
|
|
*x = GetUserRequest{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
|
|
|
mi := &file_api_v2_user_service_proto_msgTypes[1]
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *GetUserRequest) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*GetUserRequest) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
|
|
|
|
mi := &file_api_v2_user_service_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 GetUserRequest.ProtoReflect.Descriptor instead.
|
|
|
|
func (*GetUserRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return file_api_v2_user_service_proto_rawDescGZIP(), []int{1}
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
func (x *GetUserRequest) GetUsername() string {
|
2023-07-29 20:35:00 +03:00
|
|
|
if x != nil {
|
2023-09-10 13:56:24 +03:00
|
|
|
return x.Username
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetUserResponse struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *GetUserResponse) Reset() {
|
|
|
|
*x = GetUserResponse{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
|
|
|
mi := &file_api_v2_user_service_proto_msgTypes[2]
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *GetUserResponse) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*GetUserResponse) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
|
|
|
|
mi := &file_api_v2_user_service_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 GetUserResponse.ProtoReflect.Descriptor instead.
|
|
|
|
func (*GetUserResponse) Descriptor() ([]byte, []int) {
|
|
|
|
return file_api_v2_user_service_proto_rawDescGZIP(), []int{2}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *GetUserResponse) GetUser() *User {
|
|
|
|
if x != nil {
|
|
|
|
return x.User
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2023-09-10 13:56:24 +03:00
|
|
|
type UpdateUserRequest struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
|
|
|
User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
|
|
|
|
// The update mask applies to the user resource.
|
2023-09-10 17:03:12 +03:00
|
|
|
UpdateMask []string `protobuf:"bytes,3,rep,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
|
2023-09-10 13:56:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UpdateUserRequest) Reset() {
|
|
|
|
*x = UpdateUserRequest{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
|
|
|
mi := &file_api_v2_user_service_proto_msgTypes[3]
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UpdateUserRequest) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UpdateUserRequest) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message {
|
|
|
|
mi := &file_api_v2_user_service_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 UpdateUserRequest.ProtoReflect.Descriptor instead.
|
|
|
|
func (*UpdateUserRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return file_api_v2_user_service_proto_rawDescGZIP(), []int{3}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UpdateUserRequest) GetUsername() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Username
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UpdateUserRequest) GetUser() *User {
|
|
|
|
if x != nil {
|
|
|
|
return x.User
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2023-09-10 17:03:12 +03:00
|
|
|
func (x *UpdateUserRequest) GetUpdateMask() []string {
|
2023-09-10 13:56:24 +03:00
|
|
|
if x != nil {
|
|
|
|
return x.UpdateMask
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateUserResponse struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UpdateUserResponse) Reset() {
|
|
|
|
*x = UpdateUserResponse{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
|
|
|
mi := &file_api_v2_user_service_proto_msgTypes[4]
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UpdateUserResponse) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UpdateUserResponse) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *UpdateUserResponse) ProtoReflect() protoreflect.Message {
|
|
|
|
mi := &file_api_v2_user_service_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 UpdateUserResponse.ProtoReflect.Descriptor instead.
|
|
|
|
func (*UpdateUserResponse) Descriptor() ([]byte, []int) {
|
|
|
|
return file_api_v2_user_service_proto_rawDescGZIP(), []int{4}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UpdateUserResponse) GetUser() *User {
|
|
|
|
if x != nil {
|
|
|
|
return x.User
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2023-07-30 04:53:24 +03:00
|
|
|
type UserSetting struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
// The user id of the setting.
|
|
|
|
UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
|
|
// The key of the setting.
|
|
|
|
Key UserSetting_Key `protobuf:"varint,2,opt,name=key,proto3,enum=memos.api.v2.UserSetting_Key" json:"key,omitempty"`
|
|
|
|
// The value of the setting.
|
|
|
|
Value *UserSettingValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UserSetting) Reset() {
|
|
|
|
*x = UserSetting{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
2023-09-10 13:56:24 +03:00
|
|
|
mi := &file_api_v2_user_service_proto_msgTypes[5]
|
2023-07-30 04:53:24 +03:00
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UserSetting) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UserSetting) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *UserSetting) ProtoReflect() protoreflect.Message {
|
2023-09-10 13:56:24 +03:00
|
|
|
mi := &file_api_v2_user_service_proto_msgTypes[5]
|
2023-07-30 04:53:24 +03:00
|
|
|
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 UserSetting.ProtoReflect.Descriptor instead.
|
|
|
|
func (*UserSetting) Descriptor() ([]byte, []int) {
|
2023-09-10 13:56:24 +03:00
|
|
|
return file_api_v2_user_service_proto_rawDescGZIP(), []int{5}
|
2023-07-30 04:53:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UserSetting) GetUserId() int32 {
|
|
|
|
if x != nil {
|
|
|
|
return x.UserId
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UserSetting) GetKey() UserSetting_Key {
|
|
|
|
if x != nil {
|
|
|
|
return x.Key
|
|
|
|
}
|
|
|
|
return UserSetting_KEY_UNSPECIFIED
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UserSetting) GetValue() *UserSettingValue {
|
|
|
|
if x != nil {
|
|
|
|
return x.Value
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type UserSettingValue struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
// Types that are assignable to Value:
|
|
|
|
//
|
|
|
|
// *UserSettingValue_StringValue
|
|
|
|
// *UserSettingValue_VisibilityValue
|
|
|
|
Value isUserSettingValue_Value `protobuf_oneof:"value"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UserSettingValue) Reset() {
|
|
|
|
*x = UserSettingValue{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
2023-09-10 13:56:24 +03:00
|
|
|
mi := &file_api_v2_user_service_proto_msgTypes[6]
|
2023-07-30 04:53:24 +03:00
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UserSettingValue) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UserSettingValue) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *UserSettingValue) ProtoReflect() protoreflect.Message {
|
2023-09-10 13:56:24 +03:00
|
|
|
mi := &file_api_v2_user_service_proto_msgTypes[6]
|
2023-07-30 04:53:24 +03:00
|
|
|
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 UserSettingValue.ProtoReflect.Descriptor instead.
|
|
|
|
func (*UserSettingValue) Descriptor() ([]byte, []int) {
|
2023-09-10 13:56:24 +03:00
|
|
|
return file_api_v2_user_service_proto_rawDescGZIP(), []int{6}
|
2023-07-30 04:53:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UserSettingValue) GetValue() isUserSettingValue_Value {
|
|
|
|
if m != nil {
|
|
|
|
return m.Value
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UserSettingValue) GetStringValue() string {
|
|
|
|
if x, ok := x.GetValue().(*UserSettingValue_StringValue); ok {
|
|
|
|
return x.StringValue
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *UserSettingValue) GetVisibilityValue() Visibility {
|
|
|
|
if x, ok := x.GetValue().(*UserSettingValue_VisibilityValue); ok {
|
|
|
|
return x.VisibilityValue
|
|
|
|
}
|
|
|
|
return Visibility_VISIBILITY_UNSPECIFIED
|
|
|
|
}
|
|
|
|
|
|
|
|
type isUserSettingValue_Value interface {
|
|
|
|
isUserSettingValue_Value()
|
|
|
|
}
|
|
|
|
|
|
|
|
type UserSettingValue_StringValue struct {
|
|
|
|
// Default value as a string.
|
|
|
|
StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UserSettingValue_VisibilityValue struct {
|
|
|
|
VisibilityValue Visibility `protobuf:"varint,2,opt,name=visibility_value,json=visibilityValue,proto3,enum=memos.api.v2.Visibility,oneof"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UserSettingValue_StringValue) isUserSettingValue_Value() {}
|
|
|
|
|
|
|
|
func (*UserSettingValue_VisibilityValue) isUserSettingValue_Value() {}
|
|
|
|
|
2023-07-29 20:35:00 +03:00
|
|
|
var File_api_v2_user_service_proto protoreflect.FileDescriptor
|
|
|
|
|
|
|
|
var file_api_v2_user_service_proto_rawDesc = []byte{
|
|
|
|
0x0a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65,
|
|
|
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6d, 0x65, 0x6d,
|
|
|
|
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
2023-08-05 04:32:52 +03:00
|
|
|
0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19,
|
|
|
|
0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76,
|
|
|
|
0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
|
|
|
0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
|
|
|
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
|
|
|
0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
2023-09-10 13:56:24 +03:00
|
|
|
0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65,
|
|
|
|
0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
2023-09-10 17:03:12 +03:00
|
|
|
0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
|
|
|
0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f,
|
|
|
|
0x74, 0x6f, 0x22, 0xd9, 0x03, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
|
|
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x72,
|
|
|
|
0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
|
|
|
0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52,
|
|
|
|
0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x53, 0x74, 0x61,
|
|
|
|
0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
|
|
|
|
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
|
|
|
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
|
|
|
0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
|
|
|
|
0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
|
|
|
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
|
|
|
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
|
|
|
0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a,
|
|
|
|
0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
|
|
0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x72, 0x6f, 0x6c,
|
|
|
|
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
|
|
|
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x6c, 0x65,
|
|
|
|
0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18,
|
|
|
|
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08,
|
|
|
|
0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
|
|
|
0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x70, 0x65, 0x6e,
|
|
|
|
0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x49,
|
|
|
|
0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18,
|
|
|
|
0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c,
|
|
|
|
0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0b, 0x20, 0x01,
|
|
|
|
0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x04, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
|
|
|
|
0x64, 0x22, 0x3b, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c,
|
|
|
|
0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
|
|
|
|
0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d,
|
|
|
|
0x49, 0x4e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x03, 0x22, 0x2c,
|
|
|
|
0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 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, 0x22, 0x39, 0x0a, 0x0f,
|
|
|
|
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
|
|
|
0x26, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,
|
|
|
|
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65,
|
|
|
|
0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74,
|
|
|
|
0x65, 0x55, 0x73, 0x65, 0x72, 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, 0x26, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
|
|
|
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
|
|
|
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72,
|
|
|
|
0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18,
|
|
|
|
0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73,
|
|
|
|
0x6b, 0x22, 0x3c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,
|
|
|
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18,
|
|
|
|
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
|
|
|
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22,
|
|
|
|
0xf0, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12,
|
|
|
|
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
|
|
|
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
|
|
|
|
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
|
|
|
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
|
|
|
0x2e, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
|
|
|
0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
|
|
|
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74,
|
|
|
|
0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
|
|
|
|
0x61, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x4e,
|
|
|
|
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c,
|
|
|
|
0x4f, 0x43, 0x41, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x50, 0x45, 0x41,
|
|
|
|
0x52, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f,
|
|
|
|
0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10,
|
|
|
|
0x54, 0x45, 0x4c, 0x45, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x49, 0x44,
|
|
|
|
0x10, 0x04, 0x22, 0x87, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69,
|
|
|
|
0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e,
|
|
|
|
0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
|
|
|
|
0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x10,
|
|
|
|
0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
|
|
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
|
|
|
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
|
|
|
|
0x48, 0x00, 0x52, 0x0f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x56, 0x61,
|
|
|
|
0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x83, 0x02, 0x0a,
|
|
|
|
0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x07,
|
|
|
|
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
|
|
|
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
|
|
|
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
|
|
|
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
|
|
|
|
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
|
|
|
|
0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
|
|
|
|
0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
|
|
|
|
0x7d, 0x12, 0x7f, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12,
|
|
|
|
0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55,
|
|
|
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
|
|
0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
|
|
|
|
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
|
|
|
0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82,
|
|
|
|
0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
|
|
|
0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
|
|
|
|
0x65, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
|
|
|
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72,
|
|
|
|
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74,
|
|
|
|
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
|
|
|
0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e,
|
|
|
|
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03,
|
|
|
|
0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e,
|
|
|
|
0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56,
|
|
|
|
0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32,
|
|
|
|
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d,
|
|
|
|
0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70,
|
|
|
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
|
|
|
file_api_v2_user_service_proto_rawDescOnce sync.Once
|
|
|
|
file_api_v2_user_service_proto_rawDescData = file_api_v2_user_service_proto_rawDesc
|
|
|
|
)
|
|
|
|
|
|
|
|
func file_api_v2_user_service_proto_rawDescGZIP() []byte {
|
|
|
|
file_api_v2_user_service_proto_rawDescOnce.Do(func() {
|
|
|
|
file_api_v2_user_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_user_service_proto_rawDescData)
|
|
|
|
})
|
|
|
|
return file_api_v2_user_service_proto_rawDescData
|
|
|
|
}
|
|
|
|
|
2023-08-05 04:32:52 +03:00
|
|
|
var file_api_v2_user_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
2023-09-10 13:56:24 +03:00
|
|
|
var file_api_v2_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
2023-07-29 20:35:00 +03:00
|
|
|
var file_api_v2_user_service_proto_goTypes = []interface{}{
|
2023-09-10 13:56:24 +03:00
|
|
|
(User_Role)(0), // 0: memos.api.v2.User.Role
|
|
|
|
(UserSetting_Key)(0), // 1: memos.api.v2.UserSetting.Key
|
|
|
|
(*User)(nil), // 2: memos.api.v2.User
|
|
|
|
(*GetUserRequest)(nil), // 3: memos.api.v2.GetUserRequest
|
|
|
|
(*GetUserResponse)(nil), // 4: memos.api.v2.GetUserResponse
|
|
|
|
(*UpdateUserRequest)(nil), // 5: memos.api.v2.UpdateUserRequest
|
|
|
|
(*UpdateUserResponse)(nil), // 6: memos.api.v2.UpdateUserResponse
|
|
|
|
(*UserSetting)(nil), // 7: memos.api.v2.UserSetting
|
|
|
|
(*UserSettingValue)(nil), // 8: memos.api.v2.UserSettingValue
|
|
|
|
(RowStatus)(0), // 9: memos.api.v2.RowStatus
|
|
|
|
(*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
|
2023-09-10 17:03:12 +03:00
|
|
|
(Visibility)(0), // 11: memos.api.v2.Visibility
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
var file_api_v2_user_service_proto_depIdxs = []int32{
|
2023-09-10 13:56:24 +03:00
|
|
|
9, // 0: memos.api.v2.User.row_status:type_name -> memos.api.v2.RowStatus
|
|
|
|
10, // 1: memos.api.v2.User.create_time:type_name -> google.protobuf.Timestamp
|
|
|
|
10, // 2: memos.api.v2.User.update_time:type_name -> google.protobuf.Timestamp
|
|
|
|
0, // 3: memos.api.v2.User.role:type_name -> memos.api.v2.User.Role
|
|
|
|
2, // 4: memos.api.v2.GetUserResponse.user:type_name -> memos.api.v2.User
|
|
|
|
2, // 5: memos.api.v2.UpdateUserRequest.user:type_name -> memos.api.v2.User
|
2023-09-10 17:03:12 +03:00
|
|
|
2, // 6: memos.api.v2.UpdateUserResponse.user:type_name -> memos.api.v2.User
|
|
|
|
1, // 7: memos.api.v2.UserSetting.key:type_name -> memos.api.v2.UserSetting.Key
|
|
|
|
8, // 8: memos.api.v2.UserSetting.value:type_name -> memos.api.v2.UserSettingValue
|
|
|
|
11, // 9: memos.api.v2.UserSettingValue.visibility_value:type_name -> memos.api.v2.Visibility
|
|
|
|
3, // 10: memos.api.v2.UserService.GetUser:input_type -> memos.api.v2.GetUserRequest
|
|
|
|
5, // 11: memos.api.v2.UserService.UpdateUser:input_type -> memos.api.v2.UpdateUserRequest
|
|
|
|
4, // 12: memos.api.v2.UserService.GetUser:output_type -> memos.api.v2.GetUserResponse
|
|
|
|
6, // 13: memos.api.v2.UserService.UpdateUser:output_type -> memos.api.v2.UpdateUserResponse
|
|
|
|
12, // [12:14] is the sub-list for method output_type
|
|
|
|
10, // [10:12] is the sub-list for method input_type
|
|
|
|
10, // [10:10] is the sub-list for extension type_name
|
|
|
|
10, // [10:10] is the sub-list for extension extendee
|
|
|
|
0, // [0:10] is the sub-list for field type_name
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() { file_api_v2_user_service_proto_init() }
|
|
|
|
func file_api_v2_user_service_proto_init() {
|
|
|
|
if File_api_v2_user_service_proto != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
file_api_v2_common_proto_init()
|
2023-08-05 04:32:52 +03:00
|
|
|
file_api_v2_memo_service_proto_init()
|
2023-07-29 20:35:00 +03:00
|
|
|
if !protoimpl.UnsafeEnabled {
|
|
|
|
file_api_v2_user_service_proto_msgTypes[0].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_api_v2_user_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
switch v := v.(*GetUserRequest); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
file_api_v2_user_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
switch v := v.(*GetUserResponse); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
2023-07-30 04:53:24 +03:00
|
|
|
file_api_v2_user_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
2023-09-10 13:56:24 +03:00
|
|
|
switch v := v.(*UpdateUserRequest); i {
|
2023-07-30 04:53:24 +03:00
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
file_api_v2_user_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
2023-09-10 13:56:24 +03:00
|
|
|
switch v := v.(*UpdateUserResponse); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
file_api_v2_user_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
switch v := v.(*UserSetting); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
file_api_v2_user_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
2023-07-30 04:53:24 +03:00
|
|
|
switch v := v.(*UserSettingValue); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-09-10 13:56:24 +03:00
|
|
|
file_api_v2_user_service_proto_msgTypes[6].OneofWrappers = []interface{}{
|
2023-07-30 04:53:24 +03:00
|
|
|
(*UserSettingValue_StringValue)(nil),
|
|
|
|
(*UserSettingValue_VisibilityValue)(nil),
|
2023-07-29 20:35:00 +03:00
|
|
|
}
|
|
|
|
type x struct{}
|
|
|
|
out := protoimpl.TypeBuilder{
|
|
|
|
File: protoimpl.DescBuilder{
|
|
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
|
|
RawDescriptor: file_api_v2_user_service_proto_rawDesc,
|
2023-08-05 04:32:52 +03:00
|
|
|
NumEnums: 2,
|
2023-09-10 13:56:24 +03:00
|
|
|
NumMessages: 7,
|
2023-07-29 20:35:00 +03:00
|
|
|
NumExtensions: 0,
|
|
|
|
NumServices: 1,
|
|
|
|
},
|
|
|
|
GoTypes: file_api_v2_user_service_proto_goTypes,
|
|
|
|
DependencyIndexes: file_api_v2_user_service_proto_depIdxs,
|
|
|
|
EnumInfos: file_api_v2_user_service_proto_enumTypes,
|
|
|
|
MessageInfos: file_api_v2_user_service_proto_msgTypes,
|
|
|
|
}.Build()
|
|
|
|
File_api_v2_user_service_proto = out.File
|
|
|
|
file_api_v2_user_service_proto_rawDesc = nil
|
|
|
|
file_api_v2_user_service_proto_goTypes = nil
|
|
|
|
file_api_v2_user_service_proto_depIdxs = nil
|
|
|
|
}
|