Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConfigTemplate string = `` /* 2026-byte string literal not displayed */
ConfigTemplate defines service configuration in YAML
var ConfigYAMLTemplate string = `` /* 856-byte string literal not displayed */
var HealthCheckProtoTemplate string = `` /* 386-byte string literal not displayed */
var MainTemplate string = `` /* 2627-byte string literal not displayed */
var RPCTemplate string = `` /* 342-byte string literal not displayed */
var ServiceTemplate string = `package {{.ServiceName}}
// Implementation implements {{.ServiceName}} interface
type Implementation struct{}
`
Functions ¶
This section is empty.
Types ¶
type ConfigInfo ¶
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 ¶
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 ¶
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 ¶
MainInfo represents the main file information
func NewMainInfo ¶
NewMainInfo returns a new MainInfo pointer
func (*MainInfo) RenderFile ¶
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 ¶
NewRPCInfo returns a new RPCInfo pointer
func (*RPCInfo) RenderFile ¶
RenderFile render template and output to file
type ServiceInfo ¶
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