{"id":25599515,"url":"https://github.com/indaco/tempo-api","last_synced_at":"2026-07-13T10:32:32.268Z","repository":{"id":279748886,"uuid":"932229771","full_name":"indaco/tempo-api","owner":"indaco","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-17T08:57:13.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T05:45:08.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/indaco.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":"2025-02-13T15:26:05.000Z","updated_at":"2025-02-17T08:57:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"574a3840-20b3-41fd-9d17-0c82a805b4d3","html_url":"https://github.com/indaco/tempo-api","commit_stats":null,"previous_names":["indaco/tempo-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/indaco/tempo-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempo-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempo-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempo-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempo-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indaco","download_url":"https://codeload.github.com/indaco/tempo-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempo-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35420322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-02-21T14:35:41.576Z","updated_at":"2026-07-13T10:32:32.249Z","avatar_url":"https://github.com/indaco.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `tempo-api`\n\nThe `tempo-api` package provides core interfaces and types for extending the **tempo CLI** functionality.\n\n## 💻 Installation\n\n```bash\ngo get github.com/indaco/tempo-api@latest\n```\n\n## 📦 Packages Overview\n\n### `tempo-api/templatefuncs`\n\nThis package defines the `TemplateFuncProvider` interface, which external function providers must implement to register custom template functions.\n\n#### Implementing a Custom Template Function Provider\n\nTo register custom template functions, your Go package must implement the `TemplateFuncProvider` interface **and define the provider in a file named `provider.go`**.\n\n#### Example\n\n```go\n// provider.go\npackage myprovider\n\nimport (\n    \"text/template\"\n\n    \"github.com/indaco/tempo-api/templatefuncs\"\n)\n\n// MyProvider implements the TemplateFuncProvider interface\ntype MyProvider struct{}\n\n// GetFunctions returns a map of function names to implementations\nfunc (p *MyProvider) GetFunctions() template.FuncMap {\n    return template.FuncMap{\n        \"myFunc\": func() string { return \"Hello from myFunc!\" },\n    }\n}\n\n// Provider instance (must be declared in provider.go)\nvar Provider templatefuncs.TemplateFuncProvider = \u0026MyProvider{}\n```\n\n\u003e [!IMPORTANT]\n\u003e The `file` must be named **provider.go** for tempo to detect it.\n\u003e\n\u003e The Provider variable **must** be:\n\u003e\n\u003e - Exported (`Provider`, not `provider`).\n\u003e - Declared at the **package level** (not inside a function).\n\u003e - Implementing `templatefuncs.TemplateFuncProvider`.\n\n## 🔗 Registering the Provider in Tempo\n\nOnce your provider is implemented, you can register it using the tempo register functions command:\n\n### Register from a Git Repository\n\n```bash\ntempo register functions --url https://github.com/user/myprovider.git\n```\n\n### Register from a Local Path\n\n```bash\ntempo register functions --path /path/to/myprovider_module\n```\n\n## Existing Providers\n\n- [tempo-provider-sprig](https://github.com/indaco/tempo-provider-sprig)\n\n## 📖 Related Documentation\n\n- [Tempo CLI](https://github.com/indaco/tempo)\n- [Extending Tempo](https://github.com/indaco/tempo/blob/main/README.md#-extending-tempo)\n\n## 🆓 License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findaco%2Ftempo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findaco%2Ftempo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findaco%2Ftempo-api/lists"}