Documentation
¶
Index ¶
- type ChatService
- func (c ChatService) BroadcastMessage(nctx context.Context, message *chat.Message, memberships *[]chat.Membership)
- func (c ChatService) CreateChannel(ctx context.Context, channel dto.NewChannel) (dto.Channel, error)
- func (c ChatService) CreateMembership(ctx context.Context, newMembership dto.NewMembership) (*dto.Membership, error)
- func (c ChatService) CreateUser(ctx context.Context, newUser dto.NewUser) (*dto.User, error)
- func (c ChatService) GenerateAccessToken(ctx context.Context, creds dto.NewToken) (*dto.TokenResponse, error)
- func (c ChatService) GetChannelById(ctx context.Context, channelID string) (*dto.Channel, error)
- func (c ChatService) GetChannels(ctx context.Context) (*[]dto.Channel, error)
- func (c ChatService) GetUserById(ctx context.Context, userID string) (*dto.User, error)
- func (c ChatService) GetUsers(ctx context.Context) (*[]dto.User, error)
- func (c ChatService) HandleHello(ctx context.Context, payload *dto.ClientPayload) *dto.ServerResponse
- func (c ChatService) HandleNewMessage(ctx context.Context, payload *dto.ClientPayload) *dto.ServerResponse
- func (c ChatService) ProcessPubsubMessage(ctx context.Context, payload dto.PubMessage) *dto.ServerResponse
- type Publish
- type Subscribe
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatService ¶
type ChatService struct {
// contains filtered or unexported fields
}
func NewChatService ¶
func NewChatService( chatRepo chat.Repository, publisher Publish, subscriber Subscribe, ) ChatService
func (ChatService) BroadcastMessage ¶
func (c ChatService) BroadcastMessage(nctx context.Context, message *chat.Message, memberships *[]chat.Membership)
func (ChatService) CreateChannel ¶
func (c ChatService) CreateChannel(ctx context.Context, channel dto.NewChannel) (dto.Channel, error)
func (ChatService) CreateMembership ¶
func (c ChatService) CreateMembership(ctx context.Context, newMembership dto.NewMembership) (*dto.Membership, error)
func (ChatService) CreateUser ¶
func (ChatService) GenerateAccessToken ¶
func (c ChatService) GenerateAccessToken(ctx context.Context, creds dto.NewToken) (*dto.TokenResponse, error)
func (ChatService) GetChannelById ¶
func (ChatService) GetChannels ¶
func (ChatService) GetUserById ¶
func (ChatService) HandleHello ¶
func (c ChatService) HandleHello(ctx context.Context, payload *dto.ClientPayload) *dto.ServerResponse
get memberships getOrCreate device set current device set up pubsub subscribers
func (ChatService) HandleNewMessage ¶
func (c ChatService) HandleNewMessage(ctx context.Context, payload *dto.ClientPayload) *dto.ServerResponse
func (ChatService) ProcessPubsubMessage ¶
func (c ChatService) ProcessPubsubMessage(ctx context.Context, payload dto.PubMessage) *dto.ServerResponse
Click to show internal directories.
Click to hide internal directories.