lib

package
v0.0.0-...-0327b1c Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version   = "0.0.1"
	BuildDate = "2016-09-11"
)
View Source
const AppTemplate = `` /* 1274-byte string literal not displayed */

Variables

View Source
var ControllerPkgName = "gone"
View Source
var ControllerPkgPath = "github.com/go-one/gone"
View Source
var ControllerTypeName = "Controller"

Functions

func DecrLogOffset

func DecrLogOffset()

func ErrorLog

func ErrorLog(s string, args ...interface{})

func GenerateSource

func GenerateSource(a *Application) (string, error)

func GetGOPATH

func GetGOPATH() string

func IncrLogOffset

func IncrLogOffset()

func InfoLog

func InfoLog(s string, args ...interface{})

func Log

func Log(prefix, s string)

Log split string by \n, and

func LogPlace

func LogPlace() string

func PrefixString

func PrefixString(place, s string, attrs ...color.Attribute) string

func ShowBanner

func ShowBanner(c *cli.Context) error

func TypeContainsController

func TypeContainsController(t *tparser.Type) (bool, string, bool)

Types

type AppSourceGenerator

type AppSourceGenerator struct {
	*Application
}

type Application

type Application struct {
	Controllers []*Controller
	Routes      []*Route
	Packages    map[string]string
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication(path string) *Application

func (*Application) Build

func (a *Application) Build() error

func (*Application) LoadConfig

func (a *Application) LoadConfig()

func (*Application) Run

func (a *Application) Run() error

type ApplicationConfig

type ApplicationConfig struct {
	BuildPath        string
	ControllersPaths []string
	RoutesPaths      []string
}

type Controller

type Controller struct {
	Name             string
	PkgPath          string
	PkgAlias         string
	PathToController string
	PtrController    bool
	Type             *tparser.Type
}

type Route

type Route struct {
	Route             string
	HTPPMethods       []string
	HandlerPackage    string
	HandlerController string
	HandlerAction     string
	Alias             string
	Controller        *Controller
}

func ParseRoutes

func ParseRoutes(path string) ([]*Route, error)

Jump to

Keyboard shortcuts

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