model

package
v0.0.0-...-c6615d0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKey     = "ContextKey"     // 上下文变量存储键名
	ContextKeyGrpc = "ContextKeyGrpc" // 服务间上下文变量存储键名
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Session *gsession.Session // 当前Session管理对象
	User    *ContextUser      // 上下文用户信息(与Session中的数据结构不同)
	Grpc    *ContextGrpc      // 服务间上下文信息
}

内部方法请求上下文结构

type ContextGrpc

type ContextGrpc struct {
	User *ContextUser // 服务间上下文用户信息目前是和ContextUser一致,后期可能会不同
}

服务间请求上下文中的信息

type ContextUser

type ContextUser struct {
	Id       uint   // 用户ID
	Passport string // 用户账号
	Nickname string // 用户名称
}

内部方法请求上下文中的用户信息

type ServiceUserSignInReq

type ServiceUserSignInReq struct {
	Passport string
	Password string
	Agent    string
}

登录输入参数

type ServiceUserSignUpReq

type ServiceUserSignUpReq struct {
	Passport string
	Password string
	Nickname string
}

注册输入参数

type Session

type Session struct {
	User       *User       // 用户信息
	LoginTime  *gtime.Time // 登录时间
	LoginAgent string      // 登录终端
}

Session存储数据结构

type User

type User internal.User

User is the golang structure for table user.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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