Documentation ¶
Index ¶
- type AddParticipantsRequest
- type ChatService
- type Conversation
- type ConversationInfo
- type ConversationSummary
- type EditMessageRequest
- type LeaveGroupChatRequest
- type Message
- type NewChatRequest
- type NewGroupChatRequest
- type RemoveChatRequest
- type RemoveMessageRequest
- type RemoveParticipantsRequest
- type UnImplementedChatService
- func (UnImplementedChatService) AddParticipants(ctx context.Context, req *AddParticipantsRequest) error
- func (UnImplementedChatService) CreateGroupConversation(ctx context.Context, req *NewGroupChatRequest) error
- func (UnImplementedChatService) CreatePrivateConversation(ctx context.Context, req *NewChatRequest) error
- func (UnImplementedChatService) EditMessage(ctx context.Context, req *EditMessageRequest) error
- func (UnImplementedChatService) FetchContversationInfo(ctx context.Context, id int64) (*ConversationInfo, error)
- func (UnImplementedChatService) FetchConversation(ctx context.Context, id int64) ([]*Message, error)
- func (UnImplementedChatService) FetchConversations(ctx context.Context) ([]*ConversationSummary, error)
- func (UnImplementedChatService) RemoveGroupConversation(ctx context.Context, req *LeaveGroupChatRequest) error
- func (UnImplementedChatService) RemoveMessage(ctx context.Context, req *RemoveMessageRequest) error
- func (UnImplementedChatService) RemoveParticipants(ctx context.Context, req *RemoveParticipantsRequest) error
- func (UnImplementedChatService) RemovePrivateConversation(ctx context.Context, req *RemoveChatRequest) error
- type UserConversation
- type UserView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddParticipantsRequest ¶
type ChatService ¶
type ChatService interface { CreatePrivateConversation(ctx context.Context, req *NewChatRequest) error FetchConversations(ctx context.Context) ([]*ConversationSummary, error) FetchConversation(ctx context.Context, id int64) ([]*Message, error) FetchContversationInfo(ctx context.Context, id int64) (*ConversationInfo, error) RemovePrivateConversation(ctx context.Context, id int64) error CreateGroupConversation(ctx context.Context, req *NewGroupChatRequest) error RemoveGroupConversation(ctx context.Context, req *LeaveGroupChatRequest) error AddParticipants(ctx context.Context, req *AddParticipantsRequest) error RemoveParticipants(ctx context.Context, req *RemoveParticipantsRequest) error RemoveMessage(ctx context.Context, req *RemoveMessageRequest) error EditMessage(ctx context.Context, req *EditMessageRequest) error // contains filtered or unexported methods }
type Conversation ¶
type Conversation struct { ID int64 IsPrivate bool `json:"isPrivate"` Name string `json:"name"` Description string `json:"description"` PrivateMembers string `json:"-"` ImagePath string `json:"imagePath"` CreatedAt time.Time CreatedBy int64 }
---------------- Models ----------------
type ConversationInfo ¶
type ConversationSummary ¶
type ConversationSummary struct { ID int64 `json:"id"` ConversationName string `json:"conversationName"` IsPrivate bool `json:"isPrivate"` ImagePath string `json:"imagePath"` LastRead time.Time `json:"lastRead"` UnreadMessages int `json:"unreadMessages" gorm:"-"` LastMessage Message `json:"lastMessage" gorm:"-"` LastUpdate time.Time `json:"lastUpdate" gorm:"-"` }
type EditMessageRequest ¶
type LeaveGroupChatRequest ¶
type Message ¶
type Message struct { ID int64 `json:"messageID" bson:"_id"` ConversationID int64 `json:"conversationId" bson:"conversation_id"` SenderID int64 `json:"senderId" bson:"sender_id"` SenderName string `json:"senderName" bson:"sender_name"` Content map[string]string `json:"content" bson:"content"` CreatedAt time.Time `json:"createdAt" bson:"created_at,inline"` EditedAt time.Time `json:"editedAt" bson:"edited_at"` }
type NewChatRequest ¶
type NewChatRequest struct {
ReceiverID int64
}
type NewGroupChatRequest ¶
type RemoveChatRequest ¶
type RemoveChatRequest struct {
ConversationID int64
}
type RemoveMessageRequest ¶
type UnImplementedChatService ¶
type UnImplementedChatService struct{}
func (UnImplementedChatService) AddParticipants ¶
func (UnImplementedChatService) AddParticipants(ctx context.Context, req *AddParticipantsRequest) error
func (UnImplementedChatService) CreateGroupConversation ¶
func (UnImplementedChatService) CreateGroupConversation(ctx context.Context, req *NewGroupChatRequest) error
func (UnImplementedChatService) CreatePrivateConversation ¶
func (UnImplementedChatService) CreatePrivateConversation(ctx context.Context, req *NewChatRequest) error
func (UnImplementedChatService) EditMessage ¶
func (UnImplementedChatService) EditMessage(ctx context.Context, req *EditMessageRequest) error
func (UnImplementedChatService) FetchContversationInfo ¶
func (UnImplementedChatService) FetchContversationInfo(ctx context.Context, id int64) (*ConversationInfo, error)
func (UnImplementedChatService) FetchConversation ¶
func (UnImplementedChatService) FetchConversations ¶
func (UnImplementedChatService) FetchConversations(ctx context.Context) ([]*ConversationSummary, error)
func (UnImplementedChatService) RemoveGroupConversation ¶
func (UnImplementedChatService) RemoveGroupConversation(ctx context.Context, req *LeaveGroupChatRequest) error
func (UnImplementedChatService) RemoveMessage ¶
func (UnImplementedChatService) RemoveMessage(ctx context.Context, req *RemoveMessageRequest) error
func (UnImplementedChatService) RemoveParticipants ¶
func (UnImplementedChatService) RemoveParticipants(ctx context.Context, req *RemoveParticipantsRequest) error
func (UnImplementedChatService) RemovePrivateConversation ¶
func (UnImplementedChatService) RemovePrivateConversation(ctx context.Context, req *RemoveChatRequest) error
type UserConversation ¶
type UserView ¶
type UserView struct { user.UserSummary Role int32 `json:"role"` }
Click to show internal directories.
Click to hide internal directories.