Documentation
¶
Index ¶
- func RenderManagementShell(bootstrap any, metadata ManagementShellMetadata) (string, error)
- func RenderManagementShellWithAssets(bootstrap any, metadata ManagementShellMetadata, assets ManagementShellAssets) (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 any, metadata ManagementShellMetadata) (string, error)
func RenderManagementShellWithAssets ¶
func RenderManagementShellWithAssets(bootstrap any, 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]any
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
// ServerUpdateAvailable tells that a newer release is known already.
ServerUpdateAvailable bool
// MixPlain tells that the mixed port accepts plaintext carriers (tcp,
// ws, http).
MixPlain bool
// AdmitKey is the admission key of the exchange carrier, as hex, shown to
// administrators only.
AdmitKey string
// MixIP and MixPort are the mixed port, where a type=auto link connects;
// the port is "" when there is none.
MixIP, MixPort string
// MixQUICALPN is the ALPN the UDP side of the mixed port takes for quic.
MixQUICALPN string
// MixUDPPort is the port quic reaches the mixed port on: the port it
// listens on, as a port mapping or proxy given in bridge_addr (MixPort)
// usually carries TCP only.
MixUDPPort string
Username string
BridgeType string
// VisitorVKey, when set, is the vkey the access commands show.
VisitorVKey string
BridgeAddr string
BridgeIP string
BridgePort string
WindowsSuffix string
TCPIP string
TCPPort 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
// Features are the feature switches the templates test, by name.
Features map[string]bool
}
func (ManagementPageCommonData) LinkURLs ¶ added in v0.35.0
func (d ManagementPageCommonData) LinkURLs() map[string]string
LinkURLs are the launch links of the enabled bridge carriers, by type (auto where there is a mixed port, tcp, tls, quic, ws, wss, http, https): the one place the start commands take them from. A link has no vkey yet, "npc://@host:port", for the page to put in with npcLink (language.js); an HTTP link carries the path, a QUIC link the ALPN.
func (ManagementPageCommonData) Map ¶
func (d ManagementPageCommonData) Map() map[string]any
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