Documentation ¶
Overview ¶
Package protofiles is a generated protocol buffer package.
It is generated from these files:
person.proto
It has these top-level messages:
Person AddressBook
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Person_PhoneType_name = map[int32]string{
0: "MOBILE",
1: "HOME",
2: "WORK",
}
View Source
var Person_PhoneType_value = map[string]int32{
"MOBILE": 0,
"HOME": 1,
"WORK": 2,
}
Functions ¶
This section is empty.
Types ¶
type AddressBook ¶
type AddressBook struct {
People []*Person `protobuf:"bytes,1,rep,name=people" json:"people,omitempty"`
}
Our address book file is just one of these.
func (*AddressBook) Descriptor ¶
func (*AddressBook) Descriptor() ([]byte, []int)
func (*AddressBook) GetPeople ¶
func (m *AddressBook) GetPeople() []*Person
func (*AddressBook) ProtoMessage ¶
func (*AddressBook) ProtoMessage()
func (*AddressBook) Reset ¶
func (m *AddressBook) Reset()
func (*AddressBook) String ¶
func (m *AddressBook) String() string
type Person ¶
type Person struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Id int32 `protobuf:"varint,2,opt,name=id" json:"id,omitempty"` Email string `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"` Phones []*Person_PhoneNumber `protobuf:"bytes,4,rep,name=phones" json:"phones,omitempty"` }
func (*Person) Descriptor ¶
func (*Person) GetPhones ¶
func (m *Person) GetPhones() []*Person_PhoneNumber
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
type Person_PhoneNumber ¶
type Person_PhoneNumber struct { Number string `protobuf:"bytes,1,opt,name=number" json:"number,omitempty"` Type Person_PhoneType `protobuf:"varint,2,opt,name=type,enum=protofiles.Person_PhoneType" json:"type,omitempty"` }
func (*Person_PhoneNumber) Descriptor ¶
func (*Person_PhoneNumber) Descriptor() ([]byte, []int)
func (*Person_PhoneNumber) GetNumber ¶
func (m *Person_PhoneNumber) GetNumber() string
func (*Person_PhoneNumber) GetType ¶
func (m *Person_PhoneNumber) GetType() Person_PhoneType
func (*Person_PhoneNumber) ProtoMessage ¶
func (*Person_PhoneNumber) ProtoMessage()
func (*Person_PhoneNumber) Reset ¶
func (m *Person_PhoneNumber) Reset()
func (*Person_PhoneNumber) String ¶
func (m *Person_PhoneNumber) String() string
type Person_PhoneType ¶
type Person_PhoneType int32
const ( Person_MOBILE Person_PhoneType = 0 Person_HOME Person_PhoneType = 1 Person_WORK Person_PhoneType = 2 )
func (Person_PhoneType) EnumDescriptor ¶
func (Person_PhoneType) EnumDescriptor() ([]byte, []int)
func (Person_PhoneType) String ¶
func (x Person_PhoneType) String() string
Click to show internal directories.
Click to hide internal directories.