Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
infohub
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaia-X
Trust Services API
infohub
Commits
333d23bf
Commit
333d23bf
authored
2 years ago
by
Lyuben Penkovski
Browse files
Options
Downloads
Patches
Plain Diff
Add basic service documentation to README.md
parent
00f29662
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!10
Add basic service documentation to README.md
Pipeline
#52128
passed with stages
in 1 minute and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+75
-1
75 additions, 1 deletion
README.md
with
75 additions
and
1 deletion
README.md
+
75
−
1
View file @
333d23bf
...
...
@@ -6,7 +6,81 @@
Information Hub service is responsible for exporting and importing policy data
wrapped in Verifiable Credentials and Verifiable Presentations.
It is developed using the
[
Goa v3
](
https://goa.design/
)
framework.
While the service is up and running, you can see a live Swagger API
description at
`servicehost:serviceport/swagger-ui`
. In the local docker-compose
environment, the Swagger URL is available at http://localhost:8084/swagger-ui/
### Export
An export
*must*
be defined by Export Configuration stored in a MongoDB collection named
`exports`
.
Clients trigger an export by making an HTTP GET request using the name of the export as path
parameter. No other parameters are necessary to perform an export except its name.
Export returns JSON data wrapped as Verifiable Credentials and Verifiable Presentations.
The data itself is the result of one or more policy executions and is
*always*
taken from
the Cache service. If data for a given export is not found in the Cache, then policy evaluation
is triggered so that the data can be placed in Cache for future exports.
After the data is retrieved from Cache, it is wrapped in
[
VC/VP
](
https://www.w3.org/TR/vc-data-model
)
and is given to the Signer service for adding a
[
VP proof
](
https://www.w3.org/TR/vc-data-model/#proofs-signatures
)
.
```
mermaid
flowchart LR
A([client]) -- GET --> B["/v1/export/{name}"]
subgraph infohub
B --> C[(Export\nConfiguration)]
end
subgraph data
D[Policy] --> E[Cache]
end
F[Signer\nProof]
infohub --> data
data --> F
```
### Import
An import can put arbitrary external JSON data into the TSA Cache.
The data must be wrapped as Verifiable Presentation, similar to exports.
If VP proofs are verified successfully, the data is inserted into the Cache
and the cache key by which the data can later be retrieved is returned
in the response to the import request.
```
mermaid
flowchart LR
A([client]) -- POST --> B["/v1/import"]
subgraph infohub
B --> C[/Verify Proofs/]
end
C --valid--> D[Cache]
```
### Dependencies and Vendor
The project uses Go modules for managing dependencies and we commit the vendor directory.
When you add/change dependencies, be sure to clean and update the vendor directory before
submitting your Merge Request for review.
```
shell
go mod tidy
go mod vendor
```
### Tests and Linters
To execute the units tests for the service go to the root project directory and run:
```
shell
go
test
-race
./...
```
To run the linters go to the root project directory and run:
```
shell
golangci-lint run
```
## License
<hr/>
[
Apache 2.0 license
](
LICENSE
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment