post

package
v0.0.0-...-6a53fb6 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	PID       int32             `json:"pid"`
	Title     string            `json:"title"`
	Category  category.Category `json:"category"`
	Creator   user.Basic        `json:"creator"`
	Statistic *Statistic        `json:"statistic"`
	Limit     int32             `json:"limit"`
	Hidden    bool              `json:"hidden"`
	Modified  time.Time         `json:"modified"`
	Created   time.Time         `json:"created"`
}

Info is stored in storage

func (*Info) VoteCount

func (info *Info) VoteCount() int

func (*Info) VoteNegContains

func (info *Info) VoteNegContains(uid int64) bool

func (*Info) VoteNegCount

func (info *Info) VoteNegCount() int

func (*Info) VotePosContains

func (info *Info) VotePosContains(uid int64) bool

func (*Info) VotePosCount

func (info *Info) VotePosCount() int

type Post

type Post struct {
	PID     int64          `json:"pid"`
	Info    *Info          `json:"info"`
	Mention user.BasicList `json:"mention"`
	Content template.HTML  `json:"content"`
}

type RawContent

type RawContent struct {
}

type Statistic

type Statistic struct {
	PID      int32     `json:"pid"`
	Views    int32     `json:"views"`
	Replies  int32     `json:"replies"`
	Activity time.Time `json:"activity"`
	VotePos  []int32   `json:"vote_pos"`
	VoteNeg  []int32   `json:"vote_neg"`
}

Statistic is stored in Cache

Jump to

Keyboard shortcuts

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