Documentation
¶
Index ¶
- func IndexTemplate(APIName string, templateType reflect.Type)
- func IndexTemplateWrapper(fun TemplaterHandleFunc) func(w http.ResponseWriter, r *http.Request)
- func ListenPort(port int)
- func RegisterAPIs(prefix string)
- type Converter
- type HTML
- type HTMLBase
- type Markdown
- type MarkdownBase
- type Network
- type RawData
- type Smtp
- type Table
- type TableBase
- type Templater
- type TemplaterHandleFunc
- func IndexTemplateHTML(APIName string, templateType reflect.Type) TemplaterHandleFunc
- func IndexTemplateNetwork(APIName string, templateType reflect.Type) TemplaterHandleFunc
- func IndexTemplateNetworkSmtp(APIName string, templateType reflect.Type) TemplaterHandleFunc
- func IndexTemplateSMTP(APIName string, templateType reflect.Type) TemplaterHandleFunc
- type Timeline
- type TimelineBase
- type Utils
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexTemplate ¶
func IndexTemplateWrapper ¶
func IndexTemplateWrapper(fun TemplaterHandleFunc) func(w http.ResponseWriter, r *http.Request)
func ListenPort ¶
func ListenPort(port int)
func RegisterAPIs ¶
func RegisterAPIs(prefix string)
Types ¶
type Converter ¶
func (*Converter) GetConverter ¶
type HTML ¶
func (*HTML) GetHTMLBase ¶
func (html *HTML) GetHTMLBase() interface{}
func (*HTML) SetHTMLBase ¶
func (html *HTML) SetHTMLBase(data interface{})
type HTMLBase ¶
type HTMLBase struct {
Content string `json:"Content"`
}
func (*HTMLBase) HTMLBaseType ¶
type Markdown ¶
type Markdown struct { Utils `json:"Utils"` *MarkdownBase `json:"MarkdownBase"` }
func (*Markdown) GetHTMLBase ¶
func (markdown *Markdown) GetHTMLBase() interface{}
func (*Markdown) SetHTMLBase ¶
func (markdown *Markdown) SetHTMLBase(data interface{})
type MarkdownBase ¶
type MarkdownBase struct {
Content string `json:"Content"`
}
func (*MarkdownBase) HTMLBaseType ¶
func (markdown *MarkdownBase) HTMLBaseType() reflect.Type
type Network ¶
type Network struct {
URL string `json:"URL"`
}
var EmptyNetwork Network
func (*Network) GetNetwork ¶
type RawData ¶
type RawData struct {
Datas interface{}
}
func (*RawData) GetRawData ¶
func (r *RawData) GetRawData() interface{}
func (*RawData) SetRawData ¶
func (r *RawData) SetRawData(datas interface{})
type Smtp ¶
type Smtp struct { WithoutAuth bool `json:"WithoutAuth"` Host string `json:"Host"` Port int `json:"Port"` Username string `json:"Username"` Password string `json:"Password"` To string `json:"To"` From string `json:"From"` Subject string `json:"Subject"` }
var EmptySmtp Smtp
type Table ¶
func (*Table) GetHTMLBase ¶
func (table *Table) GetHTMLBase() interface{}
func (*Table) SetHTMLBase ¶
func (table *Table) SetHTMLBase(data interface{})
type TableBase ¶
type TableBase struct { Title string `json:"Title"` Overview string `json:"Overview"` HeaderCells []string `json:"HeaderCells"` HeaderCellsMap map[string]string `json:"HeaderCellsMap"` DataConverter map[string]string `json:"DataConverter"` DataCells [][]interface{} `json:"DataCells"` DataObjectCells []map[string]interface{} `json:"DataObjectCells"` }
func (*TableBase) HTMLBaseType ¶
type Templater ¶
type Templater interface { HTML(writer io.Writer) error HTMLBaseType() reflect.Type GetHTMLBase() interface{} SetHTMLBase(datas interface{}) SetRawData(datas interface{}) GetRawData() interface{} GetSmtp() *Smtp GetNetwork() *Network GetConverter() *Converter Merge(highWeight, lowWeight interface{}) interface{} }
type TemplaterHandleFunc ¶
type TemplaterHandleFunc func(w http.ResponseWriter, r *http.Request) Templater
func IndexTemplateHTML ¶
func IndexTemplateHTML(APIName string, templateType reflect.Type) TemplaterHandleFunc
func IndexTemplateNetwork ¶
func IndexTemplateNetwork(APIName string, templateType reflect.Type) TemplaterHandleFunc
func IndexTemplateNetworkSmtp ¶
func IndexTemplateNetworkSmtp(APIName string, templateType reflect.Type) TemplaterHandleFunc
func IndexTemplateSMTP ¶
func IndexTemplateSMTP(APIName string, templateType reflect.Type) TemplaterHandleFunc
type Timeline ¶
type Timeline struct { Utils `json:"Utils"` *TimelineBase `json:"TimelineBase"` }
func (*Timeline) GetHTMLBase ¶
func (timeline *Timeline) GetHTMLBase() interface{}
func (*Timeline) SetHTMLBase ¶
func (timeline *Timeline) SetHTMLBase(data interface{})
type TimelineBase ¶
type TimelineBase struct { Title string `json:"Title"` Overview string `json:"Overview"` DataConverter map[string]string `json:"DataConverter"` TimeFields []string `json:"TimeFields"` HeaderCellsMap map[string]string `json:"HeaderCellsMap"` DataObjectCells []map[string]interface{} `json:"DataObjectCells"` }
func (*TimelineBase) HTMLBaseType ¶
func (timeline *TimelineBase) HTMLBaseType() reflect.Type
Click to show internal directories.
Click to hide internal directories.