Class: Daytona::Secret

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/secret.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • secret_dto (DaytonaApiClient::Secret)


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_atString (readonly)

Returns:

  • (String)


26
27
28
# File 'lib/daytona/secret.rb', line 26

def created_at
  @created_at
end

#descriptionString? (readonly)

Returns:

  • (String, nil)


15
16
17
# File 'lib/daytona/secret.rb', line 15

def description
  @description
end

#hostsArray<String> (readonly)

Returns Allowed hosts this secret may be sent to. Accepts exact hostnames and *. wildcards (no ports).

Returns:

  • (Array<String>)

    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

#idString (readonly)

Returns:

  • (String)


9
10
11
# File 'lib/daytona/secret.rb', line 9

def id
  @id
end

#nameString (readonly)

Returns:

  • (String)


12
13
14
# File 'lib/daytona/secret.rb', line 12

def name
  @name
end

#placeholderString (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.

Returns:

  • (String)

    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_atString (readonly)

Returns:

  • (String)


29
30
31
# File 'lib/daytona/secret.rb', line 29

def updated_at
  @updated_at
end