mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-09-20 10:05:57 +08:00
Add new FileSystem related messages to LivebookProto (#2172)
This commit is contained in:
parent
928181cefe
commit
c06712fa67
|
@ -3,9 +3,12 @@ defmodule LivebookProto do
|
|||
|
||||
alias LivebookProto.{
|
||||
Event,
|
||||
FileSystemCreated,
|
||||
FileSystemDeleted,
|
||||
FileSystemUpdated,
|
||||
SecretCreated,
|
||||
SecretUpdated,
|
||||
SecretDeleted,
|
||||
SecretUpdated,
|
||||
UserSynchronized
|
||||
}
|
||||
|
||||
|
@ -15,9 +18,12 @@ defmodule LivebookProto do
|
|||
end)
|
||||
|
||||
@type event_proto ::
|
||||
SecretCreated.t()
|
||||
| SecretUpdated.t()
|
||||
FileSystemCreated.t()
|
||||
| FileSystemDeleted.t()
|
||||
| FileSystemUpdated.t()
|
||||
| SecretCreated.t()
|
||||
| SecretDeleted.t()
|
||||
| SecretUpdated.t()
|
||||
| UserSynchronized.t()
|
||||
|
||||
@doc """
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
defmodule LivebookProto.Error do
|
||||
@moduledoc false
|
||||
use Protobuf, protoc_gen_elixir_version: "0.11.0", syntax: :proto3
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :details, 1, type: :string
|
||||
end
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
defmodule LivebookProto.Event do
|
||||
@moduledoc false
|
||||
use Protobuf, protoc_gen_elixir_version: "0.11.0", syntax: :proto3
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
oneof :type, 0
|
||||
|
||||
|
@ -23,4 +22,19 @@ defmodule LivebookProto.Event do
|
|||
type: LivebookProto.UserConnected,
|
||||
json_name: "userConnected",
|
||||
oneof: 0
|
||||
|
||||
field :file_system_created, 5,
|
||||
type: LivebookProto.FileSystemCreated,
|
||||
json_name: "fileSystemCreated",
|
||||
oneof: 0
|
||||
|
||||
field :file_system_updated, 6,
|
||||
type: LivebookProto.FileSystemUpdated,
|
||||
json_name: "fileSystemUpdated",
|
||||
oneof: 0
|
||||
|
||||
field :file_system_deleted, 7,
|
||||
type: LivebookProto.FileSystemDeleted,
|
||||
json_name: "fileSystemDeleted",
|
||||
oneof: 0
|
||||
end
|
||||
|
|
8
proto/lib/livebook_proto/file_system.pb.ex
Normal file
8
proto/lib/livebook_proto/file_system.pb.ex
Normal file
|
@ -0,0 +1,8 @@
|
|||
defmodule LivebookProto.FileSystem do
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :id, 1, type: :string
|
||||
field :name, 2, type: :string
|
||||
field :type, 3, type: :string
|
||||
field :value, 4, type: :string
|
||||
end
|
8
proto/lib/livebook_proto/file_system_created.pb.ex
Normal file
8
proto/lib/livebook_proto/file_system_created.pb.ex
Normal file
|
@ -0,0 +1,8 @@
|
|||
defmodule LivebookProto.FileSystemCreated do
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :id, 1, type: :string
|
||||
field :name, 2, type: :string
|
||||
field :type, 3, type: :string
|
||||
field :value, 4, type: :string
|
||||
end
|
5
proto/lib/livebook_proto/file_system_deleted.pb.ex
Normal file
5
proto/lib/livebook_proto/file_system_deleted.pb.ex
Normal file
|
@ -0,0 +1,5 @@
|
|||
defmodule LivebookProto.FileSystemDeleted do
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :id, 1, type: :string
|
||||
end
|
8
proto/lib/livebook_proto/file_system_updated.pb.ex
Normal file
8
proto/lib/livebook_proto/file_system_updated.pb.ex
Normal file
|
@ -0,0 +1,8 @@
|
|||
defmodule LivebookProto.FileSystemUpdated do
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :id, 1, type: :string
|
||||
field :name, 2, type: :string
|
||||
field :type, 3, type: :string
|
||||
field :value, 4, type: :string
|
||||
end
|
|
@ -1,6 +1,5 @@
|
|||
defmodule LivebookProto.Secret do
|
||||
@moduledoc false
|
||||
use Protobuf, protoc_gen_elixir_version: "0.11.0", syntax: :proto3
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :name, 1, type: :string
|
||||
field :value, 2, type: :string
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
defmodule LivebookProto.SecretCreated do
|
||||
@moduledoc false
|
||||
use Protobuf, protoc_gen_elixir_version: "0.11.0", syntax: :proto3
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :name, 1, type: :string
|
||||
field :value, 2, type: :string
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
defmodule LivebookProto.SecretDeleted do
|
||||
@moduledoc false
|
||||
use Protobuf, protoc_gen_elixir_version: "0.11.0", syntax: :proto3
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :name, 1, type: :string
|
||||
end
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
defmodule LivebookProto.SecretUpdated do
|
||||
@moduledoc false
|
||||
use Protobuf, protoc_gen_elixir_version: "0.11.0", syntax: :proto3
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :name, 1, type: :string
|
||||
field :value, 2, type: :string
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
defmodule LivebookProto.UserConnected do
|
||||
@moduledoc false
|
||||
use Protobuf, protoc_gen_elixir_version: "0.11.0", syntax: :proto3
|
||||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
|
||||
|
||||
field :name, 1, type: :string
|
||||
field :secrets, 2, repeated: true, type: LivebookProto.Secret
|
||||
field :file_systems, 3, repeated: true, type: LivebookProto.FileSystem, json_name: "fileSystems"
|
||||
end
|
||||
|
|
|
@ -23,9 +23,35 @@ message SecretDeleted {
|
|||
string name = 1;
|
||||
}
|
||||
|
||||
message FileSystem {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string type = 3;
|
||||
string value = 4;
|
||||
}
|
||||
|
||||
message FileSystemCreated {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string type = 3;
|
||||
string value = 4;
|
||||
}
|
||||
|
||||
message FileSystemUpdated {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string type = 3;
|
||||
string value = 4;
|
||||
}
|
||||
|
||||
message FileSystemDeleted {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message UserConnected {
|
||||
string name = 1;
|
||||
repeated Secret secrets = 2;
|
||||
repeated FileSystem file_systems = 3;
|
||||
}
|
||||
|
||||
message Event {
|
||||
|
@ -34,5 +60,8 @@ message Event {
|
|||
SecretUpdated secret_updated = 2;
|
||||
SecretDeleted secret_deleted = 3;
|
||||
UserConnected user_connected = 4;
|
||||
FileSystemCreated file_system_created = 5;
|
||||
FileSystemUpdated file_system_updated = 6;
|
||||
FileSystemDeleted file_system_deleted = 7;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue