Documentation
¶
Index ¶
Constants ¶
View Source
const ( UP voteDir = iota DOWN )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List []Vote
List aggregates a list of votes for certain event.
type NotAllowed ¶
type NotAllowed struct {
Reason string
}
NotAllowed check.
func (*NotAllowed) Error ¶
func (e *NotAllowed) Error() string
type Vote ¶
type Vote struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` UserID bson.ObjectId `bson:"user_id" json:"user_id"` Type string `bson:"type" json:"type"` NestedType string `bson:"nested_type,omitempty" json:"nested_type,omitempty"` RelatedID bson.ObjectId `bson:"related_id" json:"related_id"` Value string `bson:"value" json:"value"` Created time.Time `bson:"created_at" json:"created_at"` Deleted *time.Time `bson:"deleted_at,omitempty" json:"-"` }
Vote represents a reaction to a post || comment
func FindVotableByUser ¶
FindVotableByUser gets the votes for ref.
Click to show internal directories.
Click to hide internal directories.