mirror of https://github.com/kone-net/go-chat.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
215 lines
6.8 KiB
215 lines
6.8 KiB
// Code generated by protoc-gen-go. DO NOT EDIT. |
|
// versions: |
|
// protoc-gen-go v1.36.10 |
|
// protoc v6.33.0 |
|
// source: pkg/protocol/message.proto |
|
|
|
package protocol |
|
|
|
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) |
|
) |
|
|
|
type Message struct { |
|
state protoimpl.MessageState `protogen:"open.v1"` |
|
Avatar string `protobuf:"bytes,1,opt,name=avatar,proto3" json:"avatar,omitempty"` //头像 |
|
FromUsername string `protobuf:"bytes,2,opt,name=fromUsername,proto3" json:"fromUsername,omitempty"` // 发送消息用户的用户名 |
|
From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` // 发送消息用户uuid |
|
To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` // 发送给对端用户的uuid |
|
Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` // 文本消息内容 |
|
ContentType int32 `protobuf:"varint,6,opt,name=contentType,proto3" json:"contentType,omitempty"` // 消息内容类型:1.文字 2.普通文件 3.图片 4.音频 5.视频 6.语音聊天 7.视频聊天 |
|
Type string `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"` // 消息传输类型:如果是心跳消息,该内容为heatbeat,在线视频或者音频为webrtc |
|
MessageType int32 `protobuf:"varint,8,opt,name=messageType,proto3" json:"messageType,omitempty"` // 消息类型,1.单聊 2.群聊 |
|
Url string `protobuf:"bytes,9,opt,name=url,proto3" json:"url,omitempty"` // 图片,视频,语音的路径 |
|
FileSuffix string `protobuf:"bytes,10,opt,name=fileSuffix,proto3" json:"fileSuffix,omitempty"` // 文件后缀,如果通过二进制头不能解析文件后缀,使用该后缀 |
|
File []byte `protobuf:"bytes,11,opt,name=file,proto3" json:"file,omitempty"` // 如果是图片,文件,视频等的二进制 |
|
unknownFields protoimpl.UnknownFields |
|
sizeCache protoimpl.SizeCache |
|
} |
|
|
|
func (x *Message) Reset() { |
|
*x = Message{} |
|
mi := &file_pkg_protocol_message_proto_msgTypes[0] |
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|
ms.StoreMessageInfo(mi) |
|
} |
|
|
|
func (x *Message) String() string { |
|
return protoimpl.X.MessageStringOf(x) |
|
} |
|
|
|
func (*Message) ProtoMessage() {} |
|
|
|
func (x *Message) ProtoReflect() protoreflect.Message { |
|
mi := &file_pkg_protocol_message_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 Message.ProtoReflect.Descriptor instead. |
|
func (*Message) Descriptor() ([]byte, []int) { |
|
return file_pkg_protocol_message_proto_rawDescGZIP(), []int{0} |
|
} |
|
|
|
func (x *Message) GetAvatar() string { |
|
if x != nil { |
|
return x.Avatar |
|
} |
|
return "" |
|
} |
|
|
|
func (x *Message) GetFromUsername() string { |
|
if x != nil { |
|
return x.FromUsername |
|
} |
|
return "" |
|
} |
|
|
|
func (x *Message) GetFrom() string { |
|
if x != nil { |
|
return x.From |
|
} |
|
return "" |
|
} |
|
|
|
func (x *Message) GetTo() string { |
|
if x != nil { |
|
return x.To |
|
} |
|
return "" |
|
} |
|
|
|
func (x *Message) GetContent() string { |
|
if x != nil { |
|
return x.Content |
|
} |
|
return "" |
|
} |
|
|
|
func (x *Message) GetContentType() int32 { |
|
if x != nil { |
|
return x.ContentType |
|
} |
|
return 0 |
|
} |
|
|
|
func (x *Message) GetType() string { |
|
if x != nil { |
|
return x.Type |
|
} |
|
return "" |
|
} |
|
|
|
func (x *Message) GetMessageType() int32 { |
|
if x != nil { |
|
return x.MessageType |
|
} |
|
return 0 |
|
} |
|
|
|
func (x *Message) GetUrl() string { |
|
if x != nil { |
|
return x.Url |
|
} |
|
return "" |
|
} |
|
|
|
func (x *Message) GetFileSuffix() string { |
|
if x != nil { |
|
return x.FileSuffix |
|
} |
|
return "" |
|
} |
|
|
|
func (x *Message) GetFile() []byte { |
|
if x != nil { |
|
return x.File |
|
} |
|
return nil |
|
} |
|
|
|
var File_pkg_protocol_message_proto protoreflect.FileDescriptor |
|
|
|
const file_pkg_protocol_message_proto_rawDesc = "" + |
|
"\n" + |
|
"\x1apkg/protocol/message.proto\x12\bprotocol\"\xa1\x02\n" + |
|
"\aMessage\x12\x16\n" + |
|
"\x06avatar\x18\x01 \x01(\tR\x06avatar\x12\"\n" + |
|
"\ffromUsername\x18\x02 \x01(\tR\ffromUsername\x12\x12\n" + |
|
"\x04from\x18\x03 \x01(\tR\x04from\x12\x0e\n" + |
|
"\x02to\x18\x04 \x01(\tR\x02to\x12\x18\n" + |
|
"\acontent\x18\x05 \x01(\tR\acontent\x12 \n" + |
|
"\vcontentType\x18\x06 \x01(\x05R\vcontentType\x12\x12\n" + |
|
"\x04type\x18\a \x01(\tR\x04type\x12 \n" + |
|
"\vmessageType\x18\b \x01(\x05R\vmessageType\x12\x10\n" + |
|
"\x03url\x18\t \x01(\tR\x03url\x12\x1e\n" + |
|
"\n" + |
|
"fileSuffix\x18\n" + |
|
" \x01(\tR\n" + |
|
"fileSuffix\x12\x12\n" + |
|
"\x04file\x18\v \x01(\fR\x04fileB\x0eZ\fpkg/protocolb\x06proto3" |
|
|
|
var ( |
|
file_pkg_protocol_message_proto_rawDescOnce sync.Once |
|
file_pkg_protocol_message_proto_rawDescData []byte |
|
) |
|
|
|
func file_pkg_protocol_message_proto_rawDescGZIP() []byte { |
|
file_pkg_protocol_message_proto_rawDescOnce.Do(func() { |
|
file_pkg_protocol_message_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pkg_protocol_message_proto_rawDesc), len(file_pkg_protocol_message_proto_rawDesc))) |
|
}) |
|
return file_pkg_protocol_message_proto_rawDescData |
|
} |
|
|
|
var file_pkg_protocol_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
|
var file_pkg_protocol_message_proto_goTypes = []any{ |
|
(*Message)(nil), // 0: protocol.Message |
|
} |
|
var file_pkg_protocol_message_proto_depIdxs = []int32{ |
|
0, // [0:0] is the sub-list for method output_type |
|
0, // [0:0] is the sub-list for method input_type |
|
0, // [0:0] is the sub-list for extension type_name |
|
0, // [0:0] is the sub-list for extension extendee |
|
0, // [0:0] is the sub-list for field type_name |
|
} |
|
|
|
func init() { file_pkg_protocol_message_proto_init() } |
|
func file_pkg_protocol_message_proto_init() { |
|
if File_pkg_protocol_message_proto != nil { |
|
return |
|
} |
|
type x struct{} |
|
out := protoimpl.TypeBuilder{ |
|
File: protoimpl.DescBuilder{ |
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_pkg_protocol_message_proto_rawDesc), len(file_pkg_protocol_message_proto_rawDesc)), |
|
NumEnums: 0, |
|
NumMessages: 1, |
|
NumExtensions: 0, |
|
NumServices: 0, |
|
}, |
|
GoTypes: file_pkg_protocol_message_proto_goTypes, |
|
DependencyIndexes: file_pkg_protocol_message_proto_depIdxs, |
|
MessageInfos: file_pkg_protocol_message_proto_msgTypes, |
|
}.Build() |
|
File_pkg_protocol_message_proto = out.File |
|
file_pkg_protocol_message_proto_goTypes = nil |
|
file_pkg_protocol_message_proto_depIdxs = nil |
|
}
|
|
|