-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GetExchangeStatus() #6
Conversation
WalkthroughA significant enhancement has been made to the API by introducing a new endpoint, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Client
participant API
User->>Client: Request exchange status
Client->>API: GET /api/exchange_status
API-->>Client: Return exchange status data
Client-->>User: Provide exchange status
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- README.md (1 hunks)
- exchange.go (1 hunks)
- exchange_test.go (1 hunks)
Additional comments not posted (10)
exchange.go (6)
8-14
: LGTM!The type definition
GetExchangeStatusInput
is well-documented and straightforward.
16-19
: LGTM!The type definition
GetExchangeStatusResponse
is well-documented and straightforward.
21-31
: LGTM!The type definition
ExchangeStatus
is comprehensive and well-documented.
33-48
: LGTM!The type definition
ExchangeStatusAvailability
is well-documented and straightforward.
50-58
: LGTM!The type definition
Availability
is well-documented and straightforward.
60-84
: LGTM!The function
GetExchangeStatus
is well-structured and handles errors appropriately.exchange_test.go (3)
14-92
: LGTM!The test case for
GetExchangeStatus
(all exchange status) is well-structured and covers the expected behavior.
94-158
: LGTM!The test case for
GetExchangeStatus
(specific pair) is well-structured and covers the expected behavior.
160-175
: LGTM!The test case for
GetExchangeStatus
(error case) is well-structured and covers the expected behavior.README.md (1)
93-93
: LGTM!The documentation for the new
GET /api/exchange_status
endpoint is clear and correctly placed.
Summary by CodeRabbit
New Features
GET /api/exchange_status
to check the operational status of the exchange.Bug Fixes
GetExchangeStatus
method, ensuring proper handling of server errors.Documentation
Tests
GetExchangeStatus
method.