Documentation ¶
Overview ¶
* @Author: zhenwei zhang * @Date: 2018-03-29 18:19:49 * @Last Modified by: zhenwei zhang * @Last Modified time: 2018-06-24 19:17:05
Index ¶
- Constants
- type AlipayController
- type ApiResponse
- type AvatarUpload
- type BaseController
- func (this *BaseController) ApiLogin()
- func (this *BaseController) DisplayJson(code int, message string, data interface{})
- func (this *BaseController) GetClientIp() string
- func (this *BaseController) GetUser() (*models.Users, error)
- func (this *BaseController) Prepare()
- func (this *BaseController) ShouldLogin()
- type CheckUserName
- type CreatePaymentParams
- type ErrorController
- type FileInfo
- type FindAvatar
- type GithubController
- type ListPayment
- type MessageCodeController
- type MessageParams
- type OSSController
- type Page
- type PassworCompare
- type PasswordEncrpt
- type PasswordReset
- type PaymentController
- type ResponseData
- type SiteController
- type Sizer
- type UserController
- func (this *UserController) AutoBind()
- func (this *UserController) Avatar()
- func (this *UserController) Bind()
- func (this *UserController) Captcha()
- func (this *UserController) ComparePassword(comp *PassworCompare) bool
- func (this *UserController) Create()
- func (this *UserController) GeneratePassword(password string, salt string) (generated string)
- func (this *UserController) GenerateSalt(n int) string
- func (this *UserController) Get()
- func (this *UserController) GetUserInfo()
- func (this *UserController) InsertUser(data *UserCreate, encrpt *PasswordEncrpt) bool
- func (this *UserController) Login()
- func (this *UserController) LoginByUid(uid int) bool
- func (this *UserController) Logout()
- func (this *UserController) PhoneNumberExits(number string) bool
- func (this *UserController) Reset()
- func (this *UserController) UpdateAvatar()
- func (this *UserController) UserNameExits()
- type UserCreate
- type UserInfoStruct
- type UserLogin
Constants ¶
View Source
const ( LOCAL_FILE_DIR = "uploads/file" MIN_FILE_SIZE = 1 MAX_FILE_SIZE = 5000000 IMAGE_TYPES = "(zip|rar|bmp|exe|doc|docx|csv|txt|mp3|mp4|jpg|gif|p?jpeg|(x-)?png)" ACCEPT_FILE_TYPES = IMAGE_TYPES EXPIRATION_TIME = 300 THUMBNAIL_PARAM = "=s80" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlipayController ¶
type AlipayController struct {
BaseController
}
func (*AlipayController) Native ¶
func (this *AlipayController) Native()
func (*AlipayController) Notify ¶
func (this *AlipayController) Notify()
func (*AlipayController) Return ¶
func (this *AlipayController) Return()
type ApiResponse ¶
type AvatarUpload ¶
type AvatarUpload struct {
ImageUrl string `json:"imageUrl"`
}
type BaseController ¶
type BaseController struct { beego.Controller // contains filtered or unexported fields }
func (*BaseController) ApiLogin ¶
func (this *BaseController) ApiLogin()
func (*BaseController) DisplayJson ¶
func (this *BaseController) DisplayJson(code int, message string, data interface{})
func (*BaseController) GetClientIp ¶
func (this *BaseController) GetClientIp() string
func (*BaseController) Prepare ¶
func (this *BaseController) Prepare()
func (*BaseController) ShouldLogin ¶
func (this *BaseController) ShouldLogin()
type CheckUserName ¶
type CheckUserName struct {
UserName string `json:"username"`
}
type CreatePaymentParams ¶
type ErrorController ¶
type ErrorController struct {
beego.Controller
}
func (*ErrorController) Error404 ¶
func (this *ErrorController) Error404()
func (*ErrorController) Error501 ¶
func (this *ErrorController) Error501()
func (*ErrorController) ErrorDb ¶
func (this *ErrorController) ErrorDb()
func (*ErrorController) IE ¶
func (this *ErrorController) IE()
type FileInfo ¶
type FileInfo struct { Url string `json:"url,omitempty"` ThumbnailUrl string `json:"thumbnailUrl,omitempty"` Name string `json:"name"` Type string `json:"type"` Size int64 `json:"size"` Error string `json:"error,omitempty"` DeleteUrl string `json:"deleteUrl,omitempty"` DeleteType string `json:"deleteType,omitempty"` }
func (*FileInfo) ValidateSize ¶
func (*FileInfo) ValidateType ¶
type FindAvatar ¶
type FindAvatar struct {
Uid string
}
type GithubController ¶
type GithubController struct {
BaseController
}
func (*GithubController) Login ¶
func (this *GithubController) Login()
type ListPayment ¶
type MessageCodeController ¶
type MessageCodeController struct {
BaseController
}
func (*MessageCodeController) Send ¶
func (this *MessageCodeController) Send()
func (*MessageCodeController) TemplateCompiler ¶
func (this *MessageCodeController) TemplateCompiler(template string, code string) string
type MessageParams ¶
type OSSController ¶
type OSSController struct {
BaseController
}
func (*OSSController) List ¶
func (this *OSSController) List()
func (*OSSController) OSSUpload ¶
func (c *OSSController) OSSUpload(imgPath string) bool
func (*OSSController) OssDelete ¶
func (this *OSSController) OssDelete(object string) error
func (*OSSController) Upload ¶
func (this *OSSController) Upload()
type PassworCompare ¶
type PasswordEncrpt ¶
type PasswordReset ¶
type PaymentController ¶
type PaymentController struct {
BaseController
}
func (*PaymentController) Create ¶
func (this *PaymentController) Create()
func (*PaymentController) List ¶
func (this *PaymentController) List()
type ResponseData ¶
type ResponseData struct {
ImageUrl string `json:"imageUrl"`
}
type SiteController ¶
type SiteController struct {
BaseController
}
func (*SiteController) Get ¶
func (this *SiteController) Get()
type UserController ¶
type UserController struct {
OSSController
}
func (*UserController) AutoBind ¶
func (this *UserController) AutoBind()
func (*UserController) Avatar ¶
func (this *UserController) Avatar()
func (*UserController) Bind ¶
func (this *UserController) Bind()
func (*UserController) Captcha ¶
func (this *UserController) Captcha()
func (*UserController) ComparePassword ¶
func (this *UserController) ComparePassword(comp *PassworCompare) bool
func (*UserController) Create ¶
func (this *UserController) Create()
func (*UserController) GeneratePassword ¶
func (this *UserController) GeneratePassword(password string, salt string) (generated string)
func (*UserController) GenerateSalt ¶
func (this *UserController) GenerateSalt(n int) string
func (*UserController) Get ¶
func (this *UserController) Get()
func (*UserController) GetUserInfo ¶
func (this *UserController) GetUserInfo()
func (*UserController) InsertUser ¶
func (this *UserController) InsertUser(data *UserCreate, encrpt *PasswordEncrpt) bool
func (*UserController) Login ¶
func (this *UserController) Login()
func (*UserController) LoginByUid ¶
func (this *UserController) LoginByUid(uid int) bool
func (*UserController) Logout ¶
func (this *UserController) Logout()
func (*UserController) PhoneNumberExits ¶
func (this *UserController) PhoneNumberExits(number string) bool
func (*UserController) Reset ¶
func (this *UserController) Reset()
func (*UserController) UpdateAvatar ¶
func (this *UserController) UpdateAvatar()
func (*UserController) UserNameExits ¶
func (this *UserController) UserNameExits()
type UserCreate ¶
type UserInfoStruct ¶
Click to show internal directories.
Click to hide internal directories.