feed

package
v0.0.0-...-7604275 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeedTypeTxt   = 0 //文本
	FeedTypeImage = 1 //图片
	FeedTypeVideo = 2 //视频
)

Variables

Functions

func ConvertFeedToProtoFeed

func ConvertFeedToProtoFeed(feed Feed) *proto_build.Feed

func CreateImageFeed

func CreateImageFeed(db *gorm.DB, userId uint64, content string, resource []string) (*proto_build.Feed, error)

func CreateTextFeed

func CreateTextFeed(db *gorm.DB, userId uint64, content string) (*proto_build.Feed, error)

func CreateVideoFeed

func CreateVideoFeed(db *gorm.DB, userId uint64, content string, resource []string) (*proto_build.Feed, error)

func DeleteFeed

func DeleteFeed(db *gorm.DB, id uint64) error

func GetFeedById

func GetFeedById(db *gorm.DB, id uint64) (*proto_build.Feed, error)

func GetFeedByUserId

func GetFeedByUserId(db *gorm.DB, userId uint64) (*proto_build.Feed, error)

func LikeFeed

func LikeFeed(db *gorm.DB, id uint64, userId uint64) error

func OwnFeed

func OwnFeed(db *gorm.DB, userId uint64, reviewStatus int32, keyword string, lastId uint64, num uint64) ([]*proto_build.Feed, *proto_build.Pager, error)

func QueryFeed

func QueryFeed(db *gorm.DB, keyword string, lastId uint64, num uint64) ([]*proto_build.Feed, *proto_build.Pager, error)

func UnLikeFeed

func UnLikeFeed(db *gorm.DB, id uint64, userId uint64) error

Types

type Feed

type Feed model.Feed

type FeedImage

type FeedImage model.FeedImage

type FeedLike

type FeedLike model.FeedLike

type FeedVideo

type FeedVideo model.FeedVideo

type Service

func NewService

func NewService(cf config.Rpc) *Service

func (*Service) FeedGet

func (*Service) FeedOwn

func (*Service) Ping

Jump to

Keyboard shortcuts

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