pkg

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(path string) error

Init initializes Oogway inside the specified directory.

func Start

func Start(dir string, funcMap template.FuncMap) error

Start starts the Oogway server for given directory. The second argument is an optional template.FuncMap that will be merged into Oogway's funcmap.

Types

type Config

type Config struct {
	Server  ServerConfig  `toml:"server"`
	Content ContentConfig `toml:"content"`
	Sass    SassConfig    `toml:"sass"`
	JS      JSConfig      `toml:"js"`
	Pirsch  PirschConfig  `toml:"pirsch"`
}

Config is the Oogway application config.

type ContentConfig

type ContentConfig struct {
	NotFound string `toml:"not_found"`
}

ContentConfig is the content configuration.

type JSConfig

type JSConfig struct {
	Entrypoint string `toml:"entrypoint"`
	Dir        string `toml:"dir"`
	Watch      bool   `toml:"watch"`
	Out        string `toml:"out"`
	SourceMap  bool   `toml:"source_map"`
}

JSConfig is the JavaScript compiler configuration.

type PageData added in v1.5.0

type PageData struct {
	URL *url.URL
}

PageData is all data passed to the page template.

type PirschConfig

type PirschConfig struct {
	ClientID     string   `toml:"client_id"`
	ClientSecret string   `toml:"client_secret"`
	Subnets      []string `toml:"subnets"`
	Header       []string `toml:"header"`
}

PirschConfig is the configuration for pirsch.io.

type SassConfig

type SassConfig struct {
	Entrypoint   string `toml:"entrypoint"`
	Dir          string `toml:"dir"`
	Watch        bool   `toml:"watch"`
	Out          string `toml:"out"`
	OutSourceMap string `toml:"out_source_map"`
}

SassConfig is the sass compiler configuration.

type ServerConfig

type ServerConfig struct {
	Host            string `toml:"host"`
	Port            int    `toml:"port"`
	ShutdownTimeout int    `toml:"shutdown_time"`
	WriteTimeout    int    `toml:"write_timeout"`
	ReadTimeout     int    `toml:"read_timeout"`
	TLSCertFile     string `toml:"tls_cert_file"`
	TLSKeyFile      string `toml:"tls_key_file"`
}

ServerConfig is the HTTP server configuration.

Jump to

Keyboard shortcuts

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