...

Package fieldnames

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

Overview ▾

Index ▾

Variables
type Message
    func (*Message) Descriptor() ([]byte, []int)
    func (x *Message) GetCamelCase() string
    func (x *Message) GetCamelCase_() string
    func (x *Message) GetCamelCase__() string
    func (x *Message) GetCamelCase___() string
    func (x *Message) GetDescriptor_() string
    func (x *Message) GetFieldOne() string
    func (x *Message) GetFieldThree() string
    func (x *Message) GetFieldTwo() string
    func (x *Message) GetField_Four() string
    func (x *Message) GetGetName() string
    func (x *Message) GetMarshal_() string
    func (x *Message) GetName_() string
    func (x *Message) GetOneofConflictA() string
    func (m *Message) GetOneofConflictA_() isMessage_OneofConflictA_
    func (m *Message) GetOneofConflictB() isMessage_OneofConflictB
    func (x *Message) GetOneofConflictB_() string
    func (m *Message) GetOneofConflictC() isMessage_OneofConflictC
    func (x *Message) GetOneofMessageConflict() string
    func (x *Message) GetOneofNoConflict() string
    func (x *Message) GetProtoMessage_() string
    func (x *Message) GetUnmarshal_() string
    func (*Message) ProtoMessage()
    func (x *Message) ProtoReflect() protoreflect.Message
    func (x *Message) Reset()
    func (x *Message) String() string
type Message_OneofConflictA
type Message_OneofConflictB_
type Message_OneofMessageConflict
    func (*Message_OneofMessageConflict) Descriptor() ([]byte, []int)
    func (*Message_OneofMessageConflict) ProtoMessage()
    func (x *Message_OneofMessageConflict) ProtoReflect() protoreflect.Message
    func (x *Message_OneofMessageConflict) Reset()
    func (x *Message_OneofMessageConflict) String() string
type Message_OneofMessageConflict_
type Message_OneofNoConflict

Package files

fieldnames.pb.go

Variables

var File_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto protoreflect.FileDescriptor

type Message

Assorted edge cases in field name conflict resolution.

Not all (or possibly any) of these behave in an easily-understood fashion. This exists to demonstrate the current behavior and catch unintended changes in it.

type Message struct {

    // Various CamelCase conversions.
    FieldOne   *string `protobuf:"bytes,1,opt,name=field_one,json=fieldOne" json:"field_one,omitempty"`
    FieldTwo   *string `protobuf:"bytes,2,opt,name=FieldTwo" json:"FieldTwo,omitempty"`
    FieldThree *string `protobuf:"bytes,3,opt,name=fieldThree" json:"fieldThree,omitempty"`
    Field_Four *string `protobuf:"bytes,4,opt,name=field__four,json=fieldFour" json:"field__four,omitempty"`
    // Field names that conflict with standard methods on the message struct.
    Descriptor_   *string `protobuf:"bytes,10,opt,name=descriptor" json:"descriptor,omitempty"`
    Marshal_      *string `protobuf:"bytes,11,opt,name=marshal" json:"marshal,omitempty"`
    Unmarshal_    *string `protobuf:"bytes,12,opt,name=unmarshal" json:"unmarshal,omitempty"`
    ProtoMessage_ *string `protobuf:"bytes,13,opt,name=proto_message,json=protoMessage" json:"proto_message,omitempty"`
    // Field names that conflict with each other after CamelCasing.
    CamelCase    *string `protobuf:"bytes,20,opt,name=CamelCase" json:"CamelCase,omitempty"`
    CamelCase_   *string `protobuf:"bytes,21,opt,name=CamelCase_,json=CamelCase" json:"CamelCase_,omitempty"`
    CamelCase__  *string `protobuf:"bytes,22,opt,name=camel_case,json=camelCase" json:"camel_case,omitempty"`   // conflicts with 20, 21
    CamelCase___ *string `protobuf:"bytes,23,opt,name=CamelCase__,json=CamelCase" json:"CamelCase__,omitempty"` // conflicts with 21, 21, renamed 22
    // Field with a getter that conflicts with another field.
    GetName *string `protobuf:"bytes,30,opt,name=get_name,json=getName" json:"get_name,omitempty"`
    Name_   *string `protobuf:"bytes,31,opt,name=name" json:"name,omitempty"`
    // Oneof that conflicts with its first field: The oneof is renamed.
    //
    // Types that are assignable to OneofConflictA_:
    //
    //	*Message_OneofConflictA
    OneofConflictA_ isMessage_OneofConflictA_ `protobuf_oneof:"oneof_conflict_a"`
    // Oneof that conflicts with its second field: The field is renamed.
    //
    // Types that are assignable to OneofConflictB:
    //
    //	*Message_OneofNoConflict
    //	*Message_OneofConflictB_
    OneofConflictB isMessage_OneofConflictB `protobuf_oneof:"oneof_conflict_b"`
    // Oneof with a field name that conflicts with a nested message.
    //
    // Types that are assignable to OneofConflictC:
    //
    //	*Message_OneofMessageConflict_
    OneofConflictC isMessage_OneofConflictC `protobuf_oneof:"oneof_conflict_c"`
    // contains filtered or unexported fields
}

func (*Message) Descriptor

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetCamelCase

func (x *Message) GetCamelCase() string

func (*Message) GetCamelCase_

func (x *Message) GetCamelCase_() string

func (*Message) GetCamelCase__

func (x *Message) GetCamelCase__() string

func (*Message) GetCamelCase___

func (x *Message) GetCamelCase___() string

func (*Message) GetDescriptor_

func (x *Message) GetDescriptor_() string

func (*Message) GetFieldOne

func (x *Message) GetFieldOne() string

func (*Message) GetFieldThree

func (x *Message) GetFieldThree() string

func (*Message) GetFieldTwo

func (x *Message) GetFieldTwo() string

func (*Message) GetField_Four

func (x *Message) GetField_Four() string

func (*Message) GetGetName

func (x *Message) GetGetName() string

func (*Message) GetMarshal_

func (x *Message) GetMarshal_() string

func (*Message) GetName_

func (x *Message) GetName_() string

func (*Message) GetOneofConflictA

func (x *Message) GetOneofConflictA() string

func (*Message) GetOneofConflictA_

func (m *Message) GetOneofConflictA_() isMessage_OneofConflictA_

func (*Message) GetOneofConflictB

func (m *Message) GetOneofConflictB() isMessage_OneofConflictB

func (*Message) GetOneofConflictB_

func (x *Message) GetOneofConflictB_() string

func (*Message) GetOneofConflictC

func (m *Message) GetOneofConflictC() isMessage_OneofConflictC

func (*Message) GetOneofMessageConflict

func (x *Message) GetOneofMessageConflict() string

func (*Message) GetOneofNoConflict

func (x *Message) GetOneofNoConflict() string

func (*Message) GetProtoMessage_

func (x *Message) GetProtoMessage_() string

func (*Message) GetUnmarshal_

func (x *Message) GetUnmarshal_() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Message_OneofConflictA

type Message_OneofConflictA struct {
    OneofConflictA string `protobuf:"bytes,40,opt,name=OneofConflictA,oneof"`
}

type Message_OneofConflictB_

type Message_OneofConflictB_ struct {
    OneofConflictB_ string `protobuf:"bytes,51,opt,name=OneofConflictB,oneof"`
}

type Message_OneofMessageConflict

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

func (*Message_OneofMessageConflict) Descriptor

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

Deprecated: Use Message_OneofMessageConflict.ProtoReflect.Descriptor instead.

func (*Message_OneofMessageConflict) ProtoMessage

func (*Message_OneofMessageConflict) ProtoMessage()

func (*Message_OneofMessageConflict) ProtoReflect

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

func (*Message_OneofMessageConflict) Reset

func (x *Message_OneofMessageConflict) Reset()

func (*Message_OneofMessageConflict) String

func (x *Message_OneofMessageConflict) String() string

type Message_OneofMessageConflict_

type Message_OneofMessageConflict_ struct {
    OneofMessageConflict string `protobuf:"bytes,60,opt,name=oneof_message_conflict,json=oneofMessageConflict,oneof"`
}

type Message_OneofNoConflict

type Message_OneofNoConflict struct {
    OneofNoConflict string `protobuf:"bytes,50,opt,name=oneof_no_conflict,json=oneofNoConflict,oneof"`
}