channelbiz

package
v0.0.0-...-d64eb31 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChannelBiz

func NewChannelBiz(channelRepo ChannelRepo, userRepo UserRepo, ps pubsub.Pubsub) *channelBiz

Types

type ChannelBiz

type ChannelBiz interface {
	Create(ctx context.Context, requester core.Requester, create *channelmodel.ChannelCreate) error
	FindUserChannel(ctx context.Context, userId int) (*channelmodel.Channel, error)
	FindChannelById(ctx context.Context, channelId int) (*channelmodel.Channel, error)
	FindChannelByUserName(ctx context.Context, userName string) (*channelmodel.Channel, error)
	FindChannels(ctx context.Context, filter *channelmodel.ChannelFilter, paging *core.Paging) ([]channelmodel.Channel, error)
	UpdateChannelName(ctx context.Context, userId int, userName, displayName string) error
	UpdateChannelData(ctx context.Context, requester core.Requester, id int, update *channelmodel.ChannelUpdate) error
	UpdateChannelDataByUserId(ctx context.Context, requester core.Requester, id int, data *channelmodel.ChannelUpdate) error
}

type ChannelRepo

type ChannelRepo interface {
	Create(ctx context.Context, create *channelmodel.ChannelCreate) error
	FindUserChannel(ctx context.Context, userId int) (*channelmodel.Channel, error)
	FindChannelById(ctx context.Context, channelId int) (*channelmodel.Channel, error)
	FindChannelByUserName(ctx context.Context, userName string) (*channelmodel.Channel, error)
	FindChannels(ctx context.Context, filter *channelmodel.ChannelFilter, paging *core.Paging) ([]channelmodel.Channel, error)
	UpdateChannelName(ctx context.Context, userId int, userName, displayName string) error
	UpdateChannelData(ctx context.Context, id int, update *channelmodel.ChannelUpdate) error
}

type UserRepo

type UserRepo interface {
	GetUserById(ctx context.Context, id int) (*common.User, error)
}

Jump to

Keyboard shortcuts

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