(conf: DatasourceConf)
| 12 | |
| 13 | |
| 14 | def get_es_auth(conf: DatasourceConf): |
| 15 | username = f"{conf.username}" |
| 16 | password = f"{conf.password}" |
| 17 | |
| 18 | credentials = f"{username}:{password}" |
| 19 | encoded_credentials = b64encode(credentials.encode()).decode() |
| 20 | |
| 21 | return { |
| 22 | "Content-Type": "application/json", |
| 23 | "Authorization": f"Basic {encoded_credentials}" |
| 24 | } |
| 25 | |
| 26 | |
| 27 | def get_es_connect(conf: DatasourceConf): |
no outgoing calls
no test coverage detected