protogen

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SocketType_name = map[int32]string{
		0: "TCP",
		1: "UNIX",
	}
	SocketType_value = map[string]int32{
		"TCP":  0,
		"UNIX": 1,
	}
)

Enum value maps for SocketType.

View Source
var Catalog_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "catalog.Catalog",
	HandlerType: (*CatalogServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Add",
			Handler:    _Catalog_Add_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Catalog_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "catalog/protos/catalog.proto",
}

Catalog_ServiceDesc is the grpc.ServiceDesc for Catalog service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_catalog_protos_catalog_proto protoreflect.FileDescriptor

Functions

func RegisterCatalogServer

func RegisterCatalogServer(s grpc.ServiceRegistrar, srv CatalogServer)

Types

type CatalogClient

type CatalogClient interface {
	Add(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Empty, error)
	Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Service, error)
}

CatalogClient is the client API for Catalog service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCatalogClient

func NewCatalogClient(cc grpc.ClientConnInterface) CatalogClient

type CatalogServer

type CatalogServer interface {
	Add(context.Context, *Service) (*Empty, error)
	Get(context.Context, *GetReq) (*Service, error)
	// contains filtered or unexported methods
}

CatalogServer is the server API for Catalog service. All implementations must embed UnimplementedCatalogServer for forward compatibility

type Empty

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

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GetReq

type GetReq struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetReq) Descriptor deprecated

func (*GetReq) Descriptor() ([]byte, []int)

Deprecated: Use GetReq.ProtoReflect.Descriptor instead.

func (*GetReq) GetName

func (x *GetReq) GetName() string

func (*GetReq) ProtoMessage

func (*GetReq) ProtoMessage()

func (*GetReq) ProtoReflect

func (x *GetReq) ProtoReflect() protoreflect.Message

func (*GetReq) Reset

func (x *GetReq) Reset()

func (*GetReq) String

func (x *GetReq) String() string

type Service

type Service struct {
	Name       string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Address    string     `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	SocketType SocketType `protobuf:"varint,3,opt,name=socket_type,json=socketType,proto3,enum=catalog.SocketType" json:"socket_type,omitempty"`
	// contains filtered or unexported fields
}

func (*Service) Descriptor deprecated

func (*Service) Descriptor() ([]byte, []int)

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetAddress

func (x *Service) GetAddress() string

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetSocketType

func (x *Service) GetSocketType() SocketType

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

func (x *Service) ProtoReflect() protoreflect.Message

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type SocketType

type SocketType int32
const (
	SocketType_TCP  SocketType = 0
	SocketType_UNIX SocketType = 1
)

func (SocketType) Descriptor

func (SocketType) Descriptor() protoreflect.EnumDescriptor

func (SocketType) Enum

func (x SocketType) Enum() *SocketType

func (SocketType) EnumDescriptor deprecated

func (SocketType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SocketType.Descriptor instead.

func (SocketType) Number

func (x SocketType) Number() protoreflect.EnumNumber

func (SocketType) String

func (x SocketType) String() string

func (SocketType) Type

type UnimplementedCatalogServer

type UnimplementedCatalogServer struct {
}

UnimplementedCatalogServer must be embedded to have forward compatible implementations.

func (UnimplementedCatalogServer) Add

func (UnimplementedCatalogServer) Get

type UnsafeCatalogServer

type UnsafeCatalogServer interface {
	// contains filtered or unexported methods
}

UnsafeCatalogServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CatalogServer will result in compilation errors.

Jump to

Keyboard shortcuts

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