Commit Graph

9 Commits

Author SHA1 Message Date
a9d98213ce test: check and handle error for testing
SonarQube Scan / SonarQube Trigger (push) Successful in 3m35s
2026-01-26 19:45:27 +07:00
4410c9b993 chore(tests): migrate to Testify for mocking and assertions
SonarQube Scan / SonarQube Trigger (push) Successful in 2m36s
2026-01-26 11:56:58 +07:00
d5f7ebf597 test(lifecycle): add unit tests for lifecycle behavior
SonarQube Scan / SonarQube Trigger (push) Successful in 2m15s
2026-01-24 20:28:30 +07:00
7159300fa2 test(stream): add unit tests for stream behavior
SonarQube Scan / SonarQube Trigger (push) Successful in 1m39s
- Fix duplicating EOF error when closing SSH connection
- Add new SessionStatusCLOSED type
2026-01-22 21:04:05 +07:00
a350692e81 test(middleware): add unit tests for middleware behavior
SonarQube Scan / SonarQube Trigger (push) Successful in 1m30s
- remove redundant check on registry.Update and check if slug exist before locking the mutex
- Update SonarQube action to not use Go cache when setting up Go
2026-01-22 12:34:24 +07:00
ed11a0b801 test(registry): add unit tests for registry behavior
SonarQube Scan / SonarQube Trigger (push) Successful in 47s
2026-01-22 00:47:53 +07:00
634c8321ef refactor(registry): define reusable constant errors
SonarQube Scan / SonarQube Trigger (push) Successful in 52s
SonarQube Scan / SonarQube Trigger (pull_request) Successful in 46s
- Introduced package-level error variables in registry to replace repeated fmt.Errorf calls
- Added errors like ErrSessionNotFound, ErrSlugInUse, ErrInvalidSlug, ErrForbiddenSlug, ErrSlugChangeNotAllowed, and ErrSlugUnchanged
2026-01-22 00:39:28 +07:00
2bc20dd991 refactor(config): centralize env loading and enforce typed access
- Centralize environment variable loading in config.MustLoad
- Parse and validate all env vars once at initialization
- Make config fields private and read-only
- Remove public Getenv usage in favor of typed accessors
- Improve validation and initialization order
- Normalize enum naming to be idiomatic and avoid constant collisions
2026-01-21 19:43:19 +07:00
1e12373359 chore(restructure): reorganize project layout
Docker Build and Push / build-and-push-branches (push) Has been skipped
Docker Build and Push / build-and-push-tags (push) Successful in 13m1s
- Reorganize internal packages and overall project structure
- Update imports and wiring to match the new layout
- Separate HTTP parsing and streaming from the server package
- Separate middleware from the server package
- Separate session registry from the session package
- Move HTTP, HTTPS, and TCP servers to the transport package
- Session package no longer starts the TCP server directly
- Server package no longer starts HTTP/HTTPS servers on initialization
- Forwarder no longer handles accepting TCP requests
- Move session details to the types package
- HTTP/HTTPS initialization is now the responsibility of main
2026-01-21 14:06:46 +07:00