Documentation ¶
Index ¶
- Constants
- Variables
- func EncryptPassword(salt, password string) string
- func FormatNow(format string) string
- func Md5String(src string) string
- func RandString(stringType, n int) string
- func Salt() string
- func Sms_code() string
- func StringInSlice(a string, list []string) bool
- func Token(uid int, ip string) string
- func ValidationErrorToString(e []*revel.ValidationError) string
- type TrackResult
Constants ¶
View Source
const ( SMS_EXPIRY = 5 //验证码有效期 单位分钟 URL_CLIENT_ID_KEY = "client_id" URL_TOKEN_KEY = "token" URL_CLIENT_ID = "cf23df2207d99a74" )
common
View Source
const ( COMPANY_USER_STATUS_CHECK_NO = 0 COMPANY_USER_STATUS_CHECK_YES = 1 COMPANY_USER_STATUS_DELETE = 2 )
company user
View Source
const ( TASK_STATUS_INIT = 0 TASK_STATUS_DOING = 1 TASK_STATUS_DONE = 2 TASK_PRIORITY_LOW = 1 TASK_PRIORITY_NORMAL = 2 TASK_PRIORITY_HIGH = 3 TASK_IS_READ = 1 TASK_UN_READ = 0 )
View Source
const ( Alnum = iota Alpha Numeric )
View Source
const (
COMPANY_NAME_MINSIZE = 4
)
company
View Source
const (
PROJECT_NAME_MINSIZE = 4
)
project
Variables ¶
View Source
var UPLOAD_ALLOWED_FILE_TYPE []string = []string{"avatar", "companyLogo"}
Functions ¶
func RandString ¶
func StringInSlice ¶
func ValidationErrorToString ¶
func ValidationErrorToString(e []*revel.ValidationError) string
Types ¶
type TrackResult ¶
type TrackResult struct { Code int `json:"code"` Data interface{} `json:"data"` Message string `json:"message"` }
func WrapFailJsonResult ¶
func WrapFailJsonResult(message string) *TrackResult
func WrapJsonResult ¶
func WrapJsonResult(c int, d interface{}, m string) *TrackResult
func WrapOKJsonResult ¶
func WrapOKJsonResult(data interface{}) *TrackResult
func WrapValidationFailJsonResult ¶
func WrapValidationFailJsonResult(code int, e []*revel.ValidationError) *TrackResult
Click to show internal directories.
Click to hide internal directories.