From 2bc80a0020c0530a9dca30bbd7dacba8c7c792e8 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 11 Mar 2025 11:25:10 -0400 Subject: [PATCH 1/4] Regenerate protobuf --- .../jumpstarter/client/v1/client.pb.go | 1037 +++++++++++++++++ .../jumpstarter/client/v1/client_grpc.pb.go | 357 ++++++ internal/protocol/jumpstarter/v1/client.pb.go | 385 ------ .../protocol/jumpstarter/v1/client_grpc.pb.go | 161 --- 4 files changed, 1394 insertions(+), 546 deletions(-) create mode 100644 internal/protocol/jumpstarter/client/v1/client.pb.go create mode 100644 internal/protocol/jumpstarter/client/v1/client_grpc.pb.go delete mode 100644 internal/protocol/jumpstarter/v1/client.pb.go delete mode 100644 internal/protocol/jumpstarter/v1/client_grpc.pb.go diff --git a/internal/protocol/jumpstarter/client/v1/client.pb.go b/internal/protocol/jumpstarter/client/v1/client.pb.go new file mode 100644 index 00000000..f993eadc --- /dev/null +++ b/internal/protocol/jumpstarter/client/v1/client.pb.go @@ -0,0 +1,1037 @@ +// Copyright 2024 The Jumpstarter Authors +// (-- api-linter: core::0215::foreign-type-reference=disabled +// (-- api-linter: core::0192::has-comments=disabled +// (-- api-linter: core::0191::java-package=disabled +// (-- api-linter: core::0191::java-outer-classname=disabled +// (-- api-linter: core::0191::java-multiple-files=disabled + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: jumpstarter/client/v1/client.proto + +package clientv1 + +import ( + v1 "github.com/jumpstarter-dev/jumpstarter-controller/internal/protocol/jumpstarter/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + 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 Exporter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Exporter) Reset() { + *x = Exporter{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Exporter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Exporter) ProtoMessage() {} + +func (x *Exporter) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_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 Exporter.ProtoReflect.Descriptor instead. +func (*Exporter) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{0} +} + +func (x *Exporter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Exporter) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +type Lease struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"` + EffectiveDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=effective_duration,json=effectiveDuration,proto3" json:"effective_duration,omitempty"` + BeginTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=begin_time,json=beginTime,proto3,oneof" json:"begin_time,omitempty"` + EffectiveBeginTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=effective_begin_time,json=effectiveBeginTime,proto3,oneof" json:"effective_begin_time,omitempty"` + EndTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=end_time,json=endTime,proto3,oneof" json:"end_time,omitempty"` + EffectiveEndTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=effective_end_time,json=effectiveEndTime,proto3,oneof" json:"effective_end_time,omitempty"` + Client *string `protobuf:"bytes,9,opt,name=client,proto3,oneof" json:"client,omitempty"` + Exporter *string `protobuf:"bytes,10,opt,name=exporter,proto3,oneof" json:"exporter,omitempty"` + Conditions []*v1.Condition `protobuf:"bytes,11,rep,name=conditions,proto3" json:"conditions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Lease) Reset() { + *x = Lease{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Lease) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Lease) ProtoMessage() {} + +func (x *Lease) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_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 Lease.ProtoReflect.Descriptor instead. +func (*Lease) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{1} +} + +func (x *Lease) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Lease) GetSelector() string { + if x != nil { + return x.Selector + } + return "" +} + +func (x *Lease) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +func (x *Lease) GetEffectiveDuration() *durationpb.Duration { + if x != nil { + return x.EffectiveDuration + } + return nil +} + +func (x *Lease) GetBeginTime() *timestamppb.Timestamp { + if x != nil { + return x.BeginTime + } + return nil +} + +func (x *Lease) GetEffectiveBeginTime() *timestamppb.Timestamp { + if x != nil { + return x.EffectiveBeginTime + } + return nil +} + +func (x *Lease) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *Lease) GetEffectiveEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EffectiveEndTime + } + return nil +} + +func (x *Lease) GetClient() string { + if x != nil && x.Client != nil { + return *x.Client + } + return "" +} + +func (x *Lease) GetExporter() string { + if x != nil && x.Exporter != nil { + return *x.Exporter + } + return "" +} + +func (x *Lease) GetConditions() []*v1.Condition { + if x != nil { + return x.Conditions + } + return nil +} + +type GetExporterRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetExporterRequest) Reset() { + *x = GetExporterRequest{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetExporterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExporterRequest) ProtoMessage() {} + +func (x *GetExporterRequest) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_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 GetExporterRequest.ProtoReflect.Descriptor instead. +func (*GetExporterRequest) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{2} +} + +func (x *GetExporterRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListExportersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListExportersRequest) Reset() { + *x = ListExportersRequest{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListExportersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListExportersRequest) ProtoMessage() {} + +func (x *ListExportersRequest) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_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 ListExportersRequest.ProtoReflect.Descriptor instead. +func (*ListExportersRequest) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{3} +} + +func (x *ListExportersRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListExportersRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListExportersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListExportersRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListExportersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Exporters []*Exporter `protobuf:"bytes,1,rep,name=exporters,proto3" json:"exporters,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListExportersResponse) Reset() { + *x = ListExportersResponse{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListExportersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListExportersResponse) ProtoMessage() {} + +func (x *ListExportersResponse) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_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 ListExportersResponse.ProtoReflect.Descriptor instead. +func (*ListExportersResponse) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{4} +} + +func (x *ListExportersResponse) GetExporters() []*Exporter { + if x != nil { + return x.Exporters + } + return nil +} + +func (x *ListExportersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type GetLeaseRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLeaseRequest) Reset() { + *x = GetLeaseRequest{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLeaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLeaseRequest) ProtoMessage() {} + +func (x *GetLeaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_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 GetLeaseRequest.ProtoReflect.Descriptor instead. +func (*GetLeaseRequest) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{5} +} + +func (x *GetLeaseRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListLeasesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLeasesRequest) Reset() { + *x = ListLeasesRequest{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLeasesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLeasesRequest) ProtoMessage() {} + +func (x *ListLeasesRequest) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_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 ListLeasesRequest.ProtoReflect.Descriptor instead. +func (*ListLeasesRequest) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{6} +} + +func (x *ListLeasesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListLeasesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListLeasesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListLeasesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListLeasesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Leases []*Lease `protobuf:"bytes,1,rep,name=leases,proto3" json:"leases,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLeasesResponse) Reset() { + *x = ListLeasesResponse{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLeasesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLeasesResponse) ProtoMessage() {} + +func (x *ListLeasesResponse) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[7] + 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 ListLeasesResponse.ProtoReflect.Descriptor instead. +func (*ListLeasesResponse) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{7} +} + +func (x *ListLeasesResponse) GetLeases() []*Lease { + if x != nil { + return x.Leases + } + return nil +} + +func (x *ListLeasesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type CreateLeaseRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + LeaseId string `protobuf:"bytes,2,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` + Lease *Lease `protobuf:"bytes,3,opt,name=lease,proto3" json:"lease,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateLeaseRequest) Reset() { + *x = CreateLeaseRequest{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateLeaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateLeaseRequest) ProtoMessage() {} + +func (x *CreateLeaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[8] + 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 CreateLeaseRequest.ProtoReflect.Descriptor instead. +func (*CreateLeaseRequest) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateLeaseRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateLeaseRequest) GetLeaseId() string { + if x != nil { + return x.LeaseId + } + return "" +} + +func (x *CreateLeaseRequest) GetLease() *Lease { + if x != nil { + return x.Lease + } + return nil +} + +type UpdateLeaseRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Lease *Lease `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateLeaseRequest) Reset() { + *x = UpdateLeaseRequest{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateLeaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateLeaseRequest) ProtoMessage() {} + +func (x *UpdateLeaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[9] + 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 UpdateLeaseRequest.ProtoReflect.Descriptor instead. +func (*UpdateLeaseRequest) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateLeaseRequest) GetLease() *Lease { + if x != nil { + return x.Lease + } + return nil +} + +func (x *UpdateLeaseRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type DeleteLeaseRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteLeaseRequest) Reset() { + *x = DeleteLeaseRequest{} + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteLeaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteLeaseRequest) ProtoMessage() {} + +func (x *DeleteLeaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_jumpstarter_client_v1_client_proto_msgTypes[10] + 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 DeleteLeaseRequest.ProtoReflect.Descriptor instead. +func (*DeleteLeaseRequest) Descriptor() ([]byte, []int) { + return file_jumpstarter_client_v1_client_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteLeaseRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_jumpstarter_client_v1_client_proto protoreflect.FileDescriptor + +var file_jumpstarter_client_v1_client_proto_rawDesc = string([]byte{ + 0x0a, 0x22, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, 0x1a, 0x1f, + 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x84, 0x02, 0x0a, 0x08, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x5f, 0xea, 0x41, 0x5c, 0x0a, 0x18, 0x6a, 0x75, 0x6d, 0x70, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x7d, 0x2a, 0x09, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x32, 0x08, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0xed, 0x06, 0x0a, 0x05, 0x4c, 0x65, 0x61, 0x73, 0x65, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x08, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, + 0xe0, 0x41, 0x05, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x0a, + 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x12, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0a, 0x62, 0x65, 0x67, 0x69, + 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 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, 0x48, 0x00, 0x52, 0x09, 0x62, 0x65, 0x67, 0x69, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x56, 0x0a, 0x14, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x01, 0x52, 0x12, 0x65, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 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, 0x48, 0x02, + 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x52, 0x0a, 0x12, + 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x08, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x03, 0x52, 0x10, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x1e, 0xe0, 0x41, 0x03, 0xfa, 0x41, 0x18, 0x0a, 0x16, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x48, 0x04, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x41, 0x0a, + 0x08, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x20, 0xe0, 0x41, 0x03, 0xfa, 0x41, 0x1a, 0x0a, 0x18, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x48, 0x05, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, + 0x12, 0x3e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0b, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x3a, 0x50, 0xea, 0x41, 0x4d, 0x0a, 0x15, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x72, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x25, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x7d, 0x2a, 0x06, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x32, 0x05, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, + 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x4a, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x1a, 0x0a, 0x18, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, + 0x64, 0x65, 0x76, 0x2f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x1a, 0x12, 0x18, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, + 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x7e, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x09, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x44, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, + 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x17, 0x0a, 0x15, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x64, + 0x65, 0x76, 0x2f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xad, + 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x17, 0x12, 0x15, 0x6a, 0x75, + 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x4c, 0x65, + 0x61, 0x73, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x72, + 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, + 0x73, 0x65, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0xa4, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x61, + 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x17, 0x12, 0x15, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x64, + 0x65, 0x76, 0x2f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x49, 0x64, + 0x12, 0x37, 0x0a, 0x05, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x05, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x12, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x37, 0x0a, 0x05, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x05, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x47, 0x0a, 0x12, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x31, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x1d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x17, 0x0a, 0x15, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xa7, 0x08, 0x0a, 0x0d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x29, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x25, 0x12, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x34, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x08, 0x47, 0x65, + 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x26, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x94, 0x01, + 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x6a, + 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x31, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x73, 0x12, 0x9f, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, + 0x65, 0x61, 0x73, 0x65, 0x12, 0x29, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x47, 0xda, + 0x41, 0x15, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2c, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x05, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0xa1, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x29, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x22, + 0x49, 0xda, 0x41, 0x11, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x05, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x32, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2e, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x81, 0x01, 0x0a, 0x0b, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x29, 0x2e, 0x6a, 0x75, 0x6d, + 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0xf0, + 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x72, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x72, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x6a, + 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x4a, 0x43, 0x58, 0xaa, 0x02, 0x15, 0x4a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x4a, 0x75, + 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x21, 0x4a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x72, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x4a, 0x75, 0x6d, 0x70, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_jumpstarter_client_v1_client_proto_rawDescOnce sync.Once + file_jumpstarter_client_v1_client_proto_rawDescData []byte +) + +func file_jumpstarter_client_v1_client_proto_rawDescGZIP() []byte { + file_jumpstarter_client_v1_client_proto_rawDescOnce.Do(func() { + file_jumpstarter_client_v1_client_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_jumpstarter_client_v1_client_proto_rawDesc), len(file_jumpstarter_client_v1_client_proto_rawDesc))) + }) + return file_jumpstarter_client_v1_client_proto_rawDescData +} + +var file_jumpstarter_client_v1_client_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_jumpstarter_client_v1_client_proto_goTypes = []any{ + (*Exporter)(nil), // 0: jumpstarter.client.v1.Exporter + (*Lease)(nil), // 1: jumpstarter.client.v1.Lease + (*GetExporterRequest)(nil), // 2: jumpstarter.client.v1.GetExporterRequest + (*ListExportersRequest)(nil), // 3: jumpstarter.client.v1.ListExportersRequest + (*ListExportersResponse)(nil), // 4: jumpstarter.client.v1.ListExportersResponse + (*GetLeaseRequest)(nil), // 5: jumpstarter.client.v1.GetLeaseRequest + (*ListLeasesRequest)(nil), // 6: jumpstarter.client.v1.ListLeasesRequest + (*ListLeasesResponse)(nil), // 7: jumpstarter.client.v1.ListLeasesResponse + (*CreateLeaseRequest)(nil), // 8: jumpstarter.client.v1.CreateLeaseRequest + (*UpdateLeaseRequest)(nil), // 9: jumpstarter.client.v1.UpdateLeaseRequest + (*DeleteLeaseRequest)(nil), // 10: jumpstarter.client.v1.DeleteLeaseRequest + nil, // 11: jumpstarter.client.v1.Exporter.LabelsEntry + (*durationpb.Duration)(nil), // 12: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp + (*v1.Condition)(nil), // 14: jumpstarter.v1.Condition + (*fieldmaskpb.FieldMask)(nil), // 15: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 16: google.protobuf.Empty +} +var file_jumpstarter_client_v1_client_proto_depIdxs = []int32{ + 11, // 0: jumpstarter.client.v1.Exporter.labels:type_name -> jumpstarter.client.v1.Exporter.LabelsEntry + 12, // 1: jumpstarter.client.v1.Lease.duration:type_name -> google.protobuf.Duration + 12, // 2: jumpstarter.client.v1.Lease.effective_duration:type_name -> google.protobuf.Duration + 13, // 3: jumpstarter.client.v1.Lease.begin_time:type_name -> google.protobuf.Timestamp + 13, // 4: jumpstarter.client.v1.Lease.effective_begin_time:type_name -> google.protobuf.Timestamp + 13, // 5: jumpstarter.client.v1.Lease.end_time:type_name -> google.protobuf.Timestamp + 13, // 6: jumpstarter.client.v1.Lease.effective_end_time:type_name -> google.protobuf.Timestamp + 14, // 7: jumpstarter.client.v1.Lease.conditions:type_name -> jumpstarter.v1.Condition + 0, // 8: jumpstarter.client.v1.ListExportersResponse.exporters:type_name -> jumpstarter.client.v1.Exporter + 1, // 9: jumpstarter.client.v1.ListLeasesResponse.leases:type_name -> jumpstarter.client.v1.Lease + 1, // 10: jumpstarter.client.v1.CreateLeaseRequest.lease:type_name -> jumpstarter.client.v1.Lease + 1, // 11: jumpstarter.client.v1.UpdateLeaseRequest.lease:type_name -> jumpstarter.client.v1.Lease + 15, // 12: jumpstarter.client.v1.UpdateLeaseRequest.update_mask:type_name -> google.protobuf.FieldMask + 2, // 13: jumpstarter.client.v1.ClientService.GetExporter:input_type -> jumpstarter.client.v1.GetExporterRequest + 3, // 14: jumpstarter.client.v1.ClientService.ListExporters:input_type -> jumpstarter.client.v1.ListExportersRequest + 5, // 15: jumpstarter.client.v1.ClientService.GetLease:input_type -> jumpstarter.client.v1.GetLeaseRequest + 6, // 16: jumpstarter.client.v1.ClientService.ListLeases:input_type -> jumpstarter.client.v1.ListLeasesRequest + 8, // 17: jumpstarter.client.v1.ClientService.CreateLease:input_type -> jumpstarter.client.v1.CreateLeaseRequest + 9, // 18: jumpstarter.client.v1.ClientService.UpdateLease:input_type -> jumpstarter.client.v1.UpdateLeaseRequest + 10, // 19: jumpstarter.client.v1.ClientService.DeleteLease:input_type -> jumpstarter.client.v1.DeleteLeaseRequest + 0, // 20: jumpstarter.client.v1.ClientService.GetExporter:output_type -> jumpstarter.client.v1.Exporter + 4, // 21: jumpstarter.client.v1.ClientService.ListExporters:output_type -> jumpstarter.client.v1.ListExportersResponse + 1, // 22: jumpstarter.client.v1.ClientService.GetLease:output_type -> jumpstarter.client.v1.Lease + 7, // 23: jumpstarter.client.v1.ClientService.ListLeases:output_type -> jumpstarter.client.v1.ListLeasesResponse + 1, // 24: jumpstarter.client.v1.ClientService.CreateLease:output_type -> jumpstarter.client.v1.Lease + 1, // 25: jumpstarter.client.v1.ClientService.UpdateLease:output_type -> jumpstarter.client.v1.Lease + 16, // 26: jumpstarter.client.v1.ClientService.DeleteLease:output_type -> google.protobuf.Empty + 20, // [20:27] is the sub-list for method output_type + 13, // [13:20] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_jumpstarter_client_v1_client_proto_init() } +func file_jumpstarter_client_v1_client_proto_init() { + if File_jumpstarter_client_v1_client_proto != nil { + return + } + file_jumpstarter_client_v1_client_proto_msgTypes[1].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_jumpstarter_client_v1_client_proto_rawDesc), len(file_jumpstarter_client_v1_client_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_jumpstarter_client_v1_client_proto_goTypes, + DependencyIndexes: file_jumpstarter_client_v1_client_proto_depIdxs, + MessageInfos: file_jumpstarter_client_v1_client_proto_msgTypes, + }.Build() + File_jumpstarter_client_v1_client_proto = out.File + file_jumpstarter_client_v1_client_proto_goTypes = nil + file_jumpstarter_client_v1_client_proto_depIdxs = nil +} diff --git a/internal/protocol/jumpstarter/client/v1/client_grpc.pb.go b/internal/protocol/jumpstarter/client/v1/client_grpc.pb.go new file mode 100644 index 00000000..e3a4a5a9 --- /dev/null +++ b/internal/protocol/jumpstarter/client/v1/client_grpc.pb.go @@ -0,0 +1,357 @@ +// Copyright 2024 The Jumpstarter Authors +// (-- api-linter: core::0215::foreign-type-reference=disabled +// (-- api-linter: core::0192::has-comments=disabled +// (-- api-linter: core::0191::java-package=disabled +// (-- api-linter: core::0191::java-outer-classname=disabled +// (-- api-linter: core::0191::java-multiple-files=disabled + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: jumpstarter/client/v1/client.proto + +package clientv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// 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 ( + ClientService_GetExporter_FullMethodName = "/jumpstarter.client.v1.ClientService/GetExporter" + ClientService_ListExporters_FullMethodName = "/jumpstarter.client.v1.ClientService/ListExporters" + ClientService_GetLease_FullMethodName = "/jumpstarter.client.v1.ClientService/GetLease" + ClientService_ListLeases_FullMethodName = "/jumpstarter.client.v1.ClientService/ListLeases" + ClientService_CreateLease_FullMethodName = "/jumpstarter.client.v1.ClientService/CreateLease" + ClientService_UpdateLease_FullMethodName = "/jumpstarter.client.v1.ClientService/UpdateLease" + ClientService_DeleteLease_FullMethodName = "/jumpstarter.client.v1.ClientService/DeleteLease" +) + +// ClientServiceClient is the client API for ClientService 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. +type ClientServiceClient interface { + GetExporter(ctx context.Context, in *GetExporterRequest, opts ...grpc.CallOption) (*Exporter, error) + ListExporters(ctx context.Context, in *ListExportersRequest, opts ...grpc.CallOption) (*ListExportersResponse, error) + GetLease(ctx context.Context, in *GetLeaseRequest, opts ...grpc.CallOption) (*Lease, error) + ListLeases(ctx context.Context, in *ListLeasesRequest, opts ...grpc.CallOption) (*ListLeasesResponse, error) + CreateLease(ctx context.Context, in *CreateLeaseRequest, opts ...grpc.CallOption) (*Lease, error) + UpdateLease(ctx context.Context, in *UpdateLeaseRequest, opts ...grpc.CallOption) (*Lease, error) + DeleteLease(ctx context.Context, in *DeleteLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type clientServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClientServiceClient(cc grpc.ClientConnInterface) ClientServiceClient { + return &clientServiceClient{cc} +} + +func (c *clientServiceClient) GetExporter(ctx context.Context, in *GetExporterRequest, opts ...grpc.CallOption) (*Exporter, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Exporter) + err := c.cc.Invoke(ctx, ClientService_GetExporter_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clientServiceClient) ListExporters(ctx context.Context, in *ListExportersRequest, opts ...grpc.CallOption) (*ListExportersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListExportersResponse) + err := c.cc.Invoke(ctx, ClientService_ListExporters_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clientServiceClient) GetLease(ctx context.Context, in *GetLeaseRequest, opts ...grpc.CallOption) (*Lease, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Lease) + err := c.cc.Invoke(ctx, ClientService_GetLease_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clientServiceClient) ListLeases(ctx context.Context, in *ListLeasesRequest, opts ...grpc.CallOption) (*ListLeasesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListLeasesResponse) + err := c.cc.Invoke(ctx, ClientService_ListLeases_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clientServiceClient) CreateLease(ctx context.Context, in *CreateLeaseRequest, opts ...grpc.CallOption) (*Lease, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Lease) + err := c.cc.Invoke(ctx, ClientService_CreateLease_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clientServiceClient) UpdateLease(ctx context.Context, in *UpdateLeaseRequest, opts ...grpc.CallOption) (*Lease, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Lease) + err := c.cc.Invoke(ctx, ClientService_UpdateLease_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clientServiceClient) DeleteLease(ctx context.Context, in *DeleteLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ClientService_DeleteLease_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClientServiceServer is the server API for ClientService service. +// All implementations must embed UnimplementedClientServiceServer +// for forward compatibility. +type ClientServiceServer interface { + GetExporter(context.Context, *GetExporterRequest) (*Exporter, error) + ListExporters(context.Context, *ListExportersRequest) (*ListExportersResponse, error) + GetLease(context.Context, *GetLeaseRequest) (*Lease, error) + ListLeases(context.Context, *ListLeasesRequest) (*ListLeasesResponse, error) + CreateLease(context.Context, *CreateLeaseRequest) (*Lease, error) + UpdateLease(context.Context, *UpdateLeaseRequest) (*Lease, error) + DeleteLease(context.Context, *DeleteLeaseRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedClientServiceServer() +} + +// UnimplementedClientServiceServer 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 UnimplementedClientServiceServer struct{} + +func (UnimplementedClientServiceServer) GetExporter(context.Context, *GetExporterRequest) (*Exporter, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExporter not implemented") +} +func (UnimplementedClientServiceServer) ListExporters(context.Context, *ListExportersRequest) (*ListExportersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExporters not implemented") +} +func (UnimplementedClientServiceServer) GetLease(context.Context, *GetLeaseRequest) (*Lease, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLease not implemented") +} +func (UnimplementedClientServiceServer) ListLeases(context.Context, *ListLeasesRequest) (*ListLeasesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListLeases not implemented") +} +func (UnimplementedClientServiceServer) CreateLease(context.Context, *CreateLeaseRequest) (*Lease, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateLease not implemented") +} +func (UnimplementedClientServiceServer) UpdateLease(context.Context, *UpdateLeaseRequest) (*Lease, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateLease not implemented") +} +func (UnimplementedClientServiceServer) DeleteLease(context.Context, *DeleteLeaseRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteLease not implemented") +} +func (UnimplementedClientServiceServer) mustEmbedUnimplementedClientServiceServer() {} +func (UnimplementedClientServiceServer) testEmbeddedByValue() {} + +// UnsafeClientServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClientServiceServer will +// result in compilation errors. +type UnsafeClientServiceServer interface { + mustEmbedUnimplementedClientServiceServer() +} + +func RegisterClientServiceServer(s grpc.ServiceRegistrar, srv ClientServiceServer) { + // If the following call pancis, it indicates UnimplementedClientServiceServer 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(&ClientService_ServiceDesc, srv) +} + +func _ClientService_GetExporter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExporterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClientServiceServer).GetExporter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClientService_GetExporter_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClientServiceServer).GetExporter(ctx, req.(*GetExporterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClientService_ListExporters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExportersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClientServiceServer).ListExporters(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClientService_ListExporters_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClientServiceServer).ListExporters(ctx, req.(*ListExportersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClientService_GetLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClientServiceServer).GetLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClientService_GetLease_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClientServiceServer).GetLease(ctx, req.(*GetLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClientService_ListLeases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListLeasesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClientServiceServer).ListLeases(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClientService_ListLeases_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClientServiceServer).ListLeases(ctx, req.(*ListLeasesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClientService_CreateLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClientServiceServer).CreateLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClientService_CreateLease_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClientServiceServer).CreateLease(ctx, req.(*CreateLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClientService_UpdateLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClientServiceServer).UpdateLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClientService_UpdateLease_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClientServiceServer).UpdateLease(ctx, req.(*UpdateLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClientService_DeleteLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClientServiceServer).DeleteLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClientService_DeleteLease_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClientServiceServer).DeleteLease(ctx, req.(*DeleteLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ClientService_ServiceDesc is the grpc.ServiceDesc for ClientService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClientService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "jumpstarter.client.v1.ClientService", + HandlerType: (*ClientServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetExporter", + Handler: _ClientService_GetExporter_Handler, + }, + { + MethodName: "ListExporters", + Handler: _ClientService_ListExporters_Handler, + }, + { + MethodName: "GetLease", + Handler: _ClientService_GetLease_Handler, + }, + { + MethodName: "ListLeases", + Handler: _ClientService_ListLeases_Handler, + }, + { + MethodName: "CreateLease", + Handler: _ClientService_CreateLease_Handler, + }, + { + MethodName: "UpdateLease", + Handler: _ClientService_UpdateLease_Handler, + }, + { + MethodName: "DeleteLease", + Handler: _ClientService_DeleteLease_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "jumpstarter/client/v1/client.proto", +} diff --git a/internal/protocol/jumpstarter/v1/client.pb.go b/internal/protocol/jumpstarter/v1/client.pb.go deleted file mode 100644 index 9cc51ced..00000000 --- a/internal/protocol/jumpstarter/v1/client.pb.go +++ /dev/null @@ -1,385 +0,0 @@ -// Copyright 2024 The Jumpstarter Authors - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.5 -// protoc (unknown) -// source: jumpstarter/v1/client.proto - -package jumpstarterv1 - -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 Exporter struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Exporter) Reset() { - *x = Exporter{} - mi := &file_jumpstarter_v1_client_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Exporter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Exporter) ProtoMessage() {} - -func (x *Exporter) ProtoReflect() protoreflect.Message { - mi := &file_jumpstarter_v1_client_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 Exporter.ProtoReflect.Descriptor instead. -func (*Exporter) Descriptor() ([]byte, []int) { - return file_jumpstarter_v1_client_proto_rawDescGZIP(), []int{0} -} - -func (x *Exporter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Exporter) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -type GetExporterRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetExporterRequest) Reset() { - *x = GetExporterRequest{} - mi := &file_jumpstarter_v1_client_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetExporterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetExporterRequest) ProtoMessage() {} - -func (x *GetExporterRequest) ProtoReflect() protoreflect.Message { - mi := &file_jumpstarter_v1_client_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 GetExporterRequest.ProtoReflect.Descriptor instead. -func (*GetExporterRequest) Descriptor() ([]byte, []int) { - return file_jumpstarter_v1_client_proto_rawDescGZIP(), []int{1} -} - -func (x *GetExporterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type ListExportersRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListExportersRequest) Reset() { - *x = ListExportersRequest{} - mi := &file_jumpstarter_v1_client_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListExportersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListExportersRequest) ProtoMessage() {} - -func (x *ListExportersRequest) ProtoReflect() protoreflect.Message { - mi := &file_jumpstarter_v1_client_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 ListExportersRequest.ProtoReflect.Descriptor instead. -func (*ListExportersRequest) Descriptor() ([]byte, []int) { - return file_jumpstarter_v1_client_proto_rawDescGZIP(), []int{2} -} - -func (x *ListExportersRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListExportersRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListExportersRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListExportersRequest) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -type ListExportersResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Exporters []*Exporter `protobuf:"bytes,1,rep,name=exporters,proto3" json:"exporters,omitempty"` - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListExportersResponse) Reset() { - *x = ListExportersResponse{} - mi := &file_jumpstarter_v1_client_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListExportersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListExportersResponse) ProtoMessage() {} - -func (x *ListExportersResponse) ProtoReflect() protoreflect.Message { - mi := &file_jumpstarter_v1_client_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 ListExportersResponse.ProtoReflect.Descriptor instead. -func (*ListExportersResponse) Descriptor() ([]byte, []int) { - return file_jumpstarter_v1_client_proto_rawDescGZIP(), []int{3} -} - -func (x *ListExportersResponse) GetExporters() []*Exporter { - if x != nil { - return x.Exporters - } - return nil -} - -func (x *ListExportersResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -var File_jumpstarter_v1_client_proto protoreflect.FileDescriptor - -var file_jumpstarter_v1_client_proto_rawDesc = string([]byte{ - 0x0a, 0x1b, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6a, - 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xfd, 0x01, 0x0a, 0x08, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, - 0x5f, 0xea, 0x41, 0x5c, 0x0a, 0x18, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x72, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x2b, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, - 0x2f, 0x7b, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x7d, 0x2a, 0x09, 0x65, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x32, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x22, 0x4a, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1a, 0x0a, 0x18, 0x6a, 0x75, - 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x45, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb3, 0x01, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1a, 0x12, 0x18, 0x6a, - 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x45, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, - 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x22, 0x77, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x65, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x09, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, - 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xa5, 0x02, 0x0a, 0x0d, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x6a, - 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, - 0x2a, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x92, - 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x24, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0xda, - 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, - 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x73, 0x42, 0xca, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6a, 0x75, 0x6d, 0x70, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x72, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x72, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x6a, 0x75, 0x6d, - 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x6a, 0x75, 0x6d, 0x70, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4a, 0x58, 0x58, 0xaa, - 0x02, 0x0e, 0x4a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x0e, 0x4a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1a, 0x4a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0f, 0x4a, 0x75, 0x6d, 0x70, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -}) - -var ( - file_jumpstarter_v1_client_proto_rawDescOnce sync.Once - file_jumpstarter_v1_client_proto_rawDescData []byte -) - -func file_jumpstarter_v1_client_proto_rawDescGZIP() []byte { - file_jumpstarter_v1_client_proto_rawDescOnce.Do(func() { - file_jumpstarter_v1_client_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_jumpstarter_v1_client_proto_rawDesc), len(file_jumpstarter_v1_client_proto_rawDesc))) - }) - return file_jumpstarter_v1_client_proto_rawDescData -} - -var file_jumpstarter_v1_client_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_jumpstarter_v1_client_proto_goTypes = []any{ - (*Exporter)(nil), // 0: jumpstarter.v1.Exporter - (*GetExporterRequest)(nil), // 1: jumpstarter.v1.GetExporterRequest - (*ListExportersRequest)(nil), // 2: jumpstarter.v1.ListExportersRequest - (*ListExportersResponse)(nil), // 3: jumpstarter.v1.ListExportersResponse - nil, // 4: jumpstarter.v1.Exporter.LabelsEntry -} -var file_jumpstarter_v1_client_proto_depIdxs = []int32{ - 4, // 0: jumpstarter.v1.Exporter.labels:type_name -> jumpstarter.v1.Exporter.LabelsEntry - 0, // 1: jumpstarter.v1.ListExportersResponse.exporters:type_name -> jumpstarter.v1.Exporter - 1, // 2: jumpstarter.v1.ClientService.GetExporter:input_type -> jumpstarter.v1.GetExporterRequest - 2, // 3: jumpstarter.v1.ClientService.ListExporters:input_type -> jumpstarter.v1.ListExportersRequest - 0, // 4: jumpstarter.v1.ClientService.GetExporter:output_type -> jumpstarter.v1.Exporter - 3, // 5: jumpstarter.v1.ClientService.ListExporters:output_type -> jumpstarter.v1.ListExportersResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_jumpstarter_v1_client_proto_init() } -func file_jumpstarter_v1_client_proto_init() { - if File_jumpstarter_v1_client_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_jumpstarter_v1_client_proto_rawDesc), len(file_jumpstarter_v1_client_proto_rawDesc)), - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_jumpstarter_v1_client_proto_goTypes, - DependencyIndexes: file_jumpstarter_v1_client_proto_depIdxs, - MessageInfos: file_jumpstarter_v1_client_proto_msgTypes, - }.Build() - File_jumpstarter_v1_client_proto = out.File - file_jumpstarter_v1_client_proto_goTypes = nil - file_jumpstarter_v1_client_proto_depIdxs = nil -} diff --git a/internal/protocol/jumpstarter/v1/client_grpc.pb.go b/internal/protocol/jumpstarter/v1/client_grpc.pb.go deleted file mode 100644 index 839132a2..00000000 --- a/internal/protocol/jumpstarter/v1/client_grpc.pb.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2024 The Jumpstarter Authors - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: jumpstarter/v1/client.proto - -package jumpstarterv1 - -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 ( - ClientService_GetExporter_FullMethodName = "/jumpstarter.v1.ClientService/GetExporter" - ClientService_ListExporters_FullMethodName = "/jumpstarter.v1.ClientService/ListExporters" -) - -// ClientServiceClient is the client API for ClientService 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. -type ClientServiceClient interface { - GetExporter(ctx context.Context, in *GetExporterRequest, opts ...grpc.CallOption) (*Exporter, error) - ListExporters(ctx context.Context, in *ListExportersRequest, opts ...grpc.CallOption) (*ListExportersResponse, error) -} - -type clientServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewClientServiceClient(cc grpc.ClientConnInterface) ClientServiceClient { - return &clientServiceClient{cc} -} - -func (c *clientServiceClient) GetExporter(ctx context.Context, in *GetExporterRequest, opts ...grpc.CallOption) (*Exporter, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(Exporter) - err := c.cc.Invoke(ctx, ClientService_GetExporter_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clientServiceClient) ListExporters(ctx context.Context, in *ListExportersRequest, opts ...grpc.CallOption) (*ListExportersResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListExportersResponse) - err := c.cc.Invoke(ctx, ClientService_ListExporters_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ClientServiceServer is the server API for ClientService service. -// All implementations must embed UnimplementedClientServiceServer -// for forward compatibility. -type ClientServiceServer interface { - GetExporter(context.Context, *GetExporterRequest) (*Exporter, error) - ListExporters(context.Context, *ListExportersRequest) (*ListExportersResponse, error) - mustEmbedUnimplementedClientServiceServer() -} - -// UnimplementedClientServiceServer 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 UnimplementedClientServiceServer struct{} - -func (UnimplementedClientServiceServer) GetExporter(context.Context, *GetExporterRequest) (*Exporter, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExporter not implemented") -} -func (UnimplementedClientServiceServer) ListExporters(context.Context, *ListExportersRequest) (*ListExportersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExporters not implemented") -} -func (UnimplementedClientServiceServer) mustEmbedUnimplementedClientServiceServer() {} -func (UnimplementedClientServiceServer) testEmbeddedByValue() {} - -// UnsafeClientServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ClientServiceServer will -// result in compilation errors. -type UnsafeClientServiceServer interface { - mustEmbedUnimplementedClientServiceServer() -} - -func RegisterClientServiceServer(s grpc.ServiceRegistrar, srv ClientServiceServer) { - // If the following call pancis, it indicates UnimplementedClientServiceServer 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(&ClientService_ServiceDesc, srv) -} - -func _ClientService_GetExporter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetExporterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClientServiceServer).GetExporter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClientService_GetExporter_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClientServiceServer).GetExporter(ctx, req.(*GetExporterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClientService_ListExporters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListExportersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClientServiceServer).ListExporters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClientService_ListExporters_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClientServiceServer).ListExporters(ctx, req.(*ListExportersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ClientService_ServiceDesc is the grpc.ServiceDesc for ClientService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ClientService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "jumpstarter.v1.ClientService", - HandlerType: (*ClientServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetExporter", - Handler: _ClientService_GetExporter_Handler, - }, - { - MethodName: "ListExporters", - Handler: _ClientService_ListExporters_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "jumpstarter/v1/client.proto", -} From 234eadd15f0f4ccd6dd0d8b4fbeea58635c209ee Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 11 Mar 2025 11:29:19 -0400 Subject: [PATCH 2/4] Implement ClientService v1 --- api/v1alpha1/exporter_helpers.go | 26 +- api/v1alpha1/lease_helpers.go | 87 +++++++ internal/service/auth/auth.go | 75 ++++++ internal/service/client/v1/client_service.go | 260 +++++++++++++++++++ internal/service/controller_service.go | 78 +----- internal/service/helpers.go | 35 --- internal/service/utils/identifier.go | 91 +++++++ 7 files changed, 545 insertions(+), 107 deletions(-) create mode 100644 internal/service/auth/auth.go create mode 100644 internal/service/client/v1/client_service.go delete mode 100644 internal/service/helpers.go create mode 100644 internal/service/utils/identifier.go diff --git a/api/v1alpha1/exporter_helpers.go b/api/v1alpha1/exporter_helpers.go index 946b0182..7b409e68 100644 --- a/api/v1alpha1/exporter_helpers.go +++ b/api/v1alpha1/exporter_helpers.go @@ -1,6 +1,12 @@ package v1alpha1 -import "strings" +import ( + "strings" + + cpb "github.com/jumpstarter-dev/jumpstarter-controller/internal/protocol/jumpstarter/client/v1" + "github.com/jumpstarter-dev/jumpstarter-controller/internal/service/utils" + kclient "sigs.k8s.io/controller-runtime/pkg/client" +) func (e *Exporter) InternalSubject() string { return strings.Join([]string{"exporter", e.Namespace, e.Name, string(e.UID)}, ":") @@ -15,3 +21,21 @@ func (e *Exporter) Usernames(prefix string) []string { return usernames } + +func (e *Exporter) ToProtobuf() *cpb.Exporter { + return &cpb.Exporter{ + Name: utils.UnparseExporterIdentifier(kclient.ObjectKeyFromObject(e)), + Labels: e.Labels, + } +} + +func (l *ExporterList) ToProtobuf() *cpb.ListExportersResponse { + var jexporters []*cpb.Exporter + for _, jexporter := range l.Items { + jexporters = append(jexporters, jexporter.ToProtobuf()) + } + return &cpb.ListExportersResponse{ + Exporters: jexporters, + NextPageToken: l.Continue, + } +} diff --git a/api/v1alpha1/lease_helpers.go b/api/v1alpha1/lease_helpers.go index d3589169..5fc42264 100644 --- a/api/v1alpha1/lease_helpers.go +++ b/api/v1alpha1/lease_helpers.go @@ -5,12 +5,99 @@ import ( "fmt" "time" + cpb "github.com/jumpstarter-dev/jumpstarter-controller/internal/protocol/jumpstarter/client/v1" + pb "github.com/jumpstarter-dev/jumpstarter-controller/internal/protocol/jumpstarter/v1" + "github.com/jumpstarter-dev/jumpstarter-controller/internal/service/utils" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/timestamppb" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" + "k8s.io/utils/ptr" + kclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" ) +func LeaseFromProtobuf( + req *cpb.Lease, + key types.NamespacedName, + clientRef corev1.LocalObjectReference, +) (*Lease, error) { + selector, err := metav1.ParseToLabelSelector(req.Selector) + if err != nil { + return nil, err + } + + return &Lease{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: key.Namespace, + Name: key.Name, + }, + Spec: LeaseSpec{ + ClientRef: clientRef, + Duration: metav1.Duration{Duration: req.Duration.AsDuration()}, + Selector: *selector, + }, + }, nil +} + +func (l *Lease) ToProtobuf() *cpb.Lease { + var conditions []*pb.Condition + for _, condition := range l.Status.Conditions { + conditions = append(conditions, &pb.Condition{ + Type: &condition.Type, + Status: (*string)(&condition.Status), + ObservedGeneration: &condition.ObservedGeneration, + LastTransitionTime: &pb.Time{ + Seconds: &condition.LastTransitionTime.ProtoTime().Seconds, + Nanos: &condition.LastTransitionTime.ProtoTime().Nanos, + }, + Reason: &condition.Reason, + Message: &condition.Message, + }) + } + + lease := cpb.Lease{ + Name: fmt.Sprintf("namespaces/%s/leases/%s", l.Namespace, l.Name), + Selector: l.Spec.Selector.String(), + Duration: durationpb.New(l.Spec.Duration.Duration), + EffectiveDuration: durationpb.New(l.Spec.Duration.Duration), // TODO: implement lease renewal + Client: ptr.To(fmt.Sprintf("namespaces/%s/clients/%s", l.Namespace, l.Spec.ClientRef.Name)), + Conditions: conditions, + // TODO: implement scheduled leases + BeginTime: nil, + EndTime: nil, + } + + if l.Status.BeginTime != nil { + lease.EffectiveBeginTime = timestamppb.New(l.Status.BeginTime.Time) + } + if l.Status.EndTime != nil { + lease.EffectiveEndTime = timestamppb.New(l.Status.EndTime.Time) + } + if l.Status.ExporterRef != nil { + lease.Exporter = ptr.To(utils.UnparseExporterIdentifier(kclient.ObjectKey{ + Namespace: l.Namespace, + Name: l.Status.ExporterRef.Name, + })) + } + + return &lease +} + +func (l *LeaseList) ToProtobuf() *cpb.ListLeasesResponse { + var jleases []*cpb.Lease + for _, jlease := range l.Items { + jleases = append(jleases, jlease.ToProtobuf()) + } + return &cpb.ListLeasesResponse{ + Leases: jleases, + NextPageToken: l.Continue, + } +} + func (l *Lease) GetExporterSelector() (labels.Selector, error) { return metav1.LabelSelectorAsSelector(&l.Spec.Selector) } diff --git a/internal/service/auth/auth.go b/internal/service/auth/auth.go new file mode 100644 index 00000000..9df98589 --- /dev/null +++ b/internal/service/auth/auth.go @@ -0,0 +1,75 @@ +package auth + +import ( + "context" + + jumpstarterdevv1alpha1 "github.com/jumpstarter-dev/jumpstarter-controller/api/v1alpha1" + "github.com/jumpstarter-dev/jumpstarter-controller/internal/authentication" + "github.com/jumpstarter-dev/jumpstarter-controller/internal/authorization" + "github.com/jumpstarter-dev/jumpstarter-controller/internal/oidc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "k8s.io/apiserver/pkg/authorization/authorizer" + kclient "sigs.k8s.io/controller-runtime/pkg/client" +) + +type Auth struct { + client kclient.Client + authn authentication.ContextAuthenticator + authz authorizer.Authorizer + attr authorization.ContextAttributesGetter +} + +func NewAuth( + client kclient.Client, + authn authentication.ContextAuthenticator, + authz authorizer.Authorizer, + attr authorization.ContextAttributesGetter, +) *Auth { + return &Auth{ + client: client, + authn: authn, + authz: authz, + attr: attr, + } +} + +func (s *Auth) AuthClient(ctx context.Context, namespace string) (*jumpstarterdevv1alpha1.Client, error) { + jclient, err := oidc.VerifyClientObjectToken( + ctx, + s.authn, + s.authz, + s.attr, + s.client, + ) + + if err != nil { + return nil, err + } + + if namespace != jclient.Namespace { + return nil, status.Error(codes.PermissionDenied, "namespace mismatch") + } + + return jclient, nil +} + +func (s *Auth) AuthExporter(ctx context.Context, namespace string) (*jumpstarterdevv1alpha1.Exporter, error) { + jexporter, err := oidc.VerifyExporterObjectToken( + ctx, + s.authn, + s.authz, + s.attr, + s.client, + ) + + if err != nil { + return nil, err + } + + if namespace != jexporter.Namespace { + return nil, status.Error(codes.PermissionDenied, "namespace mismatch") + } + + return jexporter, nil +} diff --git a/internal/service/client/v1/client_service.go b/internal/service/client/v1/client_service.go new file mode 100644 index 00000000..76e4f8cb --- /dev/null +++ b/internal/service/client/v1/client_service.go @@ -0,0 +1,260 @@ +/* +Copyright 2024. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "context" + "fmt" + + "github.com/google/uuid" + jumpstarterdevv1alpha1 "github.com/jumpstarter-dev/jumpstarter-controller/api/v1alpha1" + "github.com/jumpstarter-dev/jumpstarter-controller/internal/controller" + cpb "github.com/jumpstarter-dev/jumpstarter-controller/internal/protocol/jumpstarter/client/v1" + "github.com/jumpstarter-dev/jumpstarter-controller/internal/service/auth" + "github.com/jumpstarter-dev/jumpstarter-controller/internal/service/utils" + "google.golang.org/protobuf/types/known/emptypb" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" + kclient "sigs.k8s.io/controller-runtime/pkg/client" +) + +type ClientService struct { + cpb.UnimplementedClientServiceServer + kclient.Client + auth.Auth +} + +func NewClientService(client kclient.Client, auth auth.Auth) *ClientService { + return &ClientService{ + Client: client, + Auth: auth, + } +} + +func (s *ClientService) GetExporter( + ctx context.Context, + req *cpb.GetExporterRequest, +) (*cpb.Exporter, error) { + key, err := utils.ParseExporterIdentifier(req.Name) + if err != nil { + return nil, err + } + + _, err = s.AuthClient(ctx, key.Namespace) + if err != nil { + return nil, err + } + + var jexporter jumpstarterdevv1alpha1.Exporter + if err := s.Get(ctx, *key, &jexporter); err != nil { + return nil, err + } + + return jexporter.ToProtobuf(), nil +} + +func (s *ClientService) ListExporters( + ctx context.Context, + req *cpb.ListExportersRequest, +) (*cpb.ListExportersResponse, error) { + namespace, err := utils.ParseNamespaceIdentifier(req.Parent) + if err != nil { + return nil, err + } + + _, err = s.AuthClient(ctx, namespace) + if err != nil { + return nil, err + } + + selector, err := labels.Parse(req.Filter) + if err != nil { + return nil, err + } + + var jexporters jumpstarterdevv1alpha1.ExporterList + if err := s.List(ctx, &jexporters, &kclient.ListOptions{ + Namespace: namespace, + LabelSelector: selector, + Limit: int64(req.PageSize), + Continue: req.PageToken, + }); err != nil { + return nil, err + } + + return jexporters.ToProtobuf(), nil +} + +func (s *ClientService) GetLease(ctx context.Context, req *cpb.GetLeaseRequest) (*cpb.Lease, error) { + key, err := utils.ParseLeaseIdentifier(req.Name) + if err != nil { + return nil, err + } + + _, err = s.AuthClient(ctx, key.Namespace) + if err != nil { + return nil, err + } + + var jlease jumpstarterdevv1alpha1.Lease + if err := s.Get(ctx, *key, &jlease); err != nil { + return nil, err + } + + return jlease.ToProtobuf(), nil +} + +func (s *ClientService) ListLeases(ctx context.Context, req *cpb.ListLeasesRequest) (*cpb.ListLeasesResponse, error) { + namespace, err := utils.ParseNamespaceIdentifier(req.Parent) + if err != nil { + return nil, err + } + + _, err = s.AuthClient(ctx, namespace) + if err != nil { + return nil, err + } + + selector, err := labels.Parse(req.Filter) + if err != nil { + return nil, err + } + + var jleases jumpstarterdevv1alpha1.LeaseList + if err := s.List(ctx, &jleases, &kclient.ListOptions{ + Namespace: namespace, + LabelSelector: selector, + Limit: int64(req.PageSize), + Continue: req.PageToken, + }, controller.MatchingActiveLeases()); err != nil { + return nil, err + } + + var results []*cpb.Lease + for _, lease := range jleases.Items { + results = append(results, lease.ToProtobuf()) + } + + return &cpb.ListLeasesResponse{ + Leases: results, + NextPageToken: jleases.Continue, + }, nil +} + +func (s *ClientService) CreateLease(ctx context.Context, req *cpb.CreateLeaseRequest) (*cpb.Lease, error) { + namespace, err := utils.ParseNamespaceIdentifier(req.Parent) + if err != nil { + return nil, err + } + + jclient, err := s.AuthClient(ctx, namespace) + if err != nil { + return nil, err + } + + name, err := uuid.NewV7() + if err != nil { + return nil, err + } + + jlease, err := jumpstarterdevv1alpha1.LeaseFromProtobuf(req.Lease, types.NamespacedName{ + Namespace: namespace, + Name: name.String(), + }, corev1.LocalObjectReference{ + Name: jclient.Name, + }) + if err != nil { + return nil, err + } + + if err := s.Create(ctx, jlease); err != nil { + return nil, err + } + + return jlease.ToProtobuf(), nil +} + +func (s *ClientService) UpdateLease(ctx context.Context, req *cpb.UpdateLeaseRequest) (*cpb.Lease, error) { + key, err := utils.ParseLeaseIdentifier(req.Lease.Name) + if err != nil { + return nil, err + } + + jclient, err := s.AuthClient(ctx, key.Namespace) + if err != nil { + return nil, err + } + + var jlease jumpstarterdevv1alpha1.Lease + if err := s.Get(ctx, *key, &jlease); err != nil { + return nil, err + } + + if jlease.Spec.ClientRef.Name != jclient.Name { + return nil, fmt.Errorf("UpdateLease permission denied") + } + + original := kclient.MergeFrom(jlease.DeepCopy()) + desired, err := jumpstarterdevv1alpha1.LeaseFromProtobuf(req.Lease, *key, + corev1.LocalObjectReference{ + Name: jclient.Name, + }, + ) + if err != nil { + return nil, err + } + + jlease.Spec.Duration = desired.Spec.Duration + + if err := s.Patch(ctx, &jlease, original); err != nil { + return nil, err + } + + return jlease.ToProtobuf(), nil +} + +func (s *ClientService) DeleteLease(ctx context.Context, req *cpb.DeleteLeaseRequest) (*emptypb.Empty, error) { + key, err := utils.ParseLeaseIdentifier(req.Name) + if err != nil { + return nil, err + } + + jclient, err := s.AuthClient(ctx, key.Namespace) + if err != nil { + return nil, err + } + + var jlease jumpstarterdevv1alpha1.Lease + if err := s.Get(ctx, *key, &jlease); err != nil { + return nil, err + } + + if jlease.Spec.ClientRef.Name != jclient.Name { + return nil, fmt.Errorf("DeleteLease permission denied") + } + + original := kclient.MergeFrom(jlease.DeepCopy()) + + jlease.Spec.Release = true + + if err := s.Patch(ctx, &jlease, original); err != nil { + return nil, err + } + + return &emptypb.Empty{}, nil +} diff --git a/internal/service/controller_service.go b/internal/service/controller_service.go index 3d45646d..0e25e9ff 100644 --- a/internal/service/controller_service.go +++ b/internal/service/controller_service.go @@ -30,7 +30,10 @@ import ( "github.com/jumpstarter-dev/jumpstarter-controller/internal/authentication" "github.com/jumpstarter-dev/jumpstarter-controller/internal/authorization" "github.com/jumpstarter-dev/jumpstarter-controller/internal/oidc" + cpb "github.com/jumpstarter-dev/jumpstarter-controller/internal/protocol/jumpstarter/client/v1" pb "github.com/jumpstarter-dev/jumpstarter-controller/internal/protocol/jumpstarter/v1" + "github.com/jumpstarter-dev/jumpstarter-controller/internal/service/auth" + clientsvcv1 "github.com/jumpstarter-dev/jumpstarter-controller/internal/service/client/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" @@ -43,7 +46,6 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" k8suuid "k8s.io/apimachinery/pkg/util/uuid" @@ -59,7 +61,6 @@ import ( // ControlerService exposes a gRPC service type ControllerService struct { - pb.UnimplementedClientServiceServer pb.UnimplementedControllerServiceServer Client client.WithWatch Scheme *runtime.Scheme @@ -644,74 +645,6 @@ func (s *ControllerService) ListLeases( }, nil } -func (s *ControllerService) GetExporter( - ctx context.Context, - req *pb.GetExporterRequest, -) (*pb.Exporter, error) { - _, err := s.authenticateClient(ctx) - if err != nil { - return nil, err - } - - namespace, name, err := ParseExporterIdentifier(req.Name) - if err != nil { - return nil, err - } - - var exporter jumpstarterdevv1alpha1.Exporter - if err := s.Client.Get(ctx, client.ObjectKey{Namespace: namespace, Name: name}, &exporter); err != nil { - return nil, err - } - - return &pb.Exporter{ - Name: req.Name, - Labels: exporter.Labels, - }, nil -} - -func (s *ControllerService) ListExporters( - ctx context.Context, - req *pb.ListExportersRequest, -) (*pb.ListExportersResponse, error) { - _, err := s.authenticateClient(ctx) - if err != nil { - return nil, err - } - - namespace, err := ParseNamespaceIdentifier(req.Parent) - if err != nil { - return nil, err - } - - selector, err := labels.Parse(req.Filter) - if err != nil { - return nil, err - } - - var exporters jumpstarterdevv1alpha1.ExporterList - if err := s.Client.List(ctx, &exporters, &client.ListOptions{ - Namespace: namespace, - LabelSelector: selector, - Limit: int64(req.PageSize), - Continue: req.PageToken, - }); err != nil { - return nil, err - } - - var results []*pb.Exporter - for _, exporter := range exporters.Items { - results = append(results, &pb.Exporter{ - Name: UnparseExporterIdentifier(exporter.Namespace, exporter.Name), - Labels: exporter.Labels, - }) - } - - return &pb.ListExportersResponse{ - Exporters: results, - NextPageToken: exporters.Continue, - }, nil -} - func (s *ControllerService) Start(ctx context.Context) error { logger := log.FromContext(ctx) @@ -747,7 +680,10 @@ func (s *ControllerService) Start(ctx context.Context) error { ) pb.RegisterControllerServiceServer(server, s) - pb.RegisterClientServiceServer(server, s) + cpb.RegisterClientServiceServer( + server, + clientsvcv1.NewClientService(s.Client, *auth.NewAuth(s.Client, s.Authn, s.Authz, s.Attr)), + ) // Register reflection service on gRPC server. reflection.Register(server) diff --git a/internal/service/helpers.go b/internal/service/helpers.go deleted file mode 100644 index 20df8a36..00000000 --- a/internal/service/helpers.go +++ /dev/null @@ -1,35 +0,0 @@ -package service - -import ( - "fmt" - "strings" -) - -func ParseNamespaceIdentifier(identifier string) (string, error) { - segments := strings.Split(identifier, "/") - if len(segments) != 2 { - return "", fmt.Errorf("incorrect number of segments in identifier, expecting 2, got %d", len(segments)) - } - if segments[0] != "namespaces" { - return "", fmt.Errorf("incorrect first segment in identifier, expecting namespaces, got %s", segments[0]) - } - return segments[1], nil -} - -func UnparseExporterIdentifier(namespace string, name string) string { - return fmt.Sprintf("namespaces/%s/exporters/%s", namespace, name) -} - -func ParseExporterIdentifier(identifier string) (string, string, error) { - segments := strings.Split(identifier, "/") - if len(segments) != 4 { - return "", "", fmt.Errorf("incorrect number of segments in identifier, expecting 4, got %d", len(segments)) - } - if segments[0] != "namespaces" { - return "", "", fmt.Errorf("incorrect first segment in identifier, expecting namespaces, got %s", segments[0]) - } - if segments[2] != "exporters" { - return "", "", fmt.Errorf("incorrect third segment in identifier, expecting exporters, got %s", segments[2]) - } - return segments[1], segments[3], nil -} diff --git a/internal/service/utils/identifier.go b/internal/service/utils/identifier.go new file mode 100644 index 00000000..f198fde0 --- /dev/null +++ b/internal/service/utils/identifier.go @@ -0,0 +1,91 @@ +package utils + +import ( + "fmt" + "strings" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + kclient "sigs.k8s.io/controller-runtime/pkg/client" +) + +func ParseNamespaceIdentifier(identifier string) (namespace string, err error) { + segments := strings.Split(identifier, "/") + + if len(segments) != 2 { + return "", status.Errorf( + codes.InvalidArgument, + "invalid number of segments in identifier \"%s\", expecting 2, got %d", + identifier, + len(segments), + ) + } + + if segments[0] != "namespaces" { + return "", status.Errorf( + codes.InvalidArgument, + "invalid first segment in identifier \"%s\", expecting \"namespaces\", got \"%s\"", + identifier, + segments[0], + ) + } + + return segments[1], nil +} + +func ParseObjectIdentifier(identifier string, kind string) (key *kclient.ObjectKey, err error) { + segments := strings.Split(identifier, "/") + + if len(segments) != 4 { + return nil, status.Errorf( + codes.InvalidArgument, + "invalid number of segments in identifier \"%s\", expecting 4, got %d", + identifier, + len(segments), + ) + } + + if segments[0] != "namespaces" { + return nil, status.Errorf( + codes.InvalidArgument, + "invalid first segment in identifier \"%s\", expecting \"namespaces\", got \"%s\"", + identifier, + segments[0], + ) + } + + if segments[2] != kind { + return nil, status.Errorf( + codes.InvalidArgument, + "invalid third segment in identifier \"%s\", expecting \"%s\", got \"%s\"", + identifier, + kind, + segments[2], + ) + } + + return &kclient.ObjectKey{ + Namespace: segments[1], + Name: segments[3], + }, nil +} + +func UnparseObjectIdentifier(key kclient.ObjectKey, kind string) string { + return fmt.Sprintf("namespaces/%s/%s/%s", key.Namespace, kind, key.Name) +} + +func ParseExporterIdentifier(identifier string) (key *kclient.ObjectKey, err error) { + return ParseObjectIdentifier(identifier, "exporters") +} + +func UnparseExporterIdentifier(key kclient.ObjectKey) string { + return UnparseObjectIdentifier(key, "exporters") +} + +func ParseLeaseIdentifier(identifier string) (key *kclient.ObjectKey, err error) { + return ParseObjectIdentifier(identifier, "leases") +} + +func UnparseLeaseIdentifier(key kclient.ObjectKey) string { + return UnparseObjectIdentifier(key, "leases") +} From 614246bc9990151e2f7694cf431b07d16d4dfc78 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 11 Mar 2025 14:22:33 -0400 Subject: [PATCH 3/4] Test against both old and new client --- .github/workflows/e2e.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index e57de758..4f0d5c49 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -13,3 +13,10 @@ jobs: with: controller-ref: ${{ github.ref }} jumpstarter-ref: main + e2e-tests-28d6b1cc3b49ab9ae176918ab9709a2e2522c97e: + runs-on: ubuntu-latest + steps: + - uses: jumpstarter-dev/jumpstarter-e2e@11a5ce6734be9f089ec3ea6ebf55284616f67fe8 + with: + controller-ref: ${{ github.ref }} + jumpstarter-ref: 28d6b1cc3b49ab9ae176918ab9709a2e2522c97e From 903367ec7be8845f04fba3640aabf7b6c5d150b9 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Mar 2025 14:06:04 -0400 Subject: [PATCH 4/4] Properly format label selector --- api/v1alpha1/lease_helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1alpha1/lease_helpers.go b/api/v1alpha1/lease_helpers.go index 5fc42264..04379445 100644 --- a/api/v1alpha1/lease_helpers.go +++ b/api/v1alpha1/lease_helpers.go @@ -61,7 +61,7 @@ func (l *Lease) ToProtobuf() *cpb.Lease { lease := cpb.Lease{ Name: fmt.Sprintf("namespaces/%s/leases/%s", l.Namespace, l.Name), - Selector: l.Spec.Selector.String(), + Selector: metav1.FormatLabelSelector(&l.Spec.Selector), Duration: durationpb.New(l.Spec.Duration.Duration), EffectiveDuration: durationpb.New(l.Spec.Duration.Duration), // TODO: implement lease renewal Client: ptr.To(fmt.Sprintf("namespaces/%s/clients/%s", l.Namespace, l.Spec.ClientRef.Name)),