svcoreadapter

package
v0.0.0-...-993ae46 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

func New

func New() *Adapter

func (*Adapter) AddCollection

func (a *Adapter) AddCollection(ctx context.Context, name, description string, userId int64) error

func (*Adapter) AddFavorite

func (a *Adapter) AddFavorite(ctx context.Context, id, userId int64, target v1.FavoriteTarget, favoriteType v1.FavoriteType) error

func (*Adapter) AddFollow

func (a *Adapter) AddFollow(ctx context.Context, userId, targetUserId int64) error

func (*Adapter) AddVideo2Collection

func (a *Adapter) AddVideo2Collection(ctx context.Context, userId, collectionId, videoId int64) error

func (*Adapter) CountBeFavoriteNumber4User

func (a *Adapter) CountBeFavoriteNumber4User(ctx context.Context, userId int64) (int64, error)

func (*Adapter) CountCollected4Video

func (a *Adapter) CountCollected4Video(ctx context.Context, videoIdList []int64) (map[int64]int64, error)

func (*Adapter) CountComments4Video

func (a *Adapter) CountComments4Video(ctx context.Context, videoIdList []int64) (map[int64]int64, error)

func (*Adapter) CountFavorite4Video

func (a *Adapter) CountFavorite4Video(ctx context.Context, videoIdList []int64) (map[int64]int64, error)

func (*Adapter) CountFollow4User

func (a *Adapter) CountFollow4User(ctx context.Context, userId int64) ([]int64, error)

func (*Adapter) CreateComment

func (a *Adapter) CreateComment(ctx context.Context, options ...commentoptions.CreateCommentOption) (*v1.Comment, error)

func (*Adapter) CreateUser

func (a *Adapter) CreateUser(ctx context.Context, mobile, email string, accountId int64) (int64, error)

func (*Adapter) Feed

func (a *Adapter) Feed(ctx context.Context, userId int64, num int64, options ...videooptions.FeedOptions) (*v1.FeedShortVideoResponse, error)

func (*Adapter) GetCollectionById

func (a *Adapter) GetCollectionById(ctx context.Context, collectionId int64) (*v1.Collection, error)

func (*Adapter) GetCommentById

func (a *Adapter) GetCommentById(ctx context.Context, commentId int64) (*v1.Comment, error)

func (*Adapter) GetUserInfo

func (a *Adapter) GetUserInfo(ctx context.Context, options ...useroptions.GetUserInfoOption) (*v1.User, error)

func (*Adapter) GetUserInfoByIdList

func (a *Adapter) GetUserInfoByIdList(ctx context.Context, userIdList []int64) ([]*v1.User, error)

func (*Adapter) GetVideoById

func (a *Adapter) GetVideoById(ctx context.Context, videoId int64) (*v1.Video, error)

func (*Adapter) GetVideosByIdList

func (a *Adapter) GetVideosByIdList(ctx context.Context, idList []int64) ([]*v1.Video, error)

func (*Adapter) IsCollected

func (a *Adapter) IsCollected(ctx context.Context, userId int64, videoIdList []int64) (map[int64]bool, error)

func (*Adapter) IsFollowing

func (a *Adapter) IsFollowing(ctx context.Context, userId int64, targetUserIdList []int64) (map[int64]bool, error)

func (*Adapter) IsUserFavoriteVideo

func (a *Adapter) IsUserFavoriteVideo(ctx context.Context, userId int64, videoIdList []int64) (map[int64]bool, error)

func (*Adapter) ListChildComments

func (a *Adapter) ListChildComments(ctx context.Context, commentId int64, page, size int32) (*v1.ListChildComment4CommentResponse, error)

func (*Adapter) ListCollection

func (a *Adapter) ListCollection(ctx context.Context, userId int64, page, size int32) (*v1.ListCollectionResponse, error)

func (*Adapter) ListComment4Video

func (a *Adapter) ListComment4Video(ctx context.Context, videoId int64, page, size int32) (*v1.ListComment4VideoResponse, error)

func (*Adapter) ListFollow

func (a *Adapter) ListFollow(ctx context.Context, userId int64, followType v1.FollowType, page, size int32) (*v1.ListFollowingResponse, error)

func (*Adapter) ListUserFavoriteVideo

func (a *Adapter) ListUserFavoriteVideo(ctx context.Context, userId int64, page, size int32) (*v1.ListFavoriteResponse, error)

func (*Adapter) ListUserPublishedList

func (a *Adapter) ListUserPublishedList(ctx context.Context, userId int64, pageIndex, pageSize int32) (*v1.ListPublishedVideoResponse, error)

func (*Adapter) ListVideo4Collection

func (a *Adapter) ListVideo4Collection(ctx context.Context, collectionId int64, page, size int32) (*v1.ListCollectionVideoResponse, error)

func (*Adapter) RemoveCollection

func (a *Adapter) RemoveCollection(ctx context.Context, collectionId int64) error

func (*Adapter) RemoveComment

func (a *Adapter) RemoveComment(ctx context.Context, commentId int64) error

func (*Adapter) RemoveFavorite

func (a *Adapter) RemoveFavorite(ctx context.Context, id, userId int64, target v1.FavoriteTarget, favoriteType v1.FavoriteType) error

func (*Adapter) RemoveFollow

func (a *Adapter) RemoveFollow(ctx context.Context, userId, targetUserId int64) error

func (*Adapter) RemoveVideoFromCollection

func (a *Adapter) RemoveVideoFromCollection(ctx context.Context, userId, collectionId, videoId int64) error

func (*Adapter) SaveVideoInfo

func (a *Adapter) SaveVideoInfo(ctx context.Context, title, videoUrl, coverUrl, desc string, userId int64) (int64, error)

func (*Adapter) UpdateCollection

func (a *Adapter) UpdateCollection(ctx context.Context, collectionId int64, name, description string) error

func (*Adapter) UpdateUserInfo

func (a *Adapter) UpdateUserInfo(ctx context.Context, options ...useroptions.UpdateUserInfoOption) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳