Documentation ¶
Index ¶
- Variables
- func RegisterBackendServer(s grpc.ServiceRegistrar, srv BackendServer)
- type BackendClient
- type BackendServer
- type Chat
- func (*Chat) Descriptor() ([]byte, []int)deprecated
- func (x *Chat) GetFirstName() string
- func (x *Chat) GetId() int64
- func (x *Chat) GetLastName() string
- func (x *Chat) GetTitle() string
- func (x *Chat) GetType() string
- func (x *Chat) GetUsername() string
- func (*Chat) ProtoMessage()
- func (x *Chat) ProtoReflect() protoreflect.Message
- func (x *Chat) Reset()
- func (x *Chat) String() string
- type ChatRequest
- func (*ChatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChatRequest) GetId() int64
- func (x *ChatRequest) GetType() string
- func (x *ChatRequest) GetUsername() string
- func (*ChatRequest) ProtoMessage()
- func (x *ChatRequest) ProtoReflect() protoreflect.Message
- func (x *ChatRequest) Reset()
- func (x *ChatRequest) String() string
- type ChatResponse
- func (*ChatResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ChatResponse) GetChats() []*Chat
- func (x *ChatResponse) GetCode() int64
- func (x *ChatResponse) GetMessage() string
- func (*ChatResponse) ProtoMessage()
- func (x *ChatResponse) ProtoReflect() protoreflect.Message
- func (x *ChatResponse) Reset()
- func (x *ChatResponse) String() string
- type UnimplementedBackendServer
- type UnsafeBackendServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_backend_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBackendServer ¶
func RegisterBackendServer(s grpc.ServiceRegistrar, srv BackendServer)
Types ¶
type BackendClient ¶
type BackendClient interface { GetChat(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*ChatResponse, error) GetChatsList(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*ChatResponse, error) }
BackendClient is the client API for Backend 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 NewBackendClient ¶
func NewBackendClient(cc grpc.ClientConnInterface) BackendClient
type BackendServer ¶
type BackendServer interface { GetChat(context.Context, *ChatRequest) (*ChatResponse, error) GetChatsList(context.Context, *ChatRequest) (*ChatResponse, error) // contains filtered or unexported methods }
BackendServer is the server API for Backend service. All implementations must embed UnimplementedBackendServer for forward compatibility
type Chat ¶
type Chat struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` FirstName string `protobuf:"bytes,5,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,6,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` // contains filtered or unexported fields }
func (*Chat) Descriptor
deprecated
func (*Chat) GetFirstName ¶
func (*Chat) GetLastName ¶
func (*Chat) GetUsername ¶
func (*Chat) ProtoMessage ¶
func (*Chat) ProtoMessage()
func (*Chat) ProtoReflect ¶
func (x *Chat) ProtoReflect() protoreflect.Message
type ChatRequest ¶
type ChatRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*ChatRequest) Descriptor
deprecated
func (*ChatRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.
func (*ChatRequest) GetId ¶
func (x *ChatRequest) GetId() int64
func (*ChatRequest) GetType ¶
func (x *ChatRequest) GetType() string
func (*ChatRequest) GetUsername ¶
func (x *ChatRequest) GetUsername() string
func (*ChatRequest) ProtoMessage ¶
func (*ChatRequest) ProtoMessage()
func (*ChatRequest) ProtoReflect ¶
func (x *ChatRequest) ProtoReflect() protoreflect.Message
func (*ChatRequest) Reset ¶
func (x *ChatRequest) Reset()
func (*ChatRequest) String ¶
func (x *ChatRequest) String() string
type ChatResponse ¶
type ChatResponse struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Chats []*Chat `protobuf:"bytes,3,rep,name=chats,proto3" json:"chats,omitempty"` // contains filtered or unexported fields }
func (*ChatResponse) Descriptor
deprecated
func (*ChatResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChatResponse.ProtoReflect.Descriptor instead.
func (*ChatResponse) GetChats ¶
func (x *ChatResponse) GetChats() []*Chat
func (*ChatResponse) GetCode ¶
func (x *ChatResponse) GetCode() int64
func (*ChatResponse) GetMessage ¶
func (x *ChatResponse) GetMessage() string
func (*ChatResponse) ProtoMessage ¶
func (*ChatResponse) ProtoMessage()
func (*ChatResponse) ProtoReflect ¶
func (x *ChatResponse) ProtoReflect() protoreflect.Message
func (*ChatResponse) Reset ¶
func (x *ChatResponse) Reset()
func (*ChatResponse) String ¶
func (x *ChatResponse) String() string
type UnimplementedBackendServer ¶
type UnimplementedBackendServer struct { }
UnimplementedBackendServer must be embedded to have forward compatible implementations.
func (UnimplementedBackendServer) GetChat ¶
func (UnimplementedBackendServer) GetChat(context.Context, *ChatRequest) (*ChatResponse, error)
func (UnimplementedBackendServer) GetChatsList ¶
func (UnimplementedBackendServer) GetChatsList(context.Context, *ChatRequest) (*ChatResponse, error)
type UnsafeBackendServer ¶
type UnsafeBackendServer interface {
// contains filtered or unexported methods
}
UnsafeBackendServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BackendServer will result in compilation errors.