From fbee5436a982e74698d989d1a9b3723a306c25fd Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 15 Feb 2025 07:33:13 -0600 Subject: [PATCH] Notes added by 'git notes append' --- 088a2f65152a84583519fe89effbd92435e0eb2e | 303 +++++++++++++++++++++++ 1 file changed, 303 insertions(+) diff --git a/088a2f65152a84583519fe89effbd92435e0eb2e b/088a2f65152a84583519fe89effbd92435e0eb2e index afeb8d9..fca45da 100644 --- a/088a2f65152a84583519fe89effbd92435e0eb2e +++ b/088a2f65152a84583519fe89effbd92435e0eb2e @@ -122,3 +122,306 @@ func (v *Machine) Unmarshal(data []byte) error { } // `autogen:machine.pb.go` + +// Code modified by go.wit.com/apps/autogenpb DO NOT EDIT. +// +// user defined Mutex locks were auto added +// +// autogenpb version & build time: v0.0.50 2025-02-09_00:52:14_UTC +// autogenpb auto generates Sort(), Unique() and Marshal() functions +// go install go.wit.com/apps/autogenpb@latest + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2-devel +// protoc v3.21.12 +// source: machine.proto + +package zoopb // autogenpb changed the package name + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +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 Machine struct { + sync.RWMutex // auto-added by go.wit.com/apps/autogenpb + + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` // `autogenpb:unique` `autogenpb:sort` + Memory int64 `protobuf:"varint,2,opt,name=memory,proto3" json:"memory,omitempty"` + Cpus int64 `protobuf:"varint,3,opt,name=cpus,proto3" json:"cpus,omitempty"` + Distro string `protobuf:"bytes,4,opt,name=distro,proto3" json:"distro,omitempty"` + Packages *Packages `protobuf:"bytes,5,opt,name=packages,proto3" json:"packages,omitempty"` + Laststamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=laststamp,proto3" json:"laststamp,omitempty"` // the last time we heard anything from this machine + Installed *Packages `protobuf:"bytes,7,opt,name=installed,proto3" json:"installed,omitempty"` // packages that are installed + Available *Packages `protobuf:"bytes,8,opt,name=available,proto3" json:"available,omitempty"` // packages that are available + Wit *Packages `protobuf:"bytes,9,opt,name=wit,proto3" json:"wit,omitempty"` // packages that are available from mirrors.wit.com +} + +func (x *Machine) Reset() { + *x = Machine{} + mi := &file_machine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Machine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Machine) ProtoMessage() {} + +func (x *Machine) ProtoReflect() protoreflect.Message { + mi := &file_machine_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 Machine.ProtoReflect.Descriptor instead. +func (*Machine) Descriptor() ([]byte, []int) { + return file_machine_proto_rawDescGZIP(), []int{0} +} + +func (x *Machine) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *Machine) GetMemory() int64 { + if x != nil { + return x.Memory + } + return 0 +} + +func (x *Machine) GetCpus() int64 { + if x != nil { + return x.Cpus + } + return 0 +} + +func (x *Machine) GetDistro() string { + if x != nil { + return x.Distro + } + return "" +} + +func (x *Machine) GetPackages() *Packages { + if x != nil { + return x.Packages + } + return nil +} + +func (x *Machine) GetLaststamp() *timestamppb.Timestamp { + if x != nil { + return x.Laststamp + } + return nil +} + +func (x *Machine) GetInstalled() *Packages { + if x != nil { + return x.Installed + } + return nil +} + +func (x *Machine) GetAvailable() *Packages { + if x != nil { + return x.Available + } + return nil +} + +func (x *Machine) GetWit() *Packages { + if x != nil { + return x.Wit + } + return nil +} + +type Machines struct { + sync.RWMutex // auto-added by go.wit.com/apps/autogenpb + + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:b57e7fac-a8fc-4949-9d50-fa38312dec87` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.1` + Machines []*Machine `protobuf:"bytes,3,rep,name=machines,proto3" json:"machines,omitempty"` +} + +func (x *Machines) Reset() { + *x = Machines{} + mi := &file_machine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Machines) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Machines) ProtoMessage() {} + +func (x *Machines) ProtoReflect() protoreflect.Message { + mi := &file_machine_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 Machines.ProtoReflect.Descriptor instead. +func (*Machines) Descriptor() ([]byte, []int) { + return file_machine_proto_rawDescGZIP(), []int{1} +} + +func (x *Machines) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *Machines) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Machines) GetMachines() []*Machine { + if x != nil { + return x.Machines + } + return nil +} + +var File_machine_proto protoreflect.FileDescriptor + +var file_machine_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x05, 0x67, 0x69, 0x74, 0x70, 0x62, 0x1a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x02, 0x0a, 0x07, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x70, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x70, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x73, 0x74, + 0x72, 0x6f, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, + 0x38, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x6c, 0x61, 0x73, 0x74, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2d, 0x0a, 0x09, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, + 0x69, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x09, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x69, + 0x74, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x09, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x77, 0x69, 0x74, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x03, 0x77, 0x69, 0x74, 0x22, 0x64, 0x0a, 0x08, 0x4d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x08, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x62, 0x2e, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_machine_proto_rawDescOnce sync.Once + file_machine_proto_rawDescData = file_machine_proto_rawDesc +) + +func file_machine_proto_rawDescGZIP() []byte { + file_machine_proto_rawDescOnce.Do(func() { + file_machine_proto_rawDescData = protoimpl.X.CompressGZIP(file_machine_proto_rawDescData) + }) + return file_machine_proto_rawDescData +} + +var file_machine_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_machine_proto_goTypes = []any{ + (*Machine)(nil), // 0: gitpb.Machine + (*Machines)(nil), // 1: gitpb.Machines + (*Packages)(nil), // 2: gitpb.Packages + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp +} +var file_machine_proto_depIdxs = []int32{ + 2, // 0: gitpb.Machine.packages:type_name -> gitpb.Packages + 3, // 1: gitpb.Machine.laststamp:type_name -> google.protobuf.Timestamp + 2, // 2: gitpb.Machine.installed:type_name -> gitpb.Packages + 2, // 3: gitpb.Machine.available:type_name -> gitpb.Packages + 2, // 4: gitpb.Machine.wit:type_name -> gitpb.Packages + 0, // 5: gitpb.Machines.machines:type_name -> gitpb.Machine + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_machine_proto_init() } +func file_machine_proto_init() { + if File_machine_proto != nil { + return + } + file_package_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_machine_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_machine_proto_goTypes, + DependencyIndexes: file_machine_proto_depIdxs, + MessageInfos: file_machine_proto_msgTypes, + }.Build() + File_machine_proto = out.File + file_machine_proto_rawDesc = nil + file_machine_proto_goTypes = nil + file_machine_proto_depIdxs = nil +}