server

package
v0.0.0-...-be8d9e5 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(fileType string, files ...File)

func NewConfigFile

func NewConfigFile()

func NewCtrl

func NewCtrl(gs ...*core.Group)

func NewDBFile

func NewDBFile()

func NewDao

func NewDao(gs ...*core.Group)

func NewEntity

func NewEntity(gs ...*core.Group)

func NewRbac

func NewRbac(groups ...*core.Group)

func NewRoute

func NewRoute(groups ...*core.Group)

func NewUtils

func NewUtils()

Types

type Class

type Class struct {
	Name   string
	Fields []Field
	Funcs  []Func
}

func (*Class) AddField

func (c *Class) AddField(name, fType string, tags ...string)

func (*Class) AddFunc

func (c *Class) AddFunc(f Func) *Class

func (*Class) String

func (c *Class) String(fileType string) string

type Field

type Field struct {
	Name string
	Type string
	Tag  string
}

type File

type File struct {
	Pkg      string // ctrl,entity,dao,router
	Name     string
	Class    []Class
	Import   []string
	Variable []string
	Funcs    []Func
}

func (*File) AddFunc

func (f *File) AddFunc(fun Func) *File

func (*File) AddVariable

func (f *File) AddVariable(v string) *File

func (*File) String

func (f *File) String() string

type Func

type Func struct {
	Name  string
	Param string
	Ret   string
	Body  []string
}

func NewFunc

func NewFunc(name, parameter, ret, body string) Func

NewFunc

func (*Func) String

func (f *Func) String(classType, className string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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