enumoptions

package
v1.5.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Messaging_CreateMessage_FullMethodName = "/tests.enumoptions.message.v1.Messaging/CreateMessage"
)

Variables

View Source
var (
	Kind_name = map[int32]string{
		0: "UNKNOWN_KIND",
		1: "KIND_1",
		2: "KIND_2",
	}
	Kind_value = map[string]int32{
		"UNKNOWN_KIND": 0,
		"KIND_1":       1,
		"KIND_2":       2,
	}
)

Enum value maps for Kind.

View Source
var File_example_api_tests_enumoptions_message_proto protoreflect.FileDescriptor
View Source
var Messaging_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tests.enumoptions.message.v1.Messaging",
	HandlerType: (*MessagingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateMessage",
			Handler:    _Messaging_CreateMessage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "example/api/tests/enumoptions/message.proto",
}

Messaging_ServiceDesc is the grpc.ServiceDesc for Messaging service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func MessagingClientRoutes added in v1.5.8

func MessagingClientRoutes(cli MessagingClient, opts ...gors.Option) []gors.Route

func MessagingServerRoutes added in v1.5.8

func MessagingServerRoutes(srv MessagingServer, opts ...gors.Option) []gors.Route

func MessagingServiceRoutes

func MessagingServiceRoutes(svc MessagingService, opts ...gors.Option) []gors.Route

func RegisterMessagingServer

func RegisterMessagingServer(s grpc.ServiceRegistrar, srv MessagingServer)

Types

type Kind

type Kind int32
const (
	Kind_UNKNOWN_KIND Kind = 0
	Kind_KIND_1       Kind = 1
	Kind_KIND_2       Kind = 2
)

func (Kind) Descriptor

func (Kind) Descriptor() protoreflect.EnumDescriptor

func (Kind) Enum

func (x Kind) Enum() *Kind

func (Kind) EnumDescriptor deprecated

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

Deprecated: Use Kind.Descriptor instead.

func (Kind) Number

func (x Kind) Number() protoreflect.EnumNumber

func (Kind) String

func (x Kind) String() string

func (Kind) Type

func (Kind) Type() protoreflect.EnumType

type Message

type Message struct {
	Kind      Kind   `protobuf:"varint,1,opt,name=kind,proto3,enum=tests.enumoptions.message.v1.Kind" json:"kind,omitempty"`
	MessageId string `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	BodyText  string `protobuf:"bytes,3,opt,name=body_text,json=bodyText,proto3" json:"body_text,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetBodyText

func (x *Message) GetBodyText() string

func (*Message) GetKind

func (x *Message) GetKind() Kind

func (*Message) GetMessageId

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

type MessagingClient interface {
	CreateMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
}

MessagingClient is the client API for Messaging service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMessagingClient

func NewMessagingClient(cc grpc.ClientConnInterface) MessagingClient

type MessagingServer

type MessagingServer interface {
	CreateMessage(context.Context, *Message) (*Message, error)
	// contains filtered or unexported methods
}

MessagingServer is the server API for Messaging service. All implementations must embed UnimplementedMessagingServer for forward compatibility

type MessagingService

type MessagingService interface {
	CreateMessage(context.Context, *Message) (*Message, error)
}

MessagingService is the service API for Messaging service.

type UnimplementedMessagingServer

type UnimplementedMessagingServer struct {
}

UnimplementedMessagingServer must be embedded to have forward compatible implementations.

func (UnimplementedMessagingServer) CreateMessage

type UnsafeMessagingServer

type UnsafeMessagingServer interface {
	// contains filtered or unexported methods
}

UnsafeMessagingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MessagingServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL