{"modulePath":"github.com/CHESSComputing/DataBookkeeping","version":"v0.4.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\n## Variables\n\n```go\nvar Verbose int\n```\nVerbose controls verbosity level\n\n## Functions\n\n```go\nfunc ApiHandler(c *gin.Context, api string)\n```\nApiHandler represents generic API handler for GET/POST/PUT/DELETE requests of a specific API\n\n```go\nfunc ChildHandler(c *gin.Context)\n```\nChildHandler provides access to /child and /child/:name end-point\n\n```go\nfunc ConfigHandler(c *gin.Context)\n```\nConfigHandler provides access to /configs end-point\n\n```go\nfunc DBSDeleteHandler(c *gin.Context, a string)\n```\nDBSDeleteHandler is a generic handler to call DBS delete APIs\n\n```go\nfunc DBSGetHandler(c *gin.Context, a string)\n```\nDBSGetHandler is a generic Get handler to call DBS Get APIs.\n\n```go\nfunc DBSPostHandler(c *gin.Context, a string)\n```\nPOST handler\n\nDBSPostHandler is a generic handler to call DBS Post APIs\n\n```go\nfunc DBSPutHandler(c *gin.Context, a string)\n```\nDBSPutHandler is a generic handler to call DBS put APIs\n\n```go\nfunc DatasetHandler(c *gin.Context)\n```\nDatasetHandler provides access to GET /datasets and /dataset/:name end-point\n\n```go\nfunc EnvironmentHandler(c *gin.Context)\n```\nEnvironmentHandler provides access to /environments end-point\n\n```go\nfunc FileHandler(c *gin.Context)\n```\nFileHandler provides access to /files and /file/:name end-point\n\n```go\nfunc OsinfoHandler(c *gin.Context)\n```\nOsinfoHandler provides access to /osinfo end-point\n\n```go\nfunc PackageHandler(c *gin.Context)\n```\nPackageHandler provides access to /packages end-point\n\n```go\nfunc ParentHandler(c *gin.Context)\n```\nParentHandler provides access to /parent and /parent/:name end-point\n\n```go\nfunc ProvenanceHandler(c *gin.Context)\n```\nProvenanceHandler provides access to /provenance and /provenance/:did end-point\n\n```go\nfunc ScriptHandler(c *gin.Context)\n```\nScriptHandler provides access to /scripts end-point\n\n```go\nfunc Server()\n```\nServer defines our HTTP server\n\n## Types\n\n```go\ntype HTTPError struct {\n\tMethod         string `json:\"method\"`           // HTTP method\n\tHTTPCode       int    `json:\"code\"`             // HTTP status code from IANA\n\tTimestamp      string `json:\"timestamp\"`        // timestamp of the error\n\tPath           string `json:\"path\"`             // URL path\n\tUserAgent      string `json:\"user_agent\"`       // http user-agent field\n\tXForwardedHost string `json:\"x_forwarded_host\"` // http.Request X-Forwarded-Host\n\tXForwardedFor  string `json:\"x_forwarded_for\"`  // http.Request X-Forwarded-For\n\tRemoteAddr     string `json:\"remote_addr\"`      // http.Request remote address\n}\n```\nHTTPError represents HTTP error structure\n\n```go\ntype NameRequest struct {\n\tName string `uri:\"name\" json:\"name\"`\n}\n```\n\n```go\ntype ServerError struct {\n\tDBSError  string    `json:\"dbs_error\"` // DBS error\n\tHTTPError HTTPError `json:\"http_http\"` // HTTP section of the error\n\tException int       `json:\"exception\"` // for compatibility with Python server\n\tType      string    `json:\"type\"`      // for compatibility with Python server\n\tMessage   string    `json:\"message\"`   // for compatibility with Python server\n}\n```\nServerError represents HTTP server error structure\n\n","path":"github.com/CHESSComputing/DataBookkeeping","name":"main","synopsis":"","isRedistributable":true}
