Documentation ¶
Index ¶
- type ContactService
- func (svc *ContactService) AddContact(ctx context.Context, memberID, friendID string) error
- func (svc *ContactService) BlockContact(ctx context.Context, memberID, friendID string) error
- func (svc *ContactService) Contacts(ctx context.Context, opts *messenger.FindContactOptions) ([]*messenger.Contact, error)
- type ConverstationService
- func (svc *ConverstationService) Conversations(ctx context.Context, opts *messenger.FindConversionOptions) ([]*messenger.Conversation, error)
- func (svc *ConverstationService) CreateConversation(ctx context.Context, conversation *messenger.Conversation) error
- func (svc *ConverstationService) GetConversationMessageCount(ctx context.Context, conversationID string) (int, error)
- func (svc *ConverstationService) MarkAllMessageAsRead(ctx context.Context, conversationID string) error
- func (svc *ConverstationService) UnreadMessageCount(ctx context.Context, conversationID string) (int, error)
- type DeliveryService
- type GroupService
- func (svc *GroupService) AddGroupMember(ctx context.Context, groupID string, memberID string) error
- func (svc *GroupService) CreateGroup(ctx context.Context, group *messenger.Group, memberIDs []string) error
- func (svc *GroupService) DissolveGroup(ctx context.Context, groupID string) error
- func (svc *GroupService) GroupAdmins(ctx context.Context, groupID string) ([]*messenger.GroupMember, error)
- func (svc *GroupService) GroupMembers(ctx context.Context, opts *messenger.FindGroupMemberOptions) ([]*messenger.GroupMember, error)
- func (svc *GroupService) Groups(ctx context.Context, opts *messenger.FindGroupOptions) ([]*messenger.Group, error)
- func (svc *GroupService) JoinGroup(ctx context.Context, groupID string, memberID string) error
- func (svc *GroupService) LeaveGroup(ctx context.Context, groupID string) error
- func (svc *GroupService) RemoveAdmin(ctx context.Context, groupID string, memberID string) error
- func (svc *GroupService) SetAdmin(ctx context.Context, groupID string, memberID string) error
- type MessageService
- func (svc *MessageService) AckMessage(ctx context.Context, conversationID string, ackMsgID string, memberID string) error
- func (svc *MessageService) CreateMessage(ctx context.Context, msg *messenger.Message) error
- func (svc *MessageService) Messages(ctx context.Context, opts *messenger.FindMessagesOptions) ([]*messenger.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContactService ¶
type ContactService struct {
// contains filtered or unexported fields
}
func NewContactService ¶
func NewContactService(contactRepo messenger.ContactRepository, groupRepo messenger.GroupRepository, groupMemberRepo messenger.GroupMemberRepository, conversationRepo messenger.ConversationRepository) *ContactService
func (*ContactService) AddContact ¶
func (svc *ContactService) AddContact(ctx context.Context, memberID, friendID string) error
func (*ContactService) BlockContact ¶
func (svc *ContactService) BlockContact(ctx context.Context, memberID, friendID string) error
func (*ContactService) Contacts ¶
func (svc *ContactService) Contacts(ctx context.Context, opts *messenger.FindContactOptions) ([]*messenger.Contact, error)
type ConverstationService ¶
type ConverstationService struct {
// contains filtered or unexported fields
}
func NewConverstationService ¶
func NewConverstationService(converstationRepo messenger.ConversationRepository) *ConverstationService
func (*ConverstationService) Conversations ¶
func (svc *ConverstationService) Conversations(ctx context.Context, opts *messenger.FindConversionOptions) ([]*messenger.Conversation, error)
func (*ConverstationService) CreateConversation ¶
func (svc *ConverstationService) CreateConversation(ctx context.Context, conversation *messenger.Conversation) error
func (*ConverstationService) GetConversationMessageCount ¶
func (*ConverstationService) MarkAllMessageAsRead ¶
func (svc *ConverstationService) MarkAllMessageAsRead(ctx context.Context, conversationID string) error
func (*ConverstationService) UnreadMessageCount ¶
type DeliveryService ¶
type DeliveryService struct {
// contains filtered or unexported fields
}
func NewDeliveryService ¶
func NewDeliveryService(groupMemberRepo messenger.GroupMemberRepository) *DeliveryService
func (*DeliveryService) DeliveryMessage ¶
type GroupService ¶
type GroupService struct {
// contains filtered or unexported fields
}
func NewGroupService ¶
func NewGroupService(groupRepo messenger.GroupRepository, groupMemberRepo messenger.GroupMemberRepository) *GroupService
func (*GroupService) AddGroupMember ¶
func (*GroupService) CreateGroup ¶
func (*GroupService) DissolveGroup ¶
func (svc *GroupService) DissolveGroup(ctx context.Context, groupID string) error
func (*GroupService) GroupAdmins ¶
func (svc *GroupService) GroupAdmins(ctx context.Context, groupID string) ([]*messenger.GroupMember, error)
func (*GroupService) GroupMembers ¶
func (svc *GroupService) GroupMembers(ctx context.Context, opts *messenger.FindGroupMemberOptions) ([]*messenger.GroupMember, error)
func (*GroupService) Groups ¶
func (svc *GroupService) Groups(ctx context.Context, opts *messenger.FindGroupOptions) ([]*messenger.Group, error)
func (*GroupService) LeaveGroup ¶
func (svc *GroupService) LeaveGroup(ctx context.Context, groupID string) error
func (*GroupService) RemoveAdmin ¶
type MessageService ¶
type MessageService struct {
// contains filtered or unexported fields
}
func NewMessageService ¶
func NewMessageService(messageRepo messenger.MessageRepository, groupRepo messenger.GroupRepository) *MessageService
func (*MessageService) AckMessage ¶
func (*MessageService) CreateMessage ¶
func (*MessageService) Messages ¶
func (svc *MessageService) Messages(ctx context.Context, opts *messenger.FindMessagesOptions) ([]*messenger.Message, error)
Click to show internal directories.
Click to hide internal directories.