Documentation
¶
Index ¶
- type GridColumnConfig
- type GridConfig
- type Milk
- func (milk Milk) Button(name, displayName string) Milk
- func (milk Milk) Grid(obj interface{}, gridConfig GridConfig) Milk
- func (milk Milk) Link(url, target, displayName string, external bool) Milk
- func (milk Milk) Message(msgType string, msg string) Milk
- func (milk Milk) Modal(header, content string) Milk
- func (milk Milk) Navigation(navigation Navigation, activeNavigationName string, horizontal bool) Milk
- func (milk Milk) SimpleDialog(content string) Milk
- type MilkView
- type Navigation
- type NavigationItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GridColumnConfig ¶
type GridColumnConfig struct { Name string DisplayName string Formatter func(val interface{}) string }
GridColumnConfig tell milk.Grid which column has to be printed with given DisplayName. Add a custom formatter if you want to adjust the value output.
type Milk ¶
Milk struct hold css, js and HTML snippets of a HTML Component
func (Milk) Grid ¶
func (milk Milk) Grid(obj interface{}, gridConfig GridConfig) Milk
Grid @param interface{} usally a []map[string]string
func (Milk) Navigation ¶
func (milk Milk) Navigation(navigation Navigation, activeNavigationName string, horizontal bool) Milk
Navigation @param obj []map[string]string, horizontal bool
func (Milk) SimpleDialog ¶
SimpleDialog @param content string opens a modal with 2 buttons, abort and ok
type MilkView ¶
type MilkView struct { Milk Milk // Contains all UI Component Funcs, no init is needed here GridConfig GridConfig // Set a GridConfig if you want to print a Grid Data interface{} // The Data you are going to pass by template.Execute(temp, milkView) CSS css.CSS // Contains all CSS Classes for the UI Components, no init is needed here JS js.JS // Contains all JS Funcs for the UI Components, no init is needed here }
MilkView ...
type Navigation ¶
type Navigation []NavigationItem
Navigation ...
func (Navigation) ActiveNavigationName ¶
func (navigation Navigation) ActiveNavigationName(pathPrefix string, r *http.Request) string
ActiveNavigationName ...
Click to show internal directories.
Click to hide internal directories.