pb

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthData        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowData          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupData = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Gender_name = map[int32]string{
	0: "men",
	1: "women",
}
View Source
var Gender_value = map[string]int32{
	"men":   0,
	"women": 1,
}

Functions

This section is empty.

Types

type Gender

type Gender int32
const (
	Gender_men   Gender = 0
	Gender_women Gender = 1
)

func (Gender) EnumDescriptor

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

func (Gender) String

func (x Gender) String() string

type Person

type Person struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" idx:"normal"`
	Phone                string   `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty" idx:"unique"`
	Age                  int32    `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty" idx:"normal"`
	BirthDay             int32    `protobuf:"varint,4,opt,name=birthDay,proto3" json:"birthDay,omitempty"`
	Gender               Gender   `protobuf:"varint,5,opt,name=gender,proto3,enum=pb.Gender" json:"gender,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Person) DeepCp

func (person *Person) DeepCp() *Person

func (*Person) Descriptor

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

func (*Person) GetAge

func (m *Person) GetAge() int32

func (*Person) GetBirthDay

func (m *Person) GetBirthDay() int32

func (*Person) GetGender

func (m *Person) GetGender() Gender

func (*Person) GetName

func (m *Person) GetName() string

func (*Person) GetPhone

func (m *Person) GetPhone() string

func (*Person) Marshal

func (m *Person) Marshal() (dAtA []byte, err error)

func (*Person) MarshalTo

func (m *Person) MarshalTo(dAtA []byte) (int, error)

func (*Person) MarshalToSizedBuffer

func (m *Person) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Person) ProtoMessage

func (*Person) ProtoMessage()

func (*Person) Reset

func (m *Person) Reset()

func (*Person) Size

func (m *Person) Size() (n int)

func (*Person) String

func (m *Person) String() string

func (*Person) Unmarshal

func (m *Person) Unmarshal(dAtA []byte) error

func (*Person) XXX_DiscardUnknown

func (m *Person) XXX_DiscardUnknown()

func (*Person) XXX_Marshal

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

func (*Person) XXX_Merge

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

func (*Person) XXX_Size

func (m *Person) XXX_Size() int

func (*Person) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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