model

package
v8.4.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2017 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is responsible to load and handle the `Model(s)` inside a controller struct via the `iris:"model"` tag field. It stores the optional models from the struct's fields values that are being setted by the method function and set them as ViewData.

func Load

func Load(typ reflect.Type) *Controller

Load tries to lookup and set for any valid model field. Returns nil if no models are being used.

func (*Controller) Handle

func (mc *Controller) Handle(ctx context.Context, c reflect.Value)

Handle transfer the models to the view.

Jump to

Keyboard shortcuts

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