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,25 +2,23 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/accounts/v1/account.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (custom_options.v1.domain) = "auth";
|
||||
|
||||
service AccountService {
|
||||
|
||||
// GetAccount returns a stored Account if present. The provided request must
|
||||
// include the id for the Account be retrieved. If missing, malformed or
|
||||
// referencing a non existing Account an error is returned.
|
||||
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/accounts/{id}"
|
||||
response_body: "item"
|
||||
get: "/v1/accounts/{id}"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Gets a single Account."
|
||||
@@ -34,7 +32,7 @@ service AccountService {
|
||||
rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/accounts"
|
||||
};
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Lists all Accounts in a specific Auth Method."
|
||||
};
|
||||
@@ -117,7 +115,7 @@ service AccountService {
|
||||
}
|
||||
|
||||
message GetAccountRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message GetAccountResponse {
|
||||
@@ -125,8 +123,8 @@ message GetAccountResponse {
|
||||
}
|
||||
|
||||
message ListAccountsRequest {
|
||||
string auth_method_id = 1 [json_name="auth_method_id"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"sensitive"`
|
||||
string auth_method_id = 1 [json_name = "auth_method_id"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"sensitive"`
|
||||
}
|
||||
|
||||
message ListAccountsResponse {
|
||||
@@ -138,14 +136,14 @@ message CreateAccountRequest {
|
||||
}
|
||||
|
||||
message CreateAccountResponse {
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
resources.accounts.v1.Account item = 2;
|
||||
}
|
||||
|
||||
message UpdateAccountRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
resources.accounts.v1.Account item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
|
||||
message UpdateAccountResponse {
|
||||
@@ -153,17 +151,17 @@ message UpdateAccountResponse {
|
||||
}
|
||||
|
||||
message DeleteAccountRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message DeleteAccountResponse {}
|
||||
|
||||
message SetPasswordRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
// 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; // @gotags: `class:"public"`
|
||||
string password = 3; // @gotags: `class:"secret"`
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
string password = 3; // @gotags: `class:"secret"`
|
||||
}
|
||||
|
||||
message SetPasswordResponse {
|
||||
@@ -171,12 +169,12 @@ message SetPasswordResponse {
|
||||
}
|
||||
|
||||
message ChangePasswordRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
// 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; // @gotags: `class:"public"`
|
||||
string current_password = 3 [json_name="current_password"]; // @gotags: `class:"secret"`
|
||||
string new_password = 4 [json_name="new_password"]; // @gotags: `class:"secret"`
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
string current_password = 3 [json_name = "current_password"]; // @gotags: `class:"secret"`
|
||||
string new_password = 4 [json_name = "new_password"]; // @gotags: `class:"secret"`
|
||||
}
|
||||
|
||||
message ChangePasswordResponse {
|
||||
|
||||
@@ -2,17 +2,16 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "controller/api/resources/authmethods/v1/auth_method.proto";
|
||||
import "controller/api/resources/authtokens/v1/authtoken.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/visibility.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
import "controller/api/resources/authmethods/v1/auth_method.proto";
|
||||
import "controller/api/resources/authtokens/v1/authtoken.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (custom_options.v1.domain) = "auth";
|
||||
|
||||
service AuthMethodService {
|
||||
@@ -112,7 +111,7 @@ service AuthMethodService {
|
||||
}
|
||||
|
||||
message GetAuthMethodRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message GetAuthMethodResponse {
|
||||
@@ -120,9 +119,9 @@ message GetAuthMethodResponse {
|
||||
}
|
||||
|
||||
message ListAuthMethodsRequest {
|
||||
string scope_id = 1 [json_name = "scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name = "recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
string scope_id = 1 [json_name = "scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name = "recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListAuthMethodsResponse {
|
||||
@@ -134,12 +133,12 @@ message CreateAuthMethodRequest {
|
||||
}
|
||||
|
||||
message CreateAuthMethodResponse {
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
resources.authmethods.v1.AuthMethod item = 2;
|
||||
}
|
||||
|
||||
message UpdateAuthMethodRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
resources.authmethods.v1.AuthMethod item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
@@ -149,7 +148,7 @@ message UpdateAuthMethodResponse {
|
||||
}
|
||||
|
||||
message DeleteAuthMethodRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message DeleteAuthMethodResponse {}
|
||||
@@ -157,23 +156,26 @@ message DeleteAuthMethodResponse {}
|
||||
// Attributes specific to changing the state of an oidc auth method.
|
||||
message OidcChangeStateAttributes {
|
||||
// state must be `inactive`, `active-private`, or `active-public`
|
||||
string state = 1; // @gotags: `class:"public"`
|
||||
string state = 1; // @gotags: `class:"public"`
|
||||
// This flag is only useful for an oidc auth method. It should not be used
|
||||
// unless the oidc provider's config is incorrectly set and is stopping the
|
||||
// activation of this auth method.
|
||||
bool disable_discovered_config_validation = 2 [json_name = "disable_discovered_config_validation"]; // @gotags: `class:"public"`
|
||||
bool disable_discovered_config_validation = 2 [json_name = "disable_discovered_config_validation"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ChangeStateRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
// 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; // @gotags: `class:"public"`
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
|
||||
oneof attrs {
|
||||
// The attributes specific to this auth method's state.
|
||||
google.protobuf.Struct attributes = 4 [(custom_options.v1.subtype) = "default"];
|
||||
OidcChangeStateAttributes oidc_change_state_attributes = 5 [(custom_options.v1.subtype) = "oidc", (google.api.field_visibility).restriction = "INTERNAL"];
|
||||
OidcChangeStateAttributes oidc_change_state_attributes = 5 [
|
||||
(custom_options.v1.subtype) = "oidc",
|
||||
(google.api.field_visibility).restriction = "INTERNAL"
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,8 +186,8 @@ message ChangeStateResponse {
|
||||
// The layout of the struct for "attributes" field in AuthenticateRequest for a password type. This message isn't directly referenced anywhere but is used here to define the expected field names and
|
||||
// types.
|
||||
message PasswordLoginAttributes {
|
||||
string login_name = 1 [json_name = "login_name"]; // @gotags: `class:"sensitive"`
|
||||
string password = 2; // @gotags: `class:"secret"`
|
||||
string login_name = 1 [json_name = "login_name"]; // @gotags: `class:"sensitive"`
|
||||
string password = 2; // @gotags: `class:"secret"`
|
||||
}
|
||||
|
||||
// The layout of the struct for "attributes" field in AuthenticateRequest for a oidc type's start command. This message isn't directly referenced anywhere but is used here to define the expected field
|
||||
@@ -194,18 +196,21 @@ message OidcStartAttributes {
|
||||
// An object which will be marshaled as JSON and roundtripped in the token command call.
|
||||
google.protobuf.Struct roundtrip_payload = 1 [json_name = "roundtrip_payload"];
|
||||
// Cached marshaled payload. This is not ingressed from the client; anything found will be thrown out.
|
||||
string cached_roundtrip_payload = 2; // @gotags: `class:"sensitive"`
|
||||
string cached_roundtrip_payload = 2; // @gotags: `class:"sensitive"`
|
||||
}
|
||||
|
||||
message AuthenticateRequest {
|
||||
// The ID of the Auth Method in the system that should be used for authentication.
|
||||
string auth_method_id = 1 [json_name = "auth_method_id"]; // @gotags: `class:"public"`
|
||||
string auth_method_id = 1 [json_name = "auth_method_id"]; // @gotags: `class:"public"`
|
||||
// This can be "cookie" or "token". If not provided, "token" will be used. "cookie" activates a split-cookie method where the token is split partially between http-only and regular cookies in order
|
||||
// to keep it safe from rogue JS in the browser. Deprecated, use "type" instead.
|
||||
string token_type = 2 [json_name = "token_type", deprecated = true]; // @gotags: `class:"public"`
|
||||
string token_type = 2 [
|
||||
json_name = "token_type",
|
||||
deprecated = true
|
||||
]; // @gotags: `class:"public"`
|
||||
// This can be "cookie" or "token". If not provided, "token" will be used. "cookie" activates a split-cookie method where the token is split partially between http-only and regular cookies in order
|
||||
// to keep it safe from rogue JS in the browser.
|
||||
string type = 6 [json_name = "type"]; // @gotags: `class:"public"`
|
||||
string type = 6 [json_name = "type"]; // @gotags: `class:"public"`
|
||||
oneof attrs {
|
||||
// Attributes are passed to the Auth Method; the valid keys and values depend on the type of Auth Method as well as the command.
|
||||
google.protobuf.Struct attributes = 4;
|
||||
@@ -217,7 +222,7 @@ message AuthenticateRequest {
|
||||
controller.api.resources.authmethods.v1.OidcAuthMethodAuthenticateTokenRequest oidc_auth_method_authenticate_token_request = 10 [(google.api.field_visibility).restriction = "INTERNAL"];
|
||||
}
|
||||
// The command to perform.
|
||||
string command = 5 [json_name = "command"]; // @gotags: `class:"public"`
|
||||
string command = 5 [json_name = "command"]; // @gotags: `class:"public"`
|
||||
|
||||
// Deprecated fields
|
||||
reserved "credentials";
|
||||
@@ -225,10 +230,10 @@ message AuthenticateRequest {
|
||||
}
|
||||
|
||||
message AuthenticateResponse {
|
||||
reserved 1, 2; // Old item and token_type
|
||||
reserved 1, 2; // Old item and token_type
|
||||
reserved "item", "token_type";
|
||||
// The type of the token returned. Either "cookie" or "token".
|
||||
string type = 3; // @gotags: `class:"public"`
|
||||
string type = 3; // @gotags: `class:"public"`
|
||||
oneof attrs {
|
||||
// Valid keys and values depend on the type of Auth Method as well as the command.
|
||||
google.protobuf.Struct attributes = 4 [json_name = "attributes"];
|
||||
@@ -240,5 +245,5 @@ message AuthenticateResponse {
|
||||
controller.api.resources.authtokens.v1.AuthToken auth_token_response = 9 [(google.api.field_visibility).restriction = "INTERNAL"];
|
||||
}
|
||||
// The command that was performed.
|
||||
string command = 5 [json_name = "command"]; // @gotags: `class:"public"`
|
||||
string command = 5 [json_name = "command"]; // @gotags: `class:"public"`
|
||||
}
|
||||
@@ -2,17 +2,16 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
import "controller/api/resources/authtokens/v1/authtoken.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "controller/api/resources/authtokens/v1/authtoken.proto";
|
||||
|
||||
service AuthTokenService {
|
||||
|
||||
// GetAuthToken returns a stored Auth Token if present. The provided request
|
||||
// must include the Auth Token id and if it is missing, malformed or
|
||||
// referencing a non existing resource an error is returned.
|
||||
// referencing a non existing resource an error is returned.
|
||||
rpc GetAuthToken(GetAuthTokenRequest) returns (GetAuthTokenResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/auth-tokens/{id}"
|
||||
@@ -49,7 +48,7 @@ service AuthTokenService {
|
||||
}
|
||||
|
||||
message GetAuthTokenRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message GetAuthTokenResponse {
|
||||
@@ -57,9 +56,9 @@ message GetAuthTokenResponse {
|
||||
}
|
||||
|
||||
message ListAuthTokensRequest {
|
||||
string scope_id = 1 [json_name="scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name="recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"public"`
|
||||
string scope_id = 1 [json_name = "scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name = "recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListAuthTokensResponse {
|
||||
@@ -67,7 +66,7 @@ message ListAuthTokensResponse {
|
||||
}
|
||||
|
||||
message DeleteAuthTokenRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message DeleteAuthTokenResponse {}
|
||||
@@ -2,14 +2,13 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/credentiallibraries/v1/credential_library.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (custom_options.v1.domain) = "credential";
|
||||
|
||||
service CredentialLibraryService {
|
||||
|
||||
@@ -2,14 +2,13 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/credentialstores/v1/credential_store.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (custom_options.v1.domain) = "credential";
|
||||
|
||||
service CredentialStoreService {
|
||||
|
||||
@@ -2,15 +2,14 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "controller/api/resources/groups/v1/group.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/groups/v1/group.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
service GroupService {
|
||||
|
||||
// GetGroup returns a stored Group if present. The provided request must
|
||||
// include the Group id and if it is missing, malformed or referencing a
|
||||
// non existing resource an error is returned.
|
||||
@@ -139,9 +138,9 @@ message GetGroupResponse {
|
||||
}
|
||||
|
||||
message ListGroupsRequest {
|
||||
string scope_id = 1 [json_name="scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name="recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"public"`
|
||||
string scope_id = 1 [json_name = "scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name = "recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListGroupsResponse {
|
||||
@@ -160,7 +159,7 @@ message CreateGroupResponse {
|
||||
message UpdateGroupRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
resources.groups.v1.Group item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
|
||||
message UpdateGroupResponse {
|
||||
@@ -178,7 +177,7 @@ message AddGroupMembersRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string member_ids = 3 [json_name="member_ids"]; // @gotags: `class:"public"`
|
||||
repeated string member_ids = 3 [json_name = "member_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AddGroupMembersResponse {
|
||||
@@ -190,7 +189,7 @@ message SetGroupMembersRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string member_ids = 3 [json_name="member_ids"]; // @gotags: `class:"public"`
|
||||
repeated string member_ids = 3 [json_name = "member_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message SetGroupMembersResponse {
|
||||
@@ -202,7 +201,7 @@ message RemoveGroupMembersRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string member_ids = 3 [json_name="member_ids"]; // @gotags: `class:"public"`
|
||||
repeated string member_ids = 3 [json_name = "member_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message RemoveGroupMembersResponse {
|
||||
|
||||
@@ -2,18 +2,16 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/hostcatalogs/v1/host_catalog.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (custom_options.v1.domain) = "host";
|
||||
|
||||
service HostCatalogService {
|
||||
|
||||
// GetHostCatalog returns a stored Host Catalog if present. The provided
|
||||
// request must include the Catalog IDs for the Host Catalog being retrieved.
|
||||
// If missing, malformed, or referencing a non-existing resource an error is
|
||||
@@ -87,7 +85,7 @@ service HostCatalogService {
|
||||
}
|
||||
|
||||
message GetHostCatalogRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message GetHostCatalogResponse {
|
||||
@@ -95,9 +93,9 @@ message GetHostCatalogResponse {
|
||||
}
|
||||
|
||||
message ListHostCatalogsRequest {
|
||||
string scope_id = 1 [json_name="scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name="recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"public"`
|
||||
string scope_id = 1 [json_name = "scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name = "recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListHostCatalogsResponse {
|
||||
@@ -108,16 +106,16 @@ message CreateHostCatalogRequest {
|
||||
api.resources.hostcatalogs.v1.HostCatalog item = 1;
|
||||
// As an alternative to providing the plugin id in the provided HostCatalog,
|
||||
// this field can be used to lookup the plugin using its name.
|
||||
string plugin_name = 2 [json_name="plugin_name"]; // @gotags: `class:"public"`
|
||||
string plugin_name = 2 [json_name = "plugin_name"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message CreateHostCatalogResponse {
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
api.resources.hostcatalogs.v1.HostCatalog item = 2;
|
||||
}
|
||||
|
||||
message UpdateHostCatalogRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
api.resources.hostcatalogs.v1.HostCatalog item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
}
|
||||
@@ -127,7 +125,7 @@ message UpdateHostCatalogResponse {
|
||||
}
|
||||
|
||||
message DeleteHostCatalogRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message DeleteHostCatalogResponse {}
|
||||
@@ -2,21 +2,20 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/hosts/v1/host.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (custom_options.v1.domain) = "host";
|
||||
|
||||
service HostService {
|
||||
// GetHost returns a stored Host if present. The provided request
|
||||
// must include the host ID for the resource being retrieved. If the ID is
|
||||
// missing, malformed or referencing anon existing resource an error is
|
||||
// returned.
|
||||
// returned.
|
||||
rpc GetHost(GetHostRequest) returns (GetHostResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/hosts/{id}"
|
||||
@@ -88,7 +87,7 @@ service HostService {
|
||||
}
|
||||
|
||||
message GetHostRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message GetHostResponse {
|
||||
@@ -96,8 +95,8 @@ message GetHostResponse {
|
||||
}
|
||||
|
||||
message ListHostsRequest {
|
||||
string host_catalog_id = 1 [json_name="host_catalog_id"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"public"`
|
||||
string host_catalog_id = 1 [json_name = "host_catalog_id"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListHostsResponse {
|
||||
@@ -109,14 +108,14 @@ message CreateHostRequest {
|
||||
}
|
||||
|
||||
message CreateHostResponse {
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
api.resources.hosts.v1.Host item = 2;
|
||||
}
|
||||
|
||||
message UpdateHostRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
api.resources.hosts.v1.Host item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
|
||||
message UpdateHostResponse {
|
||||
@@ -124,7 +123,7 @@ message UpdateHostResponse {
|
||||
}
|
||||
|
||||
message DeleteHostRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message DeleteHostResponse {}
|
||||
@@ -2,14 +2,13 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/hostsets/v1/host_set.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (custom_options.v1.domain) = "host";
|
||||
|
||||
service HostSetService {
|
||||
@@ -138,7 +137,7 @@ service HostSetService {
|
||||
}
|
||||
|
||||
message GetHostSetRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message GetHostSetResponse {
|
||||
@@ -146,8 +145,8 @@ message GetHostSetResponse {
|
||||
}
|
||||
|
||||
message ListHostSetsRequest {
|
||||
string host_catalog_id = 1 [json_name="host_catalog_id"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"public"`
|
||||
string host_catalog_id = 1 [json_name = "host_catalog_id"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListHostSetsResponse {
|
||||
@@ -159,14 +158,14 @@ message CreateHostSetRequest {
|
||||
}
|
||||
|
||||
message CreateHostSetResponse {
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
string uri = 1; // @gotags: `class:"public"`
|
||||
api.resources.hostsets.v1.HostSet item = 2;
|
||||
}
|
||||
|
||||
message UpdateHostSetRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
api.resources.hostsets.v1.HostSet item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
|
||||
message UpdateHostSetResponse {
|
||||
@@ -174,19 +173,19 @@ message UpdateHostSetResponse {
|
||||
}
|
||||
|
||||
message DeleteHostSetRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message DeleteHostSetResponse {}
|
||||
|
||||
message AddHostSetHostsRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
// 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; // @gotags: `class:"public"`
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
|
||||
// A list of Host IDs which will be added to this Host Set. Each Host referenced here must be a child of the same Host Catalog of which this Host Set is a child.
|
||||
repeated string host_ids = 3 [json_name="host_ids"]; // @gotags: `class:"public"`
|
||||
repeated string host_ids = 3 [json_name = "host_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AddHostSetHostsResponse {
|
||||
@@ -194,13 +193,13 @@ message AddHostSetHostsResponse {
|
||||
}
|
||||
|
||||
message SetHostSetHostsRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
// 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; // @gotags: `class:"public"`
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
|
||||
// A list of Host IDs which will be set on this Host Set. Each Host referenced here must be a child of the same Host Catalog of which this Host Set is a child.
|
||||
repeated string host_ids = 3 [json_name="host_ids"]; // @gotags: `class:"public"`
|
||||
repeated string host_ids = 3 [json_name = "host_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message SetHostSetHostsResponse {
|
||||
@@ -208,13 +207,13 @@ message SetHostSetHostsResponse {
|
||||
}
|
||||
|
||||
message RemoveHostSetHostsRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
// 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; // @gotags: `class:"public"`
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
|
||||
// A list of Host IDs which will be removed from this Host Set.
|
||||
repeated string host_ids = 3 [json_name="host_ids"]; // @gotags: `class:"public"`
|
||||
repeated string host_ids = 3 [json_name = "host_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message RemoveHostSetHostsResponse {
|
||||
|
||||
@@ -2,25 +2,23 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/managedgroups/v1/managed_group.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (custom_options.v1.domain) = "auth";
|
||||
|
||||
service ManagedGroupService {
|
||||
|
||||
// GetManagedGroup returns a stored ManagedGroup if present. The provided request must
|
||||
// include the id for the ManagedGroup be retrieved. If missing, malformed or
|
||||
// referencing a non existing ManagedGroup an error is returned.
|
||||
rpc GetManagedGroup(GetManagedGroupRequest) returns (GetManagedGroupResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/managed-groups/{id}"
|
||||
response_body: "item"
|
||||
get: "/v1/managed-groups/{id}"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Gets a single ManagedGroup."
|
||||
@@ -34,7 +32,7 @@ service ManagedGroupService {
|
||||
rpc ListManagedGroups(ListManagedGroupsRequest) returns (ListManagedGroupsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/managed-groups"
|
||||
};
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Lists all ManagedGroups in a specific Auth Method."
|
||||
};
|
||||
@@ -97,8 +95,8 @@ message GetManagedGroupResponse {
|
||||
}
|
||||
|
||||
message ListManagedGroupsRequest {
|
||||
string auth_method_id = 1 [json_name="auth_method_id"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"public"`
|
||||
string auth_method_id = 1 [json_name = "auth_method_id"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListManagedGroupsResponse {
|
||||
@@ -117,7 +115,7 @@ message CreateManagedGroupResponse {
|
||||
message UpdateManagedGroupRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
resources.managedgroups.v1.ManagedGroup item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
|
||||
message UpdateManagedGroupResponse {
|
||||
|
||||
@@ -2,15 +2,14 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "controller/api/resources/roles/v1/role.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/roles/v1/role.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
service RoleService {
|
||||
|
||||
// GetRole returns a stored Role if present. The provided request must include
|
||||
// the Role ID for the Role being retrieved. If the ID is missing, malformed
|
||||
// or reference a non-existing resource an error is returned.
|
||||
@@ -176,7 +175,6 @@ service RoleService {
|
||||
summary: "Removes grants from a Role."
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
message GetRoleRequest {
|
||||
@@ -188,9 +186,9 @@ message GetRoleResponse {
|
||||
}
|
||||
|
||||
message ListRolesRequest {
|
||||
string scope_id = 1 [json_name="scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name="recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"public"`
|
||||
string scope_id = 1 [json_name = "scope_id"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name = "recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListRolesResponse {
|
||||
@@ -209,7 +207,7 @@ message CreateRoleResponse {
|
||||
message UpdateRoleRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
resources.roles.v1.Role item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
|
||||
message UpdateRoleResponse {
|
||||
@@ -227,7 +225,7 @@ message AddRolePrincipalsRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string principal_ids = 3 [json_name="principal_ids"]; // @gotags: `class:"public"`
|
||||
repeated string principal_ids = 3 [json_name = "principal_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AddRolePrincipalsResponse {
|
||||
@@ -239,7 +237,7 @@ message SetRolePrincipalsRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string principal_ids = 3 [json_name="principal_ids"]; // @gotags: `class:"public"`
|
||||
repeated string principal_ids = 3 [json_name = "principal_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message SetRolePrincipalsResponse {
|
||||
@@ -251,7 +249,7 @@ message RemoveRolePrincipalsRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string principal_ids = 3 [json_name="principal_ids"]; // @gotags: `class:"public"`
|
||||
repeated string principal_ids = 3 [json_name = "principal_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message RemoveRolePrincipalsResponse {
|
||||
@@ -263,7 +261,7 @@ message AddRoleGrantsRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string grant_strings = 3 [json_name="grant_strings"]; // @gotags: `class:"public"`
|
||||
repeated string grant_strings = 3 [json_name = "grant_strings"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AddRoleGrantsResponse {
|
||||
@@ -275,7 +273,7 @@ message SetRoleGrantsRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string grant_strings = 3 [json_name="grant_strings"]; // @gotags: `class:"public"`
|
||||
repeated string grant_strings = 3 [json_name = "grant_strings"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message SetRoleGrantsResponse {
|
||||
@@ -287,7 +285,7 @@ message RemoveRoleGrantsRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string grant_strings = 3 [json_name="grant_strings"]; // @gotags: `class:"public"`
|
||||
repeated string grant_strings = 3 [json_name = "grant_strings"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message RemoveRoleGrantsResponse {
|
||||
|
||||
@@ -2,13 +2,12 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "controller/api/resources/scopes/v1/scope.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/scopes/v1/scope.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "Boundary Controller HTTP API"
|
||||
@@ -100,8 +99,8 @@ message GetScopeResponse {
|
||||
|
||||
message ListScopesRequest {
|
||||
string scope_id = 1;
|
||||
bool recursive = 20 [json_name="recursive"];
|
||||
string filter = 30 [json_name="filter"];
|
||||
bool recursive = 20 [json_name = "recursive"];
|
||||
string filter = 30 [json_name = "filter"];
|
||||
}
|
||||
|
||||
message ListScopesResponse {
|
||||
@@ -122,7 +121,7 @@ message CreateScopeResponse {
|
||||
message UpdateScopeRequest {
|
||||
string id = 1;
|
||||
resources.scopes.v1.Scope item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
|
||||
message UpdateScopeResponse {
|
||||
|
||||
@@ -2,78 +2,78 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
import "controller/api/resources/sessions/v1/session.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "controller/api/resources/sessions/v1/session.proto";
|
||||
|
||||
service SessionService {
|
||||
// GetSession returns a stored Session if present. The provided request
|
||||
// must include the Session ID for the Session being retrieved. If
|
||||
// any that ID is missing, malformed or reference a non existing
|
||||
// resource an error is returned.
|
||||
rpc GetSession(GetSessionRequest) returns (GetSessionResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/sessions/{id}"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Gets a single Session."
|
||||
};
|
||||
}
|
||||
// GetSession returns a stored Session if present. The provided request
|
||||
// must include the Session ID for the Session being retrieved. If
|
||||
// any that ID is missing, malformed or reference a non existing
|
||||
// resource an error is returned.
|
||||
rpc GetSession(GetSessionRequest) returns (GetSessionResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/sessions/{id}"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Gets a single Session."
|
||||
};
|
||||
}
|
||||
|
||||
// ListSessions returns a list of stored Sessions which exist inside the scope
|
||||
// referenced inside the request. The request must include the scope ID for
|
||||
// the Sessions being retrieved. If the scope ID is missing, malformed, or
|
||||
// reference a non existing scope, an error is returned.
|
||||
rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/sessions"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Lists all Sessions."
|
||||
};
|
||||
}
|
||||
// ListSessions returns a list of stored Sessions which exist inside the scope
|
||||
// referenced inside the request. The request must include the scope ID for
|
||||
// the Sessions being retrieved. If the scope ID is missing, malformed, or
|
||||
// reference a non existing scope, an error is returned.
|
||||
rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/sessions"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Lists all Sessions."
|
||||
};
|
||||
}
|
||||
|
||||
// CancelSession cancels an existing Session in boundary. An error
|
||||
// is returned if the request attempts to cancel a Session that does
|
||||
// not exist.
|
||||
rpc CancelSession(CancelSessionRequest) returns (CancelSessionResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/sessions/{id}:cancel"
|
||||
body: "*"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Cancels a Session."
|
||||
};
|
||||
}
|
||||
// CancelSession cancels an existing Session in boundary. An error
|
||||
// is returned if the request attempts to cancel a Session that does
|
||||
// not exist.
|
||||
rpc CancelSession(CancelSessionRequest) returns (CancelSessionResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/sessions/{id}:cancel"
|
||||
body: "*"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Cancels a Session."
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message GetSessionRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message GetSessionResponse {
|
||||
resources.sessions.v1.Session item = 1;
|
||||
resources.sessions.v1.Session item = 1;
|
||||
}
|
||||
|
||||
message ListSessionsRequest {
|
||||
string scope_id = 1; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name="recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"public"`
|
||||
string scope_id = 1; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name = "recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListSessionsResponse {
|
||||
repeated resources.sessions.v1.Session items = 1;
|
||||
repeated resources.sessions.v1.Session items = 1;
|
||||
}
|
||||
|
||||
message CancelSessionRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message CancelSessionResponse {
|
||||
resources.sessions.v1.Session item = 1;
|
||||
resources.sessions.v1.Session item = 1;
|
||||
}
|
||||
@@ -2,18 +2,16 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/targets/v1/target.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
option (custom_options.v1.domain) = "target";
|
||||
|
||||
service TargetService {
|
||||
|
||||
// GetTarget returns a stored Target if present. The provided request
|
||||
// must include the Target ID for the Target being retrieved. If
|
||||
// that ID is missing, malformed or reference a non existing
|
||||
@@ -205,7 +203,6 @@ service TargetService {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// AddTargetCredentialLibraries adds Credential Libraries to this Target.
|
||||
// The provided request must include the Target ID to which the Credential
|
||||
// Libraries will be added. All Credential Libraries added to the provided
|
||||
@@ -328,8 +325,8 @@ message GetTargetResponse {
|
||||
|
||||
message ListTargetsRequest {
|
||||
string scope_id = 1; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name="recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name = "recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message ListTargetsResponse {
|
||||
@@ -348,7 +345,7 @@ message CreateTargetResponse {
|
||||
message UpdateTargetRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
resources.targets.v1.Target item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
|
||||
message UpdateTargetResponse {
|
||||
@@ -366,7 +363,7 @@ message AddTargetHostSetsRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string host_set_ids = 3 [json_name="host_set_ids"]; // @gotags: `class:"public"`
|
||||
repeated string host_set_ids = 3 [json_name = "host_set_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AddTargetHostSetsResponse {
|
||||
@@ -378,7 +375,7 @@ message SetTargetHostSetsRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string host_set_ids = 3 [json_name="host_set_ids"]; // @gotags: `class:"public"`
|
||||
repeated string host_set_ids = 3 [json_name = "host_set_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message SetTargetHostSetsResponse {
|
||||
@@ -390,7 +387,7 @@ message RemoveTargetHostSetsRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string host_set_ids = 3 [json_name="host_set_ids"]; // @gotags: `class:"public"`
|
||||
repeated string host_set_ids = 3 [json_name = "host_set_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message RemoveTargetHostSetsResponse {
|
||||
@@ -402,7 +399,7 @@ message AddTargetHostSourcesRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string host_source_ids = 3 [json_name="host_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string host_source_ids = 3 [json_name = "host_source_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AddTargetHostSourcesResponse {
|
||||
@@ -414,7 +411,7 @@ message SetTargetHostSourcesRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string host_source_ids = 3 [json_name="host_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string host_source_ids = 3 [json_name = "host_source_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message SetTargetHostSourcesResponse {
|
||||
@@ -426,7 +423,7 @@ message RemoveTargetHostSourcesRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string host_source_ids = 3 [json_name="host_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string host_source_ids = 3 [json_name = "host_source_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message RemoveTargetHostSourcesResponse {
|
||||
@@ -438,7 +435,7 @@ message AddTargetCredentialLibrariesRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string application_credential_library_ids = 3 [json_name="application_credential_library_ids"]; // @gotags: `class:"public"`
|
||||
repeated string application_credential_library_ids = 3 [json_name = "application_credential_library_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AddTargetCredentialLibrariesResponse {
|
||||
@@ -453,7 +450,7 @@ message SetTargetCredentialLibrariesRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string application_credential_library_ids = 3 [json_name="application_credential_library_ids"]; // @gotags: `class:"public"`
|
||||
repeated string application_credential_library_ids = 3 [json_name = "application_credential_library_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message SetTargetCredentialLibrariesResponse {
|
||||
@@ -465,7 +462,7 @@ message RemoveTargetCredentialLibrariesRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string application_credential_library_ids = 3 [json_name="application_credential_library_ids"]; // @gotags: `class:"public"`
|
||||
repeated string application_credential_library_ids = 3 [json_name = "application_credential_library_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message RemoveTargetCredentialLibrariesResponse {
|
||||
@@ -477,8 +474,8 @@ message AddTargetCredentialSourcesRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string application_credential_source_ids = 3 [json_name="application_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string egress_credential_source_ids = 4 [json_name="egress_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string application_credential_source_ids = 3 [json_name = "application_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string egress_credential_source_ids = 4 [json_name = "egress_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AddTargetCredentialSourcesResponse {
|
||||
@@ -492,8 +489,8 @@ message SetTargetCredentialSourcesRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string application_credential_source_ids = 3 [json_name="application_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string egress_credential_source_ids = 4 [json_name="egress_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string application_credential_source_ids = 3 [json_name = "application_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string egress_credential_source_ids = 4 [json_name = "egress_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message SetTargetCredentialSourcesResponse {
|
||||
@@ -505,8 +502,8 @@ message RemoveTargetCredentialSourcesRequest {
|
||||
// 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; // @gotags: `class:"public"`
|
||||
repeated string application_credential_source_ids = 3 [json_name="application_credential_source_id"]; // @gotags: `class:"public"`
|
||||
repeated string egress_credential_source_ids = 4 [json_name="egress_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
repeated string application_credential_source_ids = 3 [json_name = "application_credential_source_id"]; // @gotags: `class:"public"`
|
||||
repeated string egress_credential_source_ids = 4 [json_name = "egress_credential_source_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message RemoveTargetCredentialSourcesResponse {
|
||||
@@ -527,7 +524,7 @@ message AuthorizeSessionRequest {
|
||||
string scope_name = 5; // @gotags: `class:"public"`
|
||||
|
||||
// An optional parameter allowing specification of the particular Host within the Target's configured Host Sets to connect to during this Session.
|
||||
string host_id = 2 [json_name="host_id"]; // @gotags: `class:"public"`
|
||||
string host_id = 2 [json_name = "host_id"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AuthorizeSessionResponse {
|
||||
|
||||
@@ -2,15 +2,14 @@ syntax = "proto3";
|
||||
|
||||
package controller.api.services.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "controller/api/resources/users/v1/user.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resources/users/v1/user.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
||||
|
||||
service UserService {
|
||||
|
||||
// GetUser returns a stored User if present. The provided request
|
||||
// must include the User ID for the User being retrieved. If
|
||||
// that ID is missing, malformed or reference a non existing
|
||||
@@ -145,8 +144,8 @@ message GetUserResponse {
|
||||
|
||||
message ListUsersRequest {
|
||||
string scope_id = 1; // @gotags: `class:"public"`
|
||||
bool recursive = 20 [json_name="recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name="filter"]; // @gotags: `class:"sensitive"`
|
||||
bool recursive = 20 [json_name = "recursive"]; // @gotags: `class:"public"`
|
||||
string filter = 30 [json_name = "filter"]; // @gotags: `class:"sensitive"`
|
||||
}
|
||||
|
||||
message ListUsersResponse {
|
||||
@@ -165,7 +164,7 @@ message CreateUserResponse {
|
||||
message UpdateUserRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
resources.users.v1.User item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
|
||||
message UpdateUserResponse {
|
||||
@@ -182,7 +181,7 @@ message AddUserAccountsRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
// The version ensures the User hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
repeated string account_ids = 3 [json_name="account_ids"]; // @gotags: `class:"public"`
|
||||
repeated string account_ids = 3 [json_name = "account_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message AddUserAccountsResponse {
|
||||
@@ -193,7 +192,7 @@ message SetUserAccountsRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
// The version ensures the User hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
repeated string account_ids = 3 [json_name="account_ids"]; // @gotags: `class:"public"`
|
||||
repeated string account_ids = 3 [json_name = "account_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message SetUserAccountsResponse {
|
||||
@@ -204,7 +203,7 @@ message RemoveUserAccountsRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
// The version ensures the User hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
repeated string account_ids = 3 [json_name="account_ids"]; // @gotags: `class:"public"`
|
||||
repeated string account_ids = 3 [json_name = "account_ids"]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
message RemoveUserAccountsResponse {
|
||||
|
||||
Reference in new issue
Block a user