ui/channel.go
func (h *Handler) GetAgentChannels(tkn string,
	channelStatus, serviceStatus []string,
	offset, limit uint) (*GetAgentChannelsResult, error) {
	logger := h.logger.Add("method", "GetAgentChannels",
		"channelStatus", channelStatus, "serviceStatus", serviceStatus)

	if !h.token.Check(tkn) {
		logger.Warn("access denied")
		return nil, ErrAccessDenied
	}

	channels, total, err := h.getChannels(
		logger, channelStatus, serviceStatus,
		agentChannelsCondition, offset, limit)
	if err != nil {
		return nil, err
	}

	return &GetAgentChannelsResult{channels, total}, err
}
func (h *Handler) GetAgentChannels(tkn string,
	channelStatus, serviceStatus []string,
	offset, limit uint) (*GetAgentChannelsResult, error) {
	logger := h.logger.Add("method", "GetAgentChannels",
		"channelStatus", channelStatus, "serviceStatus", serviceStatus)

	if !h.token.Check(tkn) {
		logger.Warn("access denied")
		return nil, ErrAccessDenied
	}

	channels, total, err := h.getChannels(
		logger, channelStatus, serviceStatus,
		agentChannelsCondition, offset, limit)
	if err != nil {
		return nil, err
	}

	return &GetAgentChannelsResult{channels, total}, err
}
// GetAgentChannels gets channels for agent.