Skip to content

pradiptade/web-app-metadata

Repository files navigation

This module implements two RESTful API endpoints to consume payloads passed in YAML format.

APIs supported by this application

/metadata/postMetadata

  • the user passes the payload (as YAML) one at a time.

/metadata/getMetadata:

  • If the key(s) exist, and value(s) match, then return the matched payloads in memory
  • If no match, then return all payloads in memory

TESTING

Using go "testing" package

The test cases are in metadata_test.go.
Execute: go test [-v]

Using 'curl' from command line:

-- Input invalid data: curl http://localhost:8080/metadata -X POST -H 'Content-Type:application/yaml' --data-binary @invalid-1.yml
curl http://localhost:8080/metadata -X POST -H 'Content-Type:application/yaml' --data-binary @invalid-2.yml

-- Retrieve data based on search parameters:
curl http://localhost:8080/metadata?title=Valid+App+1\&version=0.0.1
curl http://localhost:8080/metadata?title=App

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages