data

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentEntities

type CommentEntities []*ent.Comment

func (CommentEntities) GetParentsLength

func (cl CommentEntities) GetParentsLength() int

func (CommentEntities) GetTotalLength

func (cl CommentEntities) GetTotalLength() int

func (*CommentEntities) MarshalBinary

func (cl *CommentEntities) MarshalBinary() ([]byte, error)

MarshalBinary -

func (*CommentEntities) UnmarshalBinary

func (cl *CommentEntities) UnmarshalBinary(data []byte) error

UnmarshalBinary -

type CommentInput

type CommentInput struct {
	Author       string  `json:"author"`
	Article      *int    `json:"article"`
	StudyArticle *int    `json:"study_article"`
	Parent       *int    `json:"parent"`
	Content      string  `json:"content"`
	Kind         *string `json:"kind"`
}

type CommentOutput

type CommentOutput struct {
	ID                       int                    `json:"id"`
	Kind                     string                 `json:"kind"`
	State                    string                 `json:"state"`
	Author                   *SimpleKhumuUserOutput `json:"author"`
	Article                  *int                   `json:"article"`
	StudyArticle             *int                   `json:"study_article"`
	Parent                   *int                   `json:"parent"`
	Content                  string                 `json:"content"`
	Children                 []*CommentOutput       `json:"children"`
	IsAuthor                 bool                   `json:"is_author"`
	IsWrittenByArticleAuthor bool                   `json:"is_written_by_article_author"`
	LikeCommentCount         int                    `json:"like_comment_count"`
	Liked                    bool                   `json:"liked"`
	CreatedAt                string                 `json:"created_at"`
}

type LikeCommentEntities

type LikeCommentEntities []*ent.LikeComment

func (LikeCommentEntities) GetLiked

func (lcl LikeCommentEntities) GetLiked(username string) bool

UnmarshalBinary -

func (*LikeCommentEntities) MarshalBinary

func (lcl *LikeCommentEntities) MarshalBinary() ([]byte, error)

MarshalBinary -

func (*LikeCommentEntities) UnmarshalBinary

func (lcl *LikeCommentEntities) UnmarshalBinary(data []byte) error

UnmarshalBinary -

type LikeCommentInput

type LikeCommentInput struct {
	User    string `json:"username"`
	Comment int    `json:"comment"`
}

type SimpleKhumuUserOutput

type SimpleKhumuUserOutput struct {
	Username string `json:"username"`
	Nickname string `json:"nickname"`
	State    string `json:"state"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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