proto

package
v2.1.1-0...-182a82a Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Enum_name = map[int32]string{
		0: "UNKNOWN",
		1: "ON",
		2: "OFF",
	}
	Enum_value = map[string]int32{
		"UNKNOWN": 0,
		"ON":      1,
		"OFF":     2,
	}
)

Enum value maps for Enum.

View Source
var File_proto_echo_proto protoreflect.FileDescriptor

Functions

func RegisterExternalServer

func RegisterExternalServer(s *grpc.Server, srv ExternalServer)

func RegisterTypetestServer

func RegisterTypetestServer(s *grpc.Server, srv TypetestServer)

Types

type Data

type Data struct {
	Enum    Enum    `protobuf:"varint,1,opt,name=enum,proto3,enum=semaphore.typetest.Enum" json:"enum,omitempty"`
	String_ string  `protobuf:"bytes,2,opt,name=string,proto3" json:"string,omitempty"`
	Integer int64   `protobuf:"varint,3,opt,name=integer,proto3" json:"integer,omitempty"`
	Double  float64 `protobuf:"fixed64,4,opt,name=double,proto3" json:"double,omitempty"`
	Numbers []int64 `protobuf:"varint,5,rep,packed,name=numbers,proto3" json:"numbers,omitempty"`
	// contains filtered or unexported fields
}

func (*Data) Descriptor deprecated

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

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetDouble

func (x *Data) GetDouble() float64

func (*Data) GetEnum

func (x *Data) GetEnum() Enum

func (*Data) GetInteger

func (x *Data) GetInteger() int64

func (*Data) GetNumbers

func (x *Data) GetNumbers() []int64

func (*Data) GetString_

func (x *Data) GetString_() string

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

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

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

type Enum

type Enum int32
const (
	Enum_UNKNOWN Enum = 0
	Enum_ON      Enum = 1
	Enum_OFF     Enum = 2
)

func (Enum) Descriptor

func (Enum) Descriptor() protoreflect.EnumDescriptor

func (Enum) Enum

func (x Enum) Enum() *Enum

func (Enum) EnumDescriptor deprecated

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

Deprecated: Use Enum.Descriptor instead.

func (Enum) Number

func (x Enum) Number() protoreflect.EnumNumber

func (Enum) String

func (x Enum) String() string

func (Enum) Type

func (Enum) Type() protoreflect.EnumType

type ExternalClient

type ExternalClient interface {
	Post(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error)
}

ExternalClient is the client API for External 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 NewExternalClient

func NewExternalClient(cc grpc.ClientConnInterface) ExternalClient

type ExternalServer

type ExternalServer interface {
	Post(context.Context, *Data) (*Data, error)
	// contains filtered or unexported methods
}

ExternalServer is the server API for External service. All implementations must embed UnimplementedExternalServer for forward compatibility

type Request

type Request struct {
	Data *Data `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetData

func (x *Request) GetData() *Data

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Echo *Data `protobuf:"bytes,1,opt,name=echo,proto3" json:"echo,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetEcho

func (x *Response) GetEcho() *Data

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type TypetestClient

type TypetestClient interface {
	Run(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

TypetestClient is the client API for Typetest 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 NewTypetestClient

func NewTypetestClient(cc grpc.ClientConnInterface) TypetestClient

type TypetestServer

type TypetestServer interface {
	Run(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

TypetestServer is the server API for Typetest service. All implementations must embed UnimplementedTypetestServer for forward compatibility

type UnimplementedExternalServer

type UnimplementedExternalServer struct {
}

UnimplementedExternalServer must be embedded to have forward compatible implementations.

func (*UnimplementedExternalServer) Post

type UnimplementedTypetestServer

type UnimplementedTypetestServer struct {
}

UnimplementedTypetestServer must be embedded to have forward compatible implementations.

func (*UnimplementedTypetestServer) Run

Jump to

Keyboard shortcuts

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