generator

package
v0.0.1-dev Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStreamMethod               = errors.New("dubbo doesn't support stream method")
	ErrMoreExtendArgsRespFieldNum = errors.New("extend args for response message should only has 1 field")
	ErrNoExtendArgsRespFieldNum   = errors.New("extend args for response message should has a field")
)

Functions

func GenDubbo

func GenDubbo(g *protogen.GeneratedFile, dubboGo *Dubbogo)

Types

type Dubbogo

type Dubbogo struct {
	*protogen.File

	Source       string
	ProtoPackage string
	Services     []*Service
}

func ProcessProtoFile

func ProcessProtoFile(g *protogen.GeneratedFile, file *protogen.File) (*Dubbogo, error)

type Method

type Method struct {
	MethodName string
	InvokeName string

	// empty when RequestExtendArgs is true
	RequestType       string
	RequestExtendArgs bool
	ArgsType          []string
	ArgsName          []string

	ResponseExtendArgs bool
	ReturnType         string
}

type Service

type Service struct {
	ServiceName   string
	InterfaceName string
	Methods       []*Method
}

Jump to

Keyboard shortcuts

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