model

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChatType_name = map[int32]string{
		0: "DIALOG",
		1: "GROUP",
	}
	ChatType_value = map[string]int32{
		"DIALOG": 0,
		"GROUP":  1,
	}
)

Enum value maps for ChatType.

View Source
var (
	ContentType_name = map[int32]string{
		0: "TEXT",
		1: "IMAGE",
	}
	ContentType_value = map[string]int32{
		"TEXT":  0,
		"IMAGE": 1,
	}
)

Enum value maps for ContentType.

View Source
var File_model_message_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ChatType

type ChatType int32
const (
	ChatType_DIALOG ChatType = 0
	ChatType_GROUP  ChatType = 1
)

func (ChatType) Descriptor

func (ChatType) Descriptor() protoreflect.EnumDescriptor

func (ChatType) Enum

func (x ChatType) Enum() *ChatType

func (ChatType) EnumDescriptor deprecated

func (ChatType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ChatType.Descriptor instead.

func (ChatType) Number

func (x ChatType) Number() protoreflect.EnumNumber

func (ChatType) String

func (x ChatType) String() string

func (ChatType) Type

type ContentType

type ContentType int32
const (
	ContentType_TEXT  ContentType = 0
	ContentType_IMAGE ContentType = 1
)

func (ContentType) Descriptor

func (ContentType) Enum

func (x ContentType) Enum() *ContentType

func (ContentType) EnumDescriptor deprecated

func (ContentType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ContentType.Descriptor instead.

func (ContentType) Number

func (x ContentType) Number() protoreflect.EnumNumber

func (ContentType) String

func (x ContentType) String() string

func (ContentType) Type

type Message

type Message struct {
	Id          int64                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ChatId      int64                  `protobuf:"varint,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
	ChatType    ChatType               `protobuf:"varint,3,opt,name=chat_type,json=chatType,proto3,enum=model.ChatType" json:"chat_type,omitempty"`
	SenderId    int64                  `protobuf:"varint,4,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
	Content     string                 `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
	ContentType ContentType            `protobuf:"varint,6,opt,name=content_type,json=contentType,proto3,enum=model.ContentType" json:"content_type,omitempty"`
	IsService   bool                   `protobuf:"varint,7,opt,name=is_service,json=isService,proto3" json:"is_service,omitempty"`
	SentAt      *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
	Delivered   *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=delivered,proto3,oneof" json:"delivered,omitempty"`
	// contains filtered or unexported fields
}

func NewMessageFromEntity

func NewMessageFromEntity(message entity.Message) *Message

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetChatId

func (x *Message) GetChatId() int64

func (*Message) GetChatType

func (x *Message) GetChatType() ChatType

func (*Message) GetContent

func (x *Message) GetContent() string

func (*Message) GetContentType

func (x *Message) GetContentType() ContentType

func (*Message) GetDelivered

func (x *Message) GetDelivered() *timestamppb.Timestamp

func (*Message) GetId

func (x *Message) GetId() int64

func (*Message) GetIsService

func (x *Message) GetIsService() bool

func (*Message) GetSenderId

func (x *Message) GetSenderId() int64

func (*Message) GetSentAt

func (x *Message) GetSentAt() *timestamppb.Timestamp

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MessageCreate

type MessageCreate struct {
	ChatId   int64    `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
	ChatType ChatType `protobuf:"varint,2,opt,name=chat_type,json=chatType,proto3,enum=model.ChatType" json:"chat_type,omitempty"`
	Content  string   `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageCreate) DTO

func (x *MessageCreate) DTO() dto.MessageCreate

func (*MessageCreate) Descriptor deprecated

func (*MessageCreate) Descriptor() ([]byte, []int)

Deprecated: Use MessageCreate.ProtoReflect.Descriptor instead.

func (*MessageCreate) GetChatId

func (x *MessageCreate) GetChatId() int64

func (*MessageCreate) GetChatType

func (x *MessageCreate) GetChatType() ChatType

func (*MessageCreate) GetContent

func (x *MessageCreate) GetContent() string

func (*MessageCreate) ProtoMessage

func (*MessageCreate) ProtoMessage()

func (*MessageCreate) ProtoReflect

func (x *MessageCreate) ProtoReflect() protoreflect.Message

func (*MessageCreate) Reset

func (x *MessageCreate) Reset()

func (*MessageCreate) String

func (x *MessageCreate) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL