entity

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: GPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	ID          int64
	Name        string
	Avatar      string
	IsFollowing int64
}

func ToAuthorEntity

func ToAuthorEntity(author *model.User) *Author

func (*Author) ToPBAuthor

func (a *Author) ToPBAuthor() *v1.Author

type User

type User struct {
	ID              int64
	AccountID       int64
	Name            string
	Avatar          string
	BackgroundImage string
	Signature       string
	Mobile          string
	Email           string
}

func FromUserModel

func FromUserModel(user *model.User) *User

func (*User) ToUserModel

func (u *User) ToUserModel() *model.User

func (*User) ToUserResp

func (u *User) ToUserResp() *v1.User

type Video

type Video struct {
	ID           int64
	Title        string
	Description  string
	VideoURL     string
	CoverURL     string
	LikeCount    int64
	CommentCount int64
	Author       *Author
	UploadTime   time.Time
	IsFavorite   int64
}

func FromVideoModel

func FromVideoModel(video *model.Video) *Video

func FromVideoModelList

func FromVideoModelList(videos []*model.Video) []*Video

func (*Video) ToPB added in v0.1.6

func (v *Video) ToPB() *v1.Video

func (*Video) ToVideoModel

func (v *Video) ToVideoModel() *model.Video

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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