...

Package enums

import "google.golang.org/protobuf/internal/testprotos/enums"
Overview
Index

Overview ▾

Variables

Enum value maps for Enum.

var (
    Enum_name = map[int32]string{
        1337: "DEFAULT",
        0:    "ZERO",
        1:    "ONE",
        11:   "ELEVENT",
        17:   "SEVENTEEN",
        37:   "THIRTYSEVEN",
        67:   "SIXTYSEVEN",
        -1:   "NEGATIVE",
    }
    Enum_value = map[string]int32{
        "DEFAULT":     1337,
        "ZERO":        0,
        "ONE":         1,
        "ELEVENT":     11,
        "SEVENTEEN":   17,
        "THIRTYSEVEN": 37,
        "SIXTYSEVEN":  67,
        "NEGATIVE":    -1,
    }
)
var File_internal_testprotos_enums_enums_proto protoreflect.FileDescriptor

type Enum

type Enum int32
const (
    Enum_DEFAULT     Enum = 1337
    Enum_ZERO        Enum = 0
    Enum_ONE         Enum = 1
    Enum_ELEVENT     Enum = 11
    Enum_SEVENTEEN   Enum = 17
    Enum_THIRTYSEVEN Enum = 37
    Enum_SIXTYSEVEN  Enum = 67
    Enum_NEGATIVE    Enum = -1
)

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.