mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 20:52:22 +00:00
111 lines
4.2 KiB
Go
111 lines
4.2 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: helloworld.proto
|
|
|
|
package main
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type Message 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 (m *Message) Reset() { *m = Message{} }
|
|
func (m *Message) String() string { return proto.CompactTextString(m) }
|
|
func (*Message) ProtoMessage() {}
|
|
func (*Message) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_helloworld_0196a2ef510324e3, []int{0}
|
|
}
|
|
func (m *Message) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Message.Unmarshal(m, b)
|
|
}
|
|
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *Message) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message.Merge(dst, src)
|
|
}
|
|
func (m *Message) XXX_Size() int {
|
|
return xxx_messageInfo_Message.Size(m)
|
|
}
|
|
func (m *Message) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message proto.InternalMessageInfo
|
|
|
|
func (m *Message) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetAge() int32 {
|
|
if m != nil {
|
|
return m.Age
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var E_DefaultString = &proto.ExtensionDesc{
|
|
ExtendedType: (*descriptor.FieldOptions)(nil),
|
|
ExtensionType: (*string)(nil),
|
|
Field: 50000,
|
|
Name: "main.default_string",
|
|
Tag: "bytes,50000,opt,name=default_string,json=defaultString",
|
|
Filename: "helloworld.proto",
|
|
}
|
|
|
|
var E_DefaultInt = &proto.ExtensionDesc{
|
|
ExtendedType: (*descriptor.FieldOptions)(nil),
|
|
ExtensionType: (*int32)(nil),
|
|
Field: 50001,
|
|
Name: "main.default_int",
|
|
Tag: "varint,50001,opt,name=default_int,json=defaultInt",
|
|
Filename: "helloworld.proto",
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Message)(nil), "main.Message")
|
|
proto.RegisterExtension(E_DefaultString)
|
|
proto.RegisterExtension(E_DefaultInt)
|
|
}
|
|
|
|
func init() { proto.RegisterFile("helloworld.proto", fileDescriptor_helloworld_0196a2ef510324e3) }
|
|
|
|
var fileDescriptor_helloworld_0196a2ef510324e3 = []byte{
|
|
// 217 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0x48, 0xcd, 0xc9,
|
|
0xc9, 0x2f, 0xcf, 0x2f, 0xca, 0x49, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d,
|
|
0xcc, 0xcc, 0x93, 0x52, 0x48, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x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