libRpc

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 GrpcClientCodeTemplate = `` /* 726-byte string literal not displayed */
View Source
const GrpcServerCodeTemplate = `` /* 2331-byte string literal not displayed */
View Source
const GrpcServiceCodeTemplate = `` /* 248-byte string literal not displayed */
View Source
const MicroClientCodeTemplate = `` /* 652-byte string literal not displayed */
View Source
const MicroServerCodeTemplate = `` /* 2387-byte string literal not displayed */
View Source
const MicroServiceCodeTemplate = `` /* 274-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"`
	Type               string `json:"type"`
	ProtoBufPath       string `json:"protubuf_path"`
	ClientOutputPath   string `json:"client_output_path"`
	ProtoGenOutputPath string `json:"proto_gen_output_path"`
	ServiceOutputPath  string `json:"service_output_path"`
	ServerOutputPath   string `json:"server_output_path"`
}

type FormatterGrpcClient

type FormatterGrpcClient struct {
	FormatterStruct
}

func NewFormatterGrpcClient

func NewFormatterGrpcClient() *FormatterGrpcClient

func (*FormatterGrpcClient) Format

func (f *FormatterGrpcClient) Format(cmdParams *CmdParams) IFormatter

func (*FormatterGrpcClient) WriteOut

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

type FormatterGrpcServer

type FormatterGrpcServer struct {
	FormatterStruct
}

func NewFormatterGrpcServer

func NewFormatterGrpcServer() *FormatterGrpcServer

func (*FormatterGrpcServer) Format

func (f *FormatterGrpcServer) Format(cmdParams *CmdParams) IFormatter

func (*FormatterGrpcServer) WriteOut

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

type FormatterGrpcService

type FormatterGrpcService struct {
	FormatterStruct
}

func NewFormatterGrpcService

func NewFormatterGrpcService() *FormatterGrpcService

func (*FormatterGrpcService) Format

func (f *FormatterGrpcService) Format(cmdParams *CmdParams) IFormatter

func (*FormatterGrpcService) WriteOut

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

type FormatterMicroClient

type FormatterMicroClient struct {
	FormatterStruct
}

func NewFormatterMicroClient

func NewFormatterMicroClient() *FormatterMicroClient

func (*FormatterMicroClient) Format

func (f *FormatterMicroClient) Format(cmdParams *CmdParams) IFormatter

func (*FormatterMicroClient) WriteOut

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

type FormatterMicroServer

type FormatterMicroServer struct {
	FormatterStruct
}

func NewFormatterMicroServer

func NewFormatterMicroServer() *FormatterMicroServer

func (*FormatterMicroServer) Format

func (f *FormatterMicroServer) Format(cmdParams *CmdParams) IFormatter

func (*FormatterMicroServer) WriteOut

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

type FormatterMicroService

type FormatterMicroService struct {
	FormatterStruct
}

func NewFormatterMicroService

func NewFormatterMicroService() *FormatterMicroService

func (*FormatterMicroService) Format

func (f *FormatterMicroService) Format(cmdParams *CmdParams) IFormatter

func (*FormatterMicroService) WriteOut

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

type FormatterStruct

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

格式化信息结构体

type IFormatter

type IFormatter interface {
	Format(cmdParams *CmdParams) 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