Documentation ¶
Index ¶
- Variables
- func DynamicRender(template_name, template_value string) (str string, is_ok bool, err_str string)
- func Equal(a, b interface{}) bool
- func GenerateDynamicTemplateName(tmplt_name, time_stamp, web_ui_theme_dir string) (template_name string)
- func GetAdminsTemplateFile(ori_tmplt_file string) string
- func GetTemplateTimestamp(template_file_path string) (timestamp string)
- func ReadMe()
- func SetTemplateTimestamp(template_file_path, timestamp string)
- func Test2()
- type CurdResult
- type DTime
- type DomoloRevelApp
- type HtmlDocument
- type LinkTag
- type LinkTags
- type ParentApp
- type UniformField
- type UrlToActionSM
- type ViewResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( /** gobbs template -> timestamp timestamp is get from db when user add or update the template in db. */ CacheMapGobbsDbTemplates map[string]string )
View Source
var ERROR_CLASS = "hasError"
View Source
var ( // The functions available for use in the templates. TemplateFuncs = map[string]interface{}{ "label": strings.Title, "eq": Equal, "set": func(renderArgs map[string]interface{}, key string, value interface{}) template.HTML { renderArgs[key] = value return template.HTML("") }, "append": func(renderArgs map[string]interface{}, key string, value interface{}) template.HTML { if renderArgs[key] == nil { renderArgs[key] = []interface{}{value} } else { renderArgs[key] = append(renderArgs[key].([]interface{}), value) } return template.HTML("") }, "nl2br": func(text string) template.HTML { return template.HTML(strings.Replace(template.HTMLEscapeString(text), "\n", "<br>", -1)) }, "raw": func(text string) template.HTML { return template.HTML(text) }, } )
Functions ¶
func DynamicRender ¶
func Equal ¶
func Equal(a, b interface{}) bool
Equal is a helper for comparing value equality, following these rules:
- Values with equivalent types are compared with reflect.DeepEqual
- int, uint, and float values are compared without regard to the type width. for example, Equal(int32(5), int64(5)) == true
- strings and byte slices are converted to strings before comparison.
- else, return false.
func GetAdminsTemplateFile ¶
func GetTemplateTimestamp ¶
func SetTemplateTimestamp ¶
func SetTemplateTimestamp(template_file_path, timestamp string)
Types ¶
type CurdResult ¶
type DTime ¶
func (*DTime) GetStrToTime ¶
type DomoloRevelApp ¶
type DomoloRevelApp struct {
*revel.Controller
}
func (DomoloRevelApp) GetDb ¶
func (c DomoloRevelApp) GetDb() *sql.DB
func (DomoloRevelApp) GetDbm ¶
func (c DomoloRevelApp) GetDbm() *gorp.DbMap
type HtmlDocument ¶
type HtmlDocument struct { }
type UniformField ¶
type UrlToActionSM ¶
type UrlToActionSM struct { /** UrlType // 0 common, 1 fixed , 2 prefix fixed and only myid 3: node detail page url // if UrlType > 0 then NotUseActionTemplate is true //NotUseActionTemplate bool BizType: 0, default 1, node */ TmpltKey string Action string Myid string RenderMapPath string Role string ModuleDirPath string ErrorMsg string IsDbTmplt bool DbTName string DbTTimestamp string Prefix string UrlType int BizType int RequestURI string FilePath string }
type ViewResult ¶
type ViewResult struct { /** TransferObject */ IsOk bool Error error Type string // -> array/ pointer / pointer to array / map / etc IMObjType string // -> one stuct , or map or array or pointer to obj , or obj array etc. IMObj interface{} //-> the quesiton is : how we could convert IObj to the real struct of where it come from? }
Click to show internal directories.
Click to hide internal directories.