Commit Graph

151 Commits

Author SHA1 Message Date
efbca43f27 make both Response and Error in one structure 2025-07-29 11:26:26 +03:00
a0451aa8a0 add full jsonrpc-2.0 batch support 2025-07-29 11:25:48 +03:00
7608bcfed3 remove w and r fields from GatewayServer and change Handle method 2025-07-29 11:25:26 +03:00
c62710a7d0 remove some garbage 2025-07-29 09:43:27 +03:00
0151c3f68a add test response using rpc.WriteResponse 2025-07-29 09:39:07 +03:00
1f36f2d7bc Move http write functions to writers.go 2025-07-29 09:33:03 +03:00
ec94df5f4a Project structure refactor:
- Change package name general_server to gateway
- Changing the structure of directories and packages
- Adding vendor to the project
2025-07-28 20:16:40 +03:00
19b699d92b Make a make to ignore vendor files 2025-07-28 20:16:31 +03:00
d5d73c1703 Add Taskfile.yml to .gitignore 2025-07-28 20:16:20 +03:00
alex
77baa1430e Initial commit: not functional 2025-07-25 11:31:53 +03:00
alex
deef4a891b logs 2025-07-12 13:25:42 +03:00
alex
aa45a2e3e4 Some changes with http server 2025-07-12 13:20:25 +03:00
alex
29d9f0487b Eliminating lint static checker's whining 2025-07-10 18:22:53 +03:00
alex
ab8da05367 Fix README.md 2025-07-10 18:04:53 +03:00
alex
53572e4628 chore: remove tracked directory to apply .gitignore 2025-07-10 18:04:39 +03:00
alex
5bc334fd2c Fixing updates 2025-07-10 18:03:30 +03:00
alex
e71d69f3f1 chore: add .meta/ to .gitignore 2025-07-09 01:24:49 +03:00
alex
cbc9a554df chore: remove tracked directory to apply .gitignore 2025-07-09 01:24:39 +03:00
alex
3e03c39644 Update README to reflect command usage and response structure 2025-07-09 01:23:18 +03:00
alex
9919f77c90 Refactor core configuration and UUID handling
- Changed UUIDLength type from byte to int in core/config/consts.go
- Introduced MetaDir constant in core/config/consts.go
- Added corestate package with initial state management and UUID handling
- Implemented GetNodeUUID and SetNodeUUID functions for UUID file management
- Created RunManager and RunFileManager for runtime directory management
- Updated GeneralServer to use new configuration structure
- Removed deprecated init package and replaced with main entry point
- Added color utility functions for logging
- Enhanced UUID generation functions in utils package
- Updated update logic to handle new configuration structure
- Added routines for cleaning temporary runtime directories
- Introduced response formatting for API responses
2025-07-09 01:21:34 +03:00
alex
8d01314ded chore: remove tracked file to apply .gitignore 2025-07-08 23:55:14 +03:00
alex
d78510e2e4 Update .gitignore to include cert/ and config.yaml 2025-07-08 23:53:43 +03:00
alex
f90062efa7 Disable TLS in configuration 2025-07-06 09:13:57 +03:00
alex
90c7b1cd70 Enhance server update process with graceful shutdown; enable TLS in config and clean up temporary files during update 2025-07-06 09:13:37 +03:00
alex
66f3d12412 Implement automatic update functionality and improve server initialization; add NODE_PATH to Makefile, enhance logging, and update README 2025-07-05 22:13:16 +03:00
alex
2fdc32ce9f Refactor error handling and utility functions; remove deprecated code and improve logging 2025-07-05 16:05:03 +03:00
alex
b70819e976 Add GeneralServer implementation for API request routing based on versioning 2025-07-05 15:04:39 +03:00
alex
7093183140 Fix directory tree representation in README.md to accurately reflect file count 2025-07-05 13:50:41 +03:00
alex
b38e492e7e Update version string format in Makefile and code files to use 'v' prefix v0.0.1-dev 2025-07-05 12:56:53 +03:00
alex
2ad4c57b2c Update README.md to change heading level for example usage section 2025-07-05 12:52:31 +03:00
alex
06e8ab5658 Refactor configuration structures and improve comments for clarity 2025-07-05 12:51:42 +03:00
alex
43b130acdb Disable TLS in configuration 2025-07-05 12:32:41 +03:00
alex
f020d3754b Add README.md with project overview, features, usage examples, and installation instructions 2025-07-05 12:32:30 +03:00
alex
dd89c91aed Update LICENSE file to include license title and rights statement 2025-07-04 23:50:09 +03:00
alex
8febbc4698 Add LICENSE file with copyright and usage terms 2025-07-04 23:47:31 +03:00
alex
d442871950 Refactor configuration and update handling:
- Modify .luarc.json to include global Lua scripts.
- Update Makefile to include LDFLAGS for versioning.
- Enhance node.go to implement version checking and update handling.
- Refactor Lua global variables in _globals.lua and echo.lua to use new structures.
- Remove deprecated http.lua and update config.yaml for TLS and update settings.
- Introduce new update.go for version management and update checking.
- Add tests for version comparison in update_test.go.
- Improve error handling in various server methods.
2025-07-03 22:38:05 +03:00
alex
96fb13e3c7 Refactor and restructure core components
- Removed obsolete files: `hanle_multi.go`, `logger.go`, `handle_com.go`, `handle_list.go`, `server.go`, and `utils.go` from the `general_server` and `sv1` packages.
- Introduced new implementations for the `GeneralServer` and `HandlerV1` in the `core` package, enhancing the overall architecture.
- Updated the `go.mod` and `go.sum` files to include new dependencies.
- Added a new configuration structure in `config.yaml` and `config.go` for better management of application settings.
- Implemented a Lua command handling mechanism in `handle_com.go` and `handle_list.go` for improved command execution.
- Enhanced logging capabilities with a new logger setup in `logger.go`.
- Added a new Lua script `http.lua` for handling HTTP requests.
2025-06-26 16:50:35 +03:00
alex
9f7f046a07 Refactor logging: update request logging to use dynamic API version retrieval in Handle and HandleList methods 2025-06-25 18:03:10 +03:00
alex
ef1efdd585 Implement TLS support: update configuration for TLS, modify server to handle HTTPS, and enhance logging for request handling 2025-06-24 22:15:37 +03:00
alex
973c060e5f Refactor echo functionality: add new echo implementation, remove deprecated echo?b1 file, and update preparation script 2025-06-23 13:47:59 +03:00
alex
241809025d Enhance server functionality: add versioning support, implement command handling improvements, and introduce new Lua scripts for command execution 2025-06-23 01:26:16 +03:00
alex
03195dca59 Refactor server structure: migrate v1 functionality to sv1 module, remove deprecated files, and update command handling 2025-06-22 22:11:14 +03:00
alex
114fc82b90 Remove internal package references and update module dependencies 2025-06-22 17:14:56 +03:00
alex
5326dd45b6 Update import paths to use the new config module; remove internal references 2025-06-22 17:12:07 +03:00
alex
27bda702bd Add configuration and v1 server implementation; create handler methods for command execution and listing 2025-06-22 17:09:47 +03:00
alex
c15e6c5b15 Refactor internal server structure: remove v1 package and migrate functionality to a new v1 module; update dependencies and improve command handling. 2025-06-22 17:01:14 +03:00
alex
213db0b8c7 Update internal/config dependency to latest version 2025-06-22 11:56:54 +03:00
alex
0d8673254e Refactor server package structure and update error handling methods; remove unused dependencies 2025-06-22 11:54:16 +03:00
alex
eaff815270 Refactor handler methods to use instance methods for logging and error handling; add utility functions for UUID generation and JSON error responses. 2025-06-22 11:48:33 +03:00
alex
07e1d3ecdd ./ 2025-06-22 11:38:53 +03:00