Documentation
¶
Index ¶
- Constants
- func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
- type ArButtons
- type ArProperties
- type ArTabs
- type ColumnInfo
- type FormInfo
- type Forms
- func (f *Forms) Count() int64
- func (f *Forms) ExpandProperties(info *FormInfo)
- func (f *Forms) Filter(lang string, forms []string) map[string]FormInfo
- func (f *Forms) Get(code string) *FormInfo
- func (f *Forms) GetParameters(r *http.Request, storagePath string, subPath string) (map[string]interface{}, bool)
- func (f *Forms) Load(configPath string)
- func (f *Forms) New(info FormInfo) string
- func (f *Forms) Render(form_code string, lang string, style string, isModal bool, ...) string
- type Functions
- type InfoAction
- type InfoButton
- type InfoItem
- type InfoProperty
- type InfoTab
- type MapInfo
- type PageInfo
- type Pages
- func (p *Pages) Count() int64
- func (p *Pages) Filter(lang string, pages []string) map[string]PageInfo
- func (p *Pages) Get(code string) *PageInfo
- func (p *Pages) Load(configPath string)
- func (p *Pages) New(info PageInfo) string
- func (p *Pages) Render(page_code string, lang string, style string, private bool, ...) (string, bool)
- type TableInfo
- type Templates
- type UI
- func (u *UI) GetLangList() *map[string]map[string]string
- func (u *UI) GetStat() *UIStat
- func (u *UI) Init(configPath string, enableWatcher bool, enableMinify bool)
- func (u *UI) RenderForm(form_code string, lang string, style string, isModal bool, ...) string
- func (u *UI) RenderPage(page_code string, lang string, style string, private bool, ...) string
- func (u *UI) ToJSON(role_name string, lang string, menus []string, forms []string, views []string) []byte
- type UIInfo
- type UIStat
- type ViewInfo
- type Views
- func (v *Views) Count() int64
- func (v *Views) Filter(lang string, views []string) map[string]ViewInfo
- func (v *Views) Get(code string) *ViewInfo
- func (v *Views) Load(configPath string)
- func (v *Views) New(info ViewInfo) string
- func (v *Views) Render(view_code string, lang string, style string, data *map[string]interface{}) (string, bool)
Constants ¶
View Source
const ( POST = "POST" GET = "GET" )
Form methods: POST or GET.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONBody ¶
func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
Types ¶
type ArButtons ¶
type ArButtons []InfoButton
type ArProperties ¶
type ArProperties []InfoProperty
type ColumnInfo ¶
type ColumnInfo struct {
Title string `json:"title" yaml:"title"`
Type string `json:"type" yaml:"type"`
Field string `json:"field" yaml:"field"`
Align string `json:"align" yaml:"align"`
Sortable bool `json:"sortable" yaml:"sortable"`
Filter string `json:"filter" yaml:"filter"`
// contains filtered or unexported fields
}
type FormInfo ¶
type FormInfo struct {
Code string `json:"code" yaml:"code"`
EncType string `json:"enctype" yaml:"enctype"`
Method string `json:"method" yaml:"method"`
Action string `json:"action" yaml:"action"`
Version int32 `json:"version" yaml:"version"`
Date string `json:"date" yaml:"date"`
Date_start string `json:"date_start" yaml:"date_start"`
Date_finish string `json:"date_finish" yaml:"date_finish"`
Title string `json:"title" yaml:"title"`
Type string `json:"type" yaml:"type"`
Description string `json:"description" yaml:"description"`
Tabs ArTabs `json:"tabs" yaml:"tabs,flow"`
Properties ArProperties `json:"properties" yaml:"properties,flow"`
Buttons ArButtons `json:"buttons" yaml:"buttons,flow"`
}
type Forms ¶
type Forms struct {
// contains filtered or unexported fields
}
func (*Forms) ExpandProperties ¶
func (*Forms) GetParameters ¶
type Functions ¶
type Functions struct {
// contains filtered or unexported fields
}
func NewFunctions ¶
func (*Functions) AppendFuncMap ¶
type InfoAction ¶
type InfoButton ¶
type InfoProperty ¶
type InfoProperty struct {
CODE string `json:"code" yaml:"code"`
Order int `json:"order" yaml:"order"`
Title string `json:"title" yaml:"title"`
Description string `json:"description" yaml:"description"`
DataType string `json:"data_type" yaml:"data_type"`
WidgetType string `json:"widget" yaml:"widget"`
Required string `json:"required" yaml:"required"`
Format string `json:"format" yaml:"format"`
Table string `json:"table" yaml:"table"`
Default string `json:"default" yaml:"default"`
OneOf []InfoItem `json:"oneOf" yaml:"oneOf"`
OneOfConst string `json:"oneOfConst" yaml:"oneOfConst"`
}
type MapInfo ¶
type MapInfo struct {
Name string `json:"name" yaml:"name"`
Latitude float64 `json:"latitude" yaml:"latitude"`
Longitude float64 `json:"longitude" yaml:"longitude"`
DefaultZoom float64 `json:"default_zoom" yaml:"default_zoom"`
MinZoom float64 `json:"min_zoom" yaml:"min_zoom"`
MaxZoom float64 `json:"max_zoom" yaml:"max_zoom"`
LayersUrl string `json:"layers_url" yaml:"layers_url"`
}
type PageInfo ¶
type PageInfo struct {
CODE string `json:"code" yaml:"code"`
Title string `json:"title" yaml:"title"`
Keywords string `json:"keywords" yaml:"keywords"` // MAX 250
Description string `json:"description" yaml:"description"` // MAX 140
Template string `json:"template" yaml:"template"`
Cache bool `json:"cache" yaml:"cache"`
MultiLanguage bool `json:"multi_language" yaml:"multi_language"`
}
type TableInfo ¶
type TableInfo struct {
Name string `json:"name" yaml:"name"`
DataUrl string `json:"url" yaml:"url"`
Columns []ColumnInfo `json:"columns" yaml:"columns"`
}
type Templates ¶
type Templates struct {
// contains filtered or unexported fields
}
func NewTemplates ¶
type ViewInfo ¶
type ViewInfo struct {
CODE string `json:"code" yaml:"code"`
Title string `json:"title" yaml:"title"`
Description string `json:"description" yaml:"description"`
MainModel string `json:"main_model" yaml:"main_model"`
EditForm string `json:"edit_form" yaml:"edit_form"`
ReadItemUrl string `json:"read_item_url" yaml:"read_item_url"`
WriteItemUrl string `json:"write_item_url" yaml:"write_item_url"`
ViewItemUrl string `json:"view_item_url" yaml:"view_item_url"`
Table TableInfo `json:"table" yaml:"table,flow"`
Map MapInfo `json:"map" yaml:"map,flow"`
Function string `json:"function" yaml:"function"`
Template string `json:"template" yaml:"template"`
Actions map[string]InfoAction `json:"actions" yaml:"actions,flow"`
}
Click to show internal directories.
Click to hide internal directories.