render

package
Version: v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright (C) 2016-2017 dapperdox.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var Render *render.Render

Render is a global instance of github.com/unrolled/render.Render

Functions

func DefaultVars

func DefaultVars(req *http.Request, apiSpec *spec.APISpecification, m Vars) map[string]interface{}

---------------------------------------------------------------------------------------- DefaultVars adds the default vars (config, specs, others....) to the data map

func HTML

func HTML(w http.ResponseWriter, status int, name string, binding interface{}, htmlOpt ...render.HTMLOptions)

---------------------------------------------------------------------------------------- HTML is an alias to github.com/unrolled/render.Render.HTML

func New

func New() *render.Render

---------------------------------------------------------------------------------------- New creates a new instance of github.com/unrolled/render.Render

func Register

func Register()

func SetGuidesNavigation

func SetGuidesNavigation(apiSpec *spec.APISpecification, guidesnav *[]*navigation.NavigationNode)

----------------------------------------------------------------------------------------

func TemplateLookup

func TemplateLookup(t string) *template.Template

----------------------------------------------------------------------------------------

Types

type GuideType

type GuideType []*navigation.NavigationNode

var guides interface{}

type HTMLWriter

type HTMLWriter struct {
	// contains filtered or unexported fields
}

----------------------------------------------------------------------------------------

func (HTMLWriter) Flush

func (w HTMLWriter) Flush()

func (HTMLWriter) Header

func (w HTMLWriter) Header() http.Header

func (HTMLWriter) Write

func (w HTMLWriter) Write(data []byte) (int, error)

func (HTMLWriter) WriteHeader

func (w HTMLWriter) WriteHeader(int)

type Vars

type Vars map[string]interface{}

Vars is a map of variables

Source Files

Directories

Path Synopsis

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