From cd739e56ccc6e4bb0a7ccec9131572172f612d40 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Mon, 7 Oct 2024 13:21:10 +0300 Subject: [PATCH] chore!: run buf format, fix capitalization of proto fields --- proto/autoscaler.proto | 8 +++---- proto/deployment.proto | 6 ++--- proto/pod.proto | 20 ++++++++-------- proto/provision-pod.proto | 24 +++++++++---------- proto/registry.proto | 3 +-- .../manifests/manifest-attestation-hello.yaml | 2 +- .../manifests/manifest-attestation-nginx.yaml | 4 ++-- 7 files changed, 33 insertions(+), 34 deletions(-) diff --git a/proto/autoscaler.proto b/proto/autoscaler.proto index 362a21ec..46639859 100644 --- a/proto/autoscaler.proto +++ b/proto/autoscaler.proto @@ -3,17 +3,17 @@ syntax = "proto3"; package apocryph.proto.v0.autoscaler; -option go_package = "github.com/comrade-coop/apocryph/pkg/proto"; - import "google/protobuf/empty.proto"; +option go_package = "github.com/comrade-coop/apocryph/pkg/proto"; + service AutoscalerService { rpc ConnectCluster(ConnectClusterRequest) returns (ConnectClusterResponse); rpc TriggerNode(ConnectClusterRequest) returns (TriggerNodeResponse); } message ConnectClusterRequest { - // could get it from within the cluster maybe? + // could get it from within the cluster maybe? string nodeGateway = 1; repeated string servers = 2; uint32 timeout = 3; @@ -25,5 +25,5 @@ message ConnectClusterResponse { } message TriggerNodeResponse { - string peerID =1; + string peerID = 1; } diff --git a/proto/deployment.proto b/proto/deployment.proto index 76b5fd7c..beaece28 100644 --- a/proto/deployment.proto +++ b/proto/deployment.proto @@ -2,10 +2,11 @@ syntax = "proto3"; package apocryph.proto.v0.deployment; -option go_package = "github.com/comrade-coop/apocryph/pkg/proto"; -import "provision-pod.proto"; import "pod.proto"; +import "provision-pod.proto"; + +option go_package = "github.com/comrade-coop/apocryph/pkg/proto"; message Deployment { string podManifestFile = 1; @@ -15,7 +16,6 @@ message Deployment { repeated UploadedSecret secrets = 5; provisionPod.ProvisionPodResponse deployed = 6; pod.KeyPair keyPair = 7; - } message ProviderConfig { diff --git a/proto/pod.proto b/proto/pod.proto index 79303b33..69bbc23f 100644 --- a/proto/pod.proto +++ b/proto/pod.proto @@ -23,7 +23,7 @@ message Container { map env = 7; repeated VolumeMount volumes = 8; repeated Resource resourceRequests = 9; // "cpu", "memory", custom - + message Port { string name = 1; uint64 containerPort = 2; @@ -51,9 +51,9 @@ message Image { } message VerificationDetails { - string signature = 1; - string identity = 2; - string issuer = 3; + string signature = 1; + string identity = 2; + string issuer = 3; } message Volume { @@ -105,11 +105,11 @@ message Key { } message KeyPair { - string privateKey= 2; - string pubAddress = 3; + string privateKey = 2; + string pubAddress = 3; } -message VerificationSettings{ - bool ForcePolicy = 1; - bool PublicVerifiability = 2; - string VerificationHost = 3; +message VerificationSettings { + bool forcePolicy = 1; + bool publicVerifiability = 2; + string verificationHost = 3; } diff --git a/proto/provision-pod.proto b/proto/provision-pod.proto index 9ac38b32..c617caeb 100644 --- a/proto/provision-pod.proto +++ b/proto/provision-pod.proto @@ -3,9 +3,10 @@ syntax = "proto3"; package apocryph.proto.v0.provisionPod; -option go_package = "github.com/comrade-coop/apocryph/pkg/proto"; import "pod.proto"; +option go_package = "github.com/comrade-coop/apocryph/pkg/proto"; + service ProvisionPodService { rpc ProvisionPod(ProvisionPodRequest) returns (ProvisionPodResponse); rpc UpdatePod(UpdatePodRequest) returns (ProvisionPodResponse); @@ -19,12 +20,11 @@ message ProvisionPodRequest { PaymentChannel payment = 3; } -message DeletePodRequest { -} +message DeletePodRequest {} message DeletePodResponse { - bool success = 1; - string error = 2; + bool success = 1; + string error = 2; } message UpdatePodRequest { @@ -56,23 +56,23 @@ message ProvisionPodResponse { } } -message PodLogRequest{ +message PodLogRequest { string ContainerName = 1; } -message PodLogResponse{ - LogEntry logEntry = 1; +message PodLogResponse { + LogEntry logEntry = 1; } -message LogEntry{ +message LogEntry { uint64 NanosecondsUnixEpoch = 1; - string line= 2; + string line = 2; } -message PodInfoRequest{ +message PodInfoRequest { string namespace = 1; } -message PodInfoResponse{ +message PodInfoResponse { string info = 1; } diff --git a/proto/registry.proto b/proto/registry.proto index cf2ba55f..3c2b507d 100644 --- a/proto/registry.proto +++ b/proto/registry.proto @@ -8,11 +8,10 @@ option go_package = "github.com/comrade-coop/apocryph/pkg/proto"; message HostInfo { repeated string multiaddrs = 1; repeated Region regions = 2; - + message Region { string name = 1; string zone = 2; uint32 num = 3; } } - diff --git a/test/e2e/common/manifests/manifest-attestation-hello.yaml b/test/e2e/common/manifests/manifest-attestation-hello.yaml index cc6f7074..f14a0f26 100644 --- a/test/e2e/common/manifests/manifest-attestation-hello.yaml +++ b/test/e2e/common/manifests/manifest-attestation-hello.yaml @@ -11,4 +11,4 @@ replicas: min: 1 max: 1 verificationSettings: - ImageVerification: true + imageVerification: true diff --git a/test/e2e/common/manifests/manifest-attestation-nginx.yaml b/test/e2e/common/manifests/manifest-attestation-nginx.yaml index 33d44a87..174d458a 100644 --- a/test/e2e/common/manifests/manifest-attestation-nginx.yaml +++ b/test/e2e/common/manifests/manifest-attestation-nginx.yaml @@ -15,5 +15,5 @@ replicas: min: 1 max: 1 verificationSettings: - ForcePolicy: true - PublicVerifiability: true + forcePolicy: true + publicVerifiability: true