Documentation
¶
Index ¶
- Constants
- Variables
- func CodeHighlight(code string, lexer string) (string, error)
- func HTMLEscapeMap(data map[string]interface{}) map[string]interface{}
- func HTMLEscapeStruct(data interface{}) interface{}
- func JSONSerializeHTML(data map[string]interface{}) (template.HTML, error)
- func TemplateFuncs() template.FuncMap
- type BreadCrumb
- type Column
- type CustomPreWrapper
- type ExternalPage
- type MenuItem
- type Page
- type Table
Constants ¶
View Source
const AdminPath = "/admin"
View Source
const CollectionsIcon = `` /* 545-byte string literal not displayed */
View Source
const DashboardIcon = `` /* 466-byte string literal not displayed */
View Source
const DefaultPageSize = 10
View Source
const DefaultSortAsc = false
View Source
const DefaultSortKey = "created_at"
View Source
const DocsIcon = `` /* 781-byte string literal not displayed */
View Source
const SessionsIcon = `` /* 630-byte string literal not displayed */
View Source
const SettingsIcon = `` /* 1568-byte string literal not displayed */
View Source
const UsersIcon = `` /* 771-byte string literal not displayed */
Variables ¶
View Source
var ExternalPages = map[string]ExternalPage{
"website": {
Title: "Website",
URL: "https://getzep.com",
},
"docs": {
Title: "Documentation",
URL: "https://docs.getzep.com",
},
"github": {
Title: "GitHub",
URL: "https://github.com/getzep/zep",
},
}
View Source
var LayoutTemplates = []string{
"templates/pages/index.html",
"templates/components/layout/*.html",
"templates/components/content/*.html",
}
View Source
var StaticFS embed.FS
View Source
var TemplatesFS embed.FS
Functions ¶
func CodeHighlight ¶
CodeHighlight takes a string of code and a lexer name and returns a highlighted HTML string.
func HTMLEscapeMap ¶
HTMLEscapeMap recursively walks a map and HTML escapes any string fields
func HTMLEscapeStruct ¶
func HTMLEscapeStruct(data interface{}) interface{}
HTMLEscapeStruct recursively walks a struct and any child structs and HTML escapes any string fields
func JSONSerializeHTML ¶
JSONSerializeHTML serializes a map to a JSON string and outputs as HTML
func TemplateFuncs ¶
Types ¶
type BreadCrumb ¶
type CustomPreWrapper ¶
type CustomPreWrapper struct{}
func (*CustomPreWrapper) End ¶
func (p *CustomPreWrapper) End(code bool) string
End is called to write the end </pre> element.
type ExternalPage ¶
type Page ¶
type Page struct { Title string SubTitle string MenuItems []MenuItem Templates []string Path string Slug string BreadCrumbs []BreadCrumb Data interface{} }
type Table ¶
type Table struct { TableID string Columns []Column Rows interface{} TotalCount int RowCount int Offset int CurrentPage int PageSize int PageCount int OrderBy string Asc bool }
func (*Table) GetOrderBy ¶
func (*Table) GetPageCount ¶
func (*Table) GetPageSize ¶
func (*Table) GetTablePath ¶
func (*Table) ParseQueryParams ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.