Documentation ¶
Index ¶
- func LoadFuncs()
- func LoadIl8n()
- type BaseController
- func (this *BaseController) BadRequest(data interface{})
- func (this *BaseController) DeleteCacheOnLogout(keys ...string)
- func (this *BaseController) DisableXSRF(pathList []string)
- func (this *BaseController) Finally()
- func (this *BaseController) Finish()
- func (this *BaseController) FlashRead()
- func (this *BaseController) GetBoolByKey(key string) bool
- func (this *BaseController) GetBoolParam(key string) bool
- func (this *BaseController) GetCurrentTime() time.Time
- func (this *BaseController) GetCurrentTimeUnix() int64
- func (this *BaseController) GetDateByKey(key string) (time.Time, error)
- func (this *BaseController) GetHeaderByName(name string) string
- func (this *BaseController) GetHeaderByNames(names ...string) string
- func (this *BaseController) GetId() int64
- func (this *BaseController) GetInt32Param(key string) int
- func (this *BaseController) GetIntByKey(key string) int64
- func (this *BaseController) GetIntParam(key string) int64
- func (this *BaseController) GetMessage(key string, args ...interface{}) string
- func (this *BaseController) GetPage() *db.Page
- func (this *BaseController) GetPageWithDefaultLimit(defaultLimit int64) *db.Page
- func (this *BaseController) GetParam(key string) string
- func (this *BaseController) GetStringByKey(key string) string
- func (this *BaseController) GetStringParam(key string) string
- func (this *BaseController) GetToken() string
- func (this *BaseController) HasPath(paths ...string) bool
- func (this *BaseController) Int64ToString(val int64) string
- func (this *BaseController) IntToString(val int) string
- func (this *BaseController) IsAjax() bool
- func (this *BaseController) IsJson() bool
- func (this *BaseController) Log(format string, v ...interface{})
- func (this *BaseController) LogoutHanlder()
- func (this *BaseController) NestPrepareBase()
- func (this *BaseController) NotFound()
- func (this *BaseController) Ok()
- func (this *BaseController) OkAsHtml(message string)
- func (this *BaseController) OkAsJson(format string, v ...interface{})
- func (this *BaseController) OkAsText(message string)
- func (this *BaseController) OnEntities(viewName string, entities interface{})
- func (this *BaseController) OnEntitiesWithTotalCount(viewName string, entities interface{}, totalCount int64)
- func (this *BaseController) OnEntity(viewName string, entity interface{})
- func (this *BaseController) OnEntityAny(view string, entity interface{}, format string, v ...interface{})
- func (this *BaseController) OnEntityError(viewName string, entity interface{}, format string, v ...interface{})
- func (this *BaseController) OnEntityErrorAny(view string, entity interface{}, format string, v ...interface{})
- func (this *BaseController) OnErrorAny(path string, format string, v ...interface{})
- func (this *BaseController) OnFlash(store bool)
- func (this *BaseController) OnJson(json support.JsonResult)
- func (this *BaseController) OnJson200()
- func (this *BaseController) OnJsonError(format string, v ...interface{})
- func (this *BaseController) OnJsonErrorNotRollback(format string, v ...interface{})
- func (this *BaseController) OnJsonMap(jsonMap map[string]interface{})
- func (this *BaseController) OnJsonMessage(format string, v ...interface{})
- func (this *BaseController) OnJsonOk(format string, v ...interface{})
- func (this *BaseController) OnJsonParseForm(entity interface{})
- func (this *BaseController) OnJsonParseFormWithFieldsConfigs(entity interface{}, configs map[string]string)
- func (this *BaseController) OnJsonResult(result interface{})
- func (this *BaseController) OnJsonResultAndResults(result interface{}, results interface{})
- func (this *BaseController) OnJsonResultAndResultsWithTotalCount(result interface{}, results interface{}, totalCount int64)
- func (this *BaseController) OnJsonResultError(result interface{}, format string, v ...interface{})
- func (this *BaseController) OnJsonResultWithMessage(result interface{}, format string, v ...interface{})
- func (this *BaseController) OnJsonResults(results interface{})
- func (this *BaseController) OnJsonResultsError(results interface{}, format string, v ...interface{})
- func (this *BaseController) OnJsonResultsWithTotalCount(results interface{}, totalCount int64)
- func (this *BaseController) OnJsonValidationError()
- func (this *BaseController) OnJsonValidationWithErrors(errors map[string]string)
- func (this *BaseController) OnJsonValidationWithResultAndMessageAndErrors(result interface{}, message string, errors map[string]string)
- func (this *BaseController) OnJsonValidationWithResultsAndMessageAndErrors(results interface{}, message string, errors map[string]string)
- func (this *BaseController) OnOkAny(path string, format string, v ...interface{})
- func (this *BaseController) OnParseForm(entity interface{})
- func (this *BaseController) OnParseJson(entity interface{})
- func (this *BaseController) OnPureTemplate(templateName string)
- func (this *BaseController) OnRedirect(action string)
- func (this *BaseController) OnRedirectError(action string, format string, v ...interface{})
- func (this *BaseController) OnRedirectSuccess(action string, format string, v ...interface{})
- func (this *BaseController) OnResult(viewName string, result interface{})
- func (this *BaseController) OnResults(viewName string, results interface{})
- func (this *BaseController) OnResultsAny(viewName string, results interface{})
- func (this *BaseController) OnResultsWithTotalCount(viewName string, results interface{}, totalCount int64)
- func (this *BaseController) OnResultsWithTotalCountAny(viewName string, results interface{}, totalCount int64)
- func (this *BaseController) OnTemplate(viewName string)
- func (this *BaseController) OnValidate(entity interface{}, custonValidation func(validator *validation.Validation)) bool
- func (this *BaseController) OnValidationErrorAny(view string, entity interface{})
- func (this *BaseController) ParamParseFloat(s string) float64
- func (this *BaseController) ParamParseMoney(s string) float64
- func (this *BaseController) ParseDate(date string) (time.Time, error)
- func (this *BaseController) ParseDateByKey(key string, layout string) (time.Time, error)
- func (this *BaseController) ParseDateTime(date string) (time.Time, error)
- func (this *BaseController) ParseJsonDate(date string) (time.Time, error)
- func (this *BaseController) RawBody() []byte
- func (this *BaseController) Recover(info interface{})
- func (this *BaseController) RenderJson(opt interface{})
- func (this *BaseController) RenderJsonResult(opt interface{})
- func (this *BaseController) Rollback()
- func (this *BaseController) ServerError()
- func (this *BaseController) StringToInt(text string) int
- func (this *BaseController) StringToInt64(text string) int64
- type Multipart
- type NestFinisher
- type NestPreparer
- type NestRecover
- type NestWebController
- type RecoverInfo
- type WebController
- func (this *WebController) AppAuth()
- func (this *WebController) Audit(format string, v ...interface{})
- func (this *WebController) AuthCheck()
- func (this *WebController) AuthCheckAdmin()
- func (this *WebController) AuthCheckRoot()
- func (this *WebController) AuthPrepare()
- func (this *WebController) BadRequest()
- func (this *WebController) CheckboxToBool(key string) bool
- func (this *WebController) CreateSession() *db.Session
- func (this *WebController) DeleteCacheOnLogout(keys ...string)
- func (this *WebController) DisableXSRF(pathList []string)
- func (this *WebController) Finally()
- func (this *WebController) Finish()
- func (this *WebController) FlashError(msg string, args ...interface{}) *WebController
- func (this *WebController) FlashNotice(msg string, args ...interface{}) *WebController
- func (this *WebController) FlashRead()
- func (this *WebController) FlashSuccess(msg string, args ...interface{}) *WebController
- func (this *WebController) FlashWarn(msg string, args ...interface{}) *WebController
- func (this *WebController) Forbidden()
- func (this *WebController) Form2Json(entity interface{})
- func (this *WebController) Form2JsonWithCnf(entity interface{}, configs map[string]string)
- func (this *WebController) GetAuditorInfo() *services.AuditorInfo
- func (this *WebController) GetAuthTenant() *models.Tenant
- func (this *WebController) GetAuthTenantSession() *models.Tenant
- func (this *WebController) GetAuthUser() *models.User
- func (this *WebController) GetBoolByKey(key string) bool
- func (this *WebController) GetBoolParam(key string) bool
- func (this *WebController) GetCurrentTime() time.Time
- func (this *WebController) GetCurrentTimeUnix() int64
- func (this *WebController) GetDateByKey(key string) (time.Time, error)
- func (this *WebController) GetFileOpt(key string) *optional.Optional[*Multipart]
- func (this *WebController) GetHeaderByName(name string) string
- func (this *WebController) GetHeaderByNames(names ...string) string
- func (this *WebController) GetId() int64
- func (this *WebController) GetInt32Param(key string) int
- func (this *WebController) GetIntByKey(key string) int64
- func (this *WebController) GetIntParam(key string) int64
- func (this *WebController) GetJsonResult() (*support.JsonResult, bool)
- func (this *WebController) GetLastUpdate() time.Time
- func (this *WebController) GetLogin() *models.User
- func (this *WebController) GetMessage(key string, args ...interface{}) string
- func (this *WebController) GetPage() *db.Page
- func (this *WebController) GetParam(key string) string
- func (this *WebController) GetStringByKey(key string) string
- func (this *WebController) GetStringParam(key string) string
- func (this *WebController) GetToken() string
- func (this *WebController) GetTokenLogin() *models.User
- func (this *WebController) GetUploadedFileExt(fieldName string, required bool) (bool, string, error)
- func (this *WebController) GetUploadedFileSavePath(fieldName string) string
- func (this *WebController) HasPath(paths ...string) bool
- func (this *WebController) HasTenantAuth(tenant *models.Tenant) bool
- func (this *WebController) HasUploadedFile(fname string) (bool, error)
- func (this *WebController) Int64ToString(val int64) string
- func (this *WebController) IntToString(val int) string
- func (this *WebController) IsAjax() bool
- func (this *WebController) IsJson() bool
- func (this *WebController) LoadModels()
- func (this *WebController) LoadTenants()
- func (this *WebController) Log(format string, v ...interface{})
- func (this *WebController) LogOut()
- func (this *WebController) LoginPath() string
- func (this *WebController) NormalizePageSortKey(key string) string
- func (this *WebController) NotFound()
- func (this *WebController) NotFoundAsJson()
- func (this *WebController) Ok()
- func (this *WebController) OkAsHtml(message string)
- func (this *WebController) OkAsJson(format string, v ...interface{})
- func (this *WebController) OkAsText(message string)
- func (this *WebController) OnEntities(viewName string, entities interface{})
- func (this *WebController) OnEntitiesWithTotalCount(viewName string, entities interface{}, totalCount int64)
- func (this *WebController) OnEntity(viewName string, entity interface{})
- func (this *WebController) OnEntityAny(view string, entity interface{}, format string, v ...interface{})
- func (this *WebController) OnEntityError(viewName string, entity interface{}, format string, v ...interface{})
- func (this *WebController) OnEntityErrorAny(view string, entity interface{}, format string, v ...interface{})
- func (this *WebController) OnEntityFail(viewName string, entity interface{}, fail *optional.Fail)
- func (this *WebController) OnErrorAny(path string, format string, v ...interface{})
- func (this *WebController) OnFlash(store bool)
- func (this *WebController) OnFullTemplate(tplName string)
- func (this *WebController) OnJson(json *support.JsonResult)
- func (this *WebController) OnJson200()
- func (this *WebController) OnJsonError(format string, v ...interface{})
- func (this *WebController) OnJsonErrorNotRollback(format string, v ...interface{})
- func (this *WebController) OnJsonMap(jsonMap map[string]interface{})
- func (this *WebController) OnJsonMessage(format string, v ...interface{})
- func (this *WebController) OnJsonOk(format string, v ...interface{})
- func (this *WebController) OnJsonPage(page *criteria.Page)
- func (this *WebController) OnJsonParseForm(entity interface{})
- func (this *WebController) OnJsonParseFormWithFieldsConfigs(entity interface{}, configs map[string]string)
- func (this *WebController) OnJsonResult(result interface{})
- func (this *WebController) OnJsonResultAndResults(result interface{}, results interface{})
- func (this *WebController) OnJsonResultAndResultsWithTotalCount(result interface{}, results interface{}, totalCount int64)
- func (this *WebController) OnJsonResultError(result interface{}, format string, v ...interface{})
- func (this *WebController) OnJsonResultWithMessage(result interface{}, format string, v ...interface{})
- func (this *WebController) OnJsonResults(results interface{})
- func (this *WebController) OnJsonResultsError(results interface{}, format string, v ...interface{})
- func (this *WebController) OnJsonResultsWithTotalCount(results interface{}, totalCount int64)
- func (this *WebController) OnJsonValidationError()
- func (this *WebController) OnJsonValidationMessageWithErrors(message string, errors map[string]string)
- func (this *WebController) OnJsonValidationWithErrors(errors map[string]string)
- func (this *WebController) OnJsonValidationWithResultAndMessageAndErrors(result interface{}, message string, errors map[string]string)
- func (this *WebController) OnJsonValidationWithResultsAndMessageAndErrors(results interface{}, message string, errors map[string]string)
- func (this *WebController) OnLoginRedirect()
- func (this *WebController) OnOkAny(path string, format string, v ...interface{})
- func (this *WebController) OnParseForm(entity interface{})
- func (this *WebController) OnParseJson(entity interface{})
- func (this *WebController) OnPureTemplate(templateName string)
- func (this *WebController) OnRedirect(action string, args ...interface{})
- func (this *WebController) OnRedirectError(action string, format string, v ...interface{})
- func (this *WebController) OnRedirectSuccess(action string, format string, v ...interface{})
- func (this *WebController) OnRender(data interface{})
- func (this *WebController) OnResult(viewName string, result interface{})
- func (this *WebController) OnResults(viewName string, results interface{})
- func (this *WebController) OnResultsAny(viewName string, results interface{})
- func (this *WebController) OnResultsWithTotalCount(viewName string, results interface{}, totalCount int64)
- func (this *WebController) OnResultsWithTotalCountAny(viewName string, results interface{}, totalCount int64)
- func (this *WebController) OnTemplate(viewName string)
- func (this *WebController) OnTemplateWithData(viewName string, data map[string]interface{})
- func (this *WebController) OnValidate(entity interface{}, custonValidation func(validator *validation.Validation)) bool
- func (this *WebController) OnValidationErrorAny(view string, entity interface{})
- func (this *WebController) ParamParseFloat(s string) float64
- func (this *WebController) ParamParseMoney(s string) float64
- func (this *WebController) ParseDate(date string) (time.Time, error)
- func (this *WebController) ParseDateByKey(key string, layout string) (time.Time, error)
- func (this *WebController) ParseDateTime(date string) (time.Time, error)
- func (this *WebController) ParseJsonDate(date string) (time.Time, error)
- func (this *WebController) Prepare()
- func (this *WebController) PrepareUploadedFile(fileOriginalName string, fileName string) (string, string, error)
- func (this *WebController) RawBody() []byte
- func (this *WebController) Recover(info interface{})
- func (this *WebController) RenderJson(opt interface{})
- func (this *WebController) RenderJsonError(format string, v ...interface{})
- func (this *WebController) RenderJsonMap(jsonMap map[string]interface{})
- func (this *WebController) RenderJsonResult(opt interface{})
- func (this *WebController) RenderTemplate(viewName string)
- func (this *WebController) Rollback()
- func (this *WebController) ServeJSON()
- func (this *WebController) ServerError()
- func (this *WebController) SessionLogOut()
- func (this *WebController) SetAuthTenant(t *models.Tenant)
- func (this *WebController) SetAuthTenantSession(tenant *models.Tenant)
- func (this *WebController) SetAuthUser(u *models.User)
- func (this *WebController) SetCustonJsonEncoder(f func(interface{}) ([]byte, error)) *WebController
- func (this *WebController) SetData(values ...interface{}) *WebController
- func (this *WebController) SetJsonPackageAsCamelCase() *WebController
- func (this *WebController) SetLogin(user *models.User)
- func (this *WebController) SetParams()
- func (this *WebController) SetResult(result interface{}) *WebController
- func (this *WebController) SetResults(results interface{}) *WebController
- func (this *WebController) SetResultsAndTotalCount(results interface{}, totalCount int64) *WebController
- func (this *WebController) SetTokenLogin(user *models.User)
- func (this *WebController) SetUseJsonPackage() *WebController
- func (this *WebController) SetViewModel(name string, data interface{}) *WebController
- func (this *WebController) StringToInt(text string) int
- func (this *WebController) StringToInt64(text string) int64
- func (this *WebController) Unauthorized()
- func (this *WebController) UpSecurityAuth() bool
- func (this *WebController) WebControllerCreateSession() *db.Session
- func (this *WebController) WebControllerLoadModels()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseController ¶
type BaseController struct { EntityValidator *validator.EntityValidator beego.Controller Flash *beego.FlashData Session *db.Session support.JsonParser ViewPath string i18n.Locale CacheService *cache.CacheService CacheKeysDeleteOnLogOut []string // contains filtered or unexported fields }
func (*BaseController) BadRequest ¶
func (this *BaseController) BadRequest(data interface{})
func (*BaseController) DeleteCacheOnLogout ¶
func (this *BaseController) DeleteCacheOnLogout(keys ...string)
func (*BaseController) DisableXSRF ¶
func (this *BaseController) DisableXSRF(pathList []string)
func (*BaseController) Finally ¶
func (this *BaseController) Finally()
func (*BaseController) Finish ¶
func (this *BaseController) Finish()
func (*BaseController) FlashRead ¶
func (this *BaseController) FlashRead()
func (*BaseController) GetBoolByKey ¶
func (this *BaseController) GetBoolByKey(key string) bool
func (*BaseController) GetBoolParam ¶
func (this *BaseController) GetBoolParam(key string) bool
func (*BaseController) GetCurrentTime ¶
func (this *BaseController) GetCurrentTime() time.Time
func (*BaseController) GetCurrentTimeUnix ¶
func (this *BaseController) GetCurrentTimeUnix() int64
func (*BaseController) GetDateByKey ¶
func (this *BaseController) GetDateByKey(key string) (time.Time, error)
func (*BaseController) GetHeaderByName ¶
func (this *BaseController) GetHeaderByName(name string) string
func (*BaseController) GetHeaderByNames ¶
func (this *BaseController) GetHeaderByNames(names ...string) string
func (*BaseController) GetId ¶
func (this *BaseController) GetId() int64
func (*BaseController) GetInt32Param ¶
func (this *BaseController) GetInt32Param(key string) int
func (*BaseController) GetIntByKey ¶
func (this *BaseController) GetIntByKey(key string) int64
func (*BaseController) GetIntParam ¶
func (this *BaseController) GetIntParam(key string) int64
func (*BaseController) GetMessage ¶
func (this *BaseController) GetMessage(key string, args ...interface{}) string
func (*BaseController) GetPage ¶
func (this *BaseController) GetPage() *db.Page
func (*BaseController) GetPageWithDefaultLimit ¶
func (this *BaseController) GetPageWithDefaultLimit(defaultLimit int64) *db.Page
func (*BaseController) GetParam ¶
func (this *BaseController) GetParam(key string) string
func (*BaseController) GetStringByKey ¶
func (this *BaseController) GetStringByKey(key string) string
func (*BaseController) GetStringParam ¶
func (this *BaseController) GetStringParam(key string) string
func (*BaseController) GetToken ¶
func (this *BaseController) GetToken() string
func (*BaseController) HasPath ¶
func (this *BaseController) HasPath(paths ...string) bool
func (*BaseController) Int64ToString ¶
func (this *BaseController) Int64ToString(val int64) string
func (*BaseController) IntToString ¶
func (this *BaseController) IntToString(val int) string
func (*BaseController) IsAjax ¶
func (this *BaseController) IsAjax() bool
func (*BaseController) IsJson ¶
func (this *BaseController) IsJson() bool
func (*BaseController) Log ¶
func (this *BaseController) Log(format string, v ...interface{})
func (*BaseController) LogoutHanlder ¶
func (this *BaseController) LogoutHanlder()
func (*BaseController) NestPrepareBase ¶
func (this *BaseController) NestPrepareBase()
Prepare implemented Prepare() method for baseController. It's used for language option check and setting.
func (*BaseController) NotFound ¶
func (this *BaseController) NotFound()
func (*BaseController) Ok ¶
func (this *BaseController) Ok()
func (*BaseController) OkAsHtml ¶
func (this *BaseController) OkAsHtml(message string)
func (*BaseController) OkAsJson ¶
func (this *BaseController) OkAsJson(format string, v ...interface{})
func (*BaseController) OkAsText ¶
func (this *BaseController) OkAsText(message string)
func (*BaseController) OnEntities ¶
func (this *BaseController) OnEntities(viewName string, entities interface{})
func (*BaseController) OnEntitiesWithTotalCount ¶
func (this *BaseController) OnEntitiesWithTotalCount(viewName string, entities interface{}, totalCount int64)
func (*BaseController) OnEntity ¶
func (this *BaseController) OnEntity(viewName string, entity interface{})
func (*BaseController) OnEntityAny ¶
func (this *BaseController) OnEntityAny(view string, entity interface{}, format string, v ...interface{})
executes OnEntity or OnJsonResultWithMessage
func (*BaseController) OnEntityError ¶
func (this *BaseController) OnEntityError(viewName string, entity interface{}, format string, v ...interface{})
func (*BaseController) OnEntityErrorAny ¶
func (this *BaseController) OnEntityErrorAny(view string, entity interface{}, format string, v ...interface{})
executes OnEntity or OnJsonError
func (*BaseController) OnErrorAny ¶
func (this *BaseController) OnErrorAny(path string, format string, v ...interface{})
executes redirect or OnJsonError
func (*BaseController) OnFlash ¶
func (this *BaseController) OnFlash(store bool)
func (*BaseController) OnJson ¶
func (this *BaseController) OnJson(json support.JsonResult)
func (*BaseController) OnJson200 ¶
func (this *BaseController) OnJson200()
func (*BaseController) OnJsonError ¶
func (this *BaseController) OnJsonError(format string, v ...interface{})
func (*BaseController) OnJsonErrorNotRollback ¶
func (this *BaseController) OnJsonErrorNotRollback(format string, v ...interface{})
func (*BaseController) OnJsonMap ¶
func (this *BaseController) OnJsonMap(jsonMap map[string]interface{})
func (*BaseController) OnJsonMessage ¶
func (this *BaseController) OnJsonMessage(format string, v ...interface{})
func (*BaseController) OnJsonOk ¶
func (this *BaseController) OnJsonOk(format string, v ...interface{})
func (*BaseController) OnJsonParseForm ¶
func (this *BaseController) OnJsonParseForm(entity interface{})
func (*BaseController) OnJsonParseFormWithFieldsConfigs ¶
func (this *BaseController) OnJsonParseFormWithFieldsConfigs(entity interface{}, configs map[string]string)
func (*BaseController) OnJsonResult ¶
func (this *BaseController) OnJsonResult(result interface{})
func (*BaseController) OnJsonResultAndResults ¶
func (this *BaseController) OnJsonResultAndResults(result interface{}, results interface{})
func (*BaseController) OnJsonResultAndResultsWithTotalCount ¶
func (this *BaseController) OnJsonResultAndResultsWithTotalCount(result interface{}, results interface{}, totalCount int64)
func (*BaseController) OnJsonResultError ¶
func (this *BaseController) OnJsonResultError(result interface{}, format string, v ...interface{})
func (*BaseController) OnJsonResultWithMessage ¶
func (this *BaseController) OnJsonResultWithMessage(result interface{}, format string, v ...interface{})
func (*BaseController) OnJsonResults ¶
func (this *BaseController) OnJsonResults(results interface{})
func (*BaseController) OnJsonResultsError ¶
func (this *BaseController) OnJsonResultsError(results interface{}, format string, v ...interface{})
func (*BaseController) OnJsonResultsWithTotalCount ¶
func (this *BaseController) OnJsonResultsWithTotalCount(results interface{}, totalCount int64)
func (*BaseController) OnJsonValidationError ¶
func (this *BaseController) OnJsonValidationError()
func (*BaseController) OnJsonValidationWithErrors ¶
func (this *BaseController) OnJsonValidationWithErrors(errors map[string]string)
func (*BaseController) OnJsonValidationWithResultAndMessageAndErrors ¶
func (this *BaseController) OnJsonValidationWithResultAndMessageAndErrors(result interface{}, message string, errors map[string]string)
func (*BaseController) OnJsonValidationWithResultsAndMessageAndErrors ¶
func (this *BaseController) OnJsonValidationWithResultsAndMessageAndErrors(results interface{}, message string, errors map[string]string)
func (*BaseController) OnOkAny ¶
func (this *BaseController) OnOkAny(path string, format string, v ...interface{})
executes redirect or OnJsonOk
func (*BaseController) OnParseForm ¶
func (this *BaseController) OnParseForm(entity interface{})
func (*BaseController) OnParseJson ¶
func (this *BaseController) OnParseJson(entity interface{})
func (*BaseController) OnPureTemplate ¶
func (this *BaseController) OnPureTemplate(templateName string)
func (*BaseController) OnRedirect ¶
func (this *BaseController) OnRedirect(action string)
func (*BaseController) OnRedirectError ¶
func (this *BaseController) OnRedirectError(action string, format string, v ...interface{})
func (*BaseController) OnRedirectSuccess ¶
func (this *BaseController) OnRedirectSuccess(action string, format string, v ...interface{})
func (*BaseController) OnResult ¶
func (this *BaseController) OnResult(viewName string, result interface{})
func (*BaseController) OnResults ¶
func (this *BaseController) OnResults(viewName string, results interface{})
func (*BaseController) OnResultsAny ¶
func (this *BaseController) OnResultsAny(viewName string, results interface{})
executes OnResults or OnJsonResults
func (*BaseController) OnResultsWithTotalCount ¶
func (this *BaseController) OnResultsWithTotalCount(viewName string, results interface{}, totalCount int64)
func (*BaseController) OnResultsWithTotalCountAny ¶
func (this *BaseController) OnResultsWithTotalCountAny(viewName string, results interface{}, totalCount int64)
executes OnResultsWithTotalCount or OnJsonResultsWithTotalCount
func (*BaseController) OnTemplate ¶
func (this *BaseController) OnTemplate(viewName string)
func (*BaseController) OnValidate ¶
func (this *BaseController) OnValidate(entity interface{}, custonValidation func(validator *validation.Validation)) bool
func (*BaseController) OnValidationErrorAny ¶
func (this *BaseController) OnValidationErrorAny(view string, entity interface{})
executes OnEntity or OnJsonValidationError
func (*BaseController) ParamParseFloat ¶
func (this *BaseController) ParamParseFloat(s string) float64
remove ,(virgula) do valor em params que vem como val de input com jquery money exemplo 45,000.00 vira 45000.00
func (*BaseController) ParamParseMoney ¶
func (this *BaseController) ParamParseMoney(s string) float64
func (*BaseController) ParseDate ¶
func (this *BaseController) ParseDate(date string) (time.Time, error)
deprecated
func (*BaseController) ParseDateByKey ¶
func (*BaseController) ParseDateTime ¶
func (this *BaseController) ParseDateTime(date string) (time.Time, error)
deprecated
func (*BaseController) ParseJsonDate ¶
func (this *BaseController) ParseJsonDate(date string) (time.Time, error)
deprecated
func (*BaseController) RawBody ¶
func (this *BaseController) RawBody() []byte
func (*BaseController) Recover ¶
func (this *BaseController) Recover(info interface{})
func (*BaseController) RenderJson ¶
func (this *BaseController) RenderJson(opt interface{})
func (*BaseController) RenderJsonResult ¶
func (this *BaseController) RenderJsonResult(opt interface{})
func (*BaseController) Rollback ¶
func (this *BaseController) Rollback()
func (*BaseController) ServerError ¶
func (this *BaseController) ServerError()
func (*BaseController) StringToInt ¶
func (this *BaseController) StringToInt(text string) int
func (*BaseController) StringToInt64 ¶
func (this *BaseController) StringToInt64(text string) int64
type Multipart ¶
type Multipart struct { FileHeader *multipart.FileHeader File *multipart.File Key string }
func (*Multipart) FileExtension ¶
type NestFinisher ¶
type NestFinisher interface {
NestFinish()
}
type NestPreparer ¶
type NestPreparer interface {
NestPrepare()
}
type NestRecover ¶
type NestRecover interface {
NextOnRecover(info *RecoverInfo)
}
type NestWebController ¶
type RecoverInfo ¶
type WebController ¶
type WebController struct { beego.Controller support.JsonParser i18n.Locale EntityValidator *validator.EntityValidator `inject:""` Flash *beego.FlashData Session *db.Session `inject:""` ViewPath string // models ModelAuditor *models.Auditor `inject:""` ModelCidade *models.Cidade `inject:""` ModelEstado *models.Estado `inject:""` ModelRole *models.Role `inject:""` ModelTenant *models.Tenant `inject:""` ModelUser *models.User `inject:""` ModelTenantUser *models.TenantUser `inject:""` ModelUserRole *models.UserRole `inject:""` IsLoggedIn bool IsTokenLoggedIn bool Auth *services.AuthService UseJsonPackage bool JsonPackageAsCamelCase bool CustonJsonEncoder func(interface{}) ([]byte, error) InheritedController interface{} DoNotLoadTenantsOnSession bool CacheService *cache.CacheService `inject:""` Character *support.Character `inject:""` CacheKeysDeleteOnLogOut []string UploadPathDestination string Container *ioc.Container // contains filtered or unexported fields }
func (*WebController) AppAuth ¶
func (this *WebController) AppAuth()
func (*WebController) Audit ¶
func (this *WebController) Audit(format string, v ...interface{})
func (*WebController) AuthCheck ¶
func (this *WebController) AuthCheck()
func (*WebController) AuthCheckAdmin ¶
func (this *WebController) AuthCheckAdmin()
func (*WebController) AuthCheckRoot ¶
func (this *WebController) AuthCheckRoot()
func (*WebController) AuthPrepare ¶
func (this *WebController) AuthPrepare()
func (*WebController) BadRequest ¶
func (this *WebController) BadRequest()
func (*WebController) CheckboxToBool ¶
func (this *WebController) CheckboxToBool(key string) bool
func (*WebController) CreateSession ¶
func (this *WebController) CreateSession() *db.Session
func (*WebController) DeleteCacheOnLogout ¶
func (this *WebController) DeleteCacheOnLogout(keys ...string)
func (*WebController) DisableXSRF ¶
func (this *WebController) DisableXSRF(pathList []string)
func (*WebController) Finally ¶
func (this *WebController) Finally()
func (*WebController) Finish ¶
func (this *WebController) Finish()
func (*WebController) FlashError ¶
func (this *WebController) FlashError(msg string, args ...interface{}) *WebController
func (*WebController) FlashNotice ¶
func (this *WebController) FlashNotice(msg string, args ...interface{}) *WebController
func (*WebController) FlashRead ¶
func (this *WebController) FlashRead()
func (*WebController) FlashSuccess ¶
func (this *WebController) FlashSuccess(msg string, args ...interface{}) *WebController
func (*WebController) FlashWarn ¶
func (this *WebController) FlashWarn(msg string, args ...interface{}) *WebController
func (*WebController) Forbidden ¶
func (this *WebController) Forbidden()
func (*WebController) Form2Json ¶
func (this *WebController) Form2Json(entity interface{})
func (*WebController) Form2JsonWithCnf ¶
func (this *WebController) Form2JsonWithCnf(entity interface{}, configs map[string]string)
func (*WebController) GetAuditorInfo ¶
func (this *WebController) GetAuditorInfo() *services.AuditorInfo
func (*WebController) GetAuthTenant ¶
func (this *WebController) GetAuthTenant() *models.Tenant
func (*WebController) GetAuthTenantSession ¶
func (this *WebController) GetAuthTenantSession() *models.Tenant
func (*WebController) GetAuthUser ¶
func (this *WebController) GetAuthUser() *models.User
func (*WebController) GetBoolByKey ¶
func (this *WebController) GetBoolByKey(key string) bool
func (*WebController) GetBoolParam ¶
func (this *WebController) GetBoolParam(key string) bool
func (*WebController) GetCurrentTime ¶
func (this *WebController) GetCurrentTime() time.Time
func (*WebController) GetCurrentTimeUnix ¶
func (this *WebController) GetCurrentTimeUnix() int64
func (*WebController) GetDateByKey ¶
func (this *WebController) GetDateByKey(key string) (time.Time, error)
func (*WebController) GetFileOpt ¶
func (this *WebController) GetFileOpt(key string) *optional.Optional[*Multipart]
func (*WebController) GetHeaderByName ¶
func (this *WebController) GetHeaderByName(name string) string
func (*WebController) GetHeaderByNames ¶
func (this *WebController) GetHeaderByNames(names ...string) string
func (*WebController) GetId ¶
func (this *WebController) GetId() int64
func (*WebController) GetInt32Param ¶
func (this *WebController) GetInt32Param(key string) int
func (*WebController) GetIntByKey ¶
func (this *WebController) GetIntByKey(key string) int64
func (*WebController) GetIntParam ¶
func (this *WebController) GetIntParam(key string) int64
func (*WebController) GetJsonResult ¶
func (this *WebController) GetJsonResult() (*support.JsonResult, bool)
func (*WebController) GetLastUpdate ¶
func (this *WebController) GetLastUpdate() time.Time
func (*WebController) GetLogin ¶
func (this *WebController) GetLogin() *models.User
func (*WebController) GetMessage ¶
func (this *WebController) GetMessage(key string, args ...interface{}) string
func (*WebController) GetPage ¶
func (this *WebController) GetPage() *db.Page
func (*WebController) GetParam ¶
func (this *WebController) GetParam(key string) string
func (*WebController) GetStringByKey ¶
func (this *WebController) GetStringByKey(key string) string
func (*WebController) GetStringParam ¶
func (this *WebController) GetStringParam(key string) string
func (*WebController) GetToken ¶
func (this *WebController) GetToken() string
func (*WebController) GetTokenLogin ¶
func (this *WebController) GetTokenLogin() *models.User
func (*WebController) GetUploadedFileExt ¶
func (*WebController) GetUploadedFileSavePath ¶
func (this *WebController) GetUploadedFileSavePath(fieldName string) string
func (*WebController) HasPath ¶
func (this *WebController) HasPath(paths ...string) bool
func (*WebController) HasTenantAuth ¶
func (this *WebController) HasTenantAuth(tenant *models.Tenant) bool
func (*WebController) HasUploadedFile ¶
func (this *WebController) HasUploadedFile(fname string) (bool, error)
func (*WebController) Int64ToString ¶
func (this *WebController) Int64ToString(val int64) string
func (*WebController) IntToString ¶
func (this *WebController) IntToString(val int) string
func (*WebController) IsAjax ¶
func (this *WebController) IsAjax() bool
func (*WebController) IsJson ¶
func (this *WebController) IsJson() bool
func (*WebController) LoadModels ¶
func (this *WebController) LoadModels()
func (*WebController) LoadTenants ¶
func (this *WebController) LoadTenants()
func (*WebController) Log ¶
func (this *WebController) Log(format string, v ...interface{})
func (*WebController) LogOut ¶
func (this *WebController) LogOut()
func (*WebController) LoginPath ¶
func (this *WebController) LoginPath() string
func (*WebController) NormalizePageSortKey ¶
func (this *WebController) NormalizePageSortKey(key string) string
func (*WebController) NotFound ¶
func (this *WebController) NotFound()
func (*WebController) NotFoundAsJson ¶
func (this *WebController) NotFoundAsJson()
func (*WebController) Ok ¶
func (this *WebController) Ok()
func (*WebController) OkAsHtml ¶
func (this *WebController) OkAsHtml(message string)
func (*WebController) OkAsJson ¶
func (this *WebController) OkAsJson(format string, v ...interface{})
func (*WebController) OkAsText ¶
func (this *WebController) OkAsText(message string)
func (*WebController) OnEntities ¶
func (this *WebController) OnEntities(viewName string, entities interface{})
func (*WebController) OnEntitiesWithTotalCount ¶
func (this *WebController) OnEntitiesWithTotalCount(viewName string, entities interface{}, totalCount int64)
func (*WebController) OnEntity ¶
func (this *WebController) OnEntity(viewName string, entity interface{})
func (*WebController) OnEntityAny ¶
func (this *WebController) OnEntityAny(view string, entity interface{}, format string, v ...interface{})
executes OnEntity or OnJsonResultWithMessage
func (*WebController) OnEntityError ¶
func (this *WebController) OnEntityError(viewName string, entity interface{}, format string, v ...interface{})
func (*WebController) OnEntityErrorAny ¶
func (this *WebController) OnEntityErrorAny(view string, entity interface{}, format string, v ...interface{})
executes OnEntity or OnJsonError
func (*WebController) OnEntityFail ¶
func (this *WebController) OnEntityFail(viewName string, entity interface{}, fail *optional.Fail)
func (*WebController) OnErrorAny ¶
func (this *WebController) OnErrorAny(path string, format string, v ...interface{})
executes redirect or OnJsonError
func (*WebController) OnFlash ¶
func (this *WebController) OnFlash(store bool)
func (*WebController) OnFullTemplate ¶
func (this *WebController) OnFullTemplate(tplName string)
func (*WebController) OnJson ¶
func (this *WebController) OnJson(json *support.JsonResult)
func (*WebController) OnJson200 ¶
func (this *WebController) OnJson200()
func (*WebController) OnJsonError ¶
func (this *WebController) OnJsonError(format string, v ...interface{})
func (*WebController) OnJsonErrorNotRollback ¶
func (this *WebController) OnJsonErrorNotRollback(format string, v ...interface{})
func (*WebController) OnJsonMap ¶
func (this *WebController) OnJsonMap(jsonMap map[string]interface{})
func (*WebController) OnJsonMessage ¶
func (this *WebController) OnJsonMessage(format string, v ...interface{})
func (*WebController) OnJsonOk ¶
func (this *WebController) OnJsonOk(format string, v ...interface{})
func (*WebController) OnJsonPage ¶
func (this *WebController) OnJsonPage(page *criteria.Page)
func (*WebController) OnJsonParseForm ¶
func (this *WebController) OnJsonParseForm(entity interface{})
func (*WebController) OnJsonParseFormWithFieldsConfigs ¶
func (this *WebController) OnJsonParseFormWithFieldsConfigs(entity interface{}, configs map[string]string)
* * * use this.Form2JsonWithCnf(entity, map[string]string{
- "FloatFieldName": "float",
- "IntFieldName": "int",
- "BoolFieldName": "bool",
- "DateFieldName": "date:layout",
- })
*
func (*WebController) OnJsonResult ¶
func (this *WebController) OnJsonResult(result interface{})
func (*WebController) OnJsonResultAndResults ¶
func (this *WebController) OnJsonResultAndResults(result interface{}, results interface{})
func (*WebController) OnJsonResultAndResultsWithTotalCount ¶
func (this *WebController) OnJsonResultAndResultsWithTotalCount(result interface{}, results interface{}, totalCount int64)
func (*WebController) OnJsonResultError ¶
func (this *WebController) OnJsonResultError(result interface{}, format string, v ...interface{})
func (*WebController) OnJsonResultWithMessage ¶
func (this *WebController) OnJsonResultWithMessage(result interface{}, format string, v ...interface{})
func (*WebController) OnJsonResults ¶
func (this *WebController) OnJsonResults(results interface{})
func (*WebController) OnJsonResultsError ¶
func (this *WebController) OnJsonResultsError(results interface{}, format string, v ...interface{})
func (*WebController) OnJsonResultsWithTotalCount ¶
func (this *WebController) OnJsonResultsWithTotalCount(results interface{}, totalCount int64)
func (*WebController) OnJsonValidationError ¶
func (this *WebController) OnJsonValidationError()
func (*WebController) OnJsonValidationMessageWithErrors ¶
func (this *WebController) OnJsonValidationMessageWithErrors(message string, errors map[string]string)
func (*WebController) OnJsonValidationWithErrors ¶
func (this *WebController) OnJsonValidationWithErrors(errors map[string]string)
func (*WebController) OnJsonValidationWithResultAndMessageAndErrors ¶
func (this *WebController) OnJsonValidationWithResultAndMessageAndErrors(result interface{}, message string, errors map[string]string)
func (*WebController) OnJsonValidationWithResultsAndMessageAndErrors ¶
func (this *WebController) OnJsonValidationWithResultsAndMessageAndErrors(results interface{}, message string, errors map[string]string)
func (*WebController) OnLoginRedirect ¶
func (this *WebController) OnLoginRedirect()
func (*WebController) OnOkAny ¶
func (this *WebController) OnOkAny(path string, format string, v ...interface{})
executes redirect or OnJsonOk
func (*WebController) OnParseForm ¶
func (this *WebController) OnParseForm(entity interface{})
func (*WebController) OnParseJson ¶
func (this *WebController) OnParseJson(entity interface{})
func (*WebController) OnPureTemplate ¶
func (this *WebController) OnPureTemplate(templateName string)
func (*WebController) OnRedirect ¶
func (this *WebController) OnRedirect(action string, args ...interface{})
func (*WebController) OnRedirectError ¶
func (this *WebController) OnRedirectError(action string, format string, v ...interface{})
func (*WebController) OnRedirectSuccess ¶
func (this *WebController) OnRedirectSuccess(action string, format string, v ...interface{})
func (*WebController) OnRender ¶
func (this *WebController) OnRender(data interface{})
func (*WebController) OnResult ¶
func (this *WebController) OnResult(viewName string, result interface{})
func (*WebController) OnResults ¶
func (this *WebController) OnResults(viewName string, results interface{})
func (*WebController) OnResultsAny ¶
func (this *WebController) OnResultsAny(viewName string, results interface{})
executes OnResults or OnJsonResults
func (*WebController) OnResultsWithTotalCount ¶
func (this *WebController) OnResultsWithTotalCount(viewName string, results interface{}, totalCount int64)
func (*WebController) OnResultsWithTotalCountAny ¶
func (this *WebController) OnResultsWithTotalCountAny(viewName string, results interface{}, totalCount int64)
executes OnResultsWithTotalCount or OnJsonResultsWithTotalCount
func (*WebController) OnTemplate ¶
func (this *WebController) OnTemplate(viewName string)
func (*WebController) OnTemplateWithData ¶
func (this *WebController) OnTemplateWithData(viewName string, data map[string]interface{})
func (*WebController) OnValidate ¶
func (this *WebController) OnValidate(entity interface{}, custonValidation func(validator *validation.Validation)) bool
func (*WebController) OnValidationErrorAny ¶
func (this *WebController) OnValidationErrorAny(view string, entity interface{})
executes OnEntity or OnJsonValidationError
func (*WebController) ParamParseFloat ¶
func (this *WebController) ParamParseFloat(s string) float64
remove ,(virgula) do valor em params que vem como val de input com jquery money exemplo 45,000.00 vira 45000.00
func (*WebController) ParamParseMoney ¶
func (this *WebController) ParamParseMoney(s string) float64
func (*WebController) ParseDate ¶
func (this *WebController) ParseDate(date string) (time.Time, error)
deprecated
func (*WebController) ParseDateByKey ¶
func (*WebController) ParseDateTime ¶
func (this *WebController) ParseDateTime(date string) (time.Time, error)
deprecated
func (*WebController) ParseJsonDate ¶
func (this *WebController) ParseJsonDate(date string) (time.Time, error)
deprecated
func (*WebController) Prepare ¶
func (this *WebController) Prepare()
Prepare implemented Prepare() method for WebController. It's used for language option check and setting.
func (*WebController) PrepareUploadedFile ¶
func (*WebController) RawBody ¶
func (this *WebController) RawBody() []byte
func (*WebController) Recover ¶
func (this *WebController) Recover(info interface{})
func (*WebController) RenderJson ¶
func (this *WebController) RenderJson(opt interface{})
func (*WebController) RenderJsonError ¶
func (this *WebController) RenderJsonError(format string, v ...interface{})
func (*WebController) RenderJsonMap ¶
func (this *WebController) RenderJsonMap(jsonMap map[string]interface{})
func (*WebController) RenderJsonResult ¶
func (this *WebController) RenderJsonResult(opt interface{})
func (*WebController) RenderTemplate ¶
func (this *WebController) RenderTemplate(viewName string)
func (*WebController) Rollback ¶
func (this *WebController) Rollback()
func (*WebController) ServeJSON ¶
func (this *WebController) ServeJSON()
func (*WebController) ServerError ¶
func (this *WebController) ServerError()
func (*WebController) SessionLogOut ¶
func (this *WebController) SessionLogOut()
func (*WebController) SetAuthTenant ¶
func (this *WebController) SetAuthTenant(t *models.Tenant)
func (*WebController) SetAuthTenantSession ¶
func (this *WebController) SetAuthTenantSession(tenant *models.Tenant)
func (*WebController) SetAuthUser ¶
func (this *WebController) SetAuthUser(u *models.User)
func (*WebController) SetCustonJsonEncoder ¶
func (this *WebController) SetCustonJsonEncoder(f func(interface{}) ([]byte, error)) *WebController
func (*WebController) SetData ¶
func (this *WebController) SetData(values ...interface{}) *WebController
func (*WebController) SetJsonPackageAsCamelCase ¶
func (this *WebController) SetJsonPackageAsCamelCase() *WebController
func (*WebController) SetLogin ¶
func (this *WebController) SetLogin(user *models.User)
func (*WebController) SetParams ¶
func (this *WebController) SetParams()
func (*WebController) SetResult ¶
func (this *WebController) SetResult(result interface{}) *WebController
func (*WebController) SetResults ¶
func (this *WebController) SetResults(results interface{}) *WebController
func (*WebController) SetResultsAndTotalCount ¶
func (this *WebController) SetResultsAndTotalCount(results interface{}, totalCount int64) *WebController
func (*WebController) SetTokenLogin ¶
func (this *WebController) SetTokenLogin(user *models.User)
func (*WebController) SetUseJsonPackage ¶
func (this *WebController) SetUseJsonPackage() *WebController
func (*WebController) SetViewModel ¶
func (this *WebController) SetViewModel(name string, data interface{}) *WebController
func (*WebController) StringToInt ¶
func (this *WebController) StringToInt(text string) int
func (*WebController) StringToInt64 ¶
func (this *WebController) StringToInt64(text string) int64
func (*WebController) Unauthorized ¶
func (this *WebController) Unauthorized()
func (*WebController) UpSecurityAuth ¶
func (this *WebController) UpSecurityAuth() bool
func (*WebController) WebControllerCreateSession ¶
func (this *WebController) WebControllerCreateSession() *db.Session
func (*WebController) WebControllerLoadModels ¶
func (this *WebController) WebControllerLoadModels()