generator

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package generator generates connnect service for python.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct{}

type GeneratedFile

type GeneratedFile struct {
	*protogen.GeneratedFile
	// contains filtered or unexported fields
}

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(plugin *protogen.Plugin, cfg *Config) (*Generator, error)

func (*Generator) Generate

func (g *Generator) Generate()

type Method

type Method struct {
	Method   string
	FullName string
	RPCType  RPCType
	Options  protoreflect.ProtoMessage
	// contains filtered or unexported fields
}

type PythonIdent

type PythonIdent struct {
	PythonName       string
	PythonImportPath PythonImportPath
}

PythonIdent is a Python identifier, consisting of a name and import path.

The name is a single identifier and may not be a dot-qualified selector.

func (PythonIdent) String

func (id PythonIdent) String() string

type PythonImportPath

type PythonImportPath string

PythonImportPath is the import path of a Python package.

For example: "google.protobuf.descriptor".

func (PythonImportPath) Ident

func (p PythonImportPath) Ident(s string) PythonIdent

Ident returns a PythonIdent with s as the PythonName and p as the PythonImportPath.

func (PythonImportPath) String

func (p PythonImportPath) String() string

type RPCType

type RPCType int
const (
	Unary RPCType = iota
	ServerStreaming
	ClientStreaming
	BidirectionalStreaming
)

Jump to

Keyboard shortcuts

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