pb

package
v0.0.0-...-0d9dc11 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_message_proto protoreflect.FileDescriptor
View Source
var File_rpc_create_message_proto protoreflect.FileDescriptor
View Source
var File_rpc_get_message_proto protoreflect.FileDescriptor
View Source
var File_service_im_proto protoreflect.FileDescriptor
View Source
var IM_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.IM",
	HandlerType: (*IMServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateMessage",
			Handler:    _IM_CreateMessage_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetMessageStream",
			Handler:       _IM_GetMessageStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "service_im.proto",
}

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

Functions

func RegisterIMServer

func RegisterIMServer(s grpc.ServiceRegistrar, srv IMServer)

Types

type CreateMessageRequest

type CreateMessageRequest struct {
	From    string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateMessageRequest) Descriptor deprecated

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

Deprecated: Use CreateMessageRequest.ProtoReflect.Descriptor instead.

func (*CreateMessageRequest) GetFrom

func (x *CreateMessageRequest) GetFrom() string

func (*CreateMessageRequest) GetMessage

func (x *CreateMessageRequest) GetMessage() string

func (*CreateMessageRequest) ProtoMessage

func (*CreateMessageRequest) ProtoMessage()

func (*CreateMessageRequest) ProtoReflect

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

func (*CreateMessageRequest) Reset

func (x *CreateMessageRequest) Reset()

func (*CreateMessageRequest) String

func (x *CreateMessageRequest) String() string

type CreateMessageResponse

type CreateMessageResponse struct {
	Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateMessageResponse) Descriptor deprecated

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

Deprecated: Use CreateMessageResponse.ProtoReflect.Descriptor instead.

func (*CreateMessageResponse) GetMessage

func (x *CreateMessageResponse) GetMessage() *Message

func (*CreateMessageResponse) ProtoMessage

func (*CreateMessageResponse) ProtoMessage()

func (*CreateMessageResponse) ProtoReflect

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

func (*CreateMessageResponse) Reset

func (x *CreateMessageResponse) Reset()

func (*CreateMessageResponse) String

func (x *CreateMessageResponse) String() string

type GetMessageStreamResponse

type GetMessageStreamResponse struct {
	Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMessageStreamResponse) Descriptor deprecated

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

Deprecated: Use GetMessageStreamResponse.ProtoReflect.Descriptor instead.

func (*GetMessageStreamResponse) GetMessage

func (x *GetMessageStreamResponse) GetMessage() *Message

func (*GetMessageStreamResponse) ProtoMessage

func (*GetMessageStreamResponse) ProtoMessage()

func (*GetMessageStreamResponse) ProtoReflect

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

func (*GetMessageStreamResponse) Reset

func (x *GetMessageStreamResponse) Reset()

func (*GetMessageStreamResponse) String

func (x *GetMessageStreamResponse) String() string

type IMClient

type IMClient interface {
	GetMessageStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (IM_GetMessageStreamClient, error)
	CreateMessage(ctx context.Context, in *CreateMessageRequest, opts ...grpc.CallOption) (*CreateMessageResponse, error)
}

IMClient is the client API for IM 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 NewIMClient

func NewIMClient(cc grpc.ClientConnInterface) IMClient

type IMServer

type IMServer interface {
	GetMessageStream(*emptypb.Empty, IM_GetMessageStreamServer) error
	CreateMessage(context.Context, *CreateMessageRequest) (*CreateMessageResponse, error)
	// contains filtered or unexported methods
}

IMServer is the server API for IM service. All implementations must embed UnimplementedIMServer for forward compatibility

type IM_GetMessageStreamClient

type IM_GetMessageStreamClient interface {
	Recv() (*GetMessageStreamResponse, error)
	grpc.ClientStream
}

type IM_GetMessageStreamServer

type IM_GetMessageStreamServer interface {
	Send(*GetMessageStreamResponse) error
	grpc.ServerStream
}

type Message

type Message struct {
	From      string                 `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	Message   string                 `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetCreatedAt

func (x *Message) GetCreatedAt() *timestamppb.Timestamp

func (*Message) GetFrom

func (x *Message) GetFrom() string

func (*Message) GetMessage

func (x *Message) GetMessage() 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 UnimplementedIMServer

type UnimplementedIMServer struct {
}

UnimplementedIMServer must be embedded to have forward compatible implementations.

func (UnimplementedIMServer) CreateMessage

func (UnimplementedIMServer) GetMessageStream

type UnsafeIMServer

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

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

Jump to

Keyboard shortcuts

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