models

package
v0.0.0-...-58d1966 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR = "ERROR"
View Source
const SUCCESS = "SUCCESS"
View Source
const TYPE_FIND = "发现"
View Source
const TYPE_FOCUS_HERITAGE = "聚焦非遗"
View Source
const TYPE_FOLK = "民间"
View Source
const TYPE_MAIN = "首页新闻"

Variables

View Source
var DB *sql.DB
View Source
var RedisDB *redis.Client

Functions

func AddFocus

func AddFocus(userID int, focusID int) string

func AddPushMessage

func AddPushMessage(userID int, userName string, replyCommentID int, replyContent string, replyToUserID int, replyToUserName string, replyTime string, originaReplyContent string) string

func AddUserCollection

func AddUserCollection(userID int, collectionType string, typeID int) string

func AddUserCommentInformation

func AddUserCommentInformation(userID int, commentTitle string, commentContent string, commentImage string, location string) string

func AddUserCommentReply

func AddUserCommentReply(userID int, commentID int, replyContent string) string

func CancelFocus

func CancelFocus(userID int, focusID int) string

func CancelUserCollect

func CancelUserCollect(userID int, collectionType string, typeID int) string

func CancelUserLike

func CancelUserLike(userID int, commentID int) string

func CheckFollowEachother

func CheckFollowEachother(userID int, focusID int) string

func CheckIsCollection

func CheckIsCollection(userID int, typeName string, typeID int) string

func CheckIsHadUser

func CheckIsHadUser(username string) (bool, error)

func CheckQuestionAnswer

func CheckQuestionAnswer(username string, answer string) (string, error)

func DeleteRedisKey

func DeleteRedisKey(key string)

func DeleteUserCommentByID

func DeleteUserCommentByID(id int) string

func DeleteUserCommentReply

func DeleteUserCommentReply(replyID int) string

func DoPasswordEncrypt

func DoPasswordEncrypt(userName string, noEncryptPassword string) string

func FindPasswordQuestion

func FindPasswordQuestion(username string) (string, error)

func GetAllUserCommentInfoByID

func GetAllUserCommentInfoByID(user int, commentID int) string

func GetBottomNewsInformationByID

func GetBottomNewsInformationByID(id int) string

func GetBottomNewsLiteInformation

func GetBottomNewsLiteInformation(start int, count int) string

func GetChannelFolkInformation

func GetChannelFolkInformation() string

func GetChannelFolkSingleInformation

func GetChannelFolkSingleInformation(id int) string

func GetChannelInformation

func GetChannelInformation(divide string) string

func GetCommentLikeNumber

func GetCommentLikeNumber(commentID int) int

func GetFansInformation

func GetFansInformation(userID int) string

func GetFansNumber

func GetFansNumber(userID int) int

func GetFindActivityID

func GetFindActivityID() string

func GetFolkNewsInformation

func GetFolkNewsInformation(id int) string

func GetFolkNewsList

func GetFolkNewsList(category string, start int, count int) string

func GetFollowInformation

func GetFollowInformation(userID int) string

func GetFollowNumber

func GetFollowNumber(userID int) int

func GetMainDivideActivityImageUrl

func GetMainDivideActivityImageUrl() string

func GetMainPageSlideNewsInformation

func GetMainPageSlideNewsInformation() string

func GetPushMessageInfo

func GetPushMessageInfo(userID int) string

func GetRedisKey

func GetRedisKey(key string) (string, error)

func GetSearchUserInfo

func GetSearchUserInfo(name string) string

func GetUserAllInfo

func GetUserAllInfo(userID int) string

func GetUserCollection

func GetUserCollection(userID int, collectionType string) string

func GetUserCommentCount

func GetUserCommentCount(commentID int, replyType int) int

func GetUserCommentIdByUser

func GetUserCommentIdByUser(userID int) string

func GetUserCommentImageUrl

func GetUserCommentImageUrl(id int) string

func GetUserCommentInformaitonByOwn

func GetUserCommentInformaitonByOwn(userID int, start int) string

func GetUserCommentInformation

func GetUserCommentInformation(userID int, start int) string

func GetUserCommentInformationBySameLocation

func GetUserCommentInformationBySameLocation(userID int, start int, location string) string

func GetUserCommentInformationByUser

func GetUserCommentInformationByUser(userID int, start int) string

func GetUserCommentReply

func GetUserCommentReply(commentID int, replyType int) string

func GetUserFocusAndFansViewPermission

func GetUserFocusAndFansViewPermission(userID int) int

func GetUserImage

func GetUserImage(userID int) string

func GetUserIsLike

func GetUserIsLike(userID int, commentID int) string

func GetUserLikeComment

func GetUserLikeComment(userID int) string

func GetUserPermission

func GetUserPermission(userID int) int

func InitDB

func InitDB() *sql.DB

func IsUserFollow

func IsUserFollow(userID int, fansID int) string

func PostDataDecrypt

func PostDataDecrypt(postData string, dataChan chan string)

func RegistUser

func RegistUser(username string, password string, findPasswordQuestion string, findPasswordAnswer string, userImage string, isHadImage int64) error

func SaveFindImage

func SaveFindImage(imageByte []byte) (bool, string)

func SearchBottomNewsInformation

func SearchBottomNewsInformation(searchString string) string

func SearchChannelForkInfo

func SearchChannelForkInfo(searchInfo string) string

func SearchFolkNewsInformaiton

func SearchFolkNewsInformaiton(searhString string) string

func SearchUserCommentInfo

func SearchUserCommentInfo(searchInfo string, userID int) string

func SelectUserName

func SelectUserName(id int64) (string, error)

func SendSinglePushMessageInfo

func SendSinglePushMessageInfo(userID int) string

func SetRedisKey

func SetRedisKey(key string, result string)

func SetUserFocusAndFansViewPermission

func SetUserFocusAndFansViewPermission(userID int, permission int) string

func SetUserLike

func SetUserLike(userID int, commentID int) string

func SetUserPermission

func SetUserPermission(userID int, permission int) string

func Sign_In

func Sign_In(userName string, password string) (int, error)

func StartPushService

func StartPushService()

func UpdatePassword

func UpdatePassword()

func UpdateUserCommentImage

func UpdateUserCommentImage(id int, imgString string) string

func UpdateUserCommentInformaiton

func UpdateUserCommentInformaiton(id int,
	commentTitle string,
	comemntContent string,
	commentImage string) string

func UpdateUserCommentReply

func UpdateUserCommentReply(replyID int, replyContent string) string

func UpdateUserImage

func UpdateUserImage(userID int, imageString string) string

func UpdateUserPassword

func UpdateUserPassword(username string, password string) (string, error)

Types

type ActivityDivideImage

type ActivityDivideImage struct {
	Id       int64  `json:"id"`
	Category string `json:"category"`
	Url      string `json:"url"`
}

type BottomNews

type BottomNews struct {
	ID      int    `json:"id"`
	Title   string `json:"title"`
	Time    string `json:"time"`
	Briefly string `json:"briefly"`
	Img     string `json:"img"`
	Content string `json:"content"`
}

type BottomNewsLite

type BottomNewsLite struct {
	ID      int    `json:"id"`
	Title   string `json:"title"`
	Time    string `json:"time"`
	Briefly string `json:"briefly"`
	Img     string `json:"img"`
}

type ChannelForkInformationLite

type ChannelForkInformationLite struct {
	Id             int64  `json:"id"`
	Divide         string `json:"divide"`
	Title          string `json:"title"`
	Apply_location string `json:"apply_location"`
	Img            string `json:"img"`
	Category       string `json:"category"`
}

type ChannelInformaiton

type ChannelInformaiton struct {
	Id             int    `json:"id"`
	Time           string `json:"time"`
	Category       string `json:"category"`
	Location       string `json:"location"`
	Apply_location string `json:"apply_location"`
	Content        string `json:"content"`
	Number         string `json:"number"`
	Img            string `json:"img"`
	Title          string `json:"title"`
}

type CollectionInfo

type CollectionInfo struct {
	CollectionType string `json:"collectionType"`
	TypeID         int    `json:"typeID"`
}

type FindActivityData

type FindActivityData struct {
	Title   string `json:"title"`
	Content string `json:"content"`
	Image   string `json:"image"`
}

type FolkData

type FolkData struct {
	Id             int64  `json:"id"`
	Time           string `json:"time"`
	Divide         string `json:"divide"`
	Category       string `json:"category"`
	Location       string `json:"location"`
	Apply_location string `json:"apply_location"`
	Title          string `json:"title"`
	Content        string `json:"content"`
	Number         string `json:"number"`
	Img            string `json:"img"`
}

type FolkNews

type FolkNews struct {
	ID       int    `json:"id"`
	Title    string `json:"title"`
	Time     string `json:"time"`
	Content  string `json:"content"`
	Category string `json:"category"`
	Details  string `json:"details"`
}

type FolkNewsLite

type FolkNewsLite struct {
	ID       int    `json:"id"`
	Title    string `json:"title"`
	Time     string `json:"time"`
	Content  string `json:"content"`
	Category string `json:"category"`
	Img      string `json:"img"`
}

type FollowInformation

type FollowInformation struct {
	FocusFansID  int    `json:"focusFansID"`
	FocusFocusID int    `json:"focusFocusID"`
	UserName     string `json:"userName"`
	Checked      bool   `json:"checked"`
}

type MainPageSlideNews

type MainPageSlideNews struct {
	ID      int    `json:"id"`
	Content string `json:"content"`
	Img     string `json:"img"`
	Detail  string `json:"detail"`
}

type PushMessageData

type PushMessageData struct {
	ID                   int    `json:"id"`
	UserID               int    `json:"userID"`
	UserName             string `json:"userName"`
	ReplyCommentID       int    `json:"replyCommentID"`
	ReplyContent         string `json:"replyContent"`
	ReplyTime            string `json:"replyTime"`
	OriginalReplyContent string `json:"originalReplyContent"`
}

type PushReplyData

type PushReplyData struct {
	ID                   int    `json:"id"`
	UserID               int    `json:"userID"`
	UserName             string `json:"userName"`
	ReplyCommentID       int    `json:"replyComemntID"`
	ReplyContent         string `json:"replyContent"`
	ReplyToUserID        int    `json:"replyToUserID"`
	ReplyToUserName      string `json:"replyToUserName"`
	ReplyTime            string `json:"replyTime"`
	IsPush               int    `json:"isPush"`
	OriginalReplyContent string `json:"originalReplyContent"`
}

type ReplyInformation

type ReplyInformation struct {
	ID           int    `json:"id"`
	ReplyTime    string `json:"replyTime"`
	CommentID    int    `json:"commentID"`
	UserID       int    `json:"userID"`
	UserName     string `json:"userName"`
	ReplyContent string `json:"replyContent"`
}

type SearchInfo

type SearchInfo struct {
	ID       int    `json:"id"`
	UserName string `json:"userName"`
}

type UserCommentData

type UserCommentData struct {
	ID             int    `json:"id"`
	CommentTime    string `json:"commentTime"`
	UserName       string `json:"userName"`
	CommentTitle   string `json:"commentTitle"`
	ComemntContent string `json:"commentContent"`
	UserID         int    `json:"userID"`
	IsLike         string `json:"isLike"`
	IsFollow       string `json:"isFollow"`
	IsCollect      string `json:"isCollect"`
	LikeNum        int    `json:"likeNum"`
	ReplyNum       int    `json:"replyNum"`
	ImageURL       string `json:"imageUrl"`
	Location       string `json:"location"`
}

type UserInfo

type UserInfo struct {
	ID                     int    `json:"id"`
	UserName               string `json:"userName"`
	FocusNumber            int    `json:"focusNumber"`
	FansNumber             int    `json:"fansNumber"`
	Permission             int    `json:"permission"`
	FocusAndFansPermission int    `json:"focusAndFansPermission"`
}

Jump to

Keyboard shortcuts

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