gogen

package
v1.10.55 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 27 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTypes

func BuildTypes(types []spec.Type) (string, error)

func Category

func Category() string

func Clean

func Clean() error

func DoGenProject

func DoGenProject(apiFile, dir, style string) error

func GenTemplates

func GenTemplates(_ *cli.Context) error

func GoCommand

func GoCommand(c *cli.Context) error

func RevertTemplate

func RevertTemplate(name string) error

func Update

func Update() error

Types

type Handler

type Handler struct {
	ImportPackages string
	HandlerName    string
	RequestType    string
	LogicType      string
	Call           string
	HasResp        bool
	HasRequest     bool
}

type Imports added in v1.10.14

type Imports []string

func (Imports) Contains added in v1.10.14

func (arr Imports) Contains(s string) bool

func (Imports) ToString added in v1.10.14

func (arr Imports) ToString() string

type LogicData added in v1.10.15

type LogicData struct {
	Function     string
	ResponseType string
	ReturnString string
	Request      string
}

type RouterGroup added in v1.10.14

type RouterGroup struct {
	ImportPackages string
	Handlers       []Handler
}

Jump to

Keyboard shortcuts

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