Ltix.Deployment (Ltix v0.1.0)

Copy Markdown View Source

A specific installation of a tool on a platform, identified by an immutable deployment_id assigned by the platform.

Summary

Functions

Create a new deployment with validation.

Types

t()

@type t() :: %Ltix.Deployment{deployment_id: String.t()}

Functions

new(deployment_id)

@spec new(String.t() | nil) :: {:ok, t()} | {:error, Exception.t()}

Create a new deployment with validation.

Validation rules

  • deployment_id — non-empty string
  • deployment_id — 255 ASCII characters max
  • deployment_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.MissingClaim{claim: "deployment_id"}}