Use AuthorizationGroup struct instead of string

This commit is contained in:
Alexandre de Souza 2025-04-07 10:16:00 -03:00
parent 32271eab0e
commit 2f51f74d0a
No known key found for this signature in database
GPG key ID: E39228FFBA346545
5 changed files with 32 additions and 9 deletions

View file

@ -1,5 +1,5 @@
defmodule LivebookProto.AppDeployment do
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3
field :id, 1, type: :string
field :title, 2, type: :string
@ -12,5 +12,9 @@ defmodule LivebookProto.AppDeployment do
field :multi_session, 9, type: :bool, json_name: "multiSession"
field :access_type, 10, type: :string, json_name: "accessType"
field :version, 11, type: :string
field :authorization_groups, 12, repeated: true, type: :string, json_name: "authorizationGroups"
field :authorization_groups, 12,
repeated: true,
type: LivebookProto.AuthorizationGroup,
json_name: "authorizationGroups"
end

View file

@ -0,0 +1,6 @@
defmodule LivebookProto.AuthorizationGroup do
use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3
field :oidc_provider_id, 1, type: :string, json_name: "oidcProviderId"
field :group_name, 2, type: :string, json_name: "groupName"
end

View file

@ -1,5 +1,5 @@
defmodule LivebookProto.DeploymentGroup do
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3
field :id, 1, type: :string
field :name, 2, type: :string
@ -17,5 +17,9 @@ defmodule LivebookProto.DeploymentGroup do
json_name: "environmentVariables"
field :teams_auth, 11, type: :bool, json_name: "teamsAuth"
field :authorization_groups, 12, repeated: true, type: :string, json_name: "authorizationGroups"
field :authorization_groups, 12,
repeated: true,
type: LivebookProto.AuthorizationGroup,
json_name: "authorizationGroups"
end

View file

@ -1,5 +1,5 @@
defmodule LivebookProto.DeploymentGroupUpdated do
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3
field :id, 1, type: :string
field :name, 2, type: :string
@ -16,5 +16,9 @@ defmodule LivebookProto.DeploymentGroupUpdated do
json_name: "environmentVariables"
field :teams_auth, 10, type: :bool, json_name: "teamsAuth"
field :authorization_groups, 11, repeated: true, type: :string, json_name: "authorizationGroups"
field :authorization_groups, 11,
repeated: true,
type: LivebookProto.AuthorizationGroup,
json_name: "authorizationGroups"
end

View file

@ -66,7 +66,7 @@ message DeploymentGroup {
string url = 9;
repeated EnvironmentVariable environment_variables = 10;
bool teams_auth = 11;
repeated string authorization_groups = 12;
repeated AuthorizationGroup authorization_groups = 12;
}
message DeploymentGroupCreated {
@ -92,7 +92,7 @@ message DeploymentGroupUpdated {
string url = 8;
repeated EnvironmentVariable environment_variables = 9;
bool teams_auth = 10;
repeated string authorization_groups = 11;
repeated AuthorizationGroup authorization_groups = 11;
}
message DeploymentGroupDeleted {
@ -139,7 +139,7 @@ message AppDeployment {
bool multi_session = 9;
string access_type = 10;
string version = 11;
repeated string authorization_groups = 12;
repeated AuthorizationGroup authorization_groups = 12;
}
message AppDeploymentStarted {
@ -206,6 +206,11 @@ message EnvironmentVariable {
string value = 2;
}
message AuthorizationGroup {
string oidc_provider_id = 1;
string group_name = 2;
}
message Event {
oneof type {
SecretCreated secret_created = 1;