...

Package nopackage

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

Overview ▾

Constants

Default values for Message fields.

const (
    Default_Message_EnumField = Enum_ZERO
)

Variables

Enum value maps for Enum.

var (
    Enum_name = map[int32]string{
        0: "ZERO",
    }
    Enum_value = map[string]int32{
        "ZERO": 0,
    }
)
var File_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto protoreflect.FileDescriptor

type Enum

type Enum int32
const (
    Enum_ZERO Enum = 0
)

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

func (*Enum) UnmarshalJSON

func (x *Enum) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type Message

type Message struct {
    StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"`
    EnumField   *Enum   `protobuf:"varint,2,opt,name=enum_field,json=enumField,enum=Enum,def=0" json:"enum_field,omitempty"`
    // contains filtered or unexported fields
}

func (*Message) Descriptor

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetEnumField

func (x *Message) GetEnumField() Enum

func (*Message) GetStringField

func (x *Message) GetStringField() 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