Documentation ¶
Overview ¶
Copyright 2017 by GoWeb author: gdccmcm14@live.com. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License
Index ¶
- func InitData()
- func InsertUser()
- type User
- func GetUsableUserByUsername(username string) (user User, err error)
- func GetUserByUsername(username string) (user User, err error)
- func GetUserOnlyByUsername(username string) (user User)
- func ListUserByUsername(offset, limit int) []*User
- func SearchUserByUsername(username string) []*User
- func UpdateLoginTime(u *User) User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { Id int64 Logincount int `orm:"column(logincount)" form:"logincount" json:"loginCount"` Username string `orm:"unique;size(32)" form:"Username" valid:"Required;MaxSize(20);MinSize(6)" json:"username"` Password string `orm:"size(32)" form:"Password" valid:"Required;MaxSize(20);MinSize(6)" json:"password"` Repassword string `orm:"-" form:"Repassword" valid:"Required" json:"repassword"` Nickname string `orm:"unique;size(32)" form:"Nickname" valid:"Required;MaxSize(20);MinSize(2)" json:"nickname"` Email string `orm:"size(32)" form:"Email" valid:"Email" json:"email"` Remark string `orm:"null;size(200)" form:"Remark" valid:"MaxSize(200)" json:"remark"` Status int `orm:"default(2)" form:"Status" valid:"Range(0,1)" json:"status"` Lastlogintime time.Time `orm:"null;type(datetime)" form:"-" json:"lastLoginTime"` Createtime time.Time `orm:"type(datetime)" json:"createTime"` Lastip string `json:"lastip"` }
func GetUsableUserByUsername ¶
func GetUserByUsername ¶
func GetUserOnlyByUsername ¶
func ListUserByUsername ¶
func SearchUserByUsername ¶
func UpdateLoginTime ¶
Click to show internal directories.
Click to hide internal directories.