...

Package proto3

import "google.golang.org/protobuf/cmd/protoc-gen-go/testdata/proto3"
Overview
Index

Overview ▾

Index ▾

Variables
type Enum
    func (Enum) Descriptor() protoreflect.EnumDescriptor
    func (x Enum) Enum() *Enum
    func (Enum) EnumDescriptor() ([]byte, []int)
    func (x Enum) Number() protoreflect.EnumNumber
    func (x Enum) String() string
    func (Enum) Type() protoreflect.EnumType
type FieldTestMessage
    func (*FieldTestMessage) Descriptor() ([]byte, []int)
    func (x *FieldTestMessage) GetMapFixed64Enum() map[uint64]FieldTestMessage_Enum
    func (x *FieldTestMessage) GetMapInt32Int64() map[int32]int64
    func (x *FieldTestMessage) GetMapStringMessage() map[string]*FieldTestMessage_Message
    func (x *FieldTestMessage) GetOptionalBool() string
    func (x *FieldTestMessage) GetOptionalBytes() []byte
    func (x *FieldTestMessage) GetOptionalDouble() float64
    func (x *FieldTestMessage) GetOptionalEnum() FieldTestMessage_Enum
    func (x *FieldTestMessage) GetOptionalFixed32() uint32
    func (x *FieldTestMessage) GetOptionalFixed64() uint64
    func (x *FieldTestMessage) GetOptionalFloat() float32
    func (x *FieldTestMessage) GetOptionalInt32() int32
    func (x *FieldTestMessage) GetOptionalInt64() int64
    func (x *FieldTestMessage) GetOptionalSfixed32() int32
    func (x *FieldTestMessage) GetOptionalSfixed64() int64
    func (x *FieldTestMessage) GetOptionalSint32() int32
    func (x *FieldTestMessage) GetOptionalSint64() int64
    func (x *FieldTestMessage) GetOptionalString() string
    func (x *FieldTestMessage) GetOptionalUint32() uint32
    func (x *FieldTestMessage) GetOptionalUint64() uint64
    func (x *FieldTestMessage) GetOptional_Message() *FieldTestMessage_Message
    func (x *FieldTestMessage) GetRepeatedBool() []bool
    func (x *FieldTestMessage) GetRepeatedBytes() [][]byte
    func (x *FieldTestMessage) GetRepeatedDouble() []float64
    func (x *FieldTestMessage) GetRepeatedEnum() []FieldTestMessage_Enum
    func (x *FieldTestMessage) GetRepeatedFixed32() []uint32
    func (x *FieldTestMessage) GetRepeatedFixed64() []uint64
    func (x *FieldTestMessage) GetRepeatedFloat() []float32
    func (x *FieldTestMessage) GetRepeatedInt32() []int32
    func (x *FieldTestMessage) GetRepeatedInt64() []int64
    func (x *FieldTestMessage) GetRepeatedSfixed32() []int32
    func (x *FieldTestMessage) GetRepeatedSfixed64() []int64
    func (x *FieldTestMessage) GetRepeatedSint32() []int32
    func (x *FieldTestMessage) GetRepeatedSint64() []int64
    func (x *FieldTestMessage) GetRepeatedString() []string
    func (x *FieldTestMessage) GetRepeatedUint32() []uint32
    func (x *FieldTestMessage) GetRepeatedUint64() []uint64
    func (x *FieldTestMessage) GetRepeated_Message() []*FieldTestMessage_Message
    func (*FieldTestMessage) ProtoMessage()
    func (x *FieldTestMessage) ProtoReflect() protoreflect.Message
    func (x *FieldTestMessage) Reset()
    func (x *FieldTestMessage) String() string
type FieldTestMessage_Enum
    func (FieldTestMessage_Enum) Descriptor() protoreflect.EnumDescriptor
    func (x FieldTestMessage_Enum) Enum() *FieldTestMessage_Enum
    func (FieldTestMessage_Enum) EnumDescriptor() ([]byte, []int)
    func (x FieldTestMessage_Enum) Number() protoreflect.EnumNumber
    func (x FieldTestMessage_Enum) String() string
    func (FieldTestMessage_Enum) Type() protoreflect.EnumType
type FieldTestMessage_Message
    func (*FieldTestMessage_Message) Descriptor() ([]byte, []int)
    func (*FieldTestMessage_Message) ProtoMessage()
    func (x *FieldTestMessage_Message) ProtoReflect() protoreflect.Message
    func (x *FieldTestMessage_Message) Reset()
    func (x *FieldTestMessage_Message) String() string

Package files

enum.pb.go fields.pb.go

Variables

Enum value maps for Enum.

var (
    Enum_name = map[int32]string{
        0: "ZERO",
        1: "ONE",
        2: "TWO",
    }
    Enum_value = map[string]int32{
        "ZERO": 0,
        "ONE":  1,
        "TWO":  2,
    }
)

Enum value maps for FieldTestMessage_Enum.

var (
    FieldTestMessage_Enum_name = map[int32]string{
        0: "ZERO",
    }
    FieldTestMessage_Enum_value = map[string]int32{
        "ZERO": 0,
    }
)
var File_cmd_protoc_gen_go_testdata_proto3_enum_proto protoreflect.FileDescriptor
var File_cmd_protoc_gen_go_testdata_proto3_fields_proto protoreflect.FileDescriptor

type Enum

type Enum int32
const (
    Enum_ZERO Enum = 0
    Enum_ONE  Enum = 1
    Enum_TWO  Enum = 2
)

func (Enum) Descriptor

func (Enum) Descriptor() protoreflect.EnumDescriptor

func (Enum) Enum

func (x Enum) Enum() *Enum

func (Enum) EnumDescriptor

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

Deprecated: Use Enum.Descriptor instead.

func (Enum) Number

func (x Enum) Number() protoreflect.EnumNumber

func (Enum) String

func (x Enum) String() string

func (Enum) Type

func (Enum) Type() protoreflect.EnumType

type FieldTestMessage

type FieldTestMessage struct {
    OptionalBool     string                               `protobuf:"bytes,1,opt,name=optional_bool,json=optionalBool,proto3" json:"optional_bool,omitempty"`
    OptionalEnum     FieldTestMessage_Enum                `protobuf:"varint,2,opt,name=optional_enum,json=optionalEnum,proto3,enum=goproto.protoc.proto3.FieldTestMessage_Enum" json:"optional_enum,omitempty"`
    OptionalInt32    int32                                `protobuf:"varint,3,opt,name=optional_int32,json=optionalInt32,proto3" json:"optional_int32,omitempty"`
    OptionalSint32   int32                                `protobuf:"zigzag32,4,opt,name=optional_sint32,json=optionalSint32,proto3" json:"optional_sint32,omitempty"`
    OptionalUint32   uint32                               `protobuf:"varint,5,opt,name=optional_uint32,json=optionalUint32,proto3" json:"optional_uint32,omitempty"`
    OptionalInt64    int64                                `protobuf:"varint,6,opt,name=optional_int64,json=optionalInt64,proto3" json:"optional_int64,omitempty"`
    OptionalSint64   int64                                `protobuf:"zigzag64,7,opt,name=optional_sint64,json=optionalSint64,proto3" json:"optional_sint64,omitempty"`
    OptionalUint64   uint64                               `protobuf:"varint,8,opt,name=optional_uint64,json=optionalUint64,proto3" json:"optional_uint64,omitempty"`
    OptionalSfixed32 int32                                `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3" json:"optional_sfixed32,omitempty"`
    OptionalFixed32  uint32                               `protobuf:"fixed32,10,opt,name=optional_fixed32,json=optionalFixed32,proto3" json:"optional_fixed32,omitempty"`
    OptionalFloat    float32                              `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3" json:"optional_float,omitempty"`
    OptionalSfixed64 int64                                `protobuf:"fixed64,12,opt,name=optional_sfixed64,json=optionalSfixed64,proto3" json:"optional_sfixed64,omitempty"`
    OptionalFixed64  uint64                               `protobuf:"fixed64,13,opt,name=optional_fixed64,json=optionalFixed64,proto3" json:"optional_fixed64,omitempty"`
    OptionalDouble   float64                              `protobuf:"fixed64,14,opt,name=optional_double,json=optionalDouble,proto3" json:"optional_double,omitempty"`
    OptionalString   string                               `protobuf:"bytes,15,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"`
    OptionalBytes    []byte                               `protobuf:"bytes,16,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"`
    Optional_Message *FieldTestMessage_Message            `protobuf:"bytes,17,opt,name=optional_Message,json=optionalMessage,proto3" json:"optional_Message,omitempty"`
    RepeatedBool     []bool                               `protobuf:"varint,201,rep,packed,name=repeated_bool,json=repeatedBool,proto3" json:"repeated_bool,omitempty"`
    RepeatedEnum     []FieldTestMessage_Enum              `protobuf:"varint,202,rep,packed,name=repeated_enum,json=repeatedEnum,proto3,enum=goproto.protoc.proto3.FieldTestMessage_Enum" json:"repeated_enum,omitempty"`
    RepeatedInt32    []int32                              `protobuf:"varint,203,rep,packed,name=repeated_int32,json=repeatedInt32,proto3" json:"repeated_int32,omitempty"`
    RepeatedSint32   []int32                              `protobuf:"zigzag32,204,rep,packed,name=repeated_sint32,json=repeatedSint32,proto3" json:"repeated_sint32,omitempty"`
    RepeatedUint32   []uint32                             `protobuf:"varint,205,rep,packed,name=repeated_uint32,json=repeatedUint32,proto3" json:"repeated_uint32,omitempty"`
    RepeatedInt64    []int64                              `protobuf:"varint,206,rep,packed,name=repeated_int64,json=repeatedInt64,proto3" json:"repeated_int64,omitempty"`
    RepeatedSint64   []int64                              `protobuf:"zigzag64,207,rep,packed,name=repeated_sint64,json=repeatedSint64,proto3" json:"repeated_sint64,omitempty"`
    RepeatedUint64   []uint64                             `protobuf:"varint,208,rep,packed,name=repeated_uint64,json=repeatedUint64,proto3" json:"repeated_uint64,omitempty"`
    RepeatedSfixed32 []int32                              `protobuf:"fixed32,209,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32,proto3" json:"repeated_sfixed32,omitempty"`
    RepeatedFixed32  []uint32                             `protobuf:"fixed32,210,rep,packed,name=repeated_fixed32,json=repeatedFixed32,proto3" json:"repeated_fixed32,omitempty"`
    RepeatedFloat    []float32                            `protobuf:"fixed32,211,rep,packed,name=repeated_float,json=repeatedFloat,proto3" json:"repeated_float,omitempty"`
    RepeatedSfixed64 []int64                              `protobuf:"fixed64,212,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64,proto3" json:"repeated_sfixed64,omitempty"`
    RepeatedFixed64  []uint64                             `protobuf:"fixed64,213,rep,packed,name=repeated_fixed64,json=repeatedFixed64,proto3" json:"repeated_fixed64,omitempty"`
    RepeatedDouble   []float64                            `protobuf:"fixed64,214,rep,packed,name=repeated_double,json=repeatedDouble,proto3" json:"repeated_double,omitempty"`
    RepeatedString   []string                             `protobuf:"bytes,215,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"`
    RepeatedBytes    [][]byte                             `protobuf:"bytes,216,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"`
    Repeated_Message []*FieldTestMessage_Message          `protobuf:"bytes,217,rep,name=repeated_Message,json=repeatedMessage,proto3" json:"repeated_Message,omitempty"`
    MapInt32Int64    map[int32]int64                      `protobuf:"bytes,500,rep,name=map_int32_int64,json=mapInt32Int64,proto3" json:"map_int32_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
    MapStringMessage map[string]*FieldTestMessage_Message `protobuf:"bytes,501,rep,name=map_string_message,json=mapStringMessage,proto3" json:"map_string_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    MapFixed64Enum   map[uint64]FieldTestMessage_Enum     `protobuf:"bytes,502,rep,name=map_fixed64_enum,json=mapFixed64Enum,proto3" json:"map_fixed64_enum,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=goproto.protoc.proto3.FieldTestMessage_Enum"`
    // contains filtered or unexported fields
}

func (*FieldTestMessage) Descriptor

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

Deprecated: Use FieldTestMessage.ProtoReflect.Descriptor instead.

func (*FieldTestMessage) GetMapFixed64Enum

func (x *FieldTestMessage) GetMapFixed64Enum() map[uint64]FieldTestMessage_Enum

func (*FieldTestMessage) GetMapInt32Int64

func (x *FieldTestMessage) GetMapInt32Int64() map[int32]int64

func (*FieldTestMessage) GetMapStringMessage

func (x *FieldTestMessage) GetMapStringMessage() map[string]*FieldTestMessage_Message

func (*FieldTestMessage) GetOptionalBool

func (x *FieldTestMessage) GetOptionalBool() string

func (*FieldTestMessage) GetOptionalBytes

func (x *FieldTestMessage) GetOptionalBytes() []byte

func (*FieldTestMessage) GetOptionalDouble

func (x *FieldTestMessage) GetOptionalDouble() float64

func (*FieldTestMessage) GetOptionalEnum

func (x *FieldTestMessage) GetOptionalEnum() FieldTestMessage_Enum

func (*FieldTestMessage) GetOptionalFixed32

func (x *FieldTestMessage) GetOptionalFixed32() uint32

func (*FieldTestMessage) GetOptionalFixed64

func (x *FieldTestMessage) GetOptionalFixed64() uint64

func (*FieldTestMessage) GetOptionalFloat

func (x *FieldTestMessage) GetOptionalFloat() float32

func (*FieldTestMessage) GetOptionalInt32

func (x *FieldTestMessage) GetOptionalInt32() int32

func (*FieldTestMessage) GetOptionalInt64

func (x *FieldTestMessage) GetOptionalInt64() int64

func (*FieldTestMessage) GetOptionalSfixed32

func (x *FieldTestMessage) GetOptionalSfixed32() int32

func (*FieldTestMessage) GetOptionalSfixed64

func (x *FieldTestMessage) GetOptionalSfixed64() int64

func (*FieldTestMessage) GetOptionalSint32

func (x *FieldTestMessage) GetOptionalSint32() int32

func (*FieldTestMessage) GetOptionalSint64

func (x *FieldTestMessage) GetOptionalSint64() int64

func (*FieldTestMessage) GetOptionalString

func (x *FieldTestMessage) GetOptionalString() string

func (*FieldTestMessage) GetOptionalUint32

func (x *FieldTestMessage) GetOptionalUint32() uint32

func (*FieldTestMessage) GetOptionalUint64

func (x *FieldTestMessage) GetOptionalUint64() uint64

func (*FieldTestMessage) GetOptional_Message

func (x *FieldTestMessage) GetOptional_Message() *FieldTestMessage_Message

func (*FieldTestMessage) GetRepeatedBool

func (x *FieldTestMessage) GetRepeatedBool() []bool

func (*FieldTestMessage) GetRepeatedBytes

func (x *FieldTestMessage) GetRepeatedBytes() [][]byte

func (*FieldTestMessage) GetRepeatedDouble

func (x *FieldTestMessage) GetRepeatedDouble() []float64

func (*FieldTestMessage) GetRepeatedEnum

func (x *FieldTestMessage) GetRepeatedEnum() []FieldTestMessage_Enum

func (*FieldTestMessage) GetRepeatedFixed32

func (x *FieldTestMessage) GetRepeatedFixed32() []uint32

func (*FieldTestMessage) GetRepeatedFixed64

func (x *FieldTestMessage) GetRepeatedFixed64() []uint64

func (*FieldTestMessage) GetRepeatedFloat

func (x *FieldTestMessage) GetRepeatedFloat() []float32

func (*FieldTestMessage) GetRepeatedInt32

func (x *FieldTestMessage) GetRepeatedInt32() []int32

func (*FieldTestMessage) GetRepeatedInt64

func (x *FieldTestMessage) GetRepeatedInt64() []int64

func (*FieldTestMessage) GetRepeatedSfixed32

func (x *FieldTestMessage) GetRepeatedSfixed32() []int32

func (*FieldTestMessage) GetRepeatedSfixed64

func (x *FieldTestMessage) GetRepeatedSfixed64() []int64

func (*FieldTestMessage) GetRepeatedSint32

func (x *FieldTestMessage) GetRepeatedSint32() []int32

func (*FieldTestMessage) GetRepeatedSint64

func (x *FieldTestMessage) GetRepeatedSint64() []int64

func (*FieldTestMessage) GetRepeatedString

func (x *FieldTestMessage) GetRepeatedString() []string

func (*FieldTestMessage) GetRepeatedUint32

func (x *FieldTestMessage) GetRepeatedUint32() []uint32

func (*FieldTestMessage) GetRepeatedUint64

func (x *FieldTestMessage) GetRepeatedUint64() []uint64

func (*FieldTestMessage) GetRepeated_Message

func (x *FieldTestMessage) GetRepeated_Message() []*FieldTestMessage_Message

func (*FieldTestMessage) ProtoMessage

func (*FieldTestMessage) ProtoMessage()

func (*FieldTestMessage) ProtoReflect

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

func (*FieldTestMessage) Reset

func (x *FieldTestMessage) Reset()

func (*FieldTestMessage) String

func (x *FieldTestMessage) String() string

type FieldTestMessage_Enum

type FieldTestMessage_Enum int32
const (
    FieldTestMessage_ZERO FieldTestMessage_Enum = 0
)

func (FieldTestMessage_Enum) Descriptor

func (FieldTestMessage_Enum) Descriptor() protoreflect.EnumDescriptor

func (FieldTestMessage_Enum) Enum

func (x FieldTestMessage_Enum) Enum() *FieldTestMessage_Enum

func (FieldTestMessage_Enum) EnumDescriptor

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

Deprecated: Use FieldTestMessage_Enum.Descriptor instead.

func (FieldTestMessage_Enum) Number

func (x FieldTestMessage_Enum) Number() protoreflect.EnumNumber

func (FieldTestMessage_Enum) String

func (x FieldTestMessage_Enum) String() string

func (FieldTestMessage_Enum) Type

func (FieldTestMessage_Enum) Type() protoreflect.EnumType

type FieldTestMessage_Message

type FieldTestMessage_Message struct {
    // contains filtered or unexported fields
}

func (*FieldTestMessage_Message) Descriptor

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

Deprecated: Use FieldTestMessage_Message.ProtoReflect.Descriptor instead.

func (*FieldTestMessage_Message) ProtoMessage

func (*FieldTestMessage_Message) ProtoMessage()

func (*FieldTestMessage_Message) ProtoReflect

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

func (*FieldTestMessage_Message) Reset

func (x *FieldTestMessage_Message) Reset()

func (*FieldTestMessage_Message) String

func (x *FieldTestMessage_Message) String() string