tutorialpb

package
v0.0.0-...-7c44550 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PhoneType_name = map[int32]string{
		0: "PHONE_TYPE_UNSPECIFIED",
		1: "PHONE_TYPE_MOBILE",
		2: "PHONE_TYPE_HOME",
		3: "PHONE_TYPE_WORK",
	}
	PhoneType_value = map[string]int32{
		"PHONE_TYPE_UNSPECIFIED": 0,
		"PHONE_TYPE_MOBILE":      1,
		"PHONE_TYPE_HOME":        2,
		"PHONE_TYPE_WORK":        3,
	}
)

Enum value maps for PhoneType.

View Source
var File_addressbook_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AddressBook

type AddressBook struct {
	People []*Person `protobuf:"bytes,1,rep,name=people,proto3" json:"people,omitempty"`
	// contains filtered or unexported fields
}

Our address book file is just one of these

func (*AddressBook) Descriptor deprecated

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

Deprecated: Use AddressBook.ProtoReflect.Descriptor instead.

func (*AddressBook) GetPeople

func (x *AddressBook) GetPeople() []*Person

func (*AddressBook) ProtoMessage

func (*AddressBook) ProtoMessage()

func (*AddressBook) ProtoReflect

func (x *AddressBook) ProtoReflect() protoreflect.Message

func (*AddressBook) Reset

func (x *AddressBook) Reset()

func (*AddressBook) String

func (x *AddressBook) String() string

type Person

type Person struct {
	Name        string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Id          int32                  `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // Unique ID number for this person.
	Email       string                 `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Phones      []*Person_PhoneNumber  `protobuf:"bytes,4,rep,name=phones,proto3" json:"phones,omitempty"`
	LastUpdated *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
	// contains filtered or unexported fields
}

func (*Person) Descriptor deprecated

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

Deprecated: Use Person.ProtoReflect.Descriptor instead.

func (*Person) GetEmail

func (x *Person) GetEmail() string

func (*Person) GetId

func (x *Person) GetId() int32

func (*Person) GetLastUpdated

func (x *Person) GetLastUpdated() *timestamppb.Timestamp

func (*Person) GetName

func (x *Person) GetName() string

func (*Person) GetPhones

func (x *Person) GetPhones() []*Person_PhoneNumber

func (*Person) ProtoMessage

func (*Person) ProtoMessage()

func (*Person) ProtoReflect

func (x *Person) ProtoReflect() protoreflect.Message

func (*Person) Reset

func (x *Person) Reset()

func (*Person) String

func (x *Person) String() string

type Person_PhoneNumber

type Person_PhoneNumber struct {
	Number string    `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"`
	Type   PhoneType `protobuf:"varint,2,opt,name=type,proto3,enum=tutorial.PhoneType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Person_PhoneNumber) Descriptor deprecated

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

Deprecated: Use Person_PhoneNumber.ProtoReflect.Descriptor instead.

func (*Person_PhoneNumber) GetNumber

func (x *Person_PhoneNumber) GetNumber() string

func (*Person_PhoneNumber) GetType

func (x *Person_PhoneNumber) GetType() PhoneType

func (*Person_PhoneNumber) ProtoMessage

func (*Person_PhoneNumber) ProtoMessage()

func (*Person_PhoneNumber) ProtoReflect

func (x *Person_PhoneNumber) ProtoReflect() protoreflect.Message

func (*Person_PhoneNumber) Reset

func (x *Person_PhoneNumber) Reset()

func (*Person_PhoneNumber) String

func (x *Person_PhoneNumber) String() string

type PhoneType

type PhoneType int32
const (
	PhoneType_PHONE_TYPE_UNSPECIFIED PhoneType = 0
	PhoneType_PHONE_TYPE_MOBILE      PhoneType = 1
	PhoneType_PHONE_TYPE_HOME        PhoneType = 2
	PhoneType_PHONE_TYPE_WORK        PhoneType = 3
)

func (PhoneType) Descriptor

func (PhoneType) Descriptor() protoreflect.EnumDescriptor

func (PhoneType) Enum

func (x PhoneType) Enum() *PhoneType

func (PhoneType) EnumDescriptor deprecated

func (PhoneType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PhoneType.Descriptor instead.

func (PhoneType) Number

func (x PhoneType) Number() protoreflect.EnumNumber

func (PhoneType) String

func (x PhoneType) String() string

func (PhoneType) Type

Jump to

Keyboard shortcuts

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