streambiz

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStreamBiz

func NewStreamBiz(streamRepo StreamRepo, channelRepo ChannelRepo, ps pubsub.Pubsub) *streamBiz

Types

type ChannelRepo

type ChannelRepo interface {
	FindUserChannel(ctx context.Context, userId int) (*channelmodel.Channel, error)
}

type StreamBiz

type StreamBiz interface {
	Create(ctx context.Context, requester core.Requester, create *streammodel.StreamCreate) (*streammodel.StreamCreateResponse, error)
	FindStreamById(ctx context.Context, id int) (*streammodel.Stream, error)
	UpdateStreamState(ctx context.Context, requester core.Requester, id int, state string) error
	FindStreams(ctx context.Context, filter *streammodel.StreamFilter, paging *core.Paging) ([]streammodel.StreamList, error)
	UpdateStreamView(ctx context.Context, id, view int) error
}

type StreamRepo

type StreamRepo interface {
	Create(ctx context.Context, create *streammodel.StreamCreate) error
	FindStreamByID(ctx context.Context, id int) (*streammodel.Stream, error)
	UpdateStream(ctx context.Context, id int, update *streammodel.StreamUpdate) error
	FindStreams(ctx context.Context, filter *streammodel.StreamFilter, paging *core.Paging) ([]streammodel.StreamList, error)
	UpdateStreamView(ctx context.Context, id, view int) error
}

Jump to

Keyboard shortcuts

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