modulepackage
0.1.6
Repository: https://github.com/chesscomputing/metadata.git
Documentation: pkg.go.dev
# README
MetaData Service
CHESS Meta Data service
Example
# record.json can be one of CHESS meta-data records
# inject new record
curl -v -X POST -H "Content-type: application/json" \
-H "Authorization: Bearer $token" \
-d@./record.json \
http://localhost:8300
# perform search with pagination
curl -X POST \
-H "Authorization: bearer $token" \
-H "Content-type: application/json" \
-d '{"client":"go-client","service_query":{"query":"{}","spec":null,"sql":"","idx":0,"limit":2}}' \
http://localhost:8300/search
# retrieve concrete record with did=123456789
curl -H "Accept: application/json" \
-H "Authorization: bearer $token" \
http://localhost:8300/123456789
# Functions
DataHandler handles POST upload of meta-data record.
DeleteHandler handles POST queries.
MetaDetailsHandler provides MetaData details dictionary via /meta end-point.
QueryCountHandler handles POST queries.
QueryHandler handles POST queries.
RecordHandler handles queries via GET requests.
RecordsHandler handles requests to get set of records for provided meta parametes.
Server defines our HTTP server.
SummaryHandler handles queries via GET requests.
# Variables
SchemaRenewInterval setup internal to update schema cache.
content is our static web server content.
Verbose defines verbosity level.
# Structs
MetaData represents meta-data object.
MetaParams represents /record?did=bla end-point.
Schema provides structure of schema file.
SchemaDetails represents individual FOXDEN schema units dictionary.
SchemaManager holds current map of MetaData schema objects.
SchemaObject holds current MetaData schema.
SchemaRecord provide schema record structure.
# Type aliases
SchemaKeys represents full collection of schema keys across all schemas.