mix

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: GPL-3.0 Imports: 11 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHeaders

func DefaultHeaders() map[string]string

DefaultHeaders returns a set of Headers that apply to all mixers

func Write added in v1.10.7

func Write(w http.ResponseWriter, m Mixer) error

Write will set Headers and Write the response based on the Mixer

func WriteStatus added in v1.10.7

func WriteStatus(w http.ResponseWriter, status int, m Mixer) error

Write will set Headers and Write the response based on the Mixer

Types

type Bag added in v1.19.6

type Bag interface {
	SetValue(name string, val interface{})
	Values() map[string]interface{}
}

func NewBag added in v1.19.6

func NewBag() Bag

func NewDataBag added in v1.19.7

func NewDataBag(data interface{}) Bag

type Mixer

type Mixer interface {
	Reader() io.Reader
	Headers() map[string]string
}

Mixer is used by the drx.ite to ApplyHeaders and Write the Response from the Reader

func JSON

func JSON(data interface{}) Mixer

JSON is called before every function execution to setup the environment a Handler will expect

func Octet

func Octet(name string, data interface{}) Mixer

type MixerFactory added in v1.10.7

type MixerFactory interface {
	AddMenu(menu *menu.Menu)
	Create(r *http.Request, title, path string, data Bag) Mixer
	AddModifier(mod ModFunc)
}

func NewPageFactory added in v1.19.6

func NewPageFactory(files *template.Template, mods ...ModFunc) MixerFactory

type ModFunc added in v1.16.3

type ModFunc func(b Bag, r *http.Request)

ModFunc can be used to add additional values to the view bag before rendering

func EndpointMod added in v1.16.3

func EndpointMod(endpoints map[string]string) ModFunc

func IdentityMod added in v1.16.3

func IdentityMod(clientId string) ModFunc

Jump to

Keyboard shortcuts

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