d8c8c14edc
src/api/eosio_contract.go: Adding EosioContractFactory function
2022-10-25 17:43:16 +02:00
9fcffe375a
src/api/eosio_v2.go: Adding EosioV2Factory function
2022-10-25 17:42:46 +02:00
7b78d2632b
src/api/eosio_v1.go: Adding EosioV1Factory function
2022-10-25 17:42:30 +02:00
39927a2441
src/api/debug.go: Adding DebugApiFactory function
2022-10-25 17:31:36 +02:00
6e8ffe718e
src/api/interface.go: Adding Factory function type.
2022-10-25 17:22:33 +02:00
0081f86f0d
src/api/interface.go: Adding ApiArguments struct.
2022-10-25 17:21:56 +02:00
8079962be8
src/api/log_params.go: Adding Combine()
2022-10-21 15:08:33 +02:00
8d2c1c8fa3
src/api/log_params.go: Don't need a ToSlice() function as LogParams is already a slice.
2022-10-21 15:08:00 +02:00
3ab2db7cb3
src/api/log_params_test.go: change assert.Equal() to assert.ElementsMatch() to ignore slice order.
2022-10-21 14:29:02 +02:00
aa98134a1e
src/utils/json_test.go: refactor test functions into a single one.
2022-10-21 13:19:34 +02:00
3568e7c908
src/utils/parse_log_formatter_test.go: fix whitespace.
2022-10-21 13:14:23 +02:00
818cf7e7e5
move src/helpers.go to src/utils/parse_log_formatter.go
2022-10-21 13:13:02 +02:00
311d9b34cb
src/main.go: Add cli flag to change logging format.
2022-10-20 15:15:11 +02:00
704965b9cc
Adding src/helpers.go
2022-10-20 15:09:21 +02:00
35b81cdcdc
src/api/eosio_contract_test.go: in TestEosioContractHTTP500Down() need to set content-type header.
2022-10-12 18:25:04 +02:00
f5ff3480e0
go: Update github.com/eosswedenorg-go/eosapi to v0.1.1
2022-10-12 12:25:42 +02:00
8f81047e02
src/parse_request_test.go: compare api's LogInfo() function as comparing the structs directly.
...
Comparing the structs may failsly error because of internal variables (like pointer) not being equal.
So just compare the data we actually care about, and those is returned by LogInfo().
2022-10-12 12:24:52 +02:00
f77edfe321
src/parse_request.go: linter does not like capitalized error strings.
2022-10-03 16:37:34 +02:00
bc6f857c1e
Adding src/api/debug_test.go
2022-10-03 16:32:17 +02:00
0349999540
src/parse_request_test.go: adding test for debug api.
2022-10-03 16:15:47 +02:00
edb063722b
src/api/test.go: rename from TestApi to DebugApi
2022-10-03 16:15:25 +02:00
bda40bf1d5
src/parse_request_test.go: add test for invalid api type.
2022-10-03 16:13:32 +02:00
b67b5d6b7e
src/main.go: use a global variable to display version number, this should be set by the linker during build.
2022-08-21 20:46:40 +02:00
c2e0bef26e
src/main.go: in eventLoop() combine SIGINT and SIGTERM handling, they have the same functionality.
2022-08-21 15:02:27 +02:00
bd412bb0eb
src/main.go: in eventLoop() create a child logger with a signal parameter and use that to log messages.
2022-08-21 15:02:26 +02:00
8b86a5d34b
src/main.go: Fix a comment.
2022-08-21 15:02:26 +02:00
44c1d690ef
src/main.go: indentation fix.
2022-08-21 14:31:31 +02:00
2832b50fe7
src/main.go: in event loop, also listen for SIGTERM and gracefully shutdown the program.
2022-08-21 14:28:22 +02:00
b2c6589408
src/main.go: Log return from spawnTcpServer()
2022-08-21 14:15:06 +02:00
14d833e174
src/main.go: Only start event loop if server started correctly.
2022-08-21 14:12:03 +02:00
0e7ed54c1a
src/server.go: make spawnTcpServer() return error and remove log calls.
2022-08-21 14:09:17 +02:00
4653790df4
src/main.go: do graceful shutdown on interrupt signal.
2022-08-21 14:01:17 +02:00
d4cb1a92f9
src/main.go: switch go routine/main thread order. run spawnTcpServer() in go routine and run event loop in main thread.
2022-08-21 13:46:45 +02:00
6907b3ce75
src/main.go: skip logging "TCP Server started" its done in spawnTcpServer()
2022-08-21 13:35:31 +02:00
def3b41842
src/server.go: in SpawnTcpServer, do server.Connect() and then server.Listen()
2022-08-21 13:34:56 +02:00
3fce1f558b
src/api/v2.go: rename file to eosio_v2.go
2022-08-18 23:19:10 +02:00
c8361f6a44
src/api/v1.go: rename file to eosio_v1.go
2022-08-18 23:18:54 +02:00
f98e2ed794
src/api/eosio_contract.go: use utils.Time
2022-08-18 12:08:05 +02:00
e5ddffbc5a
src/api/v1.go: use utils.Time
2022-08-18 12:08:05 +02:00
d3d0fb11d7
Adding src/utils/time.go
2022-08-18 12:08:05 +02:00
c8a128b657
src/api/eosio_contract.go: do not return a message to haproxy if postgres is down.
2022-08-17 17:46:32 +02:00
ec705687bc
src/api: rename eosio-contract.go to eosio_contract.go
2022-08-17 17:46:05 +02:00
ec44e35488
Adding src/api/eosio_contract_test.go
2022-08-17 17:45:00 +02:00
fa6c0bf8a1
src/api/eosio-contract.go: Add SetTime() and GetTime()
2022-08-17 17:28:01 +02:00
816a38acae
Adding src/api/log_params_test.go
2022-08-17 16:55:22 +02:00
a550f67dca
src/api/v2_test.go: Add test for LogInfo()
2022-08-17 16:55:05 +02:00
7f45b746c1
src/api/v1_test.go: Add test for LogInfo()
2022-08-17 16:54:56 +02:00
47ec8ae86e
Adding src/api/v2_test.go
2022-08-17 16:37:23 +02:00
43b3b36d09
Adding src/api/v1_test.go
2022-08-17 11:40:08 +02:00
f16dced21c
src/api/v1.go: Adding SetTime() and GetTime()
2022-08-17 11:39:28 +02:00