Documentation ¶
Index ¶
- Variables
- func AddAttachment(content string, pid, cid, nid, uid int64) (int64, error)
- func AddCategory(title string, content string, attachment string, nid int64) (int64, error)
- func AddLink(title string, content string, attachment string, nid int64, parent string) (int64, error)
- func AddNode(title string, content string, attachment string, nid int64, cid int64, ...) (int64, error)
- func AddNotification(tid, rid, uid, ctype int64, ...) (int64, error)
- func AddPage(title string, content string, attachment string, nid int64) (int64, error)
- func AddReply(tid, pid, uid, ctype int64, ...) (int64, error)
- func AddTimeline(title string, content string, cid int64, nid int64, uid int64, author string, ...) (int64, error)
- func AddTopic(title, content, avatar, avatarLarge, avatarMedium, avatarSmall string, ...) (int64, error)
- func AddUser(email string, username string, nickname string, realname string, ...) (int64, error)
- func AllExistingNodes(offset int, limit int, field string) (*[]*Node, error)
- func AvailableNodes(offset int, limit int, field string) (*[]*Node, error)
- func CacheInsert(orm *xorm.Engine, beans ...interface{}) (int64, error)
- func ConDb() (*xorm.Engine, error)
- func Counts() (categories int, nodes int, topics int, users int, replys int)
- func DelAttachment(id int64, uid int64, role int64) error
- func DelBalance(bid int64) error
- func DelBalanceByRole(id int64, uid int64, role int64) error
- func DelBalancesByUid(uid int64) error
- func DelCategory(id int64, uid int64, role int64) error
- func DelFriend(uid int64, fid int64) (int64, error)
- func DelHistoryMessage(id int64) error
- func DelLink(id int64, uid int64, role int64) error
- func DelMessage(id int64) error
- func DelNode(id int64, uid int64, role int64) error
- func DelNotification(rid int64) error
- func DelNotificationByRole(rid int64, uid int64, role int64) error
- func DelNotificationsByPid(pid int64) error
- func DelNotificationsByTid(tid int64) error
- func DelPage(id int64, uid int64, role int64) error
- func DelReply(rid int64) error
- func DelReplyByRole(rid int64, uid int64, role int64) error
- func DelReplyMark(uid int64, rid int64)
- func DelReplysByPid(pid int64) error
- func DelReplysByTid(tid int64) error
- func DelTimeline(lid int64) error
- func DelTopic(id int64, uid int64, role int64) error
- func DelTopicMark(uid, tid int64) (int64, error)
- func DelTopicsByPid(id int64, uid int64, role int64) (err error)
- func DelUser(id int64, uid int64, role int64) error
- func GetAllBalance() *[]*Balance
- func GetAllNotification() *[]Notification
- func GetAllReply() *[]*Reply
- func GetAttachmentCountByNid(nid int64) int64
- func GetAttachments(offset int, limit int, field string) (*[]*Attachment, error)
- func GetAttachmentsByCategory(category string, offset int, limit int, ctype int64, field string) *[]*Attachment
- func GetAttachmentsByCategoryCount(category string, offset int, limit int, field string) (int64, error)
- func GetAttachmentsByCid(cid int64, offset int, limit int, ctype int64, field string) *[]*Attachment
- func GetAttachmentsByCidOnBetween(cid int64, startid int64, endid int64, offset int, limit int, ctype int64, ...) *[]*Attachment
- func GetAttachmentsByHotnessCategory(catlimit int, attachmentlimit int) []*[]*Attachment
- func GetAttachmentsByHotnessNodes(nodelimit int, attachmentlimit int) []*[]*Attachment
- func GetAttachmentsByNid(nodeid int64, offset int, limit int, ctype int64, field string) *[]*Attachment
- func GetAttachmentsByNode(node string, offset int, limit int, field string) (*[]*Attachment, error)
- func GetAttachmentsByPid(pid int64, offset int, limit int, ctype int64, field string) *[]*Attachment
- func GetAttachmentsByPid4Count(pid int64, offset int, limit int, ctype int64) (int64, error)
- func GetAttachmentsByPidSinceCreated(pid int64, offset int, limit int, ctype int64, field string, since int64) *[]*Attachment
- func GetAttachmentsByScoreNodes(nodelimit int, attachmentlimit int) []*[]*Attachment
- func GetAttachmentsByUid(uid int64, offset int, limit int, ctype int64, field string) *[]*Attachment
- func GetAttachmentsCount(offset int, limit int) (int64, error)
- func GetAttachmentsCountByNode(node string, offset int, limit int) (int64, error)
- func GetBalancesByUid(uid int64, ctype int64, offset int, limit int, field string) *[]*Balance
- func GetBalancesByUidJoinUser(uid int64, ctype int64, offset int, limit int, field string) *[]*Balancejuser
- func GetBalancesByUsername(username string, ctype int64, offset int, limit int, field string) *[]*Balance
- func GetCategories(offset int, limit int, field string) (*[]*Category, error)
- func GetCategoriesByCtype(offset int, limit int, ctype int64, field string) (*[]*Category, error)
- func GetCategoriesByCtypeWithNid(offset int, limit int, ctype int64, nid int64, field string) (*[]*Category, error)
- func GetCategoriesByCtypeWithPid(offset int, limit int, ctype int64, pid int64, field string) (*[]*Category, error)
- func GetCategoriesByNid(nid int64, offset int, limit int, field string) (*[]*Category, error)
- func GetCategoriesByNodeCount(offset int, limit int, nodecount int64, field string) (*[]*Category, error)
- func GetCategoriesByPid(pid int64, offset int, limit int, ctype int64, field string) *[]*Category
- func GetCategoriesCount(offset int, limit int) (int64, error)
- func GetCategoriesViaPid(pid int64, offset int, limit int, ctype int64, field string) *[]*Category
- func GetCategoryCountByPid(pid int64) int64
- func GetFriends(offset int, limit int, field string) (*[]*Friend, error)
- func GetFriendsByUid(uid int64, offset int, limit int, group string, field string) *[]*Friend
- func GetFriendsByUidJoinUser(uid int64, offset int, limit int, group string, field string) *[]*Friendjuser
- func GetHistoryMessages(offset, limit int, field string) (*[]*HistoryMessage, error)
- func GetHistoryMessagesViaKey(offset, limit int, key, field string) (*[]*HistoryMessage, error)
- func GetHistoryMessagesViaReceiver(offset, limit int, username, field string) (*[]*HistoryMessage, error)
- func GetHistoryMessagesViaReceiverWithSender(offset, limit int, receiver, sender, field string) (*[]*HistoryMessage, error)
- func GetIssues(offset int, limit int, field string, ctype int64) (*[]*IssueMark, error)
- func GetLinkCountByPid(pid int64) int64
- func GetLinks(offset int, limit int, field string) (*[]*Link, error)
- func GetLinksByNodeCount(offset int, limit int, nodecount int64, field string) (*[]*Link, error)
- func GetMessages(offset, limit int, field string) (*[]*Message, error)
- func GetMessagesViaKey(offset, limit int, key, field string) (*[]*Message, error)
- func GetMessagesViaReceiver(offset, limit int, username, field string) (*[]*Message, error)
- func GetMessagesViaReceiverWithSender(offset, limit int, receiver, sender, field string) (*[]*Message, error)
- func GetNodeCountByPid(cid int64) int64
- func GetNodes(offset int, limit int, field string) (*[]*Node, error)
- func GetNodesByCid(cid int64, offset int, limit int, field string) (*[]*Node, error)
- func GetNodesByCtype(offset int, limit int, ctype int64, field string) (*[]*Node, error)
- func GetNodesByCtypeWithCid(offset int, limit int, ctype int64, cid int64, field string) (*[]*Node, error)
- func GetNodesByCtypeWithNid(offset int, limit int, ctype int64, nid int64, field string) (*[]*Node, error)
- func GetNodesByCtypeWithPid(offset int, limit int, ctype int64, pid int64, field string) (*[]*Node, error)
- func GetNodesByPid(pid int64, offset int, limit int, ctype int64, field string) *[]*Node
- func GetNodesCount(offset int, limit int) (int64, error)
- func GetNodesViaPid(pid int64, offset int, limit int, ctype int64, field string) *[]*Node
- func GetNotificationCountByUid(uid int64) int64
- func GetNotificationsByTid(tid int64, ctype int64, offset int, limit int, field string) *[]Notification
- func GetNotificationsByTidUid(tid int64, uid int64, ctype int64, offset int, limit int, field string) *[]Notification
- func GetNotificationsByTidUsername(tid int64, author string, ctype int64, offset int, limit int, field string) *[]Notification
- func GetNotificationsByUid(uid int64, ctype int64, offset int, limit int, field string) *[]Notification
- func GetNotificationsByUidJoinUser(uid int64, ctype int64, offset int, limit int, field string) *[]Notificationjuser
- func GetNotificationsByUidUsernameJoinTopic(uid int64, author string, ctype int64, offset int, limit int, field string) *[]Notificationjtopic
- func GetPageCountByPid(pid int64) int64
- func GetPages(offset int, limit int, field string) (*[]*Page, error)
- func GetPagesByNodeCount(offset int, limit int, nodecount int64, field string) (*[]*Page, error)
- func GetReplyCountByPid(pid int64) int64
- func GetReplyCountByTid(tid int64) int64
- func GetReplysByPid(pid int64, ctype int64, offset int, limit int, field string) *[]*Reply
- func GetReplysByPid4Count(pid int64, offset int, limit int, ctype int64) (int64, error)
- func GetReplysByTid(tid int64, ctype int64, offset int, limit int, field string) *[]*Reply
- func GetReplysByTidJoinUser(tid int64, ctype int64, offset int, limit int, field string) *[]*Replyjuser
- func GetReplysByTidUid(tid int64, uid int64, ctype int64, offset int, limit int, field string) *[]*Reply
- func GetReplysByTidUsername(tid int64, author string, ctype int64, offset int, limit int, field string) *[]*Reply
- func GetReplysByTidUsernameJoinTopic(tid int64, author string, ctype int64, offset int, limit int, field string) *[]*Replyjtopic
- func GetReports(offset int, limit int, field string, ctype int64) (*[]*ReportMark, error)
- func GetSubAttachments(pid int64, offset int, limit int, field string) (*[]*Attachment, error)
- func GetSubReplys(pid int64, offset int, limit int, field string) (*[]*Reply, error)
- func GetSubTopics(pid int64, offset int, limit int, field string) (*[]*Topic, error)
- func GetSubjectsByCategory(category string, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetSubjectsByCategory4Count(category string, offset int, limit int, ctype int64) (int64, error)
- func GetSubjectsByCategoryJoinUser(category string, offset int, limit int, ctype int64, field string) *[]*Topicjuser
- func GetSubjectsByCid(cid int64, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetSubjectsByCid4Count(cid int64, offset int, limit int, ctype int64) (int64, error)
- func GetSubjectsByCidJoinUser(cid int64, offset int, limit int, ctype int64, field string) *[]*Topicjuser
- func GetSubjectsByNid(nodeid int64, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetSubjectsByNid4Count(nodeid int64, offset int, limit int, ctype int64) (int64, error)
- func GetSubjectsByNidJoinUser(nodeid int64, offset int, limit int, ctype int64, field string) *[]*Topicjuser
- func GetSubjectsByNode(node string, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetSubjectsByNode4Count(node string, offset int, limit int, ctype int64) (int64, error)
- func GetSubjectsByNodeJoinUser(node string, offset int, limit int, ctype int64, field string) *[]*Topicjuser
- func GetSubjectsByUid(uid int64, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetSubjectsByUser(username string, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetSubjectsByUser4Count(user string, offset int, limit int, ctype int64) (int64, error)
- func GetSubjectsByUserJoinUser(username string, offset int, limit int, ctype int64, field string) *[]*Topicjuser
- func GetSubjectsByUsername(author string, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetSubjectsCountByUsername(author string, offset int, limit int, ctype int64) (int64, error)
- func GetTimelines(offset int, limit int, path string, uid int64) (*[]*Timeline, error)
- func GetTopicCountByNid(nid int64) int64
- func GetTopicMarksViaUid(offset, limit int, uid int64, field string) (*[]*TopicMark, error)
- func GetTopicMarksViaUidWithCid(offset, limit int, uid, cid int64, field string) (*[]*TopicMark, error)
- func GetTopics(offset int, limit int, field string) (*[]*Topic, error)
- func GetTopicsByCategory(category string, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetTopicsByCategoryCount(category string, offset int, limit int, field string) (int64, error)
- func GetTopicsByCid(cid int64, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetTopicsByCidOnBetween(cid int64, startid int64, endid int64, offset int, limit int, ctype int64, ...) *[]*Topic
- func GetTopicsByHotnessCategory(catlimit int, topiclimit int) []*[]*Topic
- func GetTopicsByHotnessNodes(nodelimit int, topiclimit int) []*[]*Topic
- func GetTopicsByNid(nodeid int64, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetTopicsByNode(node string, offset int, limit int, field string) (*[]*Topic, error)
- func GetTopicsByPid(pid int64, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetTopicsByPid4Count(pid int64, offset int, limit int, ctype int64) (int64, error)
- func GetTopicsByPidJoinTopicmark(pid int64, offset int, limit int, ctype int64, field string) *[]*Topicjtopicmark
- func GetTopicsByPidJoinUser(pid int64, offset int, limit int, ctype int64, field string) *[]*Topicjuser
- func GetTopicsByPidJoinUserSinceCreated(pid int64, offset int, limit int, ctype int64, field string, since int64) *[]*Topicjuser
- func GetTopicsByPidSinceCreated(pid int64, offset int, limit int, ctype int64, field string, since int64) *[]*Topic
- func GetTopicsByScoreNodes(nodelimit int, topiclimit int) []*[]*Topic
- func GetTopicsByUid(uid int64, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetTopicsCount(offset int, limit int) (int64, error)
- func GetTopicsCountByNode(node string, offset int, limit int) (int64, error)
- func GetTopicsViaPid(pid int64, offset int, limit int, ctype int64, field string) *[]*Topic
- func GetUsers(offset int, limit int, field string) (*[]*User, error)
- func GetUsersByRole(role int64, offset int, limit int, field string) (*[]*User, error)
- func GetUsersCount(offset int, limit int) (int64, error)
- func GetUsersOnConfidence(offset int, limit int, field string) (*[]*User, error)
- func GetUsersOnHotness(offset int, limit int, field string) (*[]*User, error)
- func HasCategory(title string) (int64, bool)
- func HasNode(title string) (int64, bool)
- func HasUser(username string) (int64, bool)
- func IsFriend(uid, fid int64) bool
- func IsIssueMark(uid int64, rid int64, ctype int64) bool
- func IsNodeMark(uid int64, nid int64) bool
- func IsReplyMark(uid int64, rid int64) bool
- func IsReportMark(uid int64, rid int64, ctype int64) bool
- func IsTailinfoOfUser(tid, uid int64) bool
- func IsTopicMark(uid int64, tid int64) bool
- func IsUserMark(uid int64, UserID int64) bool
- func JoinTopicmarkJoinUserForGetTopicsByPid(pid int64, offset int, limit int, field string) *[]*Topicjtopicmarkjuser
- func JoinTopicmarkJoinUserForGetTopicsByUid(uid int64, offset int, limit int, field string) *[]*Topicjtopicmarkjuser
- func NewEngine() error
- func NodesOfNavor(offset int, limit int, field string) (*[]*Node, error)
- func NodesOfNodes(offset int, limit int, field string) (*[]*Node, error)
- func Ping() error
- func PostAttachment(obj *Attachment) (int64, error)
- func PostCategory(cat *Category) (int64, error)
- func PostHistoryMessage(m *HistoryMessage) (int64, error)
- func PostMessage(m *Message) (int64, error)
- func PostNode(node *Node) (int64, error)
- func PostNotification(tid int64, rp *Notification) (int64, error)
- func PostReply(tid int64, rp *Reply) (int64, error)
- func PostTopic(tp *Topic) (int64, error)
- func PostUser(m *User) (int64, error)
- func PutAttachment(tid int64, obj *Attachment) (int64, error)
- func PutAttachmentViaVersion(tid int64, attachment *Attachment) (int64, error)
- func PutCategory(cid int64, cat *Category) (int64, error)
- func PutHistoryMessage(mid int64, msg *HistoryMessage) (int64, error)
- func PutHistoryMessageViaKey(key string, msg *HistoryMessage) (int64, error)
- func PutLink(cid int64, cat *Link) (int64, error)
- func PutMessage(mid int64, msg *Message) (int64, error)
- func PutMessageViaKey(key string, msg *Message) (int64, error)
- func PutNode(nid int64, nd *Node) (int64, error)
- func PutNotification(rid int64, rp *Notification) (int64, error)
- func PutPage(cid int64, obj *Page) (int64, error)
- func PutReply(rid int64, rp *Reply) (int64, error)
- func PutSignin2User(uid, LastSigninTime, SigninCount int64, LastSigninIp string) (int64, error)
- func PutSignout2User(uid, LastSigninTime int64, LastSigninIp string) (int64, error)
- func PutSort2AttachmentViaVersion(tid int64, attachment *Attachment) (int64, error)
- func PutSort2TopicViaVersion(tid int64, topic *Topic) (int64, error)
- func PutTailinfo2Topic(tid int64, Tailinfo string) (int64, error)
- func PutTopic(tid int64, tp *Topic) (int64, error)
- func PutTopicViaVersion(tid int64, topic *Topic) (int64, error)
- func PutUser(uid int64, usr *User) (int64, error)
- func PutViews2AttachmentViaVersion(tid int64, attachment *Attachment) (int64, error)
- func PutViews2TopicViaVersion(tid int64, topic *Topic) (int64, error)
- func ReplyMarkCount(rid int64) (int64, error)
- func ReplyMarkCountByUid(uid int64) (int64, error)
- func SearchCategory(content string, offset int, limit int, field string) (*[]*Category, error)
- func SearchNode(content string, offset int, limit int, field string) (*[]*Node, error)
- func SearchSubject(content string, offset int, limit int, field string) (*[]*Topic, error)
- func SearchSubjectJoinUser(content string, offset int, limit int, field string) (*[]*Topicjuser, error)
- func SearchTopic(content string, offset int, limit int, field string) (*[]*Topic, error)
- func SearchUser(content string, offset int, limit int, field string) (*[]*User, error)
- func SetAmountById(id, uid, ctype, amount int64, description string) error
- func SetAmountByUid(uid, ctype, amount int64, description string) error
- func SetAttachment(tid int64, obj *Attachment) (int64, error)
- func SetBalance(balance *Balance) error
- func SetBalanceForUser(uid, balance int64) error
- func SetCategory(cid int64, cat *Category) (int64, error)
- func SetEngine() (*xorm.Engine, error)
- func SetFriend(uid, fid, accept int64, content, group string) (int64, error)
- func SetFriendTo(fromUid, toFid, accept int64, content, group string) (int64, error)
- func SetIssueMark(uid int64, rid int64, ctype int64, content string) (int64, error)
- func SetNode(nid int64, nd *Node) (int64, error)
- func SetNodeMark(uid int64, nid int64) (int64, error)
- func SetNotificationContentByRid(rid int64, Content string) error
- func SetNotificationCount(uid int64, count int64) (int64, error)
- func SetNotificationCountByUid(uid int64) (int64, error)
- func SetPage(pageid int64, p *Page) (int64, error)
- func SetReply(rid int64, rp *Reply) (int64, error)
- func SetReplyContentByRid(rid int64, Content string) error
- func SetReplyCountByPid(qid int64) (int64, error)
- func SetReplyCountByTid(tid int64) (int64, error)
- func SetReplyMark(uid int64, rid int64) (int64, error)
- func SetReportMark(uid int64, rid int64, ctype int64, content string) (int64, error)
- func SetTopic(tid int64, tp *Topic) (int64, error)
- func SetTopicMark(uid, cid, tid int64) (int64, error)
- func SetUser(uid int64, usr *User) (int64, error)
- func SetUserMark(uid int64, UserID int64) (int64, error)
- func SetUserNewpassword(username string, email string, oldpassword string, newpassword string) (bool, error)
- func TopicMarkCount(tid int64) (int64, error)
- func TopicMarkCountByUid(uid int64) (int64, error)
- func UpdateCategory(cid int64, catmap *map[string]interface{}) error
- func UpdateLink(cid int64, catmap *map[string]interface{}) error
- func UpdateNode(nid int64, nodemap *map[string]interface{}) error
- func UpdatePage(cid int64, objmap *map[string]interface{}) error
- type Attachment
- type Balance
- type Balancejuser
- type Category
- type Count
- type Friend
- type Friendjuser
- type HistoryMessage
- type IssueMark
- type Link
- type Message
- type Node
- type NodeBookmark
- type NodeMark
- type Notification
- type Notificationjtopic
- type Notificationjuser
- type Page
- type Reply
- type ReplyMark
- type Replyjtopic
- type Replyjuser
- type ReportMark
- type Timeline
- type Topic
- type TopicMark
- type Topicjtopicmark
- type Topicjtopicmarkjuser
- type Topicjuser
- type User
- type UserMark
- type Usergroup
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddCategory ¶
func AddNotification ¶
func AddTimeline ¶
func AllExistingNodes ¶
返回所有存在的节点
func DelBalance ¶
func DelBalancesByUid ¶
func DelHistoryMessage ¶
func DelMessage ¶
func DelNotification ¶
func DelNotificationsByPid ¶
func DelNotificationsByTid ¶
func DelReplyMark ¶
func DelReplysByPid ¶
func DelReplysByTid ¶
func DelTimeline ¶
func DelTopicMark ¶
func DelTopicMark(uid int64, tid int64) { tpm := new(TopicMark) Engine.Where("uid=? and tid=?", uid, tid).Delete(tpm) }
func GetAllBalance ¶
func GetAllBalance() *[]*Balance
func GetAllNotification ¶
func GetAllNotification() *[]Notification
func GetAllReply ¶
func GetAllReply() *[]*Reply
func GetAttachmentCountByNid ¶
func GetAttachments ¶
func GetAttachments(offset int, limit int, field string) (*[]*Attachment, error)
func GetAttachmentsByCid ¶
func GetAttachmentsByCid(cid int64, offset int, limit int, ctype int64, field string) *[]*Attachment
GetAttachmentsByCid大数据下如出现性能问题 可以使用 GetAttachmentsByCidOnBetween
func GetAttachmentsByHotnessCategory ¶
func GetAttachmentsByHotnessCategory(catlimit int, attachmentlimit int) []*[]*Attachment
func GetAttachmentsByHotnessNodes ¶
func GetAttachmentsByHotnessNodes(nodelimit int, attachmentlimit int) []*[]*Attachment
func GetAttachmentsByNid ¶
func GetAttachmentsByNode ¶
func GetAttachmentsByPid ¶
func GetAttachmentsByScoreNodes ¶
func GetAttachmentsByScoreNodes(nodelimit int, attachmentlimit int) []*[]*Attachment
func GetAttachmentsByUid ¶
func GetAttachmentsByUid(uid int64, offset int, limit int, ctype int64, field string) *[]*Attachment
GetAttachmentsByUid不区分父子附件
func GetBalancesByUid ¶
func GetBalancesByUsername ¶
func GetCategoriesByCtype ¶
func GetCategoriesByNid ¶
func GetCategoriesByPid ¶
func GetCategoriesViaPid ¶
func GetCategoryCountByPid ¶
func GetFriendsByUid ¶
func GetFriendsByUidJoinUser ¶
func GetHistoryMessages ¶
func GetHistoryMessages(offset, limit int, field string) (*[]*HistoryMessage, error)
func GetHistoryMessagesViaKey ¶
func GetHistoryMessagesViaKey(offset, limit int, key, field string) (*[]*HistoryMessage, error)
func GetHistoryMessagesViaReceiver ¶
func GetHistoryMessagesViaReceiver(offset, limit int, username, field string) (*[]*HistoryMessage, error)
func GetHistoryMessagesViaReceiverWithSender ¶
func GetHistoryMessagesViaReceiverWithSender(offset, limit int, receiver, sender, field string) (*[]*HistoryMessage, error)
func GetLinkCountByPid ¶
func GetLinksByNodeCount ¶
func GetMessagesViaKey ¶
func GetMessagesViaReceiver ¶
func GetNodeCountByPid ¶
func GetNodesByCid ¶
func GetNodesByCid(cid int64, offset int, limit int, field string) (*[]*Node, error) { nds := new([]*Node) err := Engine.Where("cid=?", cid).Limit(limit, offset).Desc(field).Find(nds) return nds, err }
func GetNodesByCtype ¶
func GetNodesByCtypeWithCid ¶
func GetNodesByCtypeWithNid ¶
func GetNodesByCtypeWithPid ¶
func GetNodesByPid ¶
func GetNodesViaPid ¶
func GetNotificationsByTid ¶
func GetNotificationsByUid ¶
func GetPageCountByPid ¶
func GetPagesByNodeCount ¶
func GetReplyCountByPid ¶
func GetReplyCountByTid ¶
func GetReplysByPid ¶
func GetReplysByPid4Count ¶
func GetReplysByTid ¶
func GetReplysByTidJoinUser ¶
func GetReplysByTidUid ¶
func GetReplysByTidUsername ¶
func GetReports ¶
func GetSubAttachments ¶
func GetSubReplys ¶
func GetSubTopics ¶
func GetSubjectsByCategory ¶
func GetSubjectsByCid ¶
func GetSubjectsByCid4Count ¶
func GetSubjectsByNid ¶
func GetSubjectsByNid4Count ¶
func GetSubjectsByNode ¶
func GetSubjectsByNode4Count ¶
func GetSubjectsByUid ¶
func GetSubjectsByUser ¶
func GetSubjectsByUser4Count ¶
func GetSubjectsByUsername ¶
func GetTimelines ¶
func GetTopicCountByNid ¶
func GetTopicMarksViaUid ¶
func GetTopicsByCategory ¶
func GetTopicsByCid ¶
GetTopicsByCid大数据下如出现性能问题 可以使用 GetTopicsByCidOnBetween
func GetTopicsByCidOnBetween ¶
func GetTopicsByHotnessNodes ¶
func GetTopicsByNid ¶
func GetTopicsByNode ¶
func GetTopicsByPid ¶
func GetTopicsByPid4Count ¶
func GetTopicsByPidJoinUser ¶
func GetTopicsByScoreNodes ¶
func GetTopicsByUid ¶
GetTopicsByUid不区分父子话题
func GetTopicsCountByNode ¶
func GetTopicsViaPid ¶
func GetUsersByRole ¶
func GetUsersOnConfidence ¶
func GetUsersOnHotness ¶
func HasCategory ¶
func IsNodeMark ¶
func IsReplyMark ¶
func IsTailinfoOfUser ¶
func IsTopicMark ¶
func IsUserMark ¶
func JoinTopicmarkJoinUserForGetTopicsByPid ¶
func JoinTopicmarkJoinUserForGetTopicsByPid(pid int64, offset int, limit int, field string) *[]*Topicjtopicmarkjuser
func JoinTopicmarkJoinUserForGetTopicsByUid ¶
func JoinTopicmarkJoinUserForGetTopicsByUid(uid int64, offset int, limit int, field string) *[]*Topicjtopicmarkjuser
func PostCategory ¶
func PostHistoryMessage ¶
func PostHistoryMessage(m *HistoryMessage) (int64, error)
func PostMessage ¶
func PostNotification ¶
func PostNotification(tid int64, rp *Notification) (int64, error)
func PutAttachment ¶
func PutAttachment(tid int64, obj *Attachment) (int64, error)
func PutAttachmentViaVersion ¶
func PutAttachmentViaVersion(tid int64, attachment *Attachment) (int64, error)
func PutHistoryMessage ¶
func PutHistoryMessage(mid int64, msg *HistoryMessage) (int64, error)
func PutHistoryMessageViaKey ¶
func PutHistoryMessageViaKey(key string, msg *HistoryMessage) (int64, error)
func PutNotification ¶
func PutNotification(rid int64, rp *Notification) (int64, error)
func PutSignin2User ¶
func PutSignout2User ¶
func PutSort2AttachmentViaVersion ¶
func PutSort2AttachmentViaVersion(tid int64, attachment *Attachment) (int64, error)
func PutSort2Attachment(tid int64, sort int64) (int64, error) {
func PutSort2TopicViaVersion ¶
func PutSort2Topic(tid int64, sort int64) (int64, error) {
func PutViews2AttachmentViaVersion ¶
func PutViews2AttachmentViaVersion(tid int64, attachment *Attachment) (int64, error)
func ReplyMarkCount ¶
func ReplyMarkCountByUid ¶
func SearchCategory ¶
SearchCategory 搜索分类
func SearchNode ¶
SearchNode 搜索节点
func SearchSubject ¶
func SearchSubjectJoinUser ¶
func SearchTopic ¶
func SearchUser ¶
SearchUser 搜索用户
func SetAmountById ¶
func SetAmountByUid ¶
func SetAttachment ¶
func SetAttachment(tid int64, obj *Attachment) (int64, error)
func SetBalance ¶
func SetBalanceForUser ¶
func SetFriendTo ¶
func SetIssueMark ¶
SetIssueMark 设置举报标记
func SetReplyContentByRid ¶
func SetReplyCountByPid ¶
func SetReplyCountByTid ¶
func SetReportMark ¶
SetReportMark 设置举报标记
func SetTopicMark ¶
func SetUserNewpassword ¶
func TopicMarkCount ¶
func TopicMarkCountByUid ¶
func UpdateCategory ¶
map[string]interface{}{"ctype": ctype}
func UpdateLink ¶
map[string]interface{}{"ctype": ctype}
func UpdateNode ¶
map[string]interface{}{"ctype": ctype}
func UpdatePage ¶
map[string]interface{}{"ctype": ctype}
Types ¶
type Attachment ¶
type Attachment struct { Id int64 Pid int64 `xorm:"index"` //为0代表没有上级,本身就是顶层附件 大于0则本身是子附件,而该数字代表上级附件的id Cid int64 `xorm:"index"` Nid int64 `xorm:"index"` //nodeid Uid int64 `xorm:"index"` Sort int64 `xorm:"index"` //排序字段 需要手动对附件排序置顶等操作时使用 Ctype int64 `xorm:"index"` //ctype作用在于区分附件的类型 Content string `xorm:"text"` //资源URL Tags string `xorm:"index"` Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Confidence float64 `xorm:"index"` //信任度数值 Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 Author string `xorm:"index"` Category string `xorm:"index"` Node string `xorm:"index"` //nodename FavoriteCount int64 Latitude float64 `xorm:"index"` //纬度 Longitude float64 `xorm:"index"` //经度 Version int64 `xorm:"version"` //乐观锁 }
func GetAttachment ¶
func GetAttachment(id int64) (*Attachment, error)
type Balance ¶
type Balance struct { Id int64 `xorm:"index"` Uid int64 `xorm:"index"` //钱包拥有者 Time int64 `xorm:"index"` //发生时间 为保证时间的正确性 此处使用时间戳 Ctype int64 `xorm:"index"` //动作类型 Amount int64 `xorm:"index"` //数额 Balance int64 `xorm:"index"` //余额 Description string `xorm:"text"` //描述 Version int64 `xorm:"version"` //乐观锁 }
时间 类型 数额 余额 描述 Time Ctype Amount Balance Description
func GetBalanceById ¶
func GetBalanceByUid ¶
type Balancejuser ¶
type Category ¶
type Category struct { Id int64 Pid int64 `xorm:"index"` //小于等于0 代表分类本身是顶层分类, pid大于0 代表属于某分类id的下级 Nid int64 `xorm:"index"` //小于等于0 代表本分类不属于某节点,大于0 代表属于某节点id的下级 本系统围绕node设计,分类亦可以是节点的下级 Uid int64 `xorm:"index"` Sort int64 Ctype int64 `xorm:"index"` Title string `xorm:"index"` Content string `xorm:"text"` Attachment string `xorm:"text"` Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Confidence float64 `xorm:"index"` //信任度数值 Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 Author string `xorm:"index"` //这里指本分类创建者 Parent string `xorm:"index"` //父级分类名称 NodeTime int64 NodeCount int64 NodeLastUserId int64 Template string `xorm:"index"` }
func GetCategory ¶
func GetCategoryByTitle ¶
type Friend ¶
type Friend struct { Id int64 Uid int64 `xorm:"index"` Fid int64 `xorm:"index"` Content string `xorm:"index"` //申请留言 Group string `xorm:"index"` //好友分组 Accept int64 `xorm:"index"` //是否通过好友申请,即是大于0就是所有好友 3为特别关注 2为普通 1为待处理 0为缺省值 -1为拒绝 -2黑名单 Created int64 `xorm:"created index"` //何时相交 }
好友关联表 包含 用户 ID,好友 ID
func GetRelationship ¶
type Friendjuser ¶
type HistoryMessage ¶
type HistoryMessage struct { Id int64 Key string `xorm:"index"` Uid int64 `xorm:"index"` //发送者之用户ID Sender string `xorm:"index"` //发送者之用户名称 Avatar string `xorm:"index"` //发送者之头像 Receiver string `xorm:"index"` //接收者之用户名称 Content string `xorm:"index"` //搜索功能需要索引 Created int64 `xorm:"index"` }
func GetHistoryMessage ¶
func GetHistoryMessage(id int64) (*HistoryMessage, error)
func GetHistoryMessageViaKey ¶
func GetHistoryMessageViaKey(key string) (*HistoryMessage, error)
type IssueMark ¶
type Link ¶
type Link struct { Id int64 Pid int64 `xorm:"index"` //小于等于0 代表链接本身是顶层链接, pid大于0 代表属于某节点id的下级 本系统围绕node设计,链接亦可以是节点的下级 Uid int64 `xorm:"index"` Sort int64 Ctype int64 `xorm:"index"` Title string `xorm:"index"` Content string `xorm:"text"` Attachment string `xorm:"text"` Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 Author string `xorm:"index"` //这里指本链接创建者 Parent string `xorm:"index"` //父级节点名称 NodeTime int64 NodeCount int64 NodeLastUserId int64 }
func GetLinkByTitle ¶
type Message ¶
type Message struct { Id int64 Key string `xorm:"index"` Uid int64 `xorm:"index"` //发送者之用户ID Sender string `xorm:"index"` //发送者之用户名称 Avatar string `xorm:"index"` //发送者之头像 Receiver string `xorm:"index"` //接收者之用户名称 Content string `xorm:"index"` //搜索功能需要索引 Created int64 `xorm:"index"` }
func GetMessage ¶
func GetMessageViaKey ¶
type Node ¶
type Node struct { Id int64 Pid int64 `xorm:"index"` //pid为0 代表节点本身是顶层节点, pid大于0 代表上级节点id , 编写逻辑的时候注意判断此pid不能等于自身id Cid int64 `xorm:"index"` //所属分类的id Uid int64 `xorm:"index"` Sort int64 Ctype int64 `xorm:"index"` Title string `xorm:"index"` Content string `xorm:"text"` Attachment string `xorm:"text"` Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Confidence float64 `xorm:"index"` //信任度数值 Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 Author string `xorm:"index"` //节点的创建者 Parent string `xorm:"index"` //父级节点名称 Category string `xorm:"index"` //所属分类标题 Tid int64 //最后一次发布的topic的Tid Topic int64 //最后一次发布的topic的标题 TopicTime int64 TopicCount int64 TopicLastUserId int64 FavoriteCount int64 `xorm:"index"` Template string `xorm:"index"` }
func GetNodeByTitle ¶
type NodeBookmark ¶
type Notification ¶
type Notification struct { Id int64 Uid int64 `xorm:"index"` Tid int64 `xorm:"index"` Rid int64 `xorm:"index"` Ctype int64 `xorm:"index"` //0普通通知 1通知作者 -1忽略 Subject string `xorm:"text"` Reply string `xorm:"text"` Author string `xorm:"index"` Avatar string `xorm:"index"` //200x200 AvatarLarge string `xorm:"index"` //100x100 AvatarMedium string `xorm:"index"` //48x48 AvatarSmall string `xorm:"index"` //32x32 Created int64 `xorm:"created index"` }
func GetNotification ¶
func GetNotification(id int64) (*Notification, error)
type Notificationjtopic ¶
type Notificationjtopic struct { Notification `xorm:"extends"` Topic `xorm:"extends"` }
type Notificationjuser ¶
type Notificationjuser struct { Notification `xorm:"extends"` User `xorm:"extends"` }
type Page ¶
type Page struct { Id int64 Pid int64 `xorm:"index"` //小于等于0 代表页面本身是顶层页面, pid大于0 代表属于某节点id的下级 本系统围绕node设计,页面亦可以是节点的下级 Uid int64 `xorm:"index"` Sort int64 Ctype int64 `xorm:"index"` Title string `xorm:"index"` Content string `xorm:"text"` Attachment string `xorm:"text"` Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 Author string `xorm:"index"` //这里指本页面创建者 Template string `xorm:"index"` }
func GetPageByTitle ¶
type Reply ¶
type Reply struct { Id int64 Pid int64 `xorm:"index"` //上级Reply id Uid int64 `xorm:"index"` Tid int64 `xorm:"index"` Sort int64 Ctype int64 `xorm:"index"` Content string `xorm:"text"` Tailinfo int64 `xorm:"index"` Attachment string `xorm:"text"` Avatar string `xorm:"index"` //200x200 AvatarLarge string `xorm:"index"` //100x100 AvatarMedium string `xorm:"index"` //48x48 AvatarSmall string `xorm:"index"` //32x32 Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Confidence float64 `xorm:"index"` Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 Author string `xorm:"index"` AuthorSignature string `xorm:"index"` Email string `xorm:"index"` Website string `xorm:"index"` ReplyTime int64 ReplyCount int64 ReplyLastUserId int64 ReplyLastUsername string ReplyLastNickname string ReplyLastTopic string //最后回复的话题之标题 Latitude float64 `xorm:"index"` Longitude float64 `xorm:"index"` }
type Replyjtopic ¶
type Replyjuser ¶
type ReportMark ¶
type ReportMark struct { Id int64 Uid int64 `xorm:"index"` //举报人 Rid int64 `xorm:"index"` //被举报项id Ctype int64 `xorm:"index"` // 1为topic类型 -1是comment类型 Title string `xorm:"index"` //举报标题 Content string `xorm:"text"` //举报内容 }
func GetReport ¶
func GetReport(rid int64) (*ReportMark, error)
type Timeline ¶
type Timeline struct { Id int64 Cid int64 `xorm:"index"` Nid int64 `xorm:"index"` Uid int64 `xorm:"index"` Sort int64 Ctype int64 `xorm:"index"` Title string `xorm:"index"` Content string `xorm:"text"` Attachment string `xorm:"text"` Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 `xorm:"index"` Author string `xorm:"index"` AuthorSignature string `xorm:"index"` Category string `xorm:"index"` Node string `xorm:"index"` ReplyTime int64 ReplyCount int64 `xorm:"index"` ReplyLastUserId int64 ReplyLastUsername string ReplyLastNickname string }
func GetTimeline ¶
type Topic ¶
type Topic struct { Id int64 Pid int64 `xorm:"index"` //为0代表没有上级,本身就是顶层话题 大于0则本身是子话题,而该数字代表上级话题的id Cid int64 `xorm:"index"` Nid int64 `xorm:"index"` //nodeid Uid int64 `xorm:"index"` Sort int64 `xorm:"index"` //排序字段 需要手动对话题排序置顶等操作时使用 Ctype int64 `xorm:"index"` //ctype作用在于区分话题的类型 Title string `xorm:"index"` Excerpt string `xorm:"index"` //摘录 Content string `xorm:"text"` Tailinfo string `xorm:"index"` //尾巴信息 附带内容,譬如回复可见类型的话题时作为存储评论者UID集合 Attachment string `xorm:"text"` //附件 JSON Thumbnails string `xorm:"index"` //Original remote file ThumbnailsLarge string `xorm:"index"` //200x300 ThumbnailsMedium string `xorm:"index"` //200x150 ThumbnailsSmall string `xorm:"index"` //70x70 Avatar string `xorm:"index"` //200x200 AvatarLarge string `xorm:"index"` //100x100 AvatarMedium string `xorm:"index"` //48x48 AvatarSmall string `xorm:"index"` //32x32 Tags string `xorm:"index"` Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Confidence float64 `xorm:"index"` //信任度数值 Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 Author string `xorm:"index"` Template string `xorm:"index"` Category string `xorm:"index"` Node string `xorm:"index"` //nodename ReplyTime int64 ReplyCount int64 ReplyLastUserId int64 ReplyLastUsername string ReplyLastNickname string FavoriteCount int64 Latitude float64 `xorm:"index"` //纬度 Longitude float64 `xorm:"index"` //经度 Version int64 `xorm:"version"` //乐观锁 }
type Topicjtopicmark ¶
type Topicjtopicmarkjuser ¶
type Topicjuser ¶
type User ¶
type User struct { Id int64 Pid int64 `xorm:"index"` //用在归属地 归属学校 归属组织 等方面 Group string `xorm:"index"` //小组名称集合 Email string `xorm:"index"` Password string `xorm:"index" json:"-"` //禁止Json输出Password字段 Username string `xorm:"index"` Nickname string `xorm:"index"` Realname string `xorm:"index"` Content string `xorm:"text"` Avatar string `xorm:"index"` //200x200 AvatarLarge string `xorm:"index"` //100x100 AvatarMedium string `xorm:"index"` //48x48 AvatarSmall string `xorm:"index"` //32x32 Birth int64 Province string City string Occupation string //职业 Company string Address string Postcode string Mobile string `xorm:"index"` Website string Gender int64 `xorm:"index"` // 1==男 -1==女 Age int64 School string Weight int64 Height int64 ZodiacSign string //星座 Qq string Weixin string WeixinOpenId string `xorm:"index"` //微信移动端OpenId Weibo string Ctype int64 `xorm:"index"` Role int64 `xorm:"index"` //角色属性同时也是权限属性 类似linux权限的形式 ,譬如:664/755/777,TODO Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Confidence float64 `xorm:"index"` //信任度数值 Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 LastSigninTime int64 LastSigninIp string `xorm:"index"` SigninCount int64 `xorm:"index"` NodeTime int64 NodeCount int64 NodeLastTid int64 NodeLastTopic string TopicTime int64 TopicCount int64 TopicLastNid int64 TopicLastNode string ReplyTime int64 ReplyCount int64 ReplyLastTid int64 ReplyLastTopic string //topic title FavoriteCount int64 NotificationCount int64 Balance int64 }
func GetUserByMobile ¶
func GetUserByNickname ¶
func GetUserByRole ¶
func GetUserByUsername ¶
type Usergroup ¶
type Usergroup struct { Id int64 Pid int64 `xorm:"index"` Uid int64 `xorm:"index"` //创建者ID Sort int64 Ctype int64 `xorm:"index"` Title string `xorm:"index"` Content string `xorm:"text"` Attachment string `xorm:"text"` Created int64 `xorm:"created index"` Updated int64 `xorm:"updated"` Hotness float64 `xorm:"index"` Hotup int64 `xorm:"index"` Hotdown int64 `xorm:"index"` Hotscore int64 `xorm:"index"` //Hotup - Hotdown Hotvote int64 `xorm:"index"` //Hotup + Hotdown Views int64 Author string `xorm:"index"` //这里指本用户组创建者 UserTime int64 UserCount int64 UserLastUserId int64 }
Usergroup,Pid:root
Click to show internal directories.
Click to hide internal directories.