models

package
v0.0.0-...-5859b4f Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

*

  • Created by IDEA.
  • User: godsoul

*

  • Created by IDEA.
  • User: godsoul

Index

Constants

This section is empty.

Variables

View Source
var (
	Db  *gorm.DB
	RPC *rpc.Client
)

Functions

func CheckUser

func CheckUser(account, uuid string) bool

检查用户登录状态

func GetRedis

func GetRedis()

测试hmget

func GetUid

func GetUid(account string) (int64, *custerror.Error)

根据账号获取uid

func InitRPC

func InitRPC() error

func UserLoginList

func UserLoginList()

异步更新用户登录

Types

type NoArg

type NoArg struct {
}

type NoReply

type NoReply struct {
}

type Push

type Push struct {
	Openid   int
	Nickname string
	Content  string
	Roomid   int
	IP       string
}

type User

type User struct {
	Uid      int64  `gorm:"primary_key" redis:"uid"`
	Account  string `redis:"account"`
	Nickname string `gorm:"-" redis:"nickname"`
	Openid   int    `redis:"openid"`
	IsReg    int    `redis:"is_reg"`
	IP       string `gorm:"-" redis:"-"`
}

func GetUserByAccount

func GetUserByAccount(account string) *User

根据账号获取用户

func (*User) Login

func (u *User) Login(uuid string) (interface{}, *custerror.Error)

用户登录

func (User) TableName

func (User) TableName() string

func (*User) UserPush

func (u *User) UserPush(roomid int, nickname, content, ip string) (interface{}, *custerror.Error)

直播弹幕

Directories

Path Synopsis
db
rds
* * Created by IDEA.
* * Created by IDEA.

Jump to

Keyboard shortcuts

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