Commit Graph

9 Commits

Author SHA1 Message Date
argoyle fd1685867e refactor(cache): optimize test setup and reduce iterations
Remove bcrypt hashing for API keys to speed up concurrent tests and 
replace it with a legacy hashing function. Reduce the number of 
concurrent readers and writers in the test to improve performance 
while retaining essential functionality checks. Use a more efficient 
method to fetch organizations within the concurrency test block.
2025-12-05 08:47:11 +01:00
argoyle ffcf41b85a feat: add commands for managing organizations and users
Introduce `AddUserToOrganization`, `RemoveAPIKey`, and 
`RemoveOrganization` commands to enhance organization 
management. Implement validation for user addition and 
API key removal. Update GraphQL schema to support new 
mutations and add caching for the new events, ensuring 
that organizations and their relationships are accurately 
represented in the cache.
2025-11-22 18:37:07 +01:00
argoyle 6404f7a497 test(cache): reduce goroutines for race detector stability
Decrease the number of goroutines in concurrent read and write tests to 
minimize race conditions during testing. This ensures more reliable 
test results and makes it easier to identify concurrency issues.
2025-11-21 11:06:36 +01:00
argoyle 130e92dc5f feat(cache): add concurrency safety and logging improvements
Implement read-write mutex locks for cache functions to ensure
concurrency safety. Add debug logging for cache updates to enhance
traceability of operations. Optimize user addition logic to prevent
duplicates. Introduce a new test file for comprehensive cache
functionality testing, ensuring reliable behavior.
2025-11-21 10:21:08 +01:00
argoyle 4468903535 feat(cache): implement hashed API key storage and retrieval
Adds a new hashed key storage mechanism for API keys in the cache. 
Replaces direct mapping to API keys with composite keys based on 
organizationId and name. Implements searching of API keys using 
hash comparisons for improved security. Updates related tests to 
ensure correct functionality and validate the hashing. Also, 
adds support for a new dependency `golang.org/x/crypto`.
2025-11-20 22:11:24 +01:00
argoyle aaa111dd20 feat(service): implement graceful shutdown for HTTP server
Add a context with timeout to handle graceful shutdown of the HTTP 
server. Update error handling during the server's close to include 
context-aware shutdown. Ensure that the server properly logs only 
non-closed errors when listening.
2025-04-12 13:41:02 +02:00
argoyle 554a6c252f feat: organizations and API keys 2023-04-27 07:46:52 +02:00
argoyle b1124d6350 chore: handle push of unchanged schema 2022-10-14 22:41:56 +02:00
argoyle a1b4d4fc27 feat: initial commit 2022-10-09 20:37:48 +02:00