Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_proto_internal_proto protoreflect.FileDescriptor
var Server_ServiceDesc = grpc.ServiceDesc{ ServiceName: "internal.Server", HandlerType: (*ServerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUsers", Handler: _Server_GetUsers_Handler, }, { MethodName: "GetChats", Handler: _Server_GetChats_Handler, }, { MethodName: "GetChat", Handler: _Server_GetChat_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/internal.proto", }
Server_ServiceDesc is the grpc.ServiceDesc for Server service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServerServer ¶
func RegisterServerServer(s grpc.ServiceRegistrar, srv ServerServer)
Types ¶
type Chat ¶
type Chat struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` // contains filtered or unexported fields }
func (*Chat) Descriptor
deprecated
func (*Chat) GetMessages ¶
func (*Chat) ProtoMessage ¶
func (*Chat) ProtoMessage()
func (*Chat) ProtoReflect ¶
func (x *Chat) ProtoReflect() protoreflect.Message
type ChatIds ¶
type ChatIds struct { ChatIds []string `protobuf:"bytes,1,rep,name=chat_ids,json=chatIds,proto3" json:"chat_ids,omitempty"` // contains filtered or unexported fields }
func (*ChatIds) Descriptor
deprecated
func (*ChatIds) GetChatIds ¶
func (*ChatIds) ProtoMessage ¶
func (*ChatIds) ProtoMessage()
func (*ChatIds) ProtoReflect ¶
func (x *ChatIds) ProtoReflect() protoreflect.Message
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetChatRequest ¶
type GetChatRequest struct { ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` // contains filtered or unexported fields }
func (*GetChatRequest) Descriptor
deprecated
func (*GetChatRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetChatRequest.ProtoReflect.Descriptor instead.
func (*GetChatRequest) GetChatId ¶
func (x *GetChatRequest) GetChatId() string
func (*GetChatRequest) ProtoMessage ¶
func (*GetChatRequest) ProtoMessage()
func (*GetChatRequest) ProtoReflect ¶
func (x *GetChatRequest) ProtoReflect() protoreflect.Message
func (*GetChatRequest) Reset ¶
func (x *GetChatRequest) Reset()
func (*GetChatRequest) String ¶
func (x *GetChatRequest) String() string
type Message ¶
type Message struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type ServerClient ¶
type ServerClient interface { GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Users, error) GetChats(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ChatIds, error) GetChat(ctx context.Context, in *GetChatRequest, opts ...grpc.CallOption) (*Chat, error) }
ServerClient is the client API for Server 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 NewServerClient ¶
func NewServerClient(cc grpc.ClientConnInterface) ServerClient
type ServerServer ¶
type ServerServer interface { GetUsers(context.Context, *Empty) (*Users, error) GetChats(context.Context, *Empty) (*ChatIds, error) GetChat(context.Context, *GetChatRequest) (*Chat, error) // contains filtered or unexported methods }
ServerServer is the server API for Server service. All implementations must embed UnimplementedServerServer for forward compatibility
type UnimplementedServerServer ¶
type UnimplementedServerServer struct { }
UnimplementedServerServer must be embedded to have forward compatible implementations.
func (UnimplementedServerServer) GetChat ¶
func (UnimplementedServerServer) GetChat(context.Context, *GetChatRequest) (*Chat, error)
type UnsafeServerServer ¶
type UnsafeServerServer interface {
// contains filtered or unexported methods
}
UnsafeServerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServerServer will result in compilation errors.
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type Users ¶
type Users struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*Users) Descriptor
deprecated
func (*Users) ProtoMessage ¶
func (*Users) ProtoMessage()
func (*Users) ProtoReflect ¶
func (x *Users) ProtoReflect() protoreflect.Message