package oneofenum

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

Index

Variables

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,
	}
)

Enum value maps for ExampleEnum.

var File_examples_internal_proto_oneofenum_oneof_enum_proto protoreflect.FileDescriptor

Types

type ExampleEnum

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

func (ExampleEnum) Descriptor

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

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"`
}

Source Files

oneof_enum.pb.go

Version
v2.26.1 (latest)
Published
Feb 7, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
6 days ago

Tools for package owners.