helloworld

package
v0.0.0-...-23324a5 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGreeterServer

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

Types

type GetAgeReq

type GetAgeReq struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetAgeReq) Descriptor

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

func (*GetAgeReq) GetName

func (m *GetAgeReq) GetName() string

func (*GetAgeReq) ProtoMessage

func (*GetAgeReq) ProtoMessage()

func (*GetAgeReq) Reset

func (m *GetAgeReq) Reset()

func (*GetAgeReq) String

func (m *GetAgeReq) String() string

func (*GetAgeReq) XXX_DiscardUnknown

func (m *GetAgeReq) XXX_DiscardUnknown()

func (*GetAgeReq) XXX_Marshal

func (m *GetAgeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetAgeReq) XXX_Merge

func (m *GetAgeReq) XXX_Merge(src proto.Message)

func (*GetAgeReq) XXX_Size

func (m *GetAgeReq) XXX_Size() int

func (*GetAgeReq) XXX_Unmarshal

func (m *GetAgeReq) XXX_Unmarshal(b []byte) error

type GetAgeRes

type GetAgeRes struct {
	Code                 int32    `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Items                []*Item  `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetAgeRes) Descriptor

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

func (*GetAgeRes) GetCode

func (m *GetAgeRes) GetCode() int32

func (*GetAgeRes) GetItems

func (m *GetAgeRes) GetItems() []*Item

func (*GetAgeRes) ProtoMessage

func (*GetAgeRes) ProtoMessage()

func (*GetAgeRes) Reset

func (m *GetAgeRes) Reset()

func (*GetAgeRes) String

func (m *GetAgeRes) String() string

func (*GetAgeRes) XXX_DiscardUnknown

func (m *GetAgeRes) XXX_DiscardUnknown()

func (*GetAgeRes) XXX_Marshal

func (m *GetAgeRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetAgeRes) XXX_Merge

func (m *GetAgeRes) XXX_Merge(src proto.Message)

func (*GetAgeRes) XXX_Size

func (m *GetAgeRes) XXX_Size() int

func (*GetAgeRes) XXX_Unmarshal

func (m *GetAgeRes) XXX_Unmarshal(b []byte) error

type GreeterClient

type GreeterClient interface {
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
	GetAge(ctx context.Context, in *GetAgeReq, opts ...grpc.CallOption) (*GetAgeRes, error)
}

GreeterClient is the client API for Greeter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGreeterClient

func NewGreeterClient(cc *grpc.ClientConn) GreeterClient

type GreeterServer

type GreeterServer interface {
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	GetAge(context.Context, *GetAgeReq) (*GetAgeRes, error)
}

GreeterServer is the server API for Greeter service.

type HelloReply

type HelloReply struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*HelloReply) XXX_DiscardUnknown

func (m *HelloReply) XXX_DiscardUnknown()

func (*HelloReply) XXX_Marshal

func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HelloReply) XXX_Merge

func (m *HelloReply) XXX_Merge(src proto.Message)

func (*HelloReply) XXX_Size

func (m *HelloReply) XXX_Size() int

func (*HelloReply) XXX_Unmarshal

func (m *HelloReply) XXX_Unmarshal(b []byte) error

type HelloRequest

type HelloRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*HelloRequest) XXX_DiscardUnknown

func (m *HelloRequest) XXX_DiscardUnknown()

func (*HelloRequest) XXX_Marshal

func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HelloRequest) XXX_Merge

func (m *HelloRequest) XXX_Merge(src proto.Message)

func (*HelloRequest) XXX_Size

func (m *HelloRequest) XXX_Size() int

func (*HelloRequest) XXX_Unmarshal

func (m *HelloRequest) XXX_Unmarshal(b []byte) error

type Item

type Item struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Age                  int32    `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Item) Descriptor

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

func (*Item) GetAge

func (m *Item) GetAge() int32

func (*Item) GetName

func (m *Item) GetName() string

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) Reset

func (m *Item) Reset()

func (*Item) String

func (m *Item) String() string

func (*Item) XXX_DiscardUnknown

func (m *Item) XXX_DiscardUnknown()

func (*Item) XXX_Marshal

func (m *Item) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Item) XXX_Merge

func (m *Item) XXX_Merge(src proto.Message)

func (*Item) XXX_Size

func (m *Item) XXX_Size() int

func (*Item) XXX_Unmarshal

func (m *Item) XXX_Unmarshal(b []byte) error

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer can be embedded to have forward compatible implementations.

func (*UnimplementedGreeterServer) GetAge

func (*UnimplementedGreeterServer) SayHello

Jump to

Keyboard shortcuts

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