implement simple tui with humans data
This commit is contained in:
@@ -0,0 +1,715 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: helios/messenger/messenger.proto
|
||||
|
||||
package pbmessenger
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ClientStateUpdate_UpdateType int32
|
||||
|
||||
const (
|
||||
ClientStateUpdate_UPDATE_TYPE_UNSPECIFIED ClientStateUpdate_UpdateType = 0
|
||||
ClientStateUpdate_UPDATE_TYPE_CLIENT_CONNECTED ClientStateUpdate_UpdateType = 1
|
||||
ClientStateUpdate_UPDATE_TYPE_CLIENT_DISCONNECTED ClientStateUpdate_UpdateType = 2
|
||||
)
|
||||
|
||||
// Enum value maps for ClientStateUpdate_UpdateType.
|
||||
var (
|
||||
ClientStateUpdate_UpdateType_name = map[int32]string{
|
||||
0: "UPDATE_TYPE_UNSPECIFIED",
|
||||
1: "UPDATE_TYPE_CLIENT_CONNECTED",
|
||||
2: "UPDATE_TYPE_CLIENT_DISCONNECTED",
|
||||
}
|
||||
ClientStateUpdate_UpdateType_value = map[string]int32{
|
||||
"UPDATE_TYPE_UNSPECIFIED": 0,
|
||||
"UPDATE_TYPE_CLIENT_CONNECTED": 1,
|
||||
"UPDATE_TYPE_CLIENT_DISCONNECTED": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ClientStateUpdate_UpdateType) Enum() *ClientStateUpdate_UpdateType {
|
||||
p := new(ClientStateUpdate_UpdateType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ClientStateUpdate_UpdateType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ClientStateUpdate_UpdateType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_helios_messenger_messenger_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (ClientStateUpdate_UpdateType) Type() protoreflect.EnumType {
|
||||
return &file_helios_messenger_messenger_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x ClientStateUpdate_UpdateType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ClientStateUpdate_UpdateType.Descriptor instead.
|
||||
func (ClientStateUpdate_UpdateType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_helios_messenger_messenger_proto_rawDescGZIP(), []int{3, 0}
|
||||
}
|
||||
|
||||
type ClientInfo_ClientType int32
|
||||
|
||||
const (
|
||||
ClientInfo_CLIENT_TYPE_UNSPECIFIED ClientInfo_ClientType = 0
|
||||
ClientInfo_CLIENT_TYPE_KEYPAD ClientInfo_ClientType = 1
|
||||
ClientInfo_CLIENT_TYPE_DAEMON ClientInfo_ClientType = 2
|
||||
)
|
||||
|
||||
// Enum value maps for ClientInfo_ClientType.
|
||||
var (
|
||||
ClientInfo_ClientType_name = map[int32]string{
|
||||
0: "CLIENT_TYPE_UNSPECIFIED",
|
||||
1: "CLIENT_TYPE_KEYPAD",
|
||||
2: "CLIENT_TYPE_DAEMON",
|
||||
}
|
||||
ClientInfo_ClientType_value = map[string]int32{
|
||||
"CLIENT_TYPE_UNSPECIFIED": 0,
|
||||
"CLIENT_TYPE_KEYPAD": 1,
|
||||
"CLIENT_TYPE_DAEMON": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ClientInfo_ClientType) Enum() *ClientInfo_ClientType {
|
||||
p := new(ClientInfo_ClientType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ClientInfo_ClientType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ClientInfo_ClientType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_helios_messenger_messenger_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (ClientInfo_ClientType) Type() protoreflect.EnumType {
|
||||
return &file_helios_messenger_messenger_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x ClientInfo_ClientType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ClientInfo_ClientType.Descriptor instead.
|
||||
func (ClientInfo_ClientType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_helios_messenger_messenger_proto_rawDescGZIP(), []int{4, 0}
|
||||
}
|
||||
|
||||
type OutboundMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
|
||||
ToHostname string `protobuf:"bytes,2,opt,name=to_hostname,json=toHostname,proto3" json:"to_hostname,omitempty"`
|
||||
// For heartbeats, should send "heartbeat". This keeps the connection alive.
|
||||
Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OutboundMessage) Reset() {
|
||||
*x = OutboundMessage{}
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *OutboundMessage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*OutboundMessage) ProtoMessage() {}
|
||||
|
||||
func (x *OutboundMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use OutboundMessage.ProtoReflect.Descriptor instead.
|
||||
func (*OutboundMessage) Descriptor() ([]byte, []int) {
|
||||
return file_helios_messenger_messenger_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *OutboundMessage) GetMessageId() string {
|
||||
if x != nil {
|
||||
return x.MessageId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OutboundMessage) GetToHostname() string {
|
||||
if x != nil {
|
||||
return x.ToHostname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OutboundMessage) GetPayload() string {
|
||||
if x != nil {
|
||||
return x.Payload
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
|
||||
ToHostname string `protobuf:"bytes,2,opt,name=to_hostname,json=toHostname,proto3" json:"to_hostname,omitempty"`
|
||||
FromHostname string `protobuf:"bytes,3,opt,name=from_hostname,json=fromHostname,proto3" json:"from_hostname,omitempty"`
|
||||
Payload string `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Message) Reset() {
|
||||
*x = Message{}
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Message) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Message) ProtoMessage() {}
|
||||
|
||||
func (x *Message) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
|
||||
func (*Message) Descriptor() ([]byte, []int) {
|
||||
return file_helios_messenger_messenger_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Message) GetMessageId() string {
|
||||
if x != nil {
|
||||
return x.MessageId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Message) GetToHostname() string {
|
||||
if x != nil {
|
||||
return x.ToHostname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Message) GetFromHostname() string {
|
||||
if x != nil {
|
||||
return x.FromHostname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Message) GetPayload() string {
|
||||
if x != nil {
|
||||
return x.Payload
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type InboundMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Data:
|
||||
//
|
||||
// *InboundMessage_ClientMessage
|
||||
// *InboundMessage_Error
|
||||
// *InboundMessage_ClientUpdate
|
||||
Data isInboundMessage_Data `protobuf_oneof:"data"`
|
||||
}
|
||||
|
||||
func (x *InboundMessage) Reset() {
|
||||
*x = InboundMessage{}
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *InboundMessage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*InboundMessage) ProtoMessage() {}
|
||||
|
||||
func (x *InboundMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use InboundMessage.ProtoReflect.Descriptor instead.
|
||||
func (*InboundMessage) Descriptor() ([]byte, []int) {
|
||||
return file_helios_messenger_messenger_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (m *InboundMessage) GetData() isInboundMessage_Data {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *InboundMessage) GetClientMessage() *Message {
|
||||
if x, ok := x.GetData().(*InboundMessage_ClientMessage); ok {
|
||||
return x.ClientMessage
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *InboundMessage) GetError() string {
|
||||
if x, ok := x.GetData().(*InboundMessage_Error); ok {
|
||||
return x.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InboundMessage) GetClientUpdate() *ClientStateUpdate {
|
||||
if x, ok := x.GetData().(*InboundMessage_ClientUpdate); ok {
|
||||
return x.ClientUpdate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isInboundMessage_Data interface {
|
||||
isInboundMessage_Data()
|
||||
}
|
||||
|
||||
type InboundMessage_ClientMessage struct {
|
||||
ClientMessage *Message `protobuf:"bytes,1,opt,name=client_message,json=clientMessage,proto3,oneof"`
|
||||
}
|
||||
|
||||
type InboundMessage_Error struct {
|
||||
Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
|
||||
}
|
||||
|
||||
type InboundMessage_ClientUpdate struct {
|
||||
ClientUpdate *ClientStateUpdate `protobuf:"bytes,3,opt,name=client_update,json=clientUpdate,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*InboundMessage_ClientMessage) isInboundMessage_Data() {}
|
||||
|
||||
func (*InboundMessage_Error) isInboundMessage_Data() {}
|
||||
|
||||
func (*InboundMessage_ClientUpdate) isInboundMessage_Data() {}
|
||||
|
||||
type ClientStateUpdate struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Type ClientStateUpdate_UpdateType `protobuf:"varint,1,opt,name=type,proto3,enum=helios.messenger.ClientStateUpdate_UpdateType" json:"type,omitempty"`
|
||||
Client *ClientInfo `protobuf:"bytes,2,opt,name=client,proto3" json:"client,omitempty"`
|
||||
AllClients []*ClientInfo `protobuf:"bytes,3,rep,name=all_clients,json=allClients,proto3" json:"all_clients,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ClientStateUpdate) Reset() {
|
||||
*x = ClientStateUpdate{}
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ClientStateUpdate) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ClientStateUpdate) ProtoMessage() {}
|
||||
|
||||
func (x *ClientStateUpdate) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ClientStateUpdate.ProtoReflect.Descriptor instead.
|
||||
func (*ClientStateUpdate) Descriptor() ([]byte, []int) {
|
||||
return file_helios_messenger_messenger_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ClientStateUpdate) GetType() ClientStateUpdate_UpdateType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ClientStateUpdate_UPDATE_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *ClientStateUpdate) GetClient() *ClientInfo {
|
||||
if x != nil {
|
||||
return x.Client
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ClientStateUpdate) GetAllClients() []*ClientInfo {
|
||||
if x != nil {
|
||||
return x.AllClients
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ClientInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Type ClientInfo_ClientType `protobuf:"varint,1,opt,name=type,proto3,enum=helios.messenger.ClientInfo_ClientType" json:"type,omitempty"`
|
||||
Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||||
ConnectedAt int64 `protobuf:"varint,3,opt,name=connected_at,json=connectedAt,proto3" json:"connected_at,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ClientInfo) Reset() {
|
||||
*x = ClientInfo{}
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ClientInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ClientInfo) ProtoMessage() {}
|
||||
|
||||
func (x *ClientInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ClientInfo.ProtoReflect.Descriptor instead.
|
||||
func (*ClientInfo) Descriptor() ([]byte, []int) {
|
||||
return file_helios_messenger_messenger_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ClientInfo) GetType() ClientInfo_ClientType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ClientInfo_CLIENT_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *ClientInfo) GetHostname() string {
|
||||
if x != nil {
|
||||
return x.Hostname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ClientInfo) GetConnectedAt() int64 {
|
||||
if x != nil {
|
||||
return x.ConnectedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListClientsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *ListClientsRequest) Reset() {
|
||||
*x = ListClientsRequest{}
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListClientsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListClientsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListClientsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListClientsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListClientsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_helios_messenger_messenger_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
type ListClientsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Clients []*ClientInfo `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListClientsResponse) Reset() {
|
||||
*x = ListClientsResponse{}
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListClientsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListClientsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListClientsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_messenger_messenger_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListClientsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListClientsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_helios_messenger_messenger_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ListClientsResponse) GetClients() []*ClientInfo {
|
||||
if x != nil {
|
||||
return x.Clients
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_helios_messenger_messenger_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_helios_messenger_messenger_proto_rawDesc = []byte{
|
||||
0x0a, 0x20, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67,
|
||||
0x65, 0x72, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x10, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x65,
|
||||
0x6e, 0x67, 0x65, 0x72, 0x22, 0x6b, 0x0a, 0x0f, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64,
|
||||
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x5f, 0x68, 0x6f, 0x73,
|
||||
0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x22, 0x88, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b,
|
||||
0x74, 0x6f, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a,
|
||||
0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xc0, 0x01, 0x0a,
|
||||
0x0e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
|
||||
0x42, 0x0a, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73,
|
||||
0x2e, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x0d, 0x63,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73,
|
||||
0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74,
|
||||
0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e,
|
||||
0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
|
||||
0xbe, 0x02, 0x0a, 0x11, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61,
|
||||
0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x6c, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x65, 0x6c, 0x69,
|
||||
0x6f, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12,
|
||||
0x3d, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6d, 0x65,
|
||||
0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x70,
|
||||
0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17,
|
||||
0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
|
||||
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x50, 0x44,
|
||||
0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f,
|
||||
0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x55,
|
||||
0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e,
|
||||
0x54, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02,
|
||||
0x22, 0xe3, 0x01, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x3b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e,
|
||||
0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72,
|
||||
0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x43, 0x6c, 0x69, 0x65,
|
||||
0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x6e,
|
||||
0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
|
||||
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x59, 0x0a, 0x0a, 0x43,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4c, 0x49,
|
||||
0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
|
||||
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54,
|
||||
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x50, 0x41, 0x44, 0x10, 0x01, 0x12, 0x16,
|
||||
0x0a, 0x12, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41,
|
||||
0x45, 0x4d, 0x4f, 0x4e, 0x10, 0x02, 0x22, 0x14, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, 0x0a, 0x13,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6d, 0x65,
|
||||
0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x07, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x32, 0xc1, 0x01, 0x0a, 0x10,
|
||||
0x4d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x51, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x21, 0x2e, 0x68, 0x65, 0x6c,
|
||||
0x69, 0x6f, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x4f, 0x75,
|
||||
0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x20, 0x2e,
|
||||
0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72,
|
||||
0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28,
|
||||
0x01, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e,
|
||||
0x74, 0x73, 0x12, 0x24, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73,
|
||||
0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f,
|
||||
0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
|
||||
0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x79, 0x2d, 0x6c, 0x69, 0x76, 0x65, 0x2f, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f,
|
||||
0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x3b, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x73,
|
||||
0x65, 0x6e, 0x67, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_helios_messenger_messenger_proto_rawDescOnce sync.Once
|
||||
file_helios_messenger_messenger_proto_rawDescData = file_helios_messenger_messenger_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_helios_messenger_messenger_proto_rawDescGZIP() []byte {
|
||||
file_helios_messenger_messenger_proto_rawDescOnce.Do(func() {
|
||||
file_helios_messenger_messenger_proto_rawDescData = protoimpl.X.CompressGZIP(file_helios_messenger_messenger_proto_rawDescData)
|
||||
})
|
||||
return file_helios_messenger_messenger_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_helios_messenger_messenger_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_helios_messenger_messenger_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_helios_messenger_messenger_proto_goTypes = []any{
|
||||
(ClientStateUpdate_UpdateType)(0), // 0: helios.messenger.ClientStateUpdate.UpdateType
|
||||
(ClientInfo_ClientType)(0), // 1: helios.messenger.ClientInfo.ClientType
|
||||
(*OutboundMessage)(nil), // 2: helios.messenger.OutboundMessage
|
||||
(*Message)(nil), // 3: helios.messenger.Message
|
||||
(*InboundMessage)(nil), // 4: helios.messenger.InboundMessage
|
||||
(*ClientStateUpdate)(nil), // 5: helios.messenger.ClientStateUpdate
|
||||
(*ClientInfo)(nil), // 6: helios.messenger.ClientInfo
|
||||
(*ListClientsRequest)(nil), // 7: helios.messenger.ListClientsRequest
|
||||
(*ListClientsResponse)(nil), // 8: helios.messenger.ListClientsResponse
|
||||
}
|
||||
var file_helios_messenger_messenger_proto_depIdxs = []int32{
|
||||
3, // 0: helios.messenger.InboundMessage.client_message:type_name -> helios.messenger.Message
|
||||
5, // 1: helios.messenger.InboundMessage.client_update:type_name -> helios.messenger.ClientStateUpdate
|
||||
0, // 2: helios.messenger.ClientStateUpdate.type:type_name -> helios.messenger.ClientStateUpdate.UpdateType
|
||||
6, // 3: helios.messenger.ClientStateUpdate.client:type_name -> helios.messenger.ClientInfo
|
||||
6, // 4: helios.messenger.ClientStateUpdate.all_clients:type_name -> helios.messenger.ClientInfo
|
||||
1, // 5: helios.messenger.ClientInfo.type:type_name -> helios.messenger.ClientInfo.ClientType
|
||||
6, // 6: helios.messenger.ListClientsResponse.clients:type_name -> helios.messenger.ClientInfo
|
||||
2, // 7: helios.messenger.MessengerService.Stream:input_type -> helios.messenger.OutboundMessage
|
||||
7, // 8: helios.messenger.MessengerService.ListClients:input_type -> helios.messenger.ListClientsRequest
|
||||
4, // 9: helios.messenger.MessengerService.Stream:output_type -> helios.messenger.InboundMessage
|
||||
8, // 10: helios.messenger.MessengerService.ListClients:output_type -> helios.messenger.ListClientsResponse
|
||||
9, // [9:11] is the sub-list for method output_type
|
||||
7, // [7:9] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_helios_messenger_messenger_proto_init() }
|
||||
func file_helios_messenger_messenger_proto_init() {
|
||||
if File_helios_messenger_messenger_proto != nil {
|
||||
return
|
||||
}
|
||||
file_helios_messenger_messenger_proto_msgTypes[2].OneofWrappers = []any{
|
||||
(*InboundMessage_ClientMessage)(nil),
|
||||
(*InboundMessage_Error)(nil),
|
||||
(*InboundMessage_ClientUpdate)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_helios_messenger_messenger_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_helios_messenger_messenger_proto_goTypes,
|
||||
DependencyIndexes: file_helios_messenger_messenger_proto_depIdxs,
|
||||
EnumInfos: file_helios_messenger_messenger_proto_enumTypes,
|
||||
MessageInfos: file_helios_messenger_messenger_proto_msgTypes,
|
||||
}.Build()
|
||||
File_helios_messenger_messenger_proto = out.File
|
||||
file_helios_messenger_messenger_proto_rawDesc = nil
|
||||
file_helios_messenger_messenger_proto_goTypes = nil
|
||||
file_helios_messenger_messenger_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// source: helios/messenger/messenger.proto
|
||||
|
||||
package pbmessenger
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
MessengerService_Stream_FullMethodName = "/helios.messenger.MessengerService/Stream"
|
||||
MessengerService_ListClients_FullMethodName = "/helios.messenger.MessengerService/ListClients"
|
||||
)
|
||||
|
||||
// MessengerServiceClient is the client API for MessengerService 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.
|
||||
//
|
||||
// Helios' messenger service serves as a dumb 'pipe' for communication between clients of the same account
|
||||
type MessengerServiceClient interface {
|
||||
// Note: must set hostname & authorization (session_id) headers
|
||||
// Send heartbeats to keep connection alive.
|
||||
// Also make sure to have reconnect logic as helios deployments does zero-downtime deploys, but still terminates old pods.
|
||||
Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[OutboundMessage, InboundMessage], error)
|
||||
ListClients(ctx context.Context, in *ListClientsRequest, opts ...grpc.CallOption) (*ListClientsResponse, error)
|
||||
}
|
||||
|
||||
type messengerServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMessengerServiceClient(cc grpc.ClientConnInterface) MessengerServiceClient {
|
||||
return &messengerServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *messengerServiceClient) Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[OutboundMessage, InboundMessage], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &MessengerService_ServiceDesc.Streams[0], MessengerService_Stream_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[OutboundMessage, InboundMessage]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type MessengerService_StreamClient = grpc.BidiStreamingClient[OutboundMessage, InboundMessage]
|
||||
|
||||
func (c *messengerServiceClient) ListClients(ctx context.Context, in *ListClientsRequest, opts ...grpc.CallOption) (*ListClientsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListClientsResponse)
|
||||
err := c.cc.Invoke(ctx, MessengerService_ListClients_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MessengerServiceServer is the server API for MessengerService service.
|
||||
// All implementations must embed UnimplementedMessengerServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Helios' messenger service serves as a dumb 'pipe' for communication between clients of the same account
|
||||
type MessengerServiceServer interface {
|
||||
// Note: must set hostname & authorization (session_id) headers
|
||||
// Send heartbeats to keep connection alive.
|
||||
// Also make sure to have reconnect logic as helios deployments does zero-downtime deploys, but still terminates old pods.
|
||||
Stream(grpc.BidiStreamingServer[OutboundMessage, InboundMessage]) error
|
||||
ListClients(context.Context, *ListClientsRequest) (*ListClientsResponse, error)
|
||||
mustEmbedUnimplementedMessengerServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedMessengerServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMessengerServiceServer struct{}
|
||||
|
||||
func (UnimplementedMessengerServiceServer) Stream(grpc.BidiStreamingServer[OutboundMessage, InboundMessage]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Stream not implemented")
|
||||
}
|
||||
func (UnimplementedMessengerServiceServer) ListClients(context.Context, *ListClientsRequest) (*ListClientsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListClients not implemented")
|
||||
}
|
||||
func (UnimplementedMessengerServiceServer) mustEmbedUnimplementedMessengerServiceServer() {}
|
||||
func (UnimplementedMessengerServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMessengerServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MessengerServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMessengerServiceServer interface {
|
||||
mustEmbedUnimplementedMessengerServiceServer()
|
||||
}
|
||||
|
||||
func RegisterMessengerServiceServer(s grpc.ServiceRegistrar, srv MessengerServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMessengerServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&MessengerService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _MessengerService_Stream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(MessengerServiceServer).Stream(&grpc.GenericServerStream[OutboundMessage, InboundMessage]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type MessengerService_StreamServer = grpc.BidiStreamingServer[OutboundMessage, InboundMessage]
|
||||
|
||||
func _MessengerService_ListClients_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListClientsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MessengerServiceServer).ListClients(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: MessengerService_ListClients_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MessengerServiceServer).ListClients(ctx, req.(*ListClientsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// MessengerService_ServiceDesc is the grpc.ServiceDesc for MessengerService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var MessengerService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "helios.messenger.MessengerService",
|
||||
HandlerType: (*MessengerServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListClients",
|
||||
Handler: _MessengerService_ListClients_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Stream",
|
||||
Handler: _MessengerService_Stream_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "helios/messenger/messenger.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user