Documentation
¶
Index ¶
- func DefaultServiceStartCmd() *cli.Command
- func GetCommands(app *App) []cli.Command
- type App
- func GetVApp(ctx *cli.Context) (vapp *App)
- func NewAppWithOptions() (app *App)
- func NewSimpleApp(name string, appVersion vcmn.Version, apiVersion string, authors []cli.Author, ...) (app *App)
- func NewWebApp(name string, appVersion vcmn.Version, apiVersion string, authors []cli.Author, ...) (app *App)
- type Factory
- type Module
- type ModuleConfigFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultServiceStartCmd ¶
DefaultServiceStartCmd - give default service start command. If nothing special needs to be done during server start this command should be added to app.Commands array
func GetCommands ¶
GetCommands - gives commands related to HTTP networking
Types ¶
type App ¶
type App struct { cli.App Modules []*Module `json:"modules"` NetOptions vnet.Options `json:"netOptions"` IsService bool `json:"isService"` RequiresMongo bool `json:"requiresMongo"` }
App - the application itself
func NewAppWithOptions ¶
func NewAppWithOptions() (app *App)
NewAppWithOptions - creates app with non default options
func NewSimpleApp ¶
func NewSimpleApp( name string, appVersion vcmn.Version, apiVersion string, authors []cli.Author, requiresMongo bool, desc string) (app *App)
NewSimpleApp - an app that is not a service and does not use mongodb
func NewWebApp ¶
func NewWebApp( name string, appVersion vcmn.Version, apiVersion string, authors []cli.Author, requiresMongo bool, desc string) (app *App)
NewWebApp - creates a new web application with default options
func (*App) FromAppDir ¶
FromAppDir - gives a absolute path from a path relative to app directory
type Factory ¶
type Factory struct { DataType string `json:"dataType"` Func vmgo.FactoryFunc }
Factory - wraps data type name and a function to create an instance of it
type Module ¶
type Module struct { Name string `json:"name"` Description string `json:"desc"` Endpoints []*vnet.Endpoint `json:"endpoints"` Factories []Factory `json:"factory"` Commands []cli.Command Initialize ModuleConfigFunc Setup ModuleConfigFunc Reset ModuleConfigFunc }
Module - represents an application module
type ModuleConfigFunc ¶
ModuleConfigFunc Signature used by functions that are used to configure a module. Some config callbacks include - initialize, setup, reset etc