{"id":38248794,"url":"https://github.com/pantacor/pantahub-base","last_synced_at":"2026-01-17T01:25:45.978Z","repository":{"id":41939664,"uuid":"212830672","full_name":"pantacor/pantahub-base","owner":"pantacor","description":"mirror of https://gitlab.com/pantacor/pantahub-base","archived":false,"fork":false,"pushed_at":"2025-12-16T15:24:09.000Z","size":78470,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-20T06:29:32.089Z","etag":null,"topics":["devices","linux-devices","pantacor","pantahub","pantahub-base"],"latest_commit_sha":null,"homepage":"https://gitlab.com/pantacor/pantahub-base","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pantacor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-04T14:13:15.000Z","updated_at":"2025-12-04T14:15:33.000Z","dependencies_parsed_at":"2024-05-22T15:43:34.608Z","dependency_job_id":"872652ff-b256-4bcb-8ea7-9e7aedb25f51","html_url":"https://github.com/pantacor/pantahub-base","commit_stats":null,"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"purl":"pkg:github/pantacor/pantahub-base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantacor%2Fpantahub-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantacor%2Fpantahub-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantacor%2Fpantahub-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantacor%2Fpantahub-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pantacor","download_url":"https://codeload.github.com/pantacor/pantahub-base/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantacor%2Fpantahub-base/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28491462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devices","linux-devices","pantacor","pantahub","pantahub-base"],"created_at":"2026-01-17T01:25:45.903Z","updated_at":"2026-01-17T01:25:45.968Z","avatar_url":"https://github.com/pantacor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nPantahub Base APIs reference implementation.\n\n# Prepare\n\n * get a reasonable fresh golang engine (1.9++) and install it\n * Install a mongodb database locally or get credentials for hosted instance\n * Install elasticsearch 6.x.x and start it using default settings\n * Install fluentd or td-agent (on windows) and start it using with the config\n   include in pantahub-base source: fluentd.localhost.conf\n * Decide where you want to store the objects. By default we store objects in\n   $CWD/../local-s3/ folder; you can use environment variables (see below)\n   to adjust this\n\n# Build\n\n```\n$ go get -v u gitlab.com/pantacor/pantahub-base\n...\n\n$ go build -o ~/bin/pantahub-base gitlab.com/pantacor/pantahub-base\n...\n``` \n# Test\n\n* Note:Make Sure testharness project is accessible\n\n```\n$ git clone -b develop https://gitlab.com/pantacor/pantahub-testharness\n...\n\n```\n$ go test -v ./tests/...\n...\n\n# Run\n\n```\n$ pantahub-base\nmongodb connect: mongodb://localhost:27017/pantabase-serv\nS3 Development Path: ../local-s3/\n2017/06/19 21:56:04 Serving @ https://127.0.0.1:12366/\n2017/06/19 21:56:04 Serving @ http://127.0.0.1:12365/\n2017/06/19 21:56:04 Serving @ https://::1:12366/\n2017/06/19 21:56:04 Serving @ http://::1:12365/\n2017/06/19 21:56:04 Serving @ https://10.42.0.1:12366/\n2017/06/19 21:56:04 Serving @ http://10.42.0.1:12365/\n2017/06/19 21:56:04 Serving @ https://fe80::90a9:7a0:a5d5:f808:12366/\n2017/06/19 21:56:04 Serving @ http://fe80::90a9:7a0:a5d5:f808:12365/\n2017/06/19 21:56:04 Serving @ https://192.168.178.75:12366/\n2017/06/19 21:56:04 Serving @ http://192.168.178.75:12365/\n2017/06/19 21:56:04 Serving @ https://2a02:2028:66c:1201:3bae:315f:3ad8:c6ee:12366/\n2017/06/19 21:56:04 Serving @ http://2a02:2028:66c:1201:3bae:315f:3ad8:c6ee:12365/\n2017/06/19 21:56:04 Serving @ https://fe80::f64a:6b7d:ede:b208:12366/\n2017/06/19 21:56:04 Serving @ http://fe80::f64a:6b7d:ede:b208:12365/\n2017/06/19 21:56:04 Serving @ https://172.18.0.1:12366/\n2017/06/19 21:56:04 Serving @ http://172.18.0.1:12365/\n2017/06/19 21:56:04 Serving @ https://fe80::42:82ff:fea9:63a4:12366/\n2017/06/19 21:56:04 Serving @ http://fe80::42:82ff:fea9:63a4:12365/\n2017/06/19 21:56:04 Serving @ https://172.17.0.1:12366/\n2017/06/19 21:56:04 Serving @ http://172.17.0.1:12365/\n2017/06/19 21:56:04 Serving @ https://fe80::42:97ff:fef7:9daa:12366/\n2017/06/19 21:56:04 Serving @ http://fe80::42:97ff:fef7:9daa:12365/\n2017/06/19 21:56:04 Serving @ https://fe80::5491:a3ff:fed7:c798:12366/\n2017/06/19 21:56:04 Serving @ http://fe80::5491:a3ff:fed7:c798:12365/\n2017/06/19 21:56:04 Serving @ https://fe80::c0a3:b4ff:fe0d:e3b8:12366/\n2017/06/19 21:56:04 Serving @ http://fe80::c0a3:b4ff:fe0d:e3b8:12365/\n```\n\n# Configure\n\nWe currently support the environment variables you can find in utils/env.go:\n\n```\nconst (\n\t// Pantahub JWT Secret. THIS MUST BE SET TO SOMETHING SECRET!!\n\t// default: \"THIS MUST BE CHANGED\"\n\tEnvPantahubJWTAuthSecret = \"PANTAHUB_JWT_SECRET\"\n\n\t// Host you want clients to reach this server under\n\t// default: localhost\n\tEnvPantahubHost       = \"PANTAHUB_HOST\"\n\n\t// Port you want to make this server available under\n\t// default: 12365 for http and 12366 for https\n\tEnvPantahubPort       = \"PANTAHUB_PORT\"\n\n\t// Default scheme to use for urls pointing at this server when we encode\n\t// them in json or redirect (e.g. for auth)\n\t// default: http\n\tEnvPantahubScheme     = \"PANTAHUB_SCHEME\"\n\n\t// XXX: not used\n\tEnvPantahubAPIVersion = \"PANTAHUB_APIVERSION\"\n\n\t// Authentication endpoint to point clients to that need access tokens\n\t// or need more privileged access tokens.\n\t// default: $PANTAHUB_SCHEME://$PANTAHUB_HOST:$PANTAHUB_PORT/auth\n\tEnvPantahubAuth       = \"PH_AUTH\"\n\n\t// port to listen to on for http on internal interfaces\n\t// default: 12365\n\tEnvPantahubPortInt     = \"PANTAHUB_PORT_INT\"\n\n\t// port to listen to on for https on internal interfaces\n\t// default: 12366\n\tEnvPantahubPortIntTLS = \"PANTAHUB_PORT_INT_TLS\"\n\n\t// Hostname for mongodb connection\n\t// default: localhost\n\tEnvMongoHost          = \"MONGO_HOST\"\n\n\t// Port for mongodb connection\n\t// default: 27017\n\tEnvMongoPort          = \"MONGO_PORT\"\n\n\t// Database name for mongodb connection\n\t// default: pantabase-serv\n\tEnvMongoDb            = \"MONGO_DB\"\n\n\t// Database user for mongodb connection\n\t// default: \u003cnone\u003e\n\tEnvMongoUser          = \"MONGO_USER\"\n\n\t// Database password for mongodb connection\n\t// default: \u003cnone\u003e\n\tEnvMongoPassword          = \"MONGO_PASS\"\n\n\t// SMTP host to use for sending mails\n\t// default: \u003cnone\u003e\n\tEnvSMTPHost           = \"SMTP_HOST\"\n\n\t// SMTP port to use for sending mails\n\t// default: \u003cnone\u003e\n\tEnvSMTPPort           = \"SMTP_PORT\"\n\n\t// SMTP user to use for sending mails\n\t// default: \u003cnone\u003e\n\tEnvSMTPUser           = \"SMTP_USER\"\n\n\t// SMTP pass to use for sending mails\n\t// default: \u003cnone\u003e\n\tEnvSMTPPass           = \"SMTP_PASS\"\n)\n```\n\n# APIs\n\nThe following APIs are currently included and documented:\n\n * [Auth API](auth/README.md)\n * [Devices API](devices/README.md)\n * [Trails API](trails/README.md)\n * [Logs API](logs/README.md)\n\n\n# PVR\n\nThe most convenient way to interface with pantahub for a subset of its features is through the ```pvr``` tool.\n\nSee https://gitlab.com/pantacor/pvr for more features.\n\n# Docker\n\nConvenience docker builds are available in gcr.io/pantahub-registry/pantahub-base\n\nTo run the latest:\n\n```\ndocker run -it --rm \\\n\t-v/path/to/storage:/opt/ph/local-s3 \\\n\tgcr.io/pantahub-registry/pantahub-base:latest\n```\n\n# Build your own Docker\n\nWant to build your own docker images? Check out https://gitlab.com/pantacor/pantahub-containers/\nand the readmes there\n\n# Docker Compose\n\nGet start with `docker-compose`:\n\n```bash\n$ docker-compose up -d\n```\n\nCreate the test local s3 bucket\n\n```bash\n$ ./locals3.bash mb s3://testing/\nmake_bucket: testing\n```\n\nRun all tests\n\n```bash\n$ docker-compose exec base go test ./...\n```\n\n# Kubernetes\n\nCheck our example deployment manifest in https://gitlab.com/pantacor/pantahub-containers/api/k8s directory.\n\n# Issues/Support:\n\nPlease use Issue trackers on gitlab.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantacor%2Fpantahub-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpantacor%2Fpantahub-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantacor%2Fpantahub-base/lists"}