mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
428 lines
15 KiB
Go
428 lines
15 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: chat/proto/chat.proto
|
|
|
|
package chat
|
|
|
|
import (
|
|
fmt "fmt"
|
|
proto "github.com/golang/protobuf/proto"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// NewRequest contains the infromation needed to create a new chat
|
|
type NewRequest struct {
|
|
UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *NewRequest) Reset() { *m = NewRequest{} }
|
|
func (m *NewRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*NewRequest) ProtoMessage() {}
|
|
func (*NewRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825b1469f80f958d, []int{0}
|
|
}
|
|
|
|
func (m *NewRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_NewRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *NewRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_NewRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *NewRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_NewRequest.Merge(m, src)
|
|
}
|
|
func (m *NewRequest) XXX_Size() int {
|
|
return xxx_messageInfo_NewRequest.Size(m)
|
|
}
|
|
func (m *NewRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_NewRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_NewRequest proto.InternalMessageInfo
|
|
|
|
func (m *NewRequest) GetUserIds() []string {
|
|
if m != nil {
|
|
return m.UserIds
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// NewResponse contains the chat id for the users
|
|
type NewResponse struct {
|
|
ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *NewResponse) Reset() { *m = NewResponse{} }
|
|
func (m *NewResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*NewResponse) ProtoMessage() {}
|
|
func (*NewResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825b1469f80f958d, []int{1}
|
|
}
|
|
|
|
func (m *NewResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_NewResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *NewResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_NewResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *NewResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_NewResponse.Merge(m, src)
|
|
}
|
|
func (m *NewResponse) XXX_Size() int {
|
|
return xxx_messageInfo_NewResponse.Size(m)
|
|
}
|
|
func (m *NewResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_NewResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_NewResponse proto.InternalMessageInfo
|
|
|
|
func (m *NewResponse) GetChatId() string {
|
|
if m != nil {
|
|
return m.ChatId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// HistoryRequest contains the id of the chat we want the history for. This RPC will return all
|
|
// historical messages, however in a real life application we'd introduce some form of pagination
|
|
// here, only loading the older messages when required.
|
|
type HistoryRequest struct {
|
|
ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *HistoryRequest) Reset() { *m = HistoryRequest{} }
|
|
func (m *HistoryRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*HistoryRequest) ProtoMessage() {}
|
|
func (*HistoryRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825b1469f80f958d, []int{2}
|
|
}
|
|
|
|
func (m *HistoryRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_HistoryRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *HistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_HistoryRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *HistoryRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_HistoryRequest.Merge(m, src)
|
|
}
|
|
func (m *HistoryRequest) XXX_Size() int {
|
|
return xxx_messageInfo_HistoryRequest.Size(m)
|
|
}
|
|
func (m *HistoryRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_HistoryRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_HistoryRequest proto.InternalMessageInfo
|
|
|
|
func (m *HistoryRequest) GetChatId() string {
|
|
if m != nil {
|
|
return m.ChatId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// HistoryResponse contains the historical messages in a chat
|
|
type HistoryResponse struct {
|
|
Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *HistoryResponse) Reset() { *m = HistoryResponse{} }
|
|
func (m *HistoryResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*HistoryResponse) ProtoMessage() {}
|
|
func (*HistoryResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825b1469f80f958d, []int{3}
|
|
}
|
|
|
|
func (m *HistoryResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_HistoryResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *HistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_HistoryResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *HistoryResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_HistoryResponse.Merge(m, src)
|
|
}
|
|
func (m *HistoryResponse) XXX_Size() int {
|
|
return xxx_messageInfo_HistoryResponse.Size(m)
|
|
}
|
|
func (m *HistoryResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_HistoryResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_HistoryResponse proto.InternalMessageInfo
|
|
|
|
func (m *HistoryResponse) GetMessages() []*Message {
|
|
if m != nil {
|
|
return m.Messages
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// SendRequest contains a single message to send to a chat
|
|
type SendRequest struct {
|
|
// a client side id, should be validated by the server to make the request retry safe
|
|
ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
|
// id of the chat the message is being sent to / from
|
|
ChatId string `protobuf:"bytes,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
|
|
// id of the user who sent the message
|
|
UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
// subject of the message
|
|
Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
|
|
// text of the message
|
|
Text string `protobuf:"bytes,5,opt,name=text,proto3" json:"text,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SendRequest) Reset() { *m = SendRequest{} }
|
|
func (m *SendRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*SendRequest) ProtoMessage() {}
|
|
func (*SendRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825b1469f80f958d, []int{4}
|
|
}
|
|
|
|
func (m *SendRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_SendRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *SendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_SendRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *SendRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SendRequest.Merge(m, src)
|
|
}
|
|
func (m *SendRequest) XXX_Size() int {
|
|
return xxx_messageInfo_SendRequest.Size(m)
|
|
}
|
|
func (m *SendRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SendRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SendRequest proto.InternalMessageInfo
|
|
|
|
func (m *SendRequest) GetClientId() string {
|
|
if m != nil {
|
|
return m.ClientId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SendRequest) GetChatId() string {
|
|
if m != nil {
|
|
return m.ChatId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SendRequest) GetUserId() string {
|
|
if m != nil {
|
|
return m.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SendRequest) GetSubject() string {
|
|
if m != nil {
|
|
return m.Subject
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SendRequest) GetText() string {
|
|
if m != nil {
|
|
return m.Text
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// SendResponse is a blank message returned when a message is successfully created
|
|
type SendResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SendResponse) Reset() { *m = SendResponse{} }
|
|
func (m *SendResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*SendResponse) ProtoMessage() {}
|
|
func (*SendResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825b1469f80f958d, []int{5}
|
|
}
|
|
|
|
func (m *SendResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_SendResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *SendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_SendResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *SendResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SendResponse.Merge(m, src)
|
|
}
|
|
func (m *SendResponse) XXX_Size() int {
|
|
return xxx_messageInfo_SendResponse.Size(m)
|
|
}
|
|
func (m *SendResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SendResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SendResponse proto.InternalMessageInfo
|
|
|
|
// Message sent to a chat
|
|
type Message struct {
|
|
// id of the message, allocated by the server
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
// a client side id, should be validated by the server to make the request retry safe
|
|
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
|
// id of the chat the message is being sent to / from
|
|
ChatId string `protobuf:"bytes,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
|
|
// id of the user who sent the message
|
|
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
// time time the message was sent in unix format
|
|
SentAt int64 `protobuf:"varint,5,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
|
|
// subject of the message
|
|
Subject string `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject,omitempty"`
|
|
// text of the message
|
|
Text string `protobuf:"bytes,7,opt,name=text,proto3" json:"text,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Message) Reset() { *m = Message{} }
|
|
func (m *Message) String() string { return proto.CompactTextString(m) }
|
|
func (*Message) ProtoMessage() {}
|
|
func (*Message) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825b1469f80f958d, []int{6}
|
|
}
|
|
|
|
func (m *Message) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Message.Unmarshal(m, b)
|
|
}
|
|
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *Message) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message.Merge(m, src)
|
|
}
|
|
func (m *Message) XXX_Size() int {
|
|
return xxx_messageInfo_Message.Size(m)
|
|
}
|
|
func (m *Message) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message proto.InternalMessageInfo
|
|
|
|
func (m *Message) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetClientId() string {
|
|
if m != nil {
|
|
return m.ClientId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetChatId() string {
|
|
if m != nil {
|
|
return m.ChatId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetUserId() string {
|
|
if m != nil {
|
|
return m.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetSentAt() int64 {
|
|
if m != nil {
|
|
return m.SentAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Message) GetSubject() string {
|
|
if m != nil {
|
|
return m.Subject
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetText() string {
|
|
if m != nil {
|
|
return m.Text
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*NewRequest)(nil), "chat.NewRequest")
|
|
proto.RegisterType((*NewResponse)(nil), "chat.NewResponse")
|
|
proto.RegisterType((*HistoryRequest)(nil), "chat.HistoryRequest")
|
|
proto.RegisterType((*HistoryResponse)(nil), "chat.HistoryResponse")
|
|
proto.RegisterType((*SendRequest)(nil), "chat.SendRequest")
|
|
proto.RegisterType((*SendResponse)(nil), "chat.SendResponse")
|
|
proto.RegisterType((*Message)(nil), "chat.Message")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("chat/proto/chat.proto", fileDescriptor_825b1469f80f958d) }
|
|
|
|
var fileDescriptor_825b1469f80f958d = []byte{
|
|
// 370 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcf, 0x4e, 0x3a, 0x31,
|
|
0x10, 0xc7, 0xd3, 0xdd, 0xfd, 0x6d, 0x61, 0xf8, 0x89, 0xda, 0x48, 0x58, 0xd7, 0x0b, 0xe9, 0x41,
|
|
0x41, 0x23, 0x18, 0x4c, 0x3c, 0x79, 0x31, 0x5c, 0xe4, 0x20, 0x87, 0xf5, 0x01, 0xc8, 0x42, 0x1b,
|
|
0x59, 0xa3, 0xbb, 0x48, 0x4b, 0xd0, 0x57, 0xf0, 0x65, 0x7c, 0x0b, 0x9f, 0xcb, 0xf4, 0x0f, 0xd0,
|
|
0x35, 0x72, 0x9b, 0xf9, 0xce, 0x74, 0xfa, 0xf9, 0x76, 0x0a, 0x8d, 0xe9, 0x2c, 0x95, 0xbd, 0xf9,
|
|
0xa2, 0x90, 0x45, 0x4f, 0x85, 0x5d, 0x1d, 0x92, 0x40, 0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