...

Package oneofenum

import "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum"
Overview
Index

Overview ▾

Variables

Enum value maps for ExampleEnum.

var (
    ExampleEnum_name = map[int32]string{
        0: "EXAMPLE_ENUM_UNSPECIFIED",
        1: "EXAMPLE_ENUM_FIRST",
    }
    ExampleEnum_value = map[string]int32{
        "EXAMPLE_ENUM_UNSPECIFIED": 0,
        "EXAMPLE_ENUM_FIRST":       1,
    }
)
var File_examples_internal_proto_oneofenum_oneof_enum_proto protoreflect.FileDescriptor

type ExampleEnum

type ExampleEnum int32
const (
    ExampleEnum_EXAMPLE_ENUM_UNSPECIFIED ExampleEnum = 0
    ExampleEnum_EXAMPLE_ENUM_FIRST       ExampleEnum = 1
)

func (ExampleEnum) Descriptor

func (ExampleEnum) Descriptor() protoreflect.EnumDescriptor

func (ExampleEnum) Enum

func (x ExampleEnum) Enum() *ExampleEnum

func (ExampleEnum) EnumDescriptor

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

Deprecated: Use ExampleEnum.Descriptor instead.

func (ExampleEnum) Number

func (x ExampleEnum) Number() protoreflect.EnumNumber

func (ExampleEnum) String

func (x ExampleEnum) String() string

func (ExampleEnum) Type

func (ExampleEnum) Type() protoreflect.EnumType

type OneofEnumMessage

type OneofEnumMessage struct {

    // Types that are assignable to One:
    //
    //	*OneofEnumMessage_ExampleEnum
    One isOneofEnumMessage_One `protobuf_oneof:"one"`
    // contains filtered or unexported fields
}

func (*OneofEnumMessage) Descriptor

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

Deprecated: Use OneofEnumMessage.ProtoReflect.Descriptor instead.

func (*OneofEnumMessage) GetExampleEnum

func (x *OneofEnumMessage) GetExampleEnum() ExampleEnum

func (*OneofEnumMessage) GetOne

func (m *OneofEnumMessage) GetOne() isOneofEnumMessage_One

func (*OneofEnumMessage) ProtoMessage

func (*OneofEnumMessage) ProtoMessage()

func (*OneofEnumMessage) ProtoReflect

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

func (*OneofEnumMessage) Reset

func (x *OneofEnumMessage) Reset()

func (*OneofEnumMessage) String

func (x *OneofEnumMessage) String() string

type OneofEnumMessage_ExampleEnum

type OneofEnumMessage_ExampleEnum struct {
    ExampleEnum ExampleEnum `protobuf:"varint,1,opt,name=example_enum,json=exampleEnum,proto3,enum=grpc.gateway.examples.internal.proto.oneofenum.ExampleEnum,oneof"`
}