Class: WideEvent::Kamal::SecretsEditor::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/wide_event/kamal/secrets_editor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ingest_tokenObject

Returns the value of attribute ingest_token

Returns:

  • (Object)

    the current value of ingest_token



31
32
33
# File 'lib/wide_event/kamal/secrets_editor.rb', line 31

def ingest_token
  @ingest_token
end

#ingest_token_existingObject

Returns the value of attribute ingest_token_existing

Returns:

  • (Object)

    the current value of ingest_token_existing



31
32
33
# File 'lib/wide_event/kamal/secrets_editor.rb', line 31

def ingest_token_existing
  @ingest_token_existing
end

#query_tokenObject

Returns the value of attribute query_token

Returns:

  • (Object)

    the current value of query_token



31
32
33
# File 'lib/wide_event/kamal/secrets_editor.rb', line 31

def query_token
  @query_token
end

#query_token_existingObject

Returns the value of attribute query_token_existing

Returns:

  • (Object)

    the current value of query_token_existing



31
32
33
# File 'lib/wide_event/kamal/secrets_editor.rb', line 31

def query_token_existing
  @query_token_existing
end

#rootObject

Returns the value of attribute root

Returns:

  • (Object)

    the current value of root



31
32
33
# File 'lib/wide_event/kamal/secrets_editor.rb', line 31

def root
  @root
end

Instance Method Details

#write!Object



33
34
35
36
37
38
39
# File 'lib/wide_event/kamal/secrets_editor.rb', line 33

def write!
  write_token_file(INGEST_TOKEN_PATH, ingest_token) unless ingest_token_existing
  write_token_file(QUERY_TOKEN_PATH, query_token) unless query_token_existing
  ensure_lines(SECRETS_PATH, SECRETS_LINES)
  ensure_lines(GITIGNORE_PATH, GITIGNORE_LINES)
  self
end