libRestful

package
v0.0.0-...-480cc5f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const EchoRestfulCodeTemplate = `` /* 863-byte string literal not displayed */
View Source
const GinRestfulCodeTemplate = `` /* 859-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdParams

type CmdParams struct {
	Name       string `json:"name"`
	Engine     string `json:"engine"`
	OutputPath string `json:"output_path"`
}

type FormatterEchoEngine

type FormatterEchoEngine struct {
	FormatterStruct
}

func NewFormatterEchoEngine

func NewFormatterEchoEngine() *FormatterEchoEngine

func (*FormatterEchoEngine) Format

func (f *FormatterEchoEngine) Format(name string) IFormatter

func (*FormatterEchoEngine) WriteOut

func (f *FormatterEchoEngine) WriteOut(writer io.Writer) error

type FormatterGinEngine

type FormatterGinEngine struct {
	FormatterStruct
}

func NewFormatterGinEngine

func NewFormatterGinEngine() *FormatterGinEngine

func (*FormatterGinEngine) Format

func (f *FormatterGinEngine) Format(name string) IFormatter

func (*FormatterGinEngine) WriteOut

func (f *FormatterGinEngine) WriteOut(writer io.Writer) error

type FormatterStruct

type FormatterStruct struct {
	PackageName string
	ImportList  map[string]ImportItem
	StructName  string
	RouteGroup  string
}

格式化信息结构体

type IFormatter

type IFormatter interface {
	Format(name string) IFormatter
	WriteOut(writer io.Writer) error
}

type ImportItem

type ImportItem struct {
	Alias   string
	Package string
}

Jump to

Keyboard shortcuts

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