protobuf

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package helloworld is a generated protocol buffer package.

It is generated from these files:

helloworld.proto

It has these top-level messages:

HelloRequest
MessageRequest
NumberIn
NumberOut
NullMessageRequest
HelloReply
TypeMessage

Index

Constants

This section is empty.

Variables

View Source
var TypeMessage_Corpus_name = map[int32]string{
	0: "UNIVERSAL",
	1: "WEB",
	2: "IMAGES",
}
View Source
var TypeMessage_Corpus_value = map[string]int32{
	"UNIVERSAL": 0,
	"WEB":       1,
	"IMAGES":    2,
}

Functions

func RegisterGreeterServer

func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)

Types

type GreeterClient

type GreeterClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
	CreateMessage(ctx context.Context, in *MessageRequest, opts ...grpc.CallOption) (*HelloReply, error)
	GetMessage(ctx context.Context, in *NullMessageRequest, opts ...grpc.CallOption) (*HelloReply, error)
	Calculate(ctx context.Context, in *NumberIn, opts ...grpc.CallOption) (*NumberOut, error)
	TypeList(ctx context.Context, in *TypeMessage, opts ...grpc.CallOption) (*TypeMessage, error)
}

func NewGreeterClient

func NewGreeterClient(cc *grpc.ClientConn) GreeterClient

type GreeterServer

type GreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	CreateMessage(context.Context, *MessageRequest) (*HelloReply, error)
	GetMessage(context.Context, *NullMessageRequest) (*HelloReply, error)
	Calculate(context.Context, *NumberIn) (*NumberOut, error)
	TypeList(context.Context, *TypeMessage) (*TypeMessage, error)
}

type HelloReply

type HelloReply struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message"`
}

The response message containing the greetings

func (*HelloReply) Descriptor

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

func (*HelloReply) GetMessage

func (m *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) Reset

func (m *HelloReply) Reset()

func (*HelloReply) String

func (m *HelloReply) String() string

type HelloRequest

type HelloRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name" json:"name"`
}

The request message containing the user's name.

func (*HelloRequest) Descriptor

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

func (*HelloRequest) GetName

func (m *HelloRequest) GetName() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset

func (m *HelloRequest) Reset()

func (*HelloRequest) String

func (m *HelloRequest) String() string

type MessageRequest

type MessageRequest struct {
	Str   string `protobuf:"bytes,1,opt,name=str" json:"str"`
	Count int64  `protobuf:"varint,2,opt,name=count" json:"count"`
}

func (*MessageRequest) Descriptor

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

func (*MessageRequest) GetCount

func (m *MessageRequest) GetCount() int64

func (*MessageRequest) GetStr

func (m *MessageRequest) GetStr() string

func (*MessageRequest) ProtoMessage

func (*MessageRequest) ProtoMessage()

func (*MessageRequest) Reset

func (m *MessageRequest) Reset()

func (*MessageRequest) String

func (m *MessageRequest) String() string

type NullMessageRequest

type NullMessageRequest struct {
}

func (*NullMessageRequest) Descriptor

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

func (*NullMessageRequest) ProtoMessage

func (*NullMessageRequest) ProtoMessage()

func (*NullMessageRequest) Reset

func (m *NullMessageRequest) Reset()

func (*NullMessageRequest) String

func (m *NullMessageRequest) String() string

type NumberIn

type NumberIn struct {
	Number1 float32 `protobuf:"fixed32,1,opt,name=number1" json:"number1"`
	Number2 float32 `protobuf:"fixed32,2,opt,name=number2" json:"number2,omitempty"`
}

func (*NumberIn) Descriptor

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

func (*NumberIn) GetNumber1

func (m *NumberIn) GetNumber1() float32

func (*NumberIn) GetNumber2

func (m *NumberIn) GetNumber2() float32

func (*NumberIn) ProtoMessage

func (*NumberIn) ProtoMessage()

func (*NumberIn) Reset

func (m *NumberIn) Reset()

func (*NumberIn) String

func (m *NumberIn) String() string

type NumberOut

type NumberOut struct {
	Number float32 `protobuf:"fixed32,1,opt,name=number" json:"number"`
}

func (*NumberOut) Descriptor

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

func (*NumberOut) GetNumber

func (m *NumberOut) GetNumber() float32

func (*NumberOut) ProtoMessage

func (*NumberOut) ProtoMessage()

func (*NumberOut) Reset

func (m *NumberOut) Reset()

func (*NumberOut) String

func (m *NumberOut) String() string

type TypeMessage

type TypeMessage struct {
	DoubleType     float64                    `protobuf:"fixed64,1,opt,name=doubleType" json:"doubleType,omitempty"`
	FloatType      float32                    `protobuf:"fixed32,2,opt,name=floatType" json:"floatType,omitempty"`
	Int32Type      int32                      `protobuf:"varint,3,opt,name=int32Type" json:"int32Type,omitempty"`
	Int64Type      int64                      `protobuf:"varint,4,opt,name=int64Type" json:"int64Type,omitempty"`
	BoolType       bool                       `protobuf:"varint,5,opt,name=boolType" json:"boolType,omitempty"`
	StringType     string                     `protobuf:"bytes,6,opt,name=stringType" json:"stringType,omitempty"`
	BytesType      []byte                     `protobuf:"bytes,7,opt,name=bytesType,proto3" json:"bytesType,omitempty"`
	Corpus         TypeMessage_Corpus         `protobuf:"varint,8,opt,name=corpus,enum=helloworld.TypeMessage_Corpus" json:"corpus,omitempty"`
	MessageRequest *MessageRequest            `protobuf:"bytes,9,opt,name=messageRequest" json:"messageRequest,omitempty"`
	RepeatedString []string                   `protobuf:"bytes,10,rep,name=repeatedString" json:"repeatedString,omitempty"`
	MapType        map[string]*MessageRequest `` /* 135-byte string literal not displayed */
	RepeatedInt    []int32                    `protobuf:"varint,12,rep,packed,name=repeatedInt" json:"repeatedInt,omitempty"`
	Uint32Type     uint32                     `protobuf:"varint,13,opt,name=uint32Type" json:"uint32Type,omitempty"`
	Uint64Type     uint64                     `protobuf:"varint,14,opt,name=uint64Type" json:"uint64Type,omitempty"`
	Sint32Type     int32                      `protobuf:"zigzag32,15,opt,name=sint32Type" json:"sint32Type,omitempty"`
	Sint64Type     int64                      `protobuf:"zigzag64,16,opt,name=sint64Type" json:"sint64Type,omitempty"`
	Fixed32Type    uint32                     `protobuf:"fixed32,17,opt,name=fixed32Type" json:"fixed32Type,omitempty"`
	Fixed64Type    uint64                     `protobuf:"fixed64,18,opt,name=fixed64Type" json:"fixed64Type,omitempty"`
	Sfixed32Type   int32                      `protobuf:"fixed32,19,opt,name=sfixed32Type" json:"sfixed32Type,omitempty"`
	Sfixed64Type   int64                      `protobuf:"fixed64,20,opt,name=sfixed64Type" json:"sfixed64Type,omitempty"`
}

func (*TypeMessage) Descriptor

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

func (*TypeMessage) GetBoolType

func (m *TypeMessage) GetBoolType() bool

func (*TypeMessage) GetBytesType

func (m *TypeMessage) GetBytesType() []byte

func (*TypeMessage) GetCorpus

func (m *TypeMessage) GetCorpus() TypeMessage_Corpus

func (*TypeMessage) GetDoubleType

func (m *TypeMessage) GetDoubleType() float64

func (*TypeMessage) GetFixed32Type

func (m *TypeMessage) GetFixed32Type() uint32

func (*TypeMessage) GetFixed64Type

func (m *TypeMessage) GetFixed64Type() uint64

func (*TypeMessage) GetFloatType

func (m *TypeMessage) GetFloatType() float32

func (*TypeMessage) GetInt32Type

func (m *TypeMessage) GetInt32Type() int32

func (*TypeMessage) GetInt64Type

func (m *TypeMessage) GetInt64Type() int64

func (*TypeMessage) GetMapType

func (m *TypeMessage) GetMapType() map[string]*MessageRequest

func (*TypeMessage) GetMessageRequest

func (m *TypeMessage) GetMessageRequest() *MessageRequest

func (*TypeMessage) GetRepeatedInt

func (m *TypeMessage) GetRepeatedInt() []int32

func (*TypeMessage) GetRepeatedString

func (m *TypeMessage) GetRepeatedString() []string

func (*TypeMessage) GetSfixed32Type

func (m *TypeMessage) GetSfixed32Type() int32

func (*TypeMessage) GetSfixed64Type

func (m *TypeMessage) GetSfixed64Type() int64

func (*TypeMessage) GetSint32Type

func (m *TypeMessage) GetSint32Type() int32

func (*TypeMessage) GetSint64Type

func (m *TypeMessage) GetSint64Type() int64

func (*TypeMessage) GetStringType

func (m *TypeMessage) GetStringType() string

func (*TypeMessage) GetUint32Type

func (m *TypeMessage) GetUint32Type() uint32

func (*TypeMessage) GetUint64Type

func (m *TypeMessage) GetUint64Type() uint64

func (*TypeMessage) ProtoMessage

func (*TypeMessage) ProtoMessage()

func (*TypeMessage) Reset

func (m *TypeMessage) Reset()

func (*TypeMessage) String

func (m *TypeMessage) String() string

type TypeMessage_Corpus

type TypeMessage_Corpus int32
const (
	TypeMessage_UNIVERSAL TypeMessage_Corpus = 0
	TypeMessage_WEB       TypeMessage_Corpus = 1
	TypeMessage_IMAGES    TypeMessage_Corpus = 2
)

func (TypeMessage_Corpus) EnumDescriptor

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

func (TypeMessage_Corpus) String

func (x TypeMessage_Corpus) String() string

Jump to

Keyboard shortcuts

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