A specific installation of a tool on a platform, identified by an
immutable deployment_id assigned by the platform.
Summary
Types
@type t() :: %Ltix.Deployment{deployment_id: String.t()}
Functions
@spec new(String.t() | nil) :: {:ok, t()} | {:error, Exception.t()}
Create a new deployment with validation.
Validation rules
deployment_id- non-empty stringdeployment_id- 255 ASCII characters maxdeployment_id- ASCII characters only
Examples
iex> Ltix.Deployment.new("deploy-001")
{:ok, %Ltix.Deployment{deployment_id: "deploy-001"}}
Ltix.Deployment.new("")
#=> {:error, %Ltix.Errors.Invalid.InvalidField{field: :deployment_id, value: ""}}
Same as new/1, but returns the deployment or raises the error.
Examples
iex> Ltix.Deployment.new!("deploy-001")
%Ltix.Deployment{deployment_id: "deploy-001"}