Class: Daytona::Secret
- Inherits:
-
Object
- Object
- Daytona::Secret
- Defined in:
- lib/daytona/secret.rb
Instance Attribute Summary collapse
- #created_at ⇒ String readonly
- #description ⇒ String? readonly
-
#hosts ⇒ Array<String>
readonly
Allowed hosts this secret may be sent to.
- #id ⇒ String readonly
- #name ⇒ String readonly
-
#placeholder ⇒ String
readonly
Opaque placeholder token injected as the env var value in Sandboxes.
- #updated_at ⇒ String readonly
Instance Method Summary collapse
-
#initialize(secret_dto) ⇒ Secret
constructor
Initialize secret from DTO.
Constructor Details
#initialize(secret_dto) ⇒ Secret
Initialize secret from DTO
The plaintext value is write-only and is never returned by the API, so it is not exposed here.
36 37 38 39 40 41 42 43 44 |
# File 'lib/daytona/secret.rb', line 36 def initialize(secret_dto) @id = secret_dto.id @name = secret_dto.name @description = secret_dto.description @placeholder = secret_dto.placeholder @hosts = secret_dto.hosts @created_at = secret_dto.created_at @updated_at = secret_dto.updated_at end |
Instance Attribute Details
#created_at ⇒ String (readonly)
26 27 28 |
# File 'lib/daytona/secret.rb', line 26 def created_at @created_at end |
#description ⇒ String? (readonly)
15 16 17 |
# File 'lib/daytona/secret.rb', line 15 def description @description end |
#hosts ⇒ Array<String> (readonly)
Returns Allowed hosts this secret may be sent to. Accepts exact hostnames and *. wildcards (no ports).
23 24 25 |
# File 'lib/daytona/secret.rb', line 23 def hosts @hosts end |
#id ⇒ String (readonly)
9 10 11 |
# File 'lib/daytona/secret.rb', line 9 def id @id end |
#name ⇒ String (readonly)
12 13 14 |
# File 'lib/daytona/secret.rb', line 12 def name @name end |
#placeholder ⇒ String (readonly)
Returns Opaque placeholder token injected as the env var value in Sandboxes. The placeholder is resolved to the real plaintext value only for the secret’s allowed hosts.
19 20 21 |
# File 'lib/daytona/secret.rb', line 19 def placeholder @placeholder end |
#updated_at ⇒ String (readonly)
29 30 31 |
# File 'lib/daytona/secret.rb', line 29 def updated_at @updated_at end |