MCPcopy Index your code
hub / github.com/dataease/SQLBot / get_es_auth

Function get_es_auth

backend/apps/db/es_engine.py:14–24  ·  view source on GitHub ↗
(conf: DatasourceConf)

Source from the content-addressed store, hash-verified

12
13
14def 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
27def get_es_connect(conf: DatasourceConf):

Callers 2

get_es_connectFunction · 0.85
get_es_data_by_httpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected