page

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

package page provides mechanisms and data for generating a WriteFreely page.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StaticPage

type StaticPage struct {
	// App configuration
	config.AppCfg
	Version   string
	HeaderNav bool

	// Request values
	Path          string
	Username      string
	Values        map[string]string
	Flashes       []string
	CanViewReader bool
	IsAdmin       bool
	CanInvite     bool
}

func (StaticPage) OfficialVersion added in v0.9.0

func (sp StaticPage) OfficialVersion() string

func (*StaticPage) SanitizeHost

func (sp *StaticPage) SanitizeHost(cfg *config.Config)

SanitizeHost alters the StaticPage to contain a real hostname. This is especially important for the Tor hidden service, as it can be served over proxies, messing up the apparent hostname.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL