grpccodegen

package
v0.0.0-...-f078915 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

README

grpccodegen

import "github.com/blueprint-uservices/blueprint/plugins/grpc/grpccodegen"

Index

func CompileProtoFile

func CompileProtoFile(protoFileName string) error

Runs protoc on the specified protoFileName

func GenerateClient

func GenerateClient(builder golang.ModuleBuilder, service *gocode.ServiceInterface, outputPackage string) error

Generates a gRPC client for the specified service

func GenerateGRPCProto

func GenerateGRPCProto(builder golang.ModuleBuilder, service *gocode.ServiceInterface, outputPackage string) error

Generates the GRPC .proto file for the provided service interface, then compiles it using `protoc`.

See the plugin README for the required GRPC and protocol buffers package dependencies.

func GenerateServerHandler

func GenerateServerHandler(builder golang.ModuleBuilder, service *gocode.ServiceInterface, outputPackage string) error

This function is used by the GRPC plugin to generate the server-side GRPC service.

It is assumed that outputPackage is the same as the one where the .proto is generated to

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileProtoFile

func CompileProtoFile(protoFileName string) error

Runs protoc on the specified protoFileName

func GenerateClient

func GenerateClient(builder golang.ModuleBuilder, service *gocode.ServiceInterface, outputPackage string) error

Generates a gRPC client for the specified service

func GenerateGRPCProto

func GenerateGRPCProto(builder golang.ModuleBuilder, service *gocode.ServiceInterface, outputPackage string) error

Generates the GRPC .proto file for the provided service interface, then compiles it using `protoc`.

See the plugin README for the required GRPC and protocol buffers package dependencies.

func GenerateServerHandler

func GenerateServerHandler(builder golang.ModuleBuilder, service *gocode.ServiceInterface, outputPackage string) error

This function is used by the GRPC plugin to generate the server-side GRPC service.

It is assumed that outputPackage is the same as the one where the .proto is generated to

Types

This section is empty.

Jump to

Keyboard shortcuts

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