chat_v1

package
v0.0.0-...-eaac71e Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Chat_V1_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chat_v1.Chat_V1",
	HandlerType: (*Chat_V1Server)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Chat_V1_Create_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Chat_V1_Delete_Handler,
		},
		{
			MethodName: "SendMessage",
			Handler:    _Chat_V1_SendMessage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "chat.proto",
}

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

Functions

func RegisterChat_V1Server

func RegisterChat_V1Server(s grpc.ServiceRegistrar, srv Chat_V1Server)

Types

type Chat_V1Client

type Chat_V1Client interface {
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SendMessage(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

Chat_V1Client is the client API for Chat_V1 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 NewChat_V1Client

func NewChat_V1Client(cc grpc.ClientConnInterface) Chat_V1Client

type Chat_V1Server

type Chat_V1Server interface {
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
	SendMessage(context.Context, *SendRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

Chat_V1Server is the server API for Chat_V1 service. All implementations must embed UnimplementedChat_V1Server for forward compatibility

type CreateRequest

type CreateRequest struct {
	Usernames []string `protobuf:"bytes,1,rep,name=usernames,proto3" json:"usernames,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetUsernames

func (x *CreateRequest) GetUsernames() []string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetId

func (x *CreateResponse) GetId() int64

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type DeleteRequest

type DeleteRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() int64

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type SendRequest

type SendRequest struct {
	From      string                 `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	Text      string                 `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*SendRequest) Descriptor deprecated

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

Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.

func (*SendRequest) GetFrom

func (x *SendRequest) GetFrom() string

func (*SendRequest) GetText

func (x *SendRequest) GetText() string

func (*SendRequest) GetTimestamp

func (x *SendRequest) GetTimestamp() *timestamppb.Timestamp

func (*SendRequest) ProtoMessage

func (*SendRequest) ProtoMessage()

func (*SendRequest) ProtoReflect

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

func (*SendRequest) Reset

func (x *SendRequest) Reset()

func (*SendRequest) String

func (x *SendRequest) String() string

type UnimplementedChat_V1Server

type UnimplementedChat_V1Server struct {
}

UnimplementedChat_V1Server must be embedded to have forward compatible implementations.

func (UnimplementedChat_V1Server) Create

func (UnimplementedChat_V1Server) Delete

func (UnimplementedChat_V1Server) SendMessage

type UnsafeChat_V1Server

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

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

Jump to

Keyboard shortcuts

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