server

package
v0.0.0-...-2f2c2f3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdServer = &cobra.Command{
	Use:   "server",
	Short: "Generate the proto Server implementations",
	Long:  "Generate the proto Server implementations. Example: mars proto server api/xxx.proto -target-dir=internal/service",
	Run:   Run,
}

CmdServer the service command.

View Source
var MethodTemplate = `` /* 1292-byte string literal not displayed */
View Source
var MethodsTemplate1 = `` /* 359-byte string literal not displayed */
View Source
var MethodsTemplate2 = `` /* 323-byte string literal not displayed */
View Source
var MethodsTemplate3 = `` /* 280-byte string literal not displayed */
View Source
var MethodsTemplate4 = `` /* 302-byte string literal not displayed */

Functions

func ParseFunMap

func ParseFunMap(to string) map[string]struct{}

func Run

func Run(cmd *cobra.Command, args []string)

Types

type Method

type Method struct {
	Service string
	Name    string
	Request string
	Reply   string

	// type: unary or stream
	Type MethodType
}

Method is a proto method.

type MethodType

type MethodType uint8

type Service

type Service struct {
	Package     string
	Service     string
	Methods     []*Method
	GoogleEmpty bool

	UseIO      bool
	UseContext bool
}

Service is a proto service.

Jump to

Keyboard shortcuts

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