Documentation
¶
Index ¶
- func RenderManagementShell(bootstrap interface{}, metadata ManagementShellMetadata) (string, error)
- func RenderManagementShellWithAssets(bootstrap interface{}, metadata ManagementShellMetadata, ...) (string, error)
- func RenderToString(page *Page) (string, error)
- func SetRoot(root string)
- type LoginPageCommonData
- type ManagementPageCommonData
- type ManagementShellAssets
- type ManagementShellMetadata
- type Model
- type Page
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderManagementShell ¶
func RenderManagementShell(bootstrap interface{}, metadata ManagementShellMetadata) (string, error)
func RenderManagementShellWithAssets ¶
func RenderManagementShellWithAssets(bootstrap interface{}, metadata ManagementShellMetadata, assets ManagementShellAssets) (string, error)
func RenderToString ¶
Types ¶
type LoginPageCommonData ¶
type LoginPageCommonData struct {
WebBaseURL string
HeadCustomCode template.HTML
Version string
Year int
CaptchaOpen bool
CaptchaHTML template.HTML
}
func (LoginPageCommonData) Map ¶
func (d LoginPageCommonData) Map() map[string]interface{}
type ManagementPageCommonData ¶
type ManagementPageCommonData struct {
WebBaseURL string
HeadCustomCode template.HTML
Version string
Year int
IsAdmin bool
// ServerUpdate tells whether the server can be updated from the web.
ServerUpdate bool
Username string
BridgeType string
BridgeAddr string
BridgeIP string
BridgePort string
WindowsSuffix string
TCPIP string
TCPPort string
KCPIP string
KCPPort string
TLSIP string
TLSPort string
QUICIP string
QUICPort string
QUICALPN string
QUICAddr string
WSPath string
WSIP string
WSPort string
WSSIP string
WSSPort string
ProxyPort string
// ClientUpdateMin is the oldest npc version that acts on update requests.
ClientUpdateMin string
// Features are the feature switches the templates test, by name.
Features map[string]bool
}
func (ManagementPageCommonData) Map ¶
func (d ManagementPageCommonData) Map() map[string]interface{}
type ManagementShellAssets ¶
type ManagementShellAssets struct {
Ready bool `json:"ready"`
Styles []string `json:"styles,omitempty"`
Scripts []string `json:"scripts,omitempty"`
}
func DefaultManagementShellAssets ¶
func DefaultManagementShellAssets(baseURL string) ManagementShellAssets
func ResolveManagementShellAssets ¶
func ResolveManagementShellAssets(staticRoot, staticBase string) ManagementShellAssets
func (ManagementShellAssets) Clone ¶
func (a ManagementShellAssets) Clone() ManagementShellAssets
type ManagementShellMetadata ¶
Click to show internal directories.
Click to hide internal directories.