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:
1 parent
0fb9b35498
commit
f69fbf2255
131 files changed
+2329
-1618
No files matched your search
@@ -2,14 +2,14 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.resources.targets.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/targets;targets";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
import "google/api/visibility.proto";
|
||||
import "controller/api/resources/scopes/v1/scope.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/visibility.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/targets;targets";
|
||||
|
||||
message HostSource {
|
||||
// Output only. The ID of the Host Set.
|
||||
@@ -85,7 +85,7 @@ message SessionCredential {
|
||||
// Output only. The secret of this credential base64 encoded.
|
||||
SessionSecret secret = 20;
|
||||
|
||||
// Output only. The fields of the strongly typed credential, empty if the credential type of the
|
||||
// Output only. The fields of the strongly typed credential, empty if the credential type of the
|
||||
// credential source is unspecified.
|
||||
google.protobuf.Struct credential = 40;
|
||||
}
|
||||
@@ -102,10 +102,22 @@ message Target {
|
||||
resources.scopes.v1.ScopeInfo scope = 30;
|
||||
|
||||
// Required name for identification purposes.
|
||||
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "name" that: "name" }]; // @gotags: `class:"public"`
|
||||
google.protobuf.StringValue name = 40 [
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.mask_mapping) = {
|
||||
this: "name"
|
||||
that: "name"
|
||||
}
|
||||
]; // @gotags: `class:"public"`
|
||||
|
||||
// Optional user-set description for identification purposes.
|
||||
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "description" that: "description" }]; // @gotags: `class:"public"`
|
||||
google.protobuf.StringValue description = 50 [
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.mask_mapping) = {
|
||||
this: "description"
|
||||
that: "description"
|
||||
}
|
||||
]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The time this resource was created.
|
||||
google.protobuf.Timestamp created_time = 60 [json_name = "created_time"]; // @gotags: `class:"public"`
|
||||
@@ -133,21 +145,45 @@ message Target {
|
||||
repeated HostSource host_sources = 430 [json_name = "host_sources"];
|
||||
|
||||
// Maximum total lifetime of a created Session, in seconds.
|
||||
google.protobuf.UInt32Value session_max_seconds = 120
|
||||
[json_name = "session_max_seconds", (custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "session_max_seconds" that: "SessionMaxSeconds" }]; // @gotags: `class:"public"`
|
||||
google.protobuf.UInt32Value session_max_seconds = 120 [
|
||||
json_name = "session_max_seconds",
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.mask_mapping) = {
|
||||
this: "session_max_seconds"
|
||||
that: "SessionMaxSeconds"
|
||||
}
|
||||
]; // @gotags: `class:"public"`
|
||||
|
||||
// Maximum number of connections allowed in a Session. Unlimited is indicated by the value -1.
|
||||
google.protobuf.Int32Value session_connection_limit = 130
|
||||
[json_name = "session_connection_limit", (custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "session_connection_limit" that: "SessionConnectionLimit" }]; // @gotags: `class:"public"`
|
||||
google.protobuf.Int32Value session_connection_limit = 130 [
|
||||
json_name = "session_connection_limit",
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.mask_mapping) = {
|
||||
this: "session_connection_limit"
|
||||
that: "SessionConnectionLimit"
|
||||
}
|
||||
]; // @gotags: `class:"public"`
|
||||
|
||||
// Optional boolean expression to filter the workers that are allowed to satisfy this request.
|
||||
google.protobuf.StringValue worker_filter = 140
|
||||
[json_name = "worker_filter", (custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "worker_filter" that: "WorkerFilter" }]; // @gotags: `class:"public"`
|
||||
google.protobuf.StringValue worker_filter = 140 [
|
||||
json_name = "worker_filter",
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.mask_mapping) = {
|
||||
this: "worker_filter"
|
||||
that: "WorkerFilter"
|
||||
}
|
||||
]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The IDs of the application credential library ids associated with this Target. Deprecated: use application_credential_source_ids instead.
|
||||
repeated string application_credential_library_ids = 150 [json_name = "application_credential_library_ids", deprecated = true]; // @gotags: `class:"public"`
|
||||
repeated string application_credential_library_ids = 150 [
|
||||
json_name = "application_credential_library_ids",
|
||||
deprecated = true
|
||||
]; // @gotags: `class:"public"`
|
||||
// Output only. The application credential libraries associated with this Target. Deprecated: use application_credential_sources instead.
|
||||
repeated CredentialLibrary application_credential_libraries = 180 [json_name = "application_credential_libraries", deprecated = true];
|
||||
repeated CredentialLibrary application_credential_libraries = 180 [
|
||||
json_name = "application_credential_libraries",
|
||||
deprecated = true
|
||||
];
|
||||
|
||||
// Output only. The IDs of the application credential source ids associated with this Target.
|
||||
repeated string application_credential_source_ids = 400 [json_name = "application_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
@@ -179,47 +215,53 @@ message Target {
|
||||
// TcpTargetAttributes contains attributes relevant to Targets of type "tcp"
|
||||
message TcpTargetAttributes {
|
||||
// The default TCP port that will be used when connecting to the endpoint unless overridden by a Host Set or Host.
|
||||
google.protobuf.UInt32Value default_port = 10
|
||||
[json_name = "default_port", (custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "attributes.default_port" that: "DefaultPort" }]; // @gotags: `class:"public"`
|
||||
google.protobuf.UInt32Value default_port = 10 [
|
||||
json_name = "default_port",
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.mask_mapping) = {
|
||||
this: "attributes.default_port"
|
||||
that: "DefaultPort"
|
||||
}
|
||||
]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
// WorkerInfo contains information about workers, returned in to the client in SessionAuthorization
|
||||
message WorkerInfo {
|
||||
// Output only. The address of the worker.
|
||||
string address = 10; // @gotags: `class:"public"`
|
||||
string address = 10; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
// SessionAuthorizationData contains the fields needed by the proxy command to connect to a worker. It is marshaled inside the SessionAuthorization message.
|
||||
message SessionAuthorizationData {
|
||||
// Output only. The ID of the session.
|
||||
string session_id = 10 [json_name = "session_id"]; // @gotags: `class:"public"`
|
||||
string session_id = 10 [json_name = "session_id"]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The ID of the Target authorizing this session.
|
||||
string target_id = 20 [json_name = "target_id"]; // @gotags: `class:"public"`
|
||||
string target_id = 20 [json_name = "target_id"]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. Scope information for this the Target that authorized this session.
|
||||
resources.scopes.v1.ScopeInfo scope = 30;
|
||||
|
||||
// Output only. The time this resource was created.
|
||||
google.protobuf.Timestamp created_time = 40 [json_name = "created_time"]; // @gotags: `class:"public"`
|
||||
google.protobuf.Timestamp created_time = 40 [json_name = "created_time"]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. Type of the session (e.g. tcp, ssh, etc.).
|
||||
string type = 80; // @gotags: `class:"public"`
|
||||
string type = 80; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The connection limit being applied to this session. -1 means unlimited. This is not actually enforced on the client side but it provides for better listener handling by including it.
|
||||
int32 connection_limit = 90 [json_name = "connection_limit"];
|
||||
|
||||
// Output only. The certificate to use when connecting. Raw DER bytes.
|
||||
bytes certificate = 120; // @gotags: `class:"sensitive"`
|
||||
bytes certificate = 120; // @gotags: `class:"sensitive"`
|
||||
|
||||
// Output only. The private key to use when connecting. We are using Ed25519, so this is purely raw bytes, no marshaling.
|
||||
bytes private_key = 130 [json_name = "private_key"]; // @gotags: `class:"secret"`
|
||||
bytes private_key = 130 [json_name = "private_key"]; // @gotags: `class:"secret"`
|
||||
|
||||
// Output only. The host ID...not used for security purposes, but for some special command handling (e.g. ssh host key aliasing).
|
||||
string host_id = 140; // @gotags: `class:"public"`
|
||||
string host_id = 140; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The endpoint, for some special command handling.
|
||||
string endpoint = 141; // @gotags: `class:"public"`
|
||||
string endpoint = 141; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. Worker information. The first worker in the array should be prioritized.
|
||||
repeated WorkerInfo worker_info = 150 [json_name = "worker_info"];
|
||||
@@ -228,34 +270,34 @@ message SessionAuthorizationData {
|
||||
// SessionAuthorization contains all fields related to authorization for a Session. It's in the Targets package because it's returned by a Target's authorize action.
|
||||
message SessionAuthorization {
|
||||
// Output only. The ID of the Session.
|
||||
string session_id = 10 [json_name = "session_id"]; // @gotags: `class:"public"`
|
||||
string session_id = 10 [json_name = "session_id"]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The ID of the Target authorizing this Session.
|
||||
string target_id = 20 [json_name = "target_id"]; // @gotags: `class:"public"`
|
||||
string target_id = 20 [json_name = "target_id"]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. Scope information for this resource.
|
||||
resources.scopes.v1.ScopeInfo scope = 30;
|
||||
|
||||
// Output only. The time this resource was created.
|
||||
google.protobuf.Timestamp created_time = 40 [json_name = "created_time"]; // @gotags: `class:"public"`
|
||||
google.protobuf.Timestamp created_time = 40 [json_name = "created_time"]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The User for which this Session was authorized.
|
||||
string user_id = 50 [json_name = "user_id"]; // @gotags: `class:"public"`
|
||||
string user_id = 50 [json_name = "user_id"]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The Host Set containing the Host being used for this Session.
|
||||
string host_set_id = 60 [json_name = "host_set_id"]; // @gotags: `class:"public"`
|
||||
string host_set_id = 60 [json_name = "host_set_id"]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The Host whose address is being used as the endpoint for this Session.
|
||||
string host_id = 70 [json_name = "host_id"]; // @gotags: `class:"public"`
|
||||
string host_id = 70 [json_name = "host_id"]; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. Type of the Session (e.g. tcp, ssh, etc.).
|
||||
string type = 80; // @gotags: `class:"public"`
|
||||
string type = 80; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The marshaled SessionAuthorizationData message containing all information that the proxy needs.
|
||||
string authorization_token = 90 [json_name = "authorization_token"]; // @gotags: `class:"private"`
|
||||
string authorization_token = 90 [json_name = "authorization_token"]; // @gotags: `class:"private"`
|
||||
|
||||
// Output only. The endpoint address that the worker will connect to, useful for setting TLS parameters.
|
||||
string endpoint = 100; // @gotags: `class:"public"`
|
||||
string endpoint = 100; // @gotags: `class:"public"`
|
||||
|
||||
// Output only. The credentials for this session.
|
||||
repeated SessionCredential credentials = 110 [json_name = "credentials"];
|
||||
|
||||
Reference in new issue
Block a user