service

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateHandle added in v1.1.8

func GenerateHandle(mod string) (err error)

func GenerateHttp added in v1.1.8

func GenerateHttp(mod string) (err error)

func GeneratorEndpoint added in v1.1.8

func GeneratorEndpoint(mod, name string) (err error)

func GeneratorService added in v1.1.8

func GeneratorService(mod, name string) (err error)

生成新的service

func WireEndpoint added in v1.1.8

func WireEndpoint(mod string) (err error)

func WireService added in v1.1.8

func WireService(mod string) (err error)

对更新wire文件

Types

type EndpointFunc added in v1.1.8

type EndpointFunc struct {
	Mod   string
	Funcs []*Funcs
}

type Field added in v1.1.8

type Field struct {
	Name       Name
	TypeString string
}

func (*Field) Log added in v1.1.8

func (f *Field) Log(prefix string)

func (*Field) ParseFeildType added in v1.1.8

func (f *Field) ParseFeildType(expr ast.Expr)

type Func added in v1.1.8

type Func struct {
	Name     Name
	Request  []*Field
	Response []*Field
	FunCode  string
	Method   string
}

func (*Func) GenerateEmptyFunc added in v1.1.8

func (f *Func) GenerateEmptyFunc(name string) (code string)

func (*Func) GenerateFunc added in v1.1.8

func (f *Func) GenerateFunc(name string) (code string)

type Funcs added in v1.1.8

type Funcs struct {
	Name   string
	Path   string
	Method string
}

type Name added in v1.1.8

type Name struct {
	Class  string
	Camel  string
	Snake  string
	Hyphen string
}

func NewName added in v1.1.8

func NewName(name string) (n *Name)

type Parser added in v1.1.8

type Parser struct {
	Name     Name
	Funcs    []*Func
	Packages []string
}

func ParseFile added in v1.1.8

func ParseFile(path, name string) (p *Parser, err error)

func (*Parser) GenPackage added in v1.1.8

func (p *Parser) GenPackage(pkg *Pkg)

type Pkg added in v1.1.8

type Pkg struct {
	Files []*ast.File
}

func NewPkg added in v1.1.8

func NewPkg(dirs []string) (pkg *Pkg, err error)

func (*Pkg) ParseFeild added in v1.1.8

func (pkg *Pkg) ParseFeild(af *ast.Field) (f *Field)

type Service added in v1.1.8

type Service struct {
	Name        *Name
	ServiceName string
	NewFuncName string
}

func ParseServiceWire added in v1.1.8

func ParseServiceWire(path string) (w []*Service, err error)

type ServiceTplParam added in v1.1.8

type ServiceTplParam struct {
	Mod   string
	Class string
	Camel string
}

type ServiceWireTplParam added in v1.1.8

type ServiceWireTplParam struct {
	Mod         string
	ServiceList []*Service
}

Jump to

Keyboard shortcuts

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