Skip to content

Commit

Permalink
feat(satp-hermes): add health check endpoint to BLO spec
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
  • Loading branch information
RafaelAPB committed Mar 30, 2024
1 parent a0ac1ac commit 39d1434
Show file tree
Hide file tree
Showing 13 changed files with 710 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ docs/GasCost.md
docs/GetAudit200Response.md
docs/GetAuditRequest.md
docs/GetAuditResponse.md
docs/GetHealthCheck200Response.md
docs/GetRoutes200Response.md
docs/GetRoutes200ResponseRoutesInner.md
docs/GetRoutes200ResponseRoutesInnerFromToken.md
Expand All @@ -40,6 +41,7 @@ docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md
docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md
docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md
docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md
docs/HealthCheckResponse.md
docs/IncludedStep.md
docs/Insurance.md
docs/IntegrationDetails.md
Expand Down Expand Up @@ -83,6 +85,7 @@ model_gas_cost.go
model_get_audit_200_response.go
model_get_audit_request.go
model_get_audit_response.go
model_get_health_check_200_response.go
model_get_routes_200_response.go
model_get_routes_200_response_routes_inner.go
model_get_routes_200_response_routes_inner_from_token.go
Expand All @@ -95,6 +98,7 @@ model_get_routes_200_response_routes_inner_steps_inner_estimate.go
model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go
model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go
model_get_routes_200_response_routes_inner_steps_inner_tool_details.go
model_health_check_response.go
model_included_step.go
model_insurance.go
model_integration_details.go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AdminApi* | [**CallContinue**](docs/AdminApi.md#callcontinue) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue | Continue a paused transaction session
*AdminApi* | [**GetAudit**](docs/AdminApi.md#getaudit) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit | Audit transactions
*AdminApi* | [**GetHealthCheck**](docs/AdminApi.md#gethealthcheck) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck | Health check endpoint
*AdminApi* | [**GetStatus**](docs/AdminApi.md#getstatus) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/status | Get SATP current session data
*AdminApi* | [**Pause**](docs/AdminApi.md#pause) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause | Pause a transaction session
*TransactionApi* | [**Cancel**](docs/TransactionApi.md#cancel) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel | Cancel a transaction session
Expand Down Expand Up @@ -121,6 +122,7 @@ Class | Method | HTTP request | Description
- [GetAudit200Response](docs/GetAudit200Response.md)
- [GetAuditRequest](docs/GetAuditRequest.md)
- [GetAuditResponse](docs/GetAuditResponse.md)
- [GetHealthCheck200Response](docs/GetHealthCheck200Response.md)
- [GetRoutes200Response](docs/GetRoutes200Response.md)
- [GetRoutes200ResponseRoutesInner](docs/GetRoutes200ResponseRoutesInner.md)
- [GetRoutes200ResponseRoutesInnerFromToken](docs/GetRoutes200ResponseRoutesInnerFromToken.md)
Expand All @@ -133,6 +135,7 @@ Class | Method | HTTP request | Description
- [GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner](docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md)
- [GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner](docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md)
- [GetRoutes200ResponseRoutesInnerStepsInnerToolDetails](docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md)
- [HealthCheckResponse](docs/HealthCheckResponse.md)
- [IncludedStep](docs/IncludedStep.md)
- [Insurance](docs/Insurance.md)
- [IntegrationDetails](docs/IntegrationDetails.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@ paths:
http:
verbLowerCase: get
path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/status
/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck:
get:
description: Responds if SATP Hermes is on
operationId: GetHealthCheck
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetHealthCheck_200_response'
description: OK
"500":
description: Internal server error
summary: Health check endpoint
tags:
- admin
/api/v1/@hyperledger/cactus-plugin-satp-hermes/continue:
post:
description: "Attempts to continue a previously paused transaction intent, resuming\
Expand Down Expand Up @@ -948,6 +964,12 @@ components:
type: string
title: Tags
type: array
HealthCheckResponse:
properties:
status:
example: OK
type: string
type: object
BridgeInfo:
description: Information about the bridge used for the token transfer.
properties:
Expand Down Expand Up @@ -1419,6 +1441,14 @@ components:
- cancelSuccessful
- statusResponse
type: object
GetHealthCheck_200_response:
example:
status: OK
properties:
status:
example: OK
type: string
type: object
Continue_request:
description: Schema for a request to continue a paused transaction session.
properties:
Expand Down
113 changes: 113 additions & 0 deletions packages/cactus-plugin-satp-hermes/src/main/go/generated/api_admin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**CallContinue**](AdminApi.md#CallContinue) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue | Continue a paused transaction session
[**GetAudit**](AdminApi.md#GetAudit) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit | Audit transactions
[**GetHealthCheck**](AdminApi.md#GetHealthCheck) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck | Health check endpoint
[**GetStatus**](AdminApi.md#GetStatus) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/status | Get SATP current session data
[**Pause**](AdminApi.md#Pause) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause | Pause a transaction session

Expand Down Expand Up @@ -148,6 +149,67 @@ No authorization required
[[Back to README]](../README.md)


## GetHealthCheck

> GetHealthCheck200Response GetHealthCheck(ctx).Execute()
Health check endpoint



### Example

```go
package main

import (
"context"
"fmt"
"os"
openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated"
)

func main() {

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AdminApi.GetHealthCheck(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetHealthCheck``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHealthCheck`: GetHealthCheck200Response
fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetHealthCheck`: %v\n", resp)
}
```

### Path Parameters

This endpoint does not need any parameter.

### Other Parameters

Other parameters are passed through a pointer to a apiGetHealthCheckRequest struct via the builder pattern


### Return type

[**GetHealthCheck200Response**](GetHealthCheck200Response.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)


## GetStatus

> Transact200ResponseStatusResponse GetStatus(ctx).SessionID(sessionID).Execute()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# GetHealthCheck200Response

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Status** | Pointer to **string** | | [optional]

## Methods

### NewGetHealthCheck200Response

`func NewGetHealthCheck200Response() *GetHealthCheck200Response`

NewGetHealthCheck200Response instantiates a new GetHealthCheck200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed

### NewGetHealthCheck200ResponseWithDefaults

`func NewGetHealthCheck200ResponseWithDefaults() *GetHealthCheck200Response`

NewGetHealthCheck200ResponseWithDefaults instantiates a new GetHealthCheck200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set

### GetStatus

`func (o *GetHealthCheck200Response) GetStatus() string`

GetStatus returns the Status field if non-nil, zero value otherwise.

### GetStatusOk

`func (o *GetHealthCheck200Response) GetStatusOk() (*string, bool)`

GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetStatus

`func (o *GetHealthCheck200Response) SetStatus(v string)`

SetStatus sets Status field to given value.

### HasStatus

`func (o *GetHealthCheck200Response) HasStatus() bool`

HasStatus returns a boolean if a field has been set.


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit 39d1434

Please sign in to comment.