-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Host deregistration commands * Host deregistration events * Fixing module attributes in host deregistration commands
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
defmodule Trento.Domain.Host.Commands.DeregisterHost do | ||
@moduledoc """ | ||
Deregister a host | ||
""" | ||
@required_fields :all | ||
|
||
use Trento.Command | ||
|
||
defcommand do | ||
field :host_id, Ecto.UUID | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
lib/trento/domain/host/commands/request_host_deregistration.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
defmodule Trento.Domain.Host.Commands.RequestHostDeregistration do | ||
@moduledoc """ | ||
Request a deregistration of a host | ||
""" | ||
@required_fields :all | ||
|
||
use Trento.Command | ||
|
||
defcommand do | ||
field :host_id, Ecto.UUID | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
defmodule Trento.Domain.Host.Events.HostDeregistered do | ||
@moduledoc """ | ||
This event is emitted when a deregistration (decomission) of a host is completed. | ||
""" | ||
|
||
use Trento.Event | ||
|
||
defevent do | ||
field :host_id, Ecto.UUID | ||
field :deregistered_at, :utc_datetime_usec | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
lib/trento/domain/host/events/host_deregistration_requested.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
defmodule Trento.Domain.Host.Events.HostDeregistrationRequested do | ||
@moduledoc """ | ||
This event is emitted when a deregistration (decomission) of a host is requested. | ||
""" | ||
|
||
use Trento.Event | ||
|
||
defevent do | ||
field :host_id, Ecto.UUID | ||
end | ||
end |