controllers

package
v0.0.0-...-5cc725f Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2018 License: MIT Imports: 29 Imported by: 0

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

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 ApiResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

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) GetUser

func (this *BaseController) GetUser() (*models.Users, error)

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 CreatePaymentParams struct {
	Fee    string
	Method string
}

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 (this *FileInfo) ValidateSize() (valid bool)

func (*FileInfo) ValidateType

func (this *FileInfo) ValidateType() (valid bool)

type FindAvatar

type FindAvatar struct {
	Uid string
}

type GithubController

type GithubController struct {
	BaseController
}

func (*GithubController) Login

func (this *GithubController) Login()

type ListPayment

type ListPayment struct {
	PageSize   int         `json:"pageSize"`
	PageNumber int         `json:"pageNumber"`
	PageCount  int64       `json:"pageCount"`
	Table      interface{} `json:"table"`
}

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 MessageParams struct {
	Phone   string `json:"phone"`
	Captcha string `json:"captcha"`
}

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 Page

type Page struct {
	PageSize  int
	PageNumer int
}

type PassworCompare

type PassworCompare struct {
	Password  string
	Salt      string
	Generated string
}

type PasswordEncrpt

type PasswordEncrpt struct {
	Salt     string
	Password string
}

type PasswordReset

type PasswordReset struct {
	Phone       string
	Password    string
	MessageCode string
}

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 Sizer

type Sizer interface {
	Size() int64
}

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 UserCreate struct {
	UserName    string `json:"username"`
	Email       string `json:"email"`
	Password    string `json:"password"`
	Phone       string `json:"phone"`
	MessageCode string `json:"messageCode"`
}

type UserInfoStruct

type UserInfoStruct struct {
	Uid       int    `json:"uid"`
	UserName  string `json:"username"`
	TrueName  string `json:"truename"`
	UserGroup int    `json:"usergroup"`
	Email     string `json:"email"`
	Status    int    `json:"status"`
	Credits   int    `json:"credits"`
	Money     int    `json:"money"`
}

type UserLogin

type UserLogin struct {
	UserName string `json:"username"`
	Password string `json:"password"`
	Captcha  string `json:"captcha"`
}

Jump to

Keyboard shortcuts

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