todo

package
v0.0.0-...-b87fc4c Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DATABASE_Driver string = "mymysql"
	// mysql: "user:password@/dbname?charset=utf8&keepalive=1"
	// mymysql: tcp:localhost:3306*dbname/user/pwd
	DATABASE_DSN string = "tcp:localhost:3306*dbname/user/pwd"
)
View Source
var Config *goku.ServerConfig = &goku.ServerConfig{
	Addr:           ":8080",
	ReadTimeout:    10 * time.Second,
	WriteTimeout:   10 * time.Second,
	MaxHeaderBytes: 1 << 20,

	StaticPath: "static",
	ViewPath:   "views",

	LogLevel: goku.LOG_LEVEL_LOG,
	Debug:    true,
}
View Source
var Routes []*goku.Route = []*goku.Route{
	&goku.Route{
		Name:     "static",
		IsStatic: true,
		Pattern:  "/public/(.*)",
	},
	&goku.Route{
		Name:       "edit",
		Pattern:    "/{controller}/{id}/{action}",
		Default:    map[string]string{"action": "edit"},
		Constraint: map[string]string{"id": "\\d+"},
	},
	&goku.Route{
		Name:    "default",
		Pattern: "/{controller}/{action}",
		Default: map[string]string{"controller": "todo", "action": "index"},
	},
}

routes

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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