Files
2026-05-25 16:03:11 +03:00

561 lines
16 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v7.34.1
// source: homeops/stream.proto
package homeops
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
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 ServerCommandRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Args map[string]string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
TimeoutSeconds int64 `protobuf:"varint,4,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ServerCommandRequest) Reset() {
*x = ServerCommandRequest{}
mi := &file_homeops_stream_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ServerCommandRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServerCommandRequest) ProtoMessage() {}
func (x *ServerCommandRequest) ProtoReflect() protoreflect.Message {
mi := &file_homeops_stream_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 ServerCommandRequest.ProtoReflect.Descriptor instead.
func (*ServerCommandRequest) Descriptor() ([]byte, []int) {
return file_homeops_stream_proto_rawDescGZIP(), []int{0}
}
func (x *ServerCommandRequest) GetRequestId() string {
if x != nil {
return x.RequestId
}
return ""
}
func (x *ServerCommandRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ServerCommandRequest) GetArgs() map[string]string {
if x != nil {
return x.Args
}
return nil
}
func (x *ServerCommandRequest) GetTimeoutSeconds() int64 {
if x != nil {
return x.TimeoutSeconds
}
return 0
}
type AgentEvent struct {
state protoimpl.MessageState `protogen:"open.v1"`
AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
// Types that are valid to be assigned to Event:
//
// *AgentEvent_Heartbeat
// *AgentEvent_CommandResponse
// *AgentEvent_Alert
Event isAgentEvent_Event `protobuf_oneof:"event"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AgentEvent) Reset() {
*x = AgentEvent{}
mi := &file_homeops_stream_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AgentEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AgentEvent) ProtoMessage() {}
func (x *AgentEvent) ProtoReflect() protoreflect.Message {
mi := &file_homeops_stream_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 AgentEvent.ProtoReflect.Descriptor instead.
func (*AgentEvent) Descriptor() ([]byte, []int) {
return file_homeops_stream_proto_rawDescGZIP(), []int{1}
}
func (x *AgentEvent) GetAgentId() string {
if x != nil {
return x.AgentId
}
return ""
}
func (x *AgentEvent) GetEvent() isAgentEvent_Event {
if x != nil {
return x.Event
}
return nil
}
func (x *AgentEvent) GetHeartbeat() *Heartbeat {
if x != nil {
if x, ok := x.Event.(*AgentEvent_Heartbeat); ok {
return x.Heartbeat
}
}
return nil
}
func (x *AgentEvent) GetCommandResponse() *CommandResponse {
if x != nil {
if x, ok := x.Event.(*AgentEvent_CommandResponse); ok {
return x.CommandResponse
}
}
return nil
}
func (x *AgentEvent) GetAlert() *Alert {
if x != nil {
if x, ok := x.Event.(*AgentEvent_Alert); ok {
return x.Alert
}
}
return nil
}
type isAgentEvent_Event interface {
isAgentEvent_Event()
}
type AgentEvent_Heartbeat struct {
Heartbeat *Heartbeat `protobuf:"bytes,2,opt,name=heartbeat,proto3,oneof"`
}
type AgentEvent_CommandResponse struct {
CommandResponse *CommandResponse `protobuf:"bytes,3,opt,name=command_response,json=commandResponse,proto3,oneof"`
}
type AgentEvent_Alert struct {
Alert *Alert `protobuf:"bytes,4,opt,name=alert,proto3,oneof"`
}
func (*AgentEvent_Heartbeat) isAgentEvent_Event() {}
func (*AgentEvent_CommandResponse) isAgentEvent_Event() {}
func (*AgentEvent_Alert) isAgentEvent_Event() {}
type Heartbeat struct {
state protoimpl.MessageState `protogen:"open.v1"`
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Metrics *SystemMetrics `protobuf:"bytes,2,opt,name=metrics,proto3" json:"metrics,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Heartbeat) Reset() {
*x = Heartbeat{}
mi := &file_homeops_stream_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Heartbeat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Heartbeat) ProtoMessage() {}
func (x *Heartbeat) ProtoReflect() protoreflect.Message {
mi := &file_homeops_stream_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 Heartbeat.ProtoReflect.Descriptor instead.
func (*Heartbeat) Descriptor() ([]byte, []int) {
return file_homeops_stream_proto_rawDescGZIP(), []int{2}
}
func (x *Heartbeat) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *Heartbeat) GetMetrics() *SystemMetrics {
if x != nil {
return x.Metrics
}
return nil
}
type SystemMetrics struct {
state protoimpl.MessageState `protogen:"open.v1"`
CpuUsage float32 `protobuf:"fixed32,1,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"`
MemoryUsage float32 `protobuf:"fixed32,2,opt,name=memory_usage,json=memoryUsage,proto3" json:"memory_usage,omitempty"`
DiskUsage float32 `protobuf:"fixed32,3,opt,name=disk_usage,json=diskUsage,proto3" json:"disk_usage,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SystemMetrics) Reset() {
*x = SystemMetrics{}
mi := &file_homeops_stream_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SystemMetrics) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SystemMetrics) ProtoMessage() {}
func (x *SystemMetrics) ProtoReflect() protoreflect.Message {
mi := &file_homeops_stream_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 SystemMetrics.ProtoReflect.Descriptor instead.
func (*SystemMetrics) Descriptor() ([]byte, []int) {
return file_homeops_stream_proto_rawDescGZIP(), []int{3}
}
func (x *SystemMetrics) GetCpuUsage() float32 {
if x != nil {
return x.CpuUsage
}
return 0
}
func (x *SystemMetrics) GetMemoryUsage() float32 {
if x != nil {
return x.MemoryUsage
}
return 0
}
func (x *SystemMetrics) GetDiskUsage() float32 {
if x != nil {
return x.DiskUsage
}
return 0
}
type CommandResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"`
Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
ExecTimeMs int64 `protobuf:"varint,5,opt,name=exec_time_ms,json=execTimeMs,proto3" json:"exec_time_ms,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CommandResponse) Reset() {
*x = CommandResponse{}
mi := &file_homeops_stream_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CommandResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CommandResponse) ProtoMessage() {}
func (x *CommandResponse) ProtoReflect() protoreflect.Message {
mi := &file_homeops_stream_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 CommandResponse.ProtoReflect.Descriptor instead.
func (*CommandResponse) Descriptor() ([]byte, []int) {
return file_homeops_stream_proto_rawDescGZIP(), []int{4}
}
func (x *CommandResponse) GetRequestId() string {
if x != nil {
return x.RequestId
}
return ""
}
func (x *CommandResponse) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
func (x *CommandResponse) GetOutput() string {
if x != nil {
return x.Output
}
return ""
}
func (x *CommandResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
func (x *CommandResponse) GetExecTimeMs() int64 {
if x != nil {
return x.ExecTimeMs
}
return 0
}
type Alert struct {
state protoimpl.MessageState `protogen:"open.v1"`
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"`
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Alert) Reset() {
*x = Alert{}
mi := &file_homeops_stream_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Alert) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Alert) ProtoMessage() {}
func (x *Alert) ProtoReflect() protoreflect.Message {
mi := &file_homeops_stream_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 Alert.ProtoReflect.Descriptor instead.
func (*Alert) Descriptor() ([]byte, []int) {
return file_homeops_stream_proto_rawDescGZIP(), []int{5}
}
func (x *Alert) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *Alert) GetLevel() string {
if x != nil {
return x.Level
}
return ""
}
func (x *Alert) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Alert) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
var File_homeops_stream_proto protoreflect.FileDescriptor
const file_homeops_stream_proto_rawDesc = "" +
"\n" +
"\x14homeops/stream.proto\"\xe0\x01\n" +
"\x14ServerCommandRequest\x12\x1d\n" +
"\n" +
"request_id\x18\x01 \x01(\tR\trequestId\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\x123\n" +
"\x04args\x18\x03 \x03(\v2\x1f.ServerCommandRequest.ArgsEntryR\x04args\x12'\n" +
"\x0ftimeout_seconds\x18\x04 \x01(\x03R\x0etimeoutSeconds\x1a7\n" +
"\tArgsEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xbb\x01\n" +
"\n" +
"AgentEvent\x12\x19\n" +
"\bagent_id\x18\x01 \x01(\tR\aagentId\x12*\n" +
"\theartbeat\x18\x02 \x01(\v2\n" +
".HeartbeatH\x00R\theartbeat\x12=\n" +
"\x10command_response\x18\x03 \x01(\v2\x10.CommandResponseH\x00R\x0fcommandResponse\x12\x1e\n" +
"\x05alert\x18\x04 \x01(\v2\x06.AlertH\x00R\x05alertB\a\n" +
"\x05event\"S\n" +
"\tHeartbeat\x12\x1c\n" +
"\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\x12(\n" +
"\ametrics\x18\x02 \x01(\v2\x0e.SystemMetricsR\ametrics\"n\n" +
"\rSystemMetrics\x12\x1b\n" +
"\tcpu_usage\x18\x01 \x01(\x02R\bcpuUsage\x12!\n" +
"\fmemory_usage\x18\x02 \x01(\x02R\vmemoryUsage\x12\x1d\n" +
"\n" +
"disk_usage\x18\x03 \x01(\x02R\tdiskUsage\"\x9a\x01\n" +
"\x0fCommandResponse\x12\x1d\n" +
"\n" +
"request_id\x18\x01 \x01(\tR\trequestId\x12\x18\n" +
"\asuccess\x18\x02 \x01(\bR\asuccess\x12\x16\n" +
"\x06output\x18\x03 \x01(\tR\x06output\x12\x14\n" +
"\x05error\x18\x04 \x01(\tR\x05error\x12 \n" +
"\fexec_time_ms\x18\x05 \x01(\x03R\n" +
"execTimeMs\"s\n" +
"\x05Alert\x12\x1c\n" +
"\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\x12\x14\n" +
"\x05level\x18\x02 \x01(\tR\x05level\x12\x14\n" +
"\x05title\x18\x03 \x01(\tR\x05title\x12 \n" +
"\vdescription\x18\x04 \x01(\tR\vdescriptionB<Z:github.com/lorsanstand/HomeOps-Hub/api/gen/homeops;homeopsb\x06proto3"
var (
file_homeops_stream_proto_rawDescOnce sync.Once
file_homeops_stream_proto_rawDescData []byte
)
func file_homeops_stream_proto_rawDescGZIP() []byte {
file_homeops_stream_proto_rawDescOnce.Do(func() {
file_homeops_stream_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_homeops_stream_proto_rawDesc), len(file_homeops_stream_proto_rawDesc)))
})
return file_homeops_stream_proto_rawDescData
}
var file_homeops_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_homeops_stream_proto_goTypes = []any{
(*ServerCommandRequest)(nil), // 0: ServerCommandRequest
(*AgentEvent)(nil), // 1: AgentEvent
(*Heartbeat)(nil), // 2: Heartbeat
(*SystemMetrics)(nil), // 3: SystemMetrics
(*CommandResponse)(nil), // 4: CommandResponse
(*Alert)(nil), // 5: Alert
nil, // 6: ServerCommandRequest.ArgsEntry
}
var file_homeops_stream_proto_depIdxs = []int32{
6, // 0: ServerCommandRequest.args:type_name -> ServerCommandRequest.ArgsEntry
2, // 1: AgentEvent.heartbeat:type_name -> Heartbeat
4, // 2: AgentEvent.command_response:type_name -> CommandResponse
5, // 3: AgentEvent.alert:type_name -> Alert
3, // 4: Heartbeat.metrics:type_name -> SystemMetrics
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_homeops_stream_proto_init() }
func file_homeops_stream_proto_init() {
if File_homeops_stream_proto != nil {
return
}
file_homeops_stream_proto_msgTypes[1].OneofWrappers = []any{
(*AgentEvent_Heartbeat)(nil),
(*AgentEvent_CommandResponse)(nil),
(*AgentEvent_Alert)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_homeops_stream_proto_rawDesc), len(file_homeops_stream_proto_rawDesc)),
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_homeops_stream_proto_goTypes,
DependencyIndexes: file_homeops_stream_proto_depIdxs,
MessageInfos: file_homeops_stream_proto_msgTypes,
}.Build()
File_homeops_stream_proto = out.File
file_homeops_stream_proto_goTypes = nil
file_homeops_stream_proto_depIdxs = nil
}