config

package
Version: v0.0.0-...-c65c995 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2016 License: Apache-2.0 Imports: 8 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 {
	PathScope   string
	Root        http.FileSystem
	BaseURL     string
	AbsoluteURL string
	AddrPath    string
	Token       string // Anti CSRF token
	StyleSheet  string // Costum stylesheet
	FrontMatter string // Default frontmatter to save files in
	HugoEnabled bool   // Enables the Hugo plugin for File Manager
}

Config is a configuration for browsing in a particualr path.

func Parse

func Parse(c *caddy.Controller) ([]Config, error)

Parse parses the configuration set by the user so it can be used by the middleware

func (Config) CheckToken

func (c Config) CheckToken(r *http.Request) bool

CheckToken checs if current token is the same as the one used in the request

func (*Config) GenerateToken

func (c *Config) GenerateToken()

GenerateToken geneerates a new token

Jump to

Keyboard shortcuts

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