Documentation ¶
Index ¶
- Constants
- Variables
- func MessagingClientRoutes(cli MessagingClient, opts ...gors.Option) []gors.Route
- func MessagingServerRoutes(srv MessagingServer, opts ...gors.Option) []gors.Route
- func MessagingServiceRoutes(svc MessagingService, opts ...gors.Option) []gors.Route
- func RegisterMessagingServer(s grpc.ServiceRegistrar, srv MessagingServer)
- type Kind
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetBodyText() string
- func (x *Message) GetKind() Kind
- func (x *Message) GetMessageId() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MessagingClient
- type MessagingServer
- type MessagingService
- type UnimplementedMessagingServer
- type UnsafeMessagingServer
Constants ¶
const (
Messaging_CreateMessage_FullMethodName = "/tests.enumoptions.message.v1.Messaging/CreateMessage"
)
Variables ¶
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.
var File_example_api_tests_enumoptions_message_proto protoreflect.FileDescriptor
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
func (Kind) Descriptor ¶
func (Kind) Descriptor() protoreflect.EnumDescriptor
func (Kind) EnumDescriptor
deprecated
func (Kind) Number ¶
func (x Kind) Number() protoreflect.EnumNumber
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) GetBodyText ¶
func (*Message) GetMessageId ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
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 ¶
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.