Documentation ¶
Index ¶
Constants ¶
View Source
const ( //modeAccepted means The comment was accepted by the server and is published. // 001 ModeAccepted = 1 //modeModeration means: The comment was accepted by the server but awaits moderation. // 010 ModeModeration = 2 //modeDeleted means deleted, but referenced: The comment was deleted on the server but is still referenced by replies. // 100 ModeDeleted = 4 //modePublic means The comment is public. its replies can be counted and show. // 101 //modePublic include modeAccepted, modeDeleted //modePublic CAN NOT be used by comment. //It is the shortcut for select comments who are in modeAccepted or modeDeleted. ModePublic = 5 )
mode for comment's mode. comment mode CAN NOT be set to modePublic.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptableError ¶
type AcceptableError struct {
// contains filtered or unexported fields
}
AcceptableError used to type
func (*AcceptableError) Error ¶
func (e *AcceptableError) Error() string
type Accessor ¶
type Accessor interface { Close() error // contains filtered or unexported methods }
Accessor defines all usual access ops avail.
type Comment ¶
type Comment struct { ID int64 `json:"id"` Parent null.Int `json:"parent"` Created float64 `json:"created"` Modified null.Float `json:"modified"` Mode int64 `json:"mode"` Text string `json:"text"` Author null.String `json:"author"` Website null.String `json:"website"` Likes int64 `json:"likes"` Dislikes int64 `json:"dislikes"` // not store in database. Hash string `json:"hash"` // contains filtered or unexported fields }
Comment represent replies
func NewComment ¶
func NewComment(tid int64, Parent null.Int, mode int64, remoteAddr string, text string, author, email, website null.String, notification int64) Comment
NewComment return a new comment struct with setable fileds. ID, tid, or others generate later
func (*Comment) CookieValue ¶
CookieValue return the value that can be used as edit cookie value.
Click to show internal directories.
Click to hide internal directories.