wrap

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoProtoFile        = errors.New("proto file path is required")
	ErrOpeningProtoFile   = errors.New("error opening the proto file")
	ErrFailedToParseProto = errors.New("failed to parse proto file")
	ErrGeneratingWrapper  = errors.New("error while generating the code using proto file")
	ErrWritingFile        = errors.New("error writing the generated code to the file")
)

Functions

func BuildGRPCKiteClient

func BuildGRPCKiteClient(protoPath, outDir string) (string, error)

BuildGRPCKiteClient generates gRPC client wrapper code based on a proto definition.

func BuildGRPCKiteServer

func BuildGRPCKiteServer(protoPath, outDir string) (string, error)

BuildGRPCKiteServer generates gRPC server code based on a proto definition.

Types

type FileType

type FileType struct {
	FileSuffix    string
	CodeGenerator func(*WrapperData) string
}

type ProtoService

type ProtoService struct {
	Name    string
	Methods []ServiceMethod
}

ProtoService represents a service in a proto file.

type ServiceMethod

type ServiceMethod struct {
	Name            string
	Request         string
	Response        string
	StreamsRequest  bool
	StreamsResponse bool
}

ServiceMethod represents a method in a proto service.

type WrapperData

type WrapperData struct {
	Package  string
	Service  string
	Methods  []ServiceMethod
	Requests []string
	Source   string
}

WrapperData is the template data structure.

Jump to

Keyboard shortcuts

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