mirror of
https://github.com/QuasarApp/QuasarAppCI.git
synced 2025-04-26 22:04:32 +00:00
21 lines
435 B
Python
21 lines
435 B
Python
# This Python file uses the following encoding: utf-8
|
|
import json
|
|
from pathlib import Path
|
|
|
|
|
|
class SecretManager:
|
|
|
|
def __init__(self, jsFile, properties=None):
|
|
|
|
contents = Path(jsFile).read_text()
|
|
self.jsfile = json.loads(contents)
|
|
self.prop = properties
|
|
|
|
def getValue(self, key):
|
|
value = self.jsfile[key]
|
|
|
|
if self.prop:
|
|
self.prop.useSecret(value, key)
|
|
|
|
return value
|