grpc

package
v0.0.0-...-7995a24 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigTemplate string = `` /* 2026-byte string literal not displayed */

ConfigTemplate defines service configuration in YAML

View Source
var ConfigYAMLTemplate string = `` /* 856-byte string literal not displayed */
View Source
var HealthCheckProtoTemplate string = `` /* 386-byte string literal not displayed */
View Source
var MainTemplate string = `` /* 2627-byte string literal not displayed */
View Source
var RPCTemplate string = `` /* 342-byte string literal not displayed */
View Source
var ServiceTemplate string = `package {{.ServiceName}}

// Implementation implements {{.ServiceName}} interface
type Implementation struct{}
`

Functions

This section is empty.

Types

type ConfigInfo

type ConfigInfo struct {
	Opts *option.Options
}

ConfigInfo represents the Config information

func NewConfigInfo

func NewConfigInfo(opts ...option.Option) *ConfigInfo

NewConfigInfo returns a new ConfigInfo pointer

func (*ConfigInfo) RenderFile

func (config *ConfigInfo) RenderFile(outputPath string) error

RenderFile render template and output to file

type ConfigYAMLInfo

type ConfigYAMLInfo struct {
	Opts *option.Options
}

ConfigYAMLInfo represents Config YAML information

func NewConfigYAMLInfo

func NewConfigYAMLInfo(opts ...option.Option) *ConfigYAMLInfo

NewConfigYAMLInfo returns a new ConfigYAMLInfo pointer

func (*ConfigYAMLInfo) RenderFile

func (yaml *ConfigYAMLInfo) RenderFile(outputPath string) error

RenderFile render template and output to file

type HealthCheckProtoInfo

type HealthCheckProtoInfo struct {
	Opts *option.Options
}

HealthCheckProtoInfo represents the health check protobuf file information

func NewHealthCheckProtoInfo

func NewHealthCheckProtoInfo(opts ...option.Option) *HealthCheckProtoInfo

NewHealthCheckProtoInfo returns a new HealthCheckProtoInfo pointer

func (*HealthCheckProtoInfo) RenderFile

func (proto *HealthCheckProtoInfo) RenderFile(outputPath string) error

RenderFile render template and output to file

type MainInfo

type MainInfo struct {
	Opts              *option.Options
	ConfigPackagePath string
}

MainInfo represents the main file information

func NewMainInfo

func NewMainInfo(opts ...option.Option) *MainInfo

NewMainInfo returns a new MainInfo pointer

func (*MainInfo) RenderFile

func (main *MainInfo) RenderFile(outputPath string) error

RenderFile render template and output to file

type RPCInfo

type RPCInfo struct {
	Opts                *option.Options
	PackageName         string
	ServiceName         string
	ImportedPackageName string
	RPCName             string
	Request             string
	Response            string
}

RPCInfo represents the gRPC RPC information

func NewRPCInfo

func NewRPCInfo(opts ...option.Option) *RPCInfo

NewRPCInfo returns a new RPCInfo pointer

func (*RPCInfo) RenderFile

func (rpc *RPCInfo) RenderFile(outputPath string) error

RenderFile render template and output to file

type ServiceInfo

type ServiceInfo struct {
	Opts        *option.Options
	ServiceName string
}

ServiceInfo represents the gRPC service information

func NewServiceInfo

func NewServiceInfo(opts ...option.Option) *ServiceInfo

NewServiceInfo returns a new ServiceInfo pointer

func (*ServiceInfo) RenderFile

func (service *ServiceInfo) RenderFile(outputPath string) error

RenderFile render template and output to file

Jump to

Keyboard shortcuts

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