kweb

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: Apache-2.0 Imports: 20 Imported by: 1

README

kweb

个人web框架整理

  1. 生成错误信息文件``
  2. 生成页面校验文件
  3. 生成sql 文件

github.com/antonmedv/expr

Documentation

Index

Constants

View Source
const (
	HomeFlag  = "home"
	TraceFlag = "trace"
)

Variables

View Source
var GenErrorsCmd = &cobra.Command{
	Use:     "errs",
	Aliases: []string{"err"},
	Short:   "Show version info",
	Run: func(cmd *cobra.Command, args []string) {
	},
}
View Source
var GenFormCmd = &cobra.Command{
	Use:     "errs",
	Aliases: []string{"err"},
	Short:   "Show version info",
	Run: func(cmd *cobra.Command, args []string) {
	},
}

Functions

func GetApp added in v0.0.2

func GetApp() *app

func InitApp added in v0.0.2

func InitApp() *app

Types

type DbConfig added in v0.0.2

type DbConfig struct {
	Schema       string
	Name         string
	DbUrl        string
	MaxIdleConns int
}

type Executor

type Executor struct {
	*cobra.Command
	Exit func(int) // this is os.Exit by default, override in tests
}

Executor wraps the cobra Command with a nicer Execute method

func (Executor) Execute

func (e Executor) Execute() error

execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

type ExitCoder

type ExitCoder interface {
	ExitCode() int
}

type KError added in v0.0.3

type KError struct {
	Code string
	Msg  string
}

type KErrors added in v0.0.2

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

func (*KErrors) FromPath added in v0.0.3

func (t *KErrors) FromPath(cfg string)

func (*KErrors) Get added in v0.0.3

func (t *KErrors) Get(ns, name string, args ...interface{}) *KError

type KForm added in v0.0.3

type KForm struct {
	Parser expr.Node
	Msg    string
}

type KForms added in v0.0.2

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

func (*KForms) FromPath added in v0.0.3

func (t *KForms) FromPath(cfg string)

func (*KForms) Validator added in v0.0.3

func (t *KForms) Validator(form string, r io.Reader) string

type KSQLs added in v0.0.2

type KSQLs struct {
}

Directories

Path Synopsis
internal
g

Jump to

Keyboard shortcuts

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