service

package
v0.0.0-...-ba645fd Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

type ConverstationService

type ConverstationService struct {
	// contains filtered or unexported fields
}

func NewConverstationService

func NewConverstationService(converstationRepo messenger.ConversationRepository) *ConverstationService

func (*ConverstationService) Conversations

func (*ConverstationService) CreateConversation

func (svc *ConverstationService) CreateConversation(ctx context.Context, conversation *messenger.Conversation) error

func (*ConverstationService) GetConversationMessageCount

func (svc *ConverstationService) GetConversationMessageCount(ctx context.Context, conversationID string) (int, error)

func (*ConverstationService) MarkAllMessageAsRead

func (svc *ConverstationService) MarkAllMessageAsRead(ctx context.Context, conversationID string) error

func (*ConverstationService) UnreadMessageCount

func (svc *ConverstationService) UnreadMessageCount(ctx context.Context, conversationID string) (int, error)

type DeliveryService

type DeliveryService struct {
	// contains filtered or unexported fields
}

func NewDeliveryService

func NewDeliveryService(groupMemberRepo messenger.GroupMemberRepository) *DeliveryService

func (*DeliveryService) DeliveryMessage

func (svc *DeliveryService) DeliveryMessage(ctx context.Context, msgs *messenger.Message) error

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 (svc *GroupService) AddGroupMember(ctx context.Context, groupID string, memberID string) error

func (*GroupService) CreateGroup

func (svc *GroupService) CreateGroup(ctx context.Context, group *messenger.Group, memberIDs []string) error

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 (*GroupService) Groups

func (*GroupService) JoinGroup

func (svc *GroupService) JoinGroup(ctx context.Context, groupID string, memberID string) error

func (*GroupService) LeaveGroup

func (svc *GroupService) LeaveGroup(ctx context.Context, groupID string) error

func (*GroupService) RemoveAdmin

func (svc *GroupService) RemoveAdmin(ctx context.Context, groupID string, memberID string) error

func (*GroupService) SetAdmin

func (svc *GroupService) SetAdmin(ctx context.Context, groupID string, memberID string) error

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 (svc *MessageService) AckMessage(ctx context.Context, conversationID string, ackMsgID string, memberID string) error

func (*MessageService) CreateMessage

func (svc *MessageService) CreateMessage(ctx context.Context, msg *messenger.Message) error

func (*MessageService) Messages

Jump to

Keyboard shortcuts

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