fix proto files to conform with autogenpb
This commit is contained in:
parent
9160268326
commit
c3f0f41791
6
Makefile
6
Makefile
|
@ -3,7 +3,7 @@
|
|||
# cd ~/go/src/google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
# go install
|
||||
|
||||
all: droplet.pb.go hypervisor.pb.go event.pb.go experiments.pb.go vet
|
||||
all: droplet.pb.go hypervisor.pb.go event.pb.go experiment.pb.go goimports vet
|
||||
|
||||
vet:
|
||||
@GO111MODULE=off go vet
|
||||
|
@ -31,8 +31,8 @@ hypervisor.pb.go: hypervisor.proto
|
|||
event.pb.go: event.proto
|
||||
autogenpb --proto event.proto
|
||||
|
||||
experiments.pb.go: experiments.proto
|
||||
autogenpb --proto experiments.proto
|
||||
experiment.pb.go: experiment.proto
|
||||
autogenpb --proto experiment.proto
|
||||
|
||||
deps:
|
||||
apt install golang-goprotobuf-dev
|
||||
|
|
|
@ -7,8 +7,8 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time
|
|||
// global settings for autogenpb `autogenpb:mutex`
|
||||
|
||||
message Droplets { // `autogenpb:marshal`
|
||||
string uuid = 1; // I guess why not just have this on each file
|
||||
string version = 2; // maybe can be used for protobuf schema change violations
|
||||
string uuid = 1; // `autogenpb:uuid:d5d492e2-38d4-476b-86f3-f5abf01f9d6d`
|
||||
string version = 2; // `autogenpb:version:v0.0.1`
|
||||
repeated Droplet droplets = 3;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ import "google/protobuf/any.proto"; // Import the well-known type for Timestamp
|
|||
// global settings for autogenpb `autogenpb:no-sort` `autogenpb:mutex`
|
||||
|
||||
message Events { // `autogenpb:marshal`
|
||||
string uuid = 1; // I guess why not just have this on each file
|
||||
string version = 2; // maybe can be used for protobuf schema change violations
|
||||
string uuid = 1; // `autogenpb:uuid:1e3a50c7-5916-4423-b33c-f0b977a7e446`
|
||||
string version = 2; // `autogenpb:version:v0.0.1`
|
||||
int64 event_size = 3; // max events to store in a single
|
||||
repeated Event events = 4; // all the events
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
syntax = "proto3";
|
||||
package virtbuf;
|
||||
|
||||
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
||||
import "google/protobuf/any.proto"; // Import the well-known type for Timestamp
|
||||
|
||||
// global settings for autogenpb `autogenpb:no-sort` `autogenpb:no-marshal`
|
||||
|
||||
message WhatsThis {
|
||||
// is it possible to have custom formatting in JSON and TEXT marshal/unmarshal ?
|
||||
WhatInfo humantest = 1;
|
||||
|
||||
google.protobuf.Timestamp end = 2; // end time
|
||||
google.protobuf.Any orig_val = 3; // original value
|
||||
google.protobuf.Any new_val = 4; // new value
|
||||
}
|
||||
|
||||
// this is for exerimenting
|
||||
message WhatInfo {
|
||||
int64 capacity = 1; // Stores the storage capacity in bytes.
|
||||
}
|
||||
|
||||
message Experiment {
|
||||
}
|
||||
|
||||
message Experiments { // `autogenpb:marshal` `autogenpb:mutex`
|
||||
string uuid = 1; // `autogenpb:uuid:aadb95db-d798-4647-8c59-cce82e8f1ed6`
|
||||
string version = 2; // `autogenpb:version:v0.0.1`
|
||||
repeated Experiment Experiments = 3; // THIS MUST BE Experiment and then Experiments
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
syntax = "proto3";
|
||||
package virtbuf;
|
||||
|
||||
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
||||
import "google/protobuf/any.proto"; // Import the well-known type for Timestamp
|
||||
|
||||
// global settings for autogenpb `autogenpb:no-sort` `autogenpb:no-marshal`
|
||||
|
||||
message WhatsThis {
|
||||
// is it possible to have custom formatting in JSON and TEXT marshal/unmarshal ?
|
||||
WhatInfo humantest = 1;
|
||||
|
||||
google.protobuf.Timestamp end = 2; // end time
|
||||
google.protobuf.Any orig_val = 3; // original value
|
||||
google.protobuf.Any new_val = 4; // new value
|
||||
}
|
||||
|
||||
// this is for exerimenting
|
||||
message WhatInfo {
|
||||
int64 capacity = 1; // Stores the storage capacity in bytes.
|
||||
}
|
|
@ -4,8 +4,8 @@ package virtbuf;
|
|||
// global settings for autogenpb `autogenpb:mutex`
|
||||
|
||||
message Hypervisors { // `autogenpb:marshal`
|
||||
string uuid = 1; // I guess why not just have this on each file
|
||||
string version = 2; // maybe can be used for protobuf schema change violations
|
||||
string uuid = 1; // `autogenpb:uuid:6e3aa8b9-cf98-40f6-af58-3c6ad1edf4d4`
|
||||
string version = 2; // `autogenpb:version:v0.0.1`
|
||||
repeated Hypervisor hypervisors = 3;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue