Merge branch 'main' into plugin-hostcatalogs

This commit is contained in:
Jeff Mitchell committed 2021-11-04 09:02:39 -04:00
commit 80d41b9044
79 files changed
+3965 -927

No files matched your search

@@ -143,11 +143,10 @@ message Target {
// Output only. The application credential sources associated with this Target.
repeated CredentialSource application_credential_sources = 410 [json_name="application_credential_sources"];
// TODO: Uncomment when we suport more purposes beyond application
// // Output only. The egress credential libraries associated with this Target.
// repeated CredentialLibrary egress_credential_libraries = 190 [json_name="egress_credential_libraries"];
// // Output only. The credential libraries associated with this Target.
// repeated CredentialLibrary ingress_credential_libraries = 200 [json_name="ingress_credential_libraries"];
// Output only. The IDs of the egress credential source ids associated with this Target.
repeated string egress_credential_source_ids = 500 [json_name="egress_credential_source_ids"];
// Output only. The egress credential sources associated with this Target.
repeated CredentialSource egress_credential_sources = 510 [json_name="egress_credential_sources"];
// The attributes that are applicable for the specific Target.
google.protobuf.Struct attributes = 200 [(custom_options.v1.generate_sdk_option) = true];
@@ -475,21 +475,22 @@ message AddTargetCredentialSourcesRequest {
// The mutation will fail if the version does not match the latest known good version.
uint32 version = 2;
repeated string application_credential_source_ids = 3 [json_name="application_credential_source_ids"];
repeated string egress_credential_source_ids = 4 [json_name="egress_credential_source_ids"];
}
message AddTargetCredentialSourcesResponse {
api.resources.targets.v1.Target item = 1;
}
// Sets the values for application_credential_source_ids. If any
// credential_source_id field that is not set in the request will result in
// those fields being cleared.
// Sets the values for credential sources. Any credential_source_id field that
// is not set in the request will result in those fields being cleared.
message SetTargetCredentialSourcesRequest {
string id = 1;
// Version is used to ensure this resource has not changed.
// The mutation will fail if the version does not match the latest known good version.
uint32 version = 2;
repeated string application_credential_source_ids = 3 [json_name="application_credential_source_ids"];
repeated string egress_credential_source_ids = 4 [json_name="egress_credential_source_ids"];
}
message SetTargetCredentialSourcesResponse {
@@ -502,6 +503,7 @@ message RemoveTargetCredentialSourcesRequest {
// The mutation will fail if the version does not match the latest known good version.
uint32 version = 2;
repeated string application_credential_source_ids = 3 [json_name="application_credential_source_id"];
repeated string egress_credential_source_ids = 4 [json_name="egress_credential_source_ids"];
}
message RemoveTargetCredentialSourcesResponse {
@@ -118,4 +118,27 @@ message StoreTestScooter {
// @inject_tag: `gorm:"default:null"`
int32 mpg = 7;
}
// StoreTestAccessory used in the db tests only and provides a gorm resource with
// an id that's not a private or public id
message StoreTestAccessory {
// @inject_tag: gorm:"primary_key"
uint32 accessory_id = 1;
// @inject_tag: `gorm:"default:not_null"`
string description = 2;
}
// StoreTestScooterAccessory used in the db tests only and provides a gorm
// resource with multiple pks
message StoreTestScooterAccessory {
// @inject_tag: gorm:"primary_key"
uint32 accessory_id = 1;
// @inject_tag: gorm:"primary_key"
uint32 scooter_id = 2;
// @inject_tag: `gorm:"default:null"`
string review = 3;
}
@@ -0,0 +1,73 @@
syntax = "proto3";
package controller.storage.target.targettest.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/target/targettest/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
import "controller/custom_options/v1/options.proto";
message Target {
// public_id is used to access the targettest.Target via an API
// @inject_tag: gorm:"primary_key"
string public_id = 10;
// scope id for the targettest.Target
// @inject_tag: `gorm:"default:null"`
string scope_id = 20;
// name is the optional friendly name used to
// access the targettest.Target via an API
// @inject_tag: `gorm:"default:null"`
string name = 30
[(custom_options.v1.mask_mapping) = { this: "name" that: "name" }];
// description of the targettest.Target
// @inject_tag: `gorm:"default:null"`
string description = 40 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// create_time from the RDBMS
// @inject_tag: `gorm:"default:current_timestamp"`
timestamp.v1.Timestamp create_time = 50;
// update_time from the RDBMS
// @inject_tag: `gorm:"default:current_timestamp"`
timestamp.v1.Timestamp update_time = 60;
// version allows optimistic locking of the targettest.Target when modifying the
// targettest.Target
// @inject_tag: `gorm:"default:null"`
uint32 version = 70;
// default port of the targettest.Target
// @inject_tag: `gorm:"default:null"`
uint32 default_port = 80 [(custom_options.v1.mask_mapping) = {
this: "DefaultPort"
that: "attributes.default_port"
}];
// Maximum total lifetime of a created session, in seconds
// @inject_tag: `gorm:"default:null"`
uint32 session_max_seconds = 100 [(custom_options.v1.mask_mapping) = {
this: "SessionMaxSeconds"
that: "session_max_seconds"
}];
// Maximum number of connections in a session
// @inject_tag: `gorm:"default:null"`
int32 session_connection_limit = 110 [(custom_options.v1.mask_mapping) = {
this: "SessionConnectionLimit"
that: "session_connection_limit"
}];
// A boolean expression that allows filtering the workers that can handle a session
// @inject_tag: `gorm:"default:null"`
string worker_filter = 120 [(custom_options.v1.mask_mapping) = {
this: "WorkerFilter"
that: "worker_filter"
}];
}