Documentation ¶
Index ¶
- Constants
- func CreateTemplate(redirecter common.TemplateRedirecter) gin.HandlerFunc
- func GetLocalesManager(c *gin.Context) common.LocalesManager
- func GetLogger(c *gin.Context) log.Logger
- func GetRequestedUserId(c *gin.Context) uint64
- func GetSessionUserId(c *gin.Context) uint64
- func InitNoELementMsg(data gin.H, size int, c *gin.Context)
- func Run(ginLogger *zap.Logger, sites ...SiteAndConfig) error
- type GroupDisplay
- type Page
- type PageDesc
- type RoleDisplay
- type Session
- type SettingsManager
- type Site
- func (site *Site) AddDefaultData(adder common.DataAdder)
- func (site *Site) AddPage(page Page)
- func (site *Site) AddStaticPages(pageGroup parser.StaticPagesConfig) bool
- func (site *Site) GetPage(name string) (Page, bool)
- func (site *Site) GetPageWithPath(path string) (Page, bool)
- func (site *Site) Run(siteConfig config.SiteConfig) error
- func (site *Site) RunListener(siteConfig config.SiteConfig, listener net.Listener) error
- type SiteAndConfig
- type Widget
Constants ¶
View Source
const (
SessionName = "Session"
)
Variables ¶
This section is empty.
Functions ¶
func CreateTemplate ¶
func CreateTemplate(redirecter common.TemplateRedirecter) gin.HandlerFunc
func GetLocalesManager ¶
func GetLocalesManager(c *gin.Context) common.LocalesManager
func GetRequestedUserId ¶
func GetSessionUserId ¶
Types ¶
type GroupDisplay ¶
type GroupDisplay struct { Id uint64 Name string DisplayName string Roles []RoleDisplay AddableRoles []RoleDisplay }
func NewGroupDisplay ¶
func NewGroupDisplay(id uint64, name string) *GroupDisplay
type Page ¶
type Page struct { Widget Widget // contains filtered or unexported fields }
func MakeHiddenPage ¶
func MakeHiddenStaticPage ¶
func (Page) AddStaticPages ¶
func (p Page) AddStaticPages(pageGroup parser.StaticPagesConfig) bool
func (Page) AddSubPage ¶
type RoleDisplay ¶
func MakeRoleDisplay ¶
func MakeRoleDisplay(role adminservice.Role) RoleDisplay
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func GetSession ¶
type SettingsManager ¶
type SettingsManager struct { config.SettingsConfig InitSettings func(*gin.Context) map[string]string CheckSettings func(map[string]string, *gin.Context) error }
func NewSettingsManager ¶
func NewSettingsManager(settingsConfig config.SettingsConfig) *SettingsManager
type Site ¶
type Site struct {
// contains filtered or unexported fields
}
func NewSite ¶
func NewSite(configExtracter config.BaseConfigExtracter, localesManager common.LocalesManager, settingsManager *SettingsManager) *Site
func (*Site) AddDefaultData ¶
func (*Site) AddStaticPages ¶
func (site *Site) AddStaticPages(pageGroup parser.StaticPagesConfig) bool
func (*Site) RunListener ¶ added in v1.10.1
type SiteAndConfig ¶
type SiteAndConfig struct { Site *Site Config config.SiteConfig }
Click to show internal directories.
Click to hide internal directories.