Table of Contents

Interface IChannelService

Namespace
EchoHub.Core.Contracts
Assembly
EchoHub.Core.dll
public interface IChannelService

Methods

CreateChannelAsync(Guid, string, string?, bool)

Task<ChannelOperationResult> CreateChannelAsync(Guid creatorUserId, string name, string? topic, bool isPublic)

Parameters

creatorUserId Guid
name string
topic string
isPublic bool

Returns

Task<ChannelOperationResult>

DeleteChannelAsync(Guid, string)

Task<ChannelOperationResult> DeleteChannelAsync(Guid callerUserId, string channelName)

Parameters

callerUserId Guid
channelName string

Returns

Task<ChannelOperationResult>

EnsureChannelMembershipAsync(Guid, string)

Task<(bool Success, string? Error)> EnsureChannelMembershipAsync(Guid userId, string channelName)

Parameters

userId Guid
channelName string

Returns

Task<(bool Success, string Error)>

GetChannelByNameAsync(string)

Task<ChannelDto?> GetChannelByNameAsync(string channelName)

Parameters

channelName string

Returns

Task<ChannelDto>

GetChannelListAsync()

Task<List<ChannelListItem>> GetChannelListAsync()

Returns

Task<List<ChannelListItem>>

GetChannelTopicAsync(string)

Task<(string? Topic, bool Exists)> GetChannelTopicAsync(string channelName)

Parameters

channelName string

Returns

Task<(string Topic, bool Exists)>

GetChannelsAsync(Guid, int, int)

Task<PaginatedResponse<ChannelDto>> GetChannelsAsync(Guid userId, int offset, int limit)

Parameters

userId Guid
offset int
limit int

Returns

Task<PaginatedResponse<ChannelDto>>

UpdateTopicAsync(Guid, string, string?)

Task<ChannelOperationResult> UpdateTopicAsync(Guid callerUserId, string channelName, string? topic)

Parameters

callerUserId Guid
channelName string
topic string

Returns

Task<ChannelOperationResult>