mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-03 20:40:00 -05:00
- Add common.proto with Empty, StringMap, and AppError messages - Add user.proto with User message (34 fields mirroring model.User) - Add channel.proto with Channel, ChannelType enum, ChannelBannerInfo - Add post.proto with Post, PostMetadata, PostEmbed, PostPriority, Reaction - Add team.proto with Team, TeamMember, TeamUnread, TeamType enum - Add file.proto with FileInfo, FileUploadResponse, FileData - Update Makefile to support all proto files with proper import mappings - Remove bootstrap.proto (replaced by common.proto) - Use google.protobuf.Struct for dynamic JSON fields (Post.props, Channel.props) - All timestamps are int64 (milliseconds since epoch) - All IDs are strings (26-char base32) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
488 lines
16 KiB
Go
488 lines
16 KiB
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v6.33.4
|
|
// source: user.proto
|
|
|
|
package pluginapiv1
|
|
|
|
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)
|
|
)
|
|
|
|
// User contains the details about a Mattermost user.
|
|
// Maps to model.User in Go.
|
|
type User struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Unique identifier for the user (26-char ID)
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
// Timestamp when the user was created (milliseconds since epoch)
|
|
CreateAt int64 `protobuf:"varint,2,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"`
|
|
// Timestamp when the user was last updated (milliseconds since epoch)
|
|
UpdateAt int64 `protobuf:"varint,3,opt,name=update_at,json=updateAt,proto3" json:"update_at,omitempty"`
|
|
// Timestamp when the user was deleted (0 if not deleted, milliseconds since epoch)
|
|
DeleteAt int64 `protobuf:"varint,4,opt,name=delete_at,json=deleteAt,proto3" json:"delete_at,omitempty"`
|
|
// The user's username (unique, lowercase)
|
|
Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"`
|
|
// The user's password (only populated during create/update, never in responses)
|
|
Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
|
|
// External authentication data (e.g., LDAP DN, SAML NameID)
|
|
AuthData *string `protobuf:"bytes,7,opt,name=auth_data,json=authData,proto3,oneof" json:"auth_data,omitempty"`
|
|
// The authentication service used (e.g., "email", "ldap", "saml", "gitlab")
|
|
AuthService string `protobuf:"bytes,8,opt,name=auth_service,json=authService,proto3" json:"auth_service,omitempty"`
|
|
// The user's email address
|
|
Email string `protobuf:"bytes,9,opt,name=email,proto3" json:"email,omitempty"`
|
|
// Whether the user's email has been verified
|
|
EmailVerified bool `protobuf:"varint,10,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"`
|
|
// The user's nickname (display name alternative)
|
|
Nickname string `protobuf:"bytes,11,opt,name=nickname,proto3" json:"nickname,omitempty"`
|
|
// The user's first name
|
|
FirstName string `protobuf:"bytes,12,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
|
|
// The user's last name
|
|
LastName string `protobuf:"bytes,13,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
|
|
// The user's job position
|
|
Position string `protobuf:"bytes,14,opt,name=position,proto3" json:"position,omitempty"`
|
|
// Space-separated list of role names assigned to the user
|
|
Roles string `protobuf:"bytes,15,opt,name=roles,proto3" json:"roles,omitempty"`
|
|
// Whether the user has opted in to marketing emails
|
|
AllowMarketing bool `protobuf:"varint,16,opt,name=allow_marketing,json=allowMarketing,proto3" json:"allow_marketing,omitempty"`
|
|
// User-specific properties (custom status, etc.)
|
|
// Maps to model.StringMap (map[string]string)
|
|
Props map[string]string `protobuf:"bytes,17,rep,name=props,proto3" json:"props,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
// Notification preferences
|
|
// Maps to model.StringMap (map[string]string)
|
|
NotifyProps map[string]string `protobuf:"bytes,18,rep,name=notify_props,json=notifyProps,proto3" json:"notify_props,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
// Timestamp when the password was last updated (milliseconds since epoch)
|
|
LastPasswordUpdate int64 `protobuf:"varint,19,opt,name=last_password_update,json=lastPasswordUpdate,proto3" json:"last_password_update,omitempty"`
|
|
// Timestamp when the profile picture was last updated (milliseconds since epoch)
|
|
LastPictureUpdate int64 `protobuf:"varint,20,opt,name=last_picture_update,json=lastPictureUpdate,proto3" json:"last_picture_update,omitempty"`
|
|
// Number of consecutive failed login attempts
|
|
FailedAttempts int32 `protobuf:"varint,21,opt,name=failed_attempts,json=failedAttempts,proto3" json:"failed_attempts,omitempty"`
|
|
// The user's locale preference (e.g., "en", "es")
|
|
Locale string `protobuf:"bytes,22,opt,name=locale,proto3" json:"locale,omitempty"`
|
|
// Timezone settings
|
|
// Maps to model.StringMap (map[string]string)
|
|
Timezone map[string]string `protobuf:"bytes,23,rep,name=timezone,proto3" json:"timezone,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
// Whether MFA (multi-factor authentication) is enabled
|
|
MfaActive bool `protobuf:"varint,24,opt,name=mfa_active,json=mfaActive,proto3" json:"mfa_active,omitempty"`
|
|
// MFA secret (only for internal use, never in API responses)
|
|
MfaSecret string `protobuf:"bytes,25,opt,name=mfa_secret,json=mfaSecret,proto3" json:"mfa_secret,omitempty"`
|
|
// Remote cluster ID if this user is from a shared channel
|
|
RemoteId *string `protobuf:"bytes,26,opt,name=remote_id,json=remoteId,proto3,oneof" json:"remote_id,omitempty"`
|
|
// Timestamp of last activity (milliseconds since epoch)
|
|
LastActivityAt int64 `protobuf:"varint,27,opt,name=last_activity_at,json=lastActivityAt,proto3" json:"last_activity_at,omitempty"`
|
|
// Whether this is a bot account
|
|
IsBot bool `protobuf:"varint,28,opt,name=is_bot,json=isBot,proto3" json:"is_bot,omitempty"`
|
|
// Description for bot accounts
|
|
BotDescription string `protobuf:"bytes,29,opt,name=bot_description,json=botDescription,proto3" json:"bot_description,omitempty"`
|
|
// Timestamp when the bot icon was last updated (milliseconds since epoch)
|
|
BotLastIconUpdate int64 `protobuf:"varint,30,opt,name=bot_last_icon_update,json=botLastIconUpdate,proto3" json:"bot_last_icon_update,omitempty"`
|
|
// ID of the terms of service the user has accepted
|
|
TermsOfServiceId string `protobuf:"bytes,31,opt,name=terms_of_service_id,json=termsOfServiceId,proto3" json:"terms_of_service_id,omitempty"`
|
|
// Timestamp when the user accepted the terms of service (milliseconds since epoch)
|
|
TermsOfServiceCreateAt int64 `protobuf:"varint,32,opt,name=terms_of_service_create_at,json=termsOfServiceCreateAt,proto3" json:"terms_of_service_create_at,omitempty"`
|
|
// Whether to skip sending the welcome email
|
|
DisableWelcomeEmail bool `protobuf:"varint,33,opt,name=disable_welcome_email,json=disableWelcomeEmail,proto3" json:"disable_welcome_email,omitempty"`
|
|
// Timestamp of last login (milliseconds since epoch)
|
|
LastLogin int64 `protobuf:"varint,34,opt,name=last_login,json=lastLogin,proto3" json:"last_login,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *User) Reset() {
|
|
*x = User{}
|
|
mi := &file_user_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_user_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 User.ProtoReflect.Descriptor instead.
|
|
func (*User) Descriptor() ([]byte, []int) {
|
|
return file_user_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *User) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetCreateAt() int64 {
|
|
if x != nil {
|
|
return x.CreateAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetUpdateAt() int64 {
|
|
if x != nil {
|
|
return x.UpdateAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetDeleteAt() int64 {
|
|
if x != nil {
|
|
return x.DeleteAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetAuthData() string {
|
|
if x != nil && x.AuthData != nil {
|
|
return *x.AuthData
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetAuthService() string {
|
|
if x != nil {
|
|
return x.AuthService
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetEmailVerified() bool {
|
|
if x != nil {
|
|
return x.EmailVerified
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *User) GetNickname() string {
|
|
if x != nil {
|
|
return x.Nickname
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetFirstName() string {
|
|
if x != nil {
|
|
return x.FirstName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetLastName() string {
|
|
if x != nil {
|
|
return x.LastName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetPosition() string {
|
|
if x != nil {
|
|
return x.Position
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetRoles() string {
|
|
if x != nil {
|
|
return x.Roles
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetAllowMarketing() bool {
|
|
if x != nil {
|
|
return x.AllowMarketing
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *User) GetProps() map[string]string {
|
|
if x != nil {
|
|
return x.Props
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *User) GetNotifyProps() map[string]string {
|
|
if x != nil {
|
|
return x.NotifyProps
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *User) GetLastPasswordUpdate() int64 {
|
|
if x != nil {
|
|
return x.LastPasswordUpdate
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetLastPictureUpdate() int64 {
|
|
if x != nil {
|
|
return x.LastPictureUpdate
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetFailedAttempts() int32 {
|
|
if x != nil {
|
|
return x.FailedAttempts
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetLocale() string {
|
|
if x != nil {
|
|
return x.Locale
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetTimezone() map[string]string {
|
|
if x != nil {
|
|
return x.Timezone
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *User) GetMfaActive() bool {
|
|
if x != nil {
|
|
return x.MfaActive
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *User) GetMfaSecret() string {
|
|
if x != nil {
|
|
return x.MfaSecret
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetRemoteId() string {
|
|
if x != nil && x.RemoteId != nil {
|
|
return *x.RemoteId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetLastActivityAt() int64 {
|
|
if x != nil {
|
|
return x.LastActivityAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetIsBot() bool {
|
|
if x != nil {
|
|
return x.IsBot
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *User) GetBotDescription() string {
|
|
if x != nil {
|
|
return x.BotDescription
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetBotLastIconUpdate() int64 {
|
|
if x != nil {
|
|
return x.BotLastIconUpdate
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetTermsOfServiceId() string {
|
|
if x != nil {
|
|
return x.TermsOfServiceId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetTermsOfServiceCreateAt() int64 {
|
|
if x != nil {
|
|
return x.TermsOfServiceCreateAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetDisableWelcomeEmail() bool {
|
|
if x != nil {
|
|
return x.DisableWelcomeEmail
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *User) GetLastLogin() int64 {
|
|
if x != nil {
|
|
return x.LastLogin
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_user_proto protoreflect.FileDescriptor
|
|
|
|
const file_user_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\n" +
|
|
"user.proto\x12\x17mattermost.pluginapi.v1\"\xe5\v\n" +
|
|
"\x04User\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" +
|
|
"\tcreate_at\x18\x02 \x01(\x03R\bcreateAt\x12\x1b\n" +
|
|
"\tupdate_at\x18\x03 \x01(\x03R\bupdateAt\x12\x1b\n" +
|
|
"\tdelete_at\x18\x04 \x01(\x03R\bdeleteAt\x12\x1a\n" +
|
|
"\busername\x18\x05 \x01(\tR\busername\x12\x1a\n" +
|
|
"\bpassword\x18\x06 \x01(\tR\bpassword\x12 \n" +
|
|
"\tauth_data\x18\a \x01(\tH\x00R\bauthData\x88\x01\x01\x12!\n" +
|
|
"\fauth_service\x18\b \x01(\tR\vauthService\x12\x14\n" +
|
|
"\x05email\x18\t \x01(\tR\x05email\x12%\n" +
|
|
"\x0eemail_verified\x18\n" +
|
|
" \x01(\bR\remailVerified\x12\x1a\n" +
|
|
"\bnickname\x18\v \x01(\tR\bnickname\x12\x1d\n" +
|
|
"\n" +
|
|
"first_name\x18\f \x01(\tR\tfirstName\x12\x1b\n" +
|
|
"\tlast_name\x18\r \x01(\tR\blastName\x12\x1a\n" +
|
|
"\bposition\x18\x0e \x01(\tR\bposition\x12\x14\n" +
|
|
"\x05roles\x18\x0f \x01(\tR\x05roles\x12'\n" +
|
|
"\x0fallow_marketing\x18\x10 \x01(\bR\x0eallowMarketing\x12>\n" +
|
|
"\x05props\x18\x11 \x03(\v2(.mattermost.pluginapi.v1.User.PropsEntryR\x05props\x12Q\n" +
|
|
"\fnotify_props\x18\x12 \x03(\v2..mattermost.pluginapi.v1.User.NotifyPropsEntryR\vnotifyProps\x120\n" +
|
|
"\x14last_password_update\x18\x13 \x01(\x03R\x12lastPasswordUpdate\x12.\n" +
|
|
"\x13last_picture_update\x18\x14 \x01(\x03R\x11lastPictureUpdate\x12'\n" +
|
|
"\x0ffailed_attempts\x18\x15 \x01(\x05R\x0efailedAttempts\x12\x16\n" +
|
|
"\x06locale\x18\x16 \x01(\tR\x06locale\x12G\n" +
|
|
"\btimezone\x18\x17 \x03(\v2+.mattermost.pluginapi.v1.User.TimezoneEntryR\btimezone\x12\x1d\n" +
|
|
"\n" +
|
|
"mfa_active\x18\x18 \x01(\bR\tmfaActive\x12\x1d\n" +
|
|
"\n" +
|
|
"mfa_secret\x18\x19 \x01(\tR\tmfaSecret\x12 \n" +
|
|
"\tremote_id\x18\x1a \x01(\tH\x01R\bremoteId\x88\x01\x01\x12(\n" +
|
|
"\x10last_activity_at\x18\x1b \x01(\x03R\x0elastActivityAt\x12\x15\n" +
|
|
"\x06is_bot\x18\x1c \x01(\bR\x05isBot\x12'\n" +
|
|
"\x0fbot_description\x18\x1d \x01(\tR\x0ebotDescription\x12/\n" +
|
|
"\x14bot_last_icon_update\x18\x1e \x01(\x03R\x11botLastIconUpdate\x12-\n" +
|
|
"\x13terms_of_service_id\x18\x1f \x01(\tR\x10termsOfServiceId\x12:\n" +
|
|
"\x1aterms_of_service_create_at\x18 \x01(\x03R\x16termsOfServiceCreateAt\x122\n" +
|
|
"\x15disable_welcome_email\x18! \x01(\bR\x13disableWelcomeEmail\x12\x1d\n" +
|
|
"\n" +
|
|
"last_login\x18\" \x01(\x03R\tlastLogin\x1a8\n" +
|
|
"\n" +
|
|
"PropsEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a>\n" +
|
|
"\x10NotifyPropsEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a;\n" +
|
|
"\rTimezoneEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\f\n" +
|
|
"\n" +
|
|
"_auth_dataB\f\n" +
|
|
"\n" +
|
|
"_remote_idBXZVgithub.com/mattermost/mattermost/server/public/pluginapi/grpc/generated/go/pluginapiv1b\x06proto3"
|
|
|
|
var (
|
|
file_user_proto_rawDescOnce sync.Once
|
|
file_user_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_user_proto_rawDescGZIP() []byte {
|
|
file_user_proto_rawDescOnce.Do(func() {
|
|
file_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_user_proto_rawDesc), len(file_user_proto_rawDesc)))
|
|
})
|
|
return file_user_proto_rawDescData
|
|
}
|
|
|
|
var file_user_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
|
var file_user_proto_goTypes = []any{
|
|
(*User)(nil), // 0: mattermost.pluginapi.v1.User
|
|
nil, // 1: mattermost.pluginapi.v1.User.PropsEntry
|
|
nil, // 2: mattermost.pluginapi.v1.User.NotifyPropsEntry
|
|
nil, // 3: mattermost.pluginapi.v1.User.TimezoneEntry
|
|
}
|
|
var file_user_proto_depIdxs = []int32{
|
|
1, // 0: mattermost.pluginapi.v1.User.props:type_name -> mattermost.pluginapi.v1.User.PropsEntry
|
|
2, // 1: mattermost.pluginapi.v1.User.notify_props:type_name -> mattermost.pluginapi.v1.User.NotifyPropsEntry
|
|
3, // 2: mattermost.pluginapi.v1.User.timezone:type_name -> mattermost.pluginapi.v1.User.TimezoneEntry
|
|
3, // [3:3] is the sub-list for method output_type
|
|
3, // [3:3] is the sub-list for method input_type
|
|
3, // [3:3] is the sub-list for extension type_name
|
|
3, // [3:3] is the sub-list for extension extendee
|
|
0, // [0:3] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_user_proto_init() }
|
|
func file_user_proto_init() {
|
|
if File_user_proto != nil {
|
|
return
|
|
}
|
|
file_user_proto_msgTypes[0].OneofWrappers = []any{}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_user_proto_rawDesc), len(file_user_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 4,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_user_proto_goTypes,
|
|
DependencyIndexes: file_user_proto_depIdxs,
|
|
MessageInfos: file_user_proto_msgTypes,
|
|
}.Build()
|
|
File_user_proto = out.File
|
|
file_user_proto_goTypes = nil
|
|
file_user_proto_depIdxs = nil
|
|
}
|