golang

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package golang is a generated protocol buffer package.

It is generated from these files:

test.proto

It has these top-level messages:

TestRequest
TestResponse
CustomOption

Index

Constants

This section is empty.

Variables

View Source
var E_Mopt1 = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.MethodOptions)(nil),
	ExtensionType: (*bool)(nil),
	Field:         50059,
	Name:          "test.mopt1",
	Tag:           "varint,50059,opt,name=mopt1",
	Filename:      "test.proto",
}
View Source
var E_Mopt2 = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.MethodOptions)(nil),
	ExtensionType: (*CustomOption)(nil),
	Field:         50060,
	Name:          "test.mopt2",
	Tag:           "bytes,50060,opt,name=mopt2",
	Filename:      "test.proto",
}
View Source
var E_Sopt1 = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.ServiceOptions)(nil),
	ExtensionType: (*bool)(nil),
	Field:         50061,
	Name:          "test.sopt1",
	Tag:           "varint,50061,opt,name=sopt1",
	Filename:      "test.proto",
}

Functions

func RegisterTestServiceServer

func RegisterTestServiceServer(s *grpc.Server, srv TestServiceServer)

Types

type CustomOption

type CustomOption struct {
	Name  string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Value int32  `protobuf:"varint,2,opt,name=value" json:"value,omitempty"`
}

func (*CustomOption) Descriptor

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

func (*CustomOption) GetName

func (m *CustomOption) GetName() string

func (*CustomOption) GetValue

func (m *CustomOption) GetValue() int32

func (*CustomOption) ProtoMessage

func (*CustomOption) ProtoMessage()

func (*CustomOption) Reset

func (m *CustomOption) Reset()

func (*CustomOption) String

func (m *CustomOption) String() string

type TestRequest

type TestRequest struct {
	Foo string `protobuf:"bytes,1,opt,name=foo" json:"foo,omitempty"`
	Bar string `protobuf:"bytes,2,opt,name=bar" json:"bar,omitempty"`
}

func (*TestRequest) Descriptor

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

func (*TestRequest) GetBar

func (m *TestRequest) GetBar() string

func (*TestRequest) GetFoo

func (m *TestRequest) GetFoo() string

func (*TestRequest) ProtoMessage

func (*TestRequest) ProtoMessage()

func (*TestRequest) Reset

func (m *TestRequest) Reset()

func (*TestRequest) String

func (m *TestRequest) String() string

type TestResponse

type TestResponse struct {
	Foo   string        `protobuf:"bytes,1,opt,name=foo" json:"foo,omitempty"`
	Bar   string        `protobuf:"bytes,2,opt,name=bar" json:"bar,omitempty"`
	Sopt1 bool          `protobuf:"varint,3,opt,name=sopt1" json:"sopt1,omitempty"`
	Mopt1 bool          `protobuf:"varint,4,opt,name=mopt1" json:"mopt1,omitempty"`
	Mopt2 *CustomOption `protobuf:"bytes,5,opt,name=mopt2" json:"mopt2,omitempty"`
}

func (*TestResponse) Descriptor

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

func (*TestResponse) GetBar

func (m *TestResponse) GetBar() string

func (*TestResponse) GetFoo

func (m *TestResponse) GetFoo() string

func (*TestResponse) GetMopt1

func (m *TestResponse) GetMopt1() bool

func (*TestResponse) GetMopt2

func (m *TestResponse) GetMopt2() *CustomOption

func (*TestResponse) GetSopt1

func (m *TestResponse) GetSopt1() bool

func (*TestResponse) ProtoMessage

func (*TestResponse) ProtoMessage()

func (*TestResponse) Reset

func (m *TestResponse) Reset()

func (*TestResponse) String

func (m *TestResponse) String() string

type TestServiceClient

type TestServiceClient interface {
	Simple(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
}

func NewTestServiceClient

func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient

type TestServiceServer

type TestServiceServer interface {
	Simple(context.Context, *TestRequest) (*TestResponse, error)
}

Jump to

Keyboard shortcuts

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