Skip to content

Commit

Permalink
Merge pull request #435 from ARGOeu/devel
Browse files Browse the repository at this point in the history
Version 1.4.0
  • Loading branch information
themiszamani authored Oct 10, 2022
2 parents 609fe99 + 5c99517 commit a828d23
Show file tree
Hide file tree
Showing 106 changed files with 9,171 additions and 5,268 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ARGO Messaging
[![Build Status](https://jenkins.einfra.grnet.gr/buildStatus/icon?job=ARGO%2Fargo-messaging%2Fmaster&style=flat-square&color=darkturquoise&subject=build-master)](https://jenkins.einfra.grnet.gr/job/ARGO/job/argo-messaging/job/master/)
[![Build Status](https://jenkins.einfra.grnet.gr/buildStatus/icon?job=ARGO%2Fargo-messaging%2Fdevel&style=flat-square&subject=build-devel)](https://jenkins.einfra.grnet.gr/job/ARGO/job/argo-messaging/job/devel/)

## Description
The ARGO Messaging Service is a Publish/Subscribe Service,
which implements the Google PubSub protocol.
Instead of focusing on a single Messaging API specification
Expand Down
4 changes: 3 additions & 1 deletion argo-messaging.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Name: argo-messaging
Summary: ARGO Messaging API for broker network
Version: 1.3.0
Version: 1.4.0
Release: 1%{?dist}
License: ASL 2.0
Buildroot: %{_tmppath}/%{name}-buildroot
Expand Down Expand Up @@ -63,6 +63,8 @@ go clean
%attr(0644,root,root) /usr/lib/systemd/system/argo-messaging.service

%changelog
* Mon Oct 10 2022 Agelos Tsalapatis <[email protected]> 1.4.0-1%{?dist}
- AMS release 1.4.0
* Fri Jul 29 2022 Agelos Tsalapatis <[email protected]> 1.3.0-1%{?dist}
- AMS release 1.3.0
* Thu May 19 2022 Agelos Tsalapatis <[email protected]> 1.2.0-1%{?dist}
Expand Down
5 changes: 5 additions & 0 deletions auth/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ func RegisterUser(uuid, name, fname, lname, email, org, desc, registeredAt, atkn
}, nil
}

// DeleteUserRegistration removes the respective registration from the store based on the given uuid
func DeleteUserRegistration(regUUID string, str stores.Store) error {
return str.DeleteRegistration(regUUID)
}

func FindUserRegistration(regUUID, status string, str stores.Store) (UserRegistration, error) {

q, err := str.QueryRegistrations(regUUID, status, "", "", "", "")
Expand Down
61 changes: 61 additions & 0 deletions doc/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,30 @@ paths:
$ref: "#/responses/404"
500:
$ref: "#/responses/500"
delete:
summary: Delete a specific user registration
description: |
Deletes a user's registration
parameters:
- $ref: '#/parameters/ApiKey'
- name: UUID
in: path
description: UUID of the registration
required: true
type: string
tags:
- Registrations
responses:
200:
description: User's registration
401:
$ref: "#/responses/401"
403:
$ref: "#/responses/403"
404:
$ref: "#/responses/404"
500:
$ref: "#/responses/500"

/projects/{PROJECT}/schemas:
get:
Expand Down Expand Up @@ -1226,6 +1250,32 @@ paths:
500:
$ref: "#/responses/500"

/users/usageReport:
get:
summary: Show the projects and their metrics, alongside service operational metrics based on the provided key
description: |
Show a specific's user usage information regarding its projects
parameters:
- $ref: '#/parameters/ApiKey'
- $ref: '#/parameters/StartDate'
- $ref: '#/parameters/EndDate'
- $ref: '#/parameters/Projects'
tags:
- Users
responses:
200:
description: A User usage report object
schema:
$ref: '#/definitions/UserUsageReport'
400:
$ref: "#/responses/400"
401:
$ref: "#/responses/401"
403:
$ref: "#/responses/403"
500:
$ref: "#/responses/500"

/users/{USER}:refreshToken:
post:
summary: Refreshes the token of an existing user
Expand Down Expand Up @@ -2539,6 +2589,17 @@ definitions:
schema:
type: object

UserUsageReport:
type: object
properties:
va_report:
type: object
$ref: '#/definitions/VAMetrics'
operational_metrics:
type: array
items:
$ref: '#/definitions/Metric'

VAMetrics:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion doc/v1/docs/api_health.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ information about errors regarding the push server.
- A user token corresponding to a `service_admin` or `admin_viewer`
has to be provided when using the `details` parameter.

```
```bash
curl -H "Content-Type: application/json"
"https://{URL}/v1/status?details=true&key=token"
```
Expand Down
8 changes: 4 additions & 4 deletions doc/v1/docs/api_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Operational Metrics include metrics related to the CPU or memory usage of the am
This request gets a list of operational metrics for the specific ams servcice

### Request
```json
```
GET "/v1/metrics"
```


### Example request

```json
```bash
curl -H "Content-Type: application/json"
"https://{URL}/v1/metrics?key=S3CR3T"
```
Expand Down Expand Up @@ -81,14 +81,14 @@ GET "/v1/metrics/va_metrics"

### Example request

```
```bash
curl -H "Content-Type: application/json"
"https://{URL}/v1/metrics/va_metrics"
```

### Example request with URL parameters

```
```bash
curl -H "Content-Type: application/json"
"https://{URL}/v1/metrics/va_metrics?start_date=2019-03-01&end_date=2019-07-24&projects=ARGO,ARGO-2"
```
Expand Down
39 changes: 19 additions & 20 deletions doc/v1/docs/api_projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GET "/v1/projects"
```

### Example request
```
```bash
curl -X GET -H "Content-Type: application/json"
"https://{URL}/v1/projects?key=S3CR3T"
```
Expand All @@ -24,7 +24,6 @@ Success Response


```json

{
"projects": [
{
Expand Down Expand Up @@ -69,7 +68,7 @@ GET "/v1/projects/{project_name}"


### Example request
```
```bash
curl -X GET -H "Content-Type: application/json"
"https://{URL}/v1/projects/BRAND_NEW?key=S3CR3T"
```
Expand Down Expand Up @@ -116,9 +115,9 @@ POST "/v1/projects/{project_name}"
### Example request


```
```bash
curl -X POST -H "Content-Type: application/json"
-d POSTDATA "https://{URL}/v1/projects/PROJECT_NEW?key=S3CR3T"
-d $POSTDATA "https://{URL}/v1/projects/PROJECT_NEW?key=S3CR3T"
```

### Responses
Expand All @@ -144,7 +143,7 @@ Please refer to section [Errors](api_errors.md) to see all possible Errors
This request updates information (such as name,description) on an existing project (PUT)

### Request
```json
```
PUT "/v1/projects/{project_name}"
```

Expand All @@ -160,9 +159,9 @@ PUT "/v1/projects/{project_name}"
```

### Example request
```
```bash
curl -X PUT -H "Content-Type: application/json"
-d POSTDATA "https://{URL}/v1/projects/PROJECT_NEW?key=S3CR3T"
-d $POSTDATA "https://{URL}/v1/projects/PROJECT_NEW?key=S3CR3T"
```

### Responses
Expand All @@ -188,7 +187,7 @@ Please refer to section [Errors](api_errors.md) to see all possible Errors
This request deletes a specific project

### Request
```json
```
DELETE "/v1/projects/{project_name}"
```

Expand All @@ -197,7 +196,7 @@ DELETE "/v1/projects/{project_name}"

### Example request

```json
```bash
curl -X DELETE -H "Content-Type: application/json"
"https://{URL}/v1/projects/BRAND_NEW?key=S3CR3T"
```
Expand All @@ -217,7 +216,7 @@ containing the projects, subscriptions and topics that the user belongs to.


### Example request
```
```bash
curl -X GET -H "Content-Type: application/json"
"https://{URL}/v1/projects/ARGO2/members?key=S3CR3T&details=true"
```
Expand Down Expand Up @@ -293,7 +292,7 @@ returned remove user information such as `token`, `service_roles` and `created_b
### [GET] Show a specific member user of the specific project

### Example request
```
```bash
curl -X GET -H "Content-Type: application/json"
"https://{URL}/v1/projects/ARGO2/members/Test?key=S3CR3T"
```
Expand Down Expand Up @@ -339,9 +338,9 @@ Please refer to section [Errors](api_errors.md) to see all possible Errors
### [POST] Create a new member user under the specific project

### Example request
```
```bash
curl -X POST -H "Content-Type: application/json"
-d POSTDATA "https://{URL}/v1/projects/ARGO2/members/NewUser?key=S3CR3T"
-d $POSTDATA "https://{URL}/v1/projects/ARGO2/members/NewUser?key=S3CR3T"
```

### Post body:
Expand Down Expand Up @@ -393,9 +392,9 @@ Please refer to section [Errors](api_errors.md) to see all possible Errors
### [PUT] Updates the roles for a member user under the specific project

### Example request
```
```bash
curl -X PUT -H "Content-Type: application/json"
-d POSTDATA "https://{URL}/v1/projects/ARGO2/members/NewUser?key=S3CR3T"
-d $POSTDATA "https://{URL}/v1/projects/ARGO2/members/NewUser?key=S3CR3T"
```

### Post body:
Expand Down Expand Up @@ -446,9 +445,9 @@ Please refer to section [Errors](api_errors.md) to see all possible Errors
### [POST] Add/Invite a user to a project

### Example request
```
```bash
curl -X POST -H "Content-Type: application/json"
-d POSTDATA "https://{URL}/v1/projects/ARGO2/members/NewUser:add?key=S3CR3T"
-d $POSTDATA "https://{URL}/v1/projects/ARGO2/members/NewUser:add?key=S3CR3T"
```

### Post body:
Expand Down Expand Up @@ -495,7 +494,7 @@ Please refer to section [Errors](api_errors.md) to see all possible Errors
### [POST] Remove a user from the project

### Example request
```
```bash
curl -X POST -H "Content-Type: application/json"
"https://{URL}/v1/projects/ARGO2/members/NewUser:remove?key=S3CR3T"
```
Expand Down Expand Up @@ -526,7 +525,7 @@ GET "/v1/projects/{project_name}:metrics"

### Example request

```json
```bash
curl -H "Content-Type: application/json"
"https://{URL}/v1/projects/BRAND_NEW:metrics?key=S3CR3T"
```
Expand Down
10 changes: 5 additions & 5 deletions doc/v1/docs/api_registrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARGO Messaging Service supports calls for registering users
This request creates a new registration for a future user

### Request
```json
```
POST "/v1/registrations
```

Expand Down Expand Up @@ -61,7 +61,7 @@ This request accepts a user's registration
and as a result it creates a new user with the provided information.
### Request
```json
```
POST "/v1/registrations/{uuid}:accept"
```
Expand Down Expand Up @@ -102,7 +102,7 @@ You can also provide a comment regarding
the decline reason of the registration.
### Request
```json
```
POST "/v1/registrations/{uuid}:decline"
```
### Post body:
Expand Down Expand Up @@ -135,7 +135,7 @@ Please refer to section [Errors](api_errors.md) to see all possible Errors
This request retrieves a user's registration
### Request
```json
```
GET "/v1/registrations/{uuid}"
```
Expand Down Expand Up @@ -174,7 +174,7 @@ Please refer to section [Errors](api_errors.md) to see all possible Errors
This request retrieves all registration in the service
### Request
```json
```
GET "/v1/registrations"
```
Expand Down
Loading

0 comments on commit a828d23

Please sign in to comment.