autogenpb now configured in .proto files
This commit is contained in:
parent
aeac6b5af7
commit
8f3953159a
8
Makefile
8
Makefile
|
@ -23,16 +23,16 @@ clean:
|
|||
-rm -f go.*
|
||||
|
||||
droplet.pb.go: droplet.proto
|
||||
autogenpb --proto droplet.proto --mutex
|
||||
autogenpb --proto droplet.proto
|
||||
|
||||
hypervisor.pb.go: hypervisor.proto
|
||||
autogenpb --proto hypervisor.proto --mutex
|
||||
autogenpb --proto hypervisor.proto
|
||||
|
||||
event.pb.go: event.proto
|
||||
autogenpb --proto event.proto --mutex --no-sort
|
||||
autogenpb --proto event.proto
|
||||
|
||||
experiments.pb.go: experiments.proto
|
||||
autogenpb --proto experiments.proto --no-marshal --no-sort
|
||||
autogenpb --proto experiments.proto
|
||||
|
||||
deps:
|
||||
apt install golang-goprotobuf-dev
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
these are .proto files. first stab. may be inaccurate
|
||||
writes out config files as protojson and prototext
|
||||
todo: lots of stuff
|
||||
This go library handles the protobuf files
|
||||
and various functions for virtigo.
|
||||
|
||||
You must build the protobuf files using autogenpb
|
||||
|
||||
go install go.wit.com/apps/autogenpb@latest
|
||||
|
|
|
@ -4,6 +4,8 @@ package virtbuf;
|
|||
import "google/protobuf/duration.proto"; // Import the well-known type for Timestamp
|
||||
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
||||
|
||||
// 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
|
||||
|
|
|
@ -4,6 +4,8 @@ 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: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
|
||||
|
|
|
@ -4,6 +4,8 @@ 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;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
syntax = "proto3";
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue