Skip to content

Instantly share code, notes, and snippets.

@chakrit
Last active August 29, 2015 14:22
Show Gist options
  • Save chakrit/9708ad015e85cbf4e7bf to your computer and use it in GitHub Desktop.
Save chakrit/9708ad015e85cbf4e7bf to your computer and use it in GitHub Desktop.
// Code generated by protoc-gen-gogo.
// source: sample.proto
// DO NOT EDIT!
/*
Package generated is a generated protocol buffer package.
It is generated from these files:
sample.proto
It has these top-level messages:
HelloRequest
HelloReply
*/
package generated
import proto "github.com/golang/protobuf/proto"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
type HelloRequest struct {
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *HelloRequest) Reset() { *m = HelloRequest{} }
func (m *HelloRequest) String() string { return proto.CompactTextString(m) }
func (*HelloRequest) ProtoMessage() {}
func (m *HelloRequest) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
type HelloReply struct {
Message *string `protobuf:"bytes,1,req,name=message" json:"message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *HelloReply) Reset() { *m = HelloReply{} }
func (m *HelloReply) String() string { return proto.CompactTextString(m) }
func (*HelloReply) ProtoMessage() {}
func (m *HelloReply) GetMessage() string {
if m != nil && m.Message != nil {
return *m.Message
}
return ""
}
func init() {
}
package generated;
service Greeter {
rpc SayHello(HelloRequest) returns (HelloReply) {}
}
message HelloRequest {
required string name = 1;
}
message HelloReply {
required string message = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment