biz

package
v0.0.0-...-7d1b39b Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

This section is empty.

Types

type PublishRepo

type PublishRepo interface {
	GetVideosByUserId(context.Context, uint32) ([]*Video, error)
	UploadAll(context.Context, []byte, string) error
	GetFeedList(context.Context, string) (int64, []*Video, error)
	GetVideosByVideoIds(context.Context, uint32, []uint32) ([]*Video, error)
	InitUpdateFavoriteQueue()
	InitUpdateCommentQueue()
}

type PublishUseCase

type PublishUseCase struct {
	// contains filtered or unexported fields
}

func NewPublishUseCase

func NewPublishUseCase(repo PublishRepo, logger log.Logger) *PublishUseCase

func (*PublishUseCase) FeedList

func (u *PublishUseCase) FeedList(ctx context.Context, latestTime string) (int64, []*Video, error)

func (*PublishUseCase) GetPublishList

func (u *PublishUseCase) GetPublishList(
	ctx context.Context, userId uint32,
) ([]*Video, error)

func (*PublishUseCase) GetVideoListByVideoIds

func (u *PublishUseCase) GetVideoListByVideoIds(ctx context.Context, userId uint32, videoIds []uint32) ([]*Video, error)

func (*PublishUseCase) PublishAction

func (u *PublishUseCase) PublishAction(
	ctx context.Context, fileBytes []byte, title string,
) error

type User

type User struct {
	ID              uint32 `copier:"Id"`
	Name            string
	FollowCount     uint32
	FollowerCount   uint32
	IsFollow        bool
	Avatar          string
	BackgroundImage string
	Signature       string
	TotalFavorited  uint32
	WorkCount       uint32
	FavoriteCount   uint32
}

type Video

type Video struct {
	ID            uint32 `copier:"Id"`
	Author        *User
	PlayUrl       string
	CoverUrl      string
	FavoriteCount uint32
	CommentCount  uint32
	IsFavorite    bool
	Title         string
}

Jump to

Keyboard shortcuts

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