feat(proto): Format protobuf files with buf (#2033)

Formats all protobuf files with buf format. This ensures
a consistent style across all our protobuf files, similar
to gofumpt.
This commit is contained in:
Johan Brandhorst-Satzkorn authored and GitHub committed 2022-05-04 11:10:21 -04:00
1 parent 0fb9b35498
commit f69fbf2255
131 files changed
+2329 -1618

No files matched your search

@@ -3,10 +3,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the plugin host
// package.
package controller.storage.host.plugin.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/host/plugin/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
import "controller/custom_options/v1/options.proto";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/host/plugin/store;store";
message HostCatalog {
// public_id is a surrogate key suitable for use in a public API.
@@ -23,11 +24,17 @@ message HostCatalog {
// name is optional. If set, it must be unique within scope_id.
// @inject_tag: `gorm:"default:null"`
string name = 4 [(custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
string name = 4 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description is optional.
// @inject_tag: `gorm:"default:null"`
string description = 5 [(custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
string description = 5 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// The scope_id of the owning scope and must be set.
// @inject_tag: `gorm:"not_null"`
@@ -76,11 +83,17 @@ message HostSet {
// name is optional. If set, it must be unique within
// catalog_id.
// @inject_tag: `gorm:"default:null"`
string name = 6 [(custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
string name = 6 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description is optional.
// @inject_tag: `gorm:"default:null"`
string description = 7 [(custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
string description = 7 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// catalog_id is the public_id of the owning
// plugin_host_catalog and must be set.
@@ -97,11 +110,17 @@ message HostSet {
// preferred_endpoints stores string preference values
// @inject_tag: `gorm:"-"`
repeated string preferred_endpoints = 11 [(custom_options.v1.mask_mapping) = {this:"PreferredEndpoints" that: "preferred_endpoints"}];
repeated string preferred_endpoints = 11 [(custom_options.v1.mask_mapping) = {
this: "PreferredEndpoints"
that: "preferred_endpoints"
}];
// Sync interval is a value representing a duration in seconds
// @inject_tag: `gorm:"default:null"`
int32 sync_interval_seconds = 12 [(custom_options.v1.mask_mapping) = {this: "SyncIntervalSeconds" that: "sync_interval_seconds"}];
int32 sync_interval_seconds = 12 [(custom_options.v1.mask_mapping) = {
this: "SyncIntervalSeconds"
that: "sync_interval_seconds"
}];
}
message HostCatalogSecret {
@@ -3,10 +3,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the static host
// package.
package controller.storage.host.static.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/host/static/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
import "controller/custom_options/v1/options.proto";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/host/static/store;store";
message HostCatalog {
// public_is is a surrogate key suitable for use in a public API.
@@ -23,11 +24,17 @@ message HostCatalog {
// name is optional. If set, it must be unique within scope_id.
// @inject_tag: `gorm:"default:null"`
string name = 4 [(custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
string name = 4 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description is optional.
// @inject_tag: `gorm:"default:null"`
string description = 5 [(custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
string description = 5 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// The scope_id of the owning scope and must be set.
// @inject_tag: `gorm:"not_null"`
@@ -54,11 +61,17 @@ message Host {
// name is optional. If set, it must be unique within
// catalog_id.
// @inject_tag: `gorm:"default:null"`
string name = 4 [(custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
string name = 4 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description is optional.
// @inject_tag: `gorm:"default:null"`
string description = 5 [(custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
string description = 5 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// catalog_id is the public_id of the owning
// static_host_catalog and must be set.
@@ -68,7 +81,10 @@ message Host {
// address is the IP Address or DNS name of the host. It must be set and
// it must be unique within catalog_id.
// @inject_tag: `gorm:"default:null"`
string address = 7 [(custom_options.v1.mask_mapping) = {this:"address" that: "attributes.address"}];
string address = 7 [(custom_options.v1.mask_mapping) = {
this: "address"
that: "attributes.address"
}];
// version allows optimistic locking of the resource
// @inject_tag: `gorm:"default:null"`
@@ -91,11 +107,17 @@ message HostSet {
// name is optional. If set, it must be unique within
// catalog_id.
// @inject_tag: `gorm:"default:null"`
string name = 4 [(custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
string name = 4 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description is optional.
// @inject_tag: `gorm:"default:null"`
string description = 5 [(custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
string description = 5 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// catalog_id is the public_id of the owning
// static_host_catalog and must be set.
@@ -122,6 +144,12 @@ message HostSetMember {
// here for the purpose of identifying the mask maps which are on the top level
// api set resource but aren't present in the static host set storage.
message UnimplementedSetFields {
repeated string preferred_endpoints = 11 [(custom_options.v1.mask_mapping) = {this:"PreferredEndpoints" that: "preferred_endpoints"}];
int32 sync_interval_seconds = 22 [(custom_options.v1.mask_mapping) = {this: "SyncIntervalSeconds" that: "sync_interval_seconds"}];
}
repeated string preferred_endpoints = 11 [(custom_options.v1.mask_mapping) = {
this: "PreferredEndpoints"
that: "preferred_endpoints"
}];
int32 sync_interval_seconds = 22 [(custom_options.v1.mask_mapping) = {
this: "SyncIntervalSeconds"
that: "sync_interval_seconds"
}];
}
@@ -2,6 +2,7 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the host package.
package controller.storage.host.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/host/store;store";
message Catalog {
@@ -62,4 +63,4 @@ message DnsName {
// @inject_tag: `gorm:"primary_key"`
string name = 2;
}
}