modulepackage
0.0.0-20241212124933-4cb6afc16a82
Repository: https://github.com/orecast/metadata.git
Documentation: pkg.go.dev
# README
MetaData Service
Meta Data service for OreCast.
OreCast APIs
public APIs
/meta
get all meta data records/meta/:site
get meta data record for a given site
Example
# get all sites records
curl http://localhost:8300/meta
protected APIs
/meta
post new meta data record/meta/:mid
delete meta data record for a given meta-data ID
Example
# record.json
{
"site":"Cornell",
"description": "waste minerals",
"tags": ["waste", "minerals"],
"bucket": "waste"
}
# inject new record
curl -v -X POST -H "Content-type: application/json" \
-H "Authorization: Bearer $token" \
-d@./record.json \
http://localhost:8300/meta
# Functions
MetaDeleteHandler provides access to Delete /meta/:mid end-point.
MetaHandler provives access to GET /meta end-point.
MetaPostHandler provides access to POST /meta end-point.
MetaRecordHandler provides access to GET /meta/:site end-point.
MetaSiteHandler provides access to GET /meta/:site end-point.
No description provided by the author
# Structs
MetaData represents meta-data object.
MetaIdParams represents URI storage params in /meta/:mid end-point.
SiteParams represents URI storage params in /meta/:site end-point.