This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func CreatePersonDB(persondbtype string, person Person) error { | |
| var db PersonDB | |
| if persondbtype == "local" { | |
| db = new(LocalDatabase) | |
| } else if persondbtype == "in-memory" { | |
| db = new(InMemoryDatabase) | |
| } else { | |
| return fmt.Errorf("persondbtype not supported :%s", persondbtype) | |
| } | |
| db.save(person) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| admin: | |
| access_log_path: /tmp/admin_access.log | |
| address: | |
| socket_address: | |
| address: 127.0.0.1 | |
| protocol: TCP | |
| port_value: 9901 | |
| static_resources: | |
| listeners: | |
| - name: listener_0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static_resources: | |
| listeners: | |
| - name: listener_0 | |
| address: | |
| socket_address: | |
| address: 0.0.0.0 | |
| port_value: 10000 | |
| filter_chains: | |
| - filters: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # change <repo> with name of your actual repo | |
| test: # run make setup before this | |
| @echo *************Running tests*************; \ | |
| source .venv/bin/activate; \ | |
| pytest --junitxml htmlcov/codecov-results.xml --cov . --cov-config test/.coveragerc --cov-report html --cov-report xml | |
| lint: # run make setup before this | |
| @echo *************Running lint*************; \ | |
| source .venv/bin/activate; \ | |
| pylint <repo>/ |