structs

package
Version: v0.0.0-...-0c73920 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server      Server      `toml:"server"`
	Database    Database    `toml:"database"`
	PageContext PageContext `toml:"pageContext"`
}

Config is a structure containing global website configuration.

See the comments for Server, Database and PageContext for more details.

type Database

type Database struct {
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	User     string `toml:"user"`
	Password string `toml:"password"`
	Name     string `toml:"name"`
}

type Globals

type Globals struct {
	PageData    interface{}
	PageContext PageContext
}

Globals is a structure containing template data.

type PageContext

type PageContext struct {
	LongName        string `toml:"longName"`
	ShortName       string `toml:"shortName"`
	SiteDescription string `toml:"siteDescription"`
	URLPrefix       string `toml:"urlPrefix"`
	FullURL         string `toml:"fullURL"`
	MainTwitter     string `toml:"mainTwitter"`
	MainFacebook    string `toml:"mainFacebook"`
}

PageContext is a structure containing static information to provide to all page templates.

This contains the website's long and short names, as well as a directory of pages for navigation.

type Server

type Server struct {
	Address string `toml:"address"`
	Port    int    `toml:"port"`
	Timeout int    `toml:"timeout"`
}

Server is a structure containing server configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL