udwRpc2Builder

package
v0.0.0-...-f254aa5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RpcTypeKindNamedStruct = "namedStruct"
	RpcTypeKindString      = "string"
	RpcTypeKindInt         = "int"
	RpcTypeKindBool        = "bool"
	RpcTypeKindSlice       = "slice"
)

Variables

This section is empty.

Functions

func Generate

func Generate(req GenerateReq)

Types

type GenerateReq

type GenerateReq struct {
	RpcDefine        RpcService
	FromPkgPath      string
	FromObjName      string
	TargetPkgPath    string
	Prefix           string
	TargetFilePath   string
	GoFmt            bool
	DisableGenServer bool
	DisableGenClient bool
}

type RpcApi

type RpcApi struct {
	Pos                 int
	Name                string
	InputParameterList  []RpcParameter
	OutputParameterList []RpcParameter
}

type RpcField

type RpcField struct {
	Pos  int
	Name string
	Type RpcType
}

type RpcParameter

type RpcParameter struct {
	Pos  int
	Name string
	Type RpcType

	IsClientIp  bool
	IsHijackCtx bool
}

type RpcService

type RpcService struct {
	List []RpcApi
}

type RpcType

type RpcType struct {
	Kind       string
	Elem       *RpcType
	FieldList  []RpcField
	StructName string
	GoPkg      string
}

Jump to

Keyboard shortcuts

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