controllers

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GettingStart *_GettingStart
)

Functions

func NewAppConfig

func NewAppConfig(config gogo.Configer) error

NewAppConfig apply application config from *gogo.AppConfig

Types

type AppConfig

type AppConfig struct {
	Domain       string              `json:"domain"`
	Model        *models.Config      `json:"model"`
	GettingStart *GettingStartConfig `json:"getting_start"`
}

Application configuration specs

var (
	Config *AppConfig
)

type Application

type Application struct {
	*gogo.AppServer
}

func New

func New(runMode, srcPath string) *Application

func (*Application) Middlewares

func (app *Application) Middlewares()

Middlerwares implements gogo.Middlewarer NOTE: DO NOT change the method name, its required by gogo!

func (*Application) Resources

func (app *Application) Resources()

Resources implements gogo.Resourcer NOTE: DO NOT change the method name, its required by gogo!

func (*Application) Run

func (app *Application) Run()

Run runs application after registering middelwares and resources

type GettingStartConfig

type GettingStartConfig struct {
	Greeting string `json:"greeting"`
}

Sample application config for illustration

Jump to

Keyboard shortcuts

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