{"id":15502763,"url":"https://github.com/j-siu/go-gitapi","last_synced_at":"2026-04-27T23:36:22.299Z","repository":{"id":57695082,"uuid":"488795013","full_name":"J-Siu/go-gitapi","owner":"J-Siu","description":"github/gitea REST API library for golang","archived":false,"fork":false,"pushed_at":"2023-03-27T07:58:39.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T17:28:27.995Z","etag":null,"topics":["api","gitea","github","go","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/J-Siu.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-05-05T01:32:42.000Z","updated_at":"2022-05-25T06:44:08.000Z","dependencies_parsed_at":"2024-06-20T18:55:23.023Z","dependency_job_id":null,"html_url":"https://github.com/J-Siu/go-gitapi","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fgo-gitapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fgo-gitapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fgo-gitapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fgo-gitapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/J-Siu","download_url":"https://codeload.github.com/J-Siu/go-gitapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246077434,"owners_count":20719989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api","gitea","github","go","golang"],"created_at":"2024-10-02T09:10:58.997Z","updated_at":"2026-04-27T23:36:22.294Z","avatar_url":"https://github.com/J-Siu.png","language":"Go","funding_links":["https://www.paypal.com/donate/?business=HZF49NM9D35SJ\u0026no_recurring=0\u0026currency_code=CAD"],"categories":[],"sub_categories":[],"readme":"# go-gitapi  [![Paypal donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate/?business=HZF49NM9D35SJ\u0026no_recurring=0\u0026currency_code=CAD)\n\nGolang Github/Gitea api library using [go-restapi](https://github.com/J-Siu/go-restapi).\n\n### Table Of Content\n\u003c!-- TOC --\u003e\n\n- [Pro](#pro)\n- [Doc](#doc)\n- [Dependency](#dependency)\n- [Supported git repository services](#supported-git-repository-services)\n- [Usage Example](#usage-example)\n- [Used By Project](#used-by-project)\n- [Repository](#repository)\n- [Contributors](#contributors)\n- [Change Log](#change-log)\n- [License](#license)\n\n\u003c!-- /TOC --\u003e\n\u003c!--more--\u003e\n\n#### api.go\n\n```go\nfunc (t *GitApi) EndpointRepos() *GitApi\nfunc (t *GitApi) EndpointReposActionsGithub() *GitApi\nfunc (t *GitApi) EndpointReposSecrets() *GitApi\nfunc (t *GitApi) EndpointReposSecretsPubkey() *GitApi\nfunc (t *GitApi) EndpointReposTopics() *GitApi\nfunc (t *GitApi) EndpointUserRepos() *GitApi\nfunc (t *GitApi) HeaderGithub() *GitApi\nfunc (t *GitApi) HeaderInit() *GitApi\nfunc (t *GitApi) New(property *Property) *GitApi\nfunc New(property *Property) *GitApi\n```\n\n```go\ntype IInfo interface\n```\n\n#### Repo Struct\n\n```go\ntype EncryptedPair struct\ntype PublicKey struct\ntype Private struct\ntype Visibility struct\ntype Description struct\ntype Topics struct\ntype Info struct\ntype Error struct\ntype InfoList []IInfo\n```\n\n### Pro\n\n- Easy to extend\n- Small size\n\n### Doc\n\n- https://pkg.go.dev/github.com/J-Siu/go-gitapi\n\n### Dependency\n\n- [go-helper](https://github.com/J-Siu/go-helper)\n\n### Supported git repository services\n- gitea\n- github\n- gogs\n\n### Usage Example\n\nFollowing is code to create a new repository:\n\n1. Prepare a GitApi data structure\n    ```go\n    var info gitapi.RepoInfo\n    info.Name = \"test\"\n    info.Private = remote.Private\n    ```\n\n2. Setup and execute\n    ```go\n    property = gitapi.Property{\n      // Debug:      true,\n      EntryPoint: \"https://api.github.com\",\n      Info:       \u0026repoList,\n      Name:       \"Test\",\n      User:       \"User\",\n      Token:      \"01234567890123456789012345678912\",\n      Vendor:     gitapi.VendorGithub,\n      SkipVerify: false,\n    }\n\n    // Get instance\n    gitApi := gitapi.New(\u0026property)\n    // Setup endpoint\n    gitApi.EndpointRepos()\n    // Setup Github header\n    gitApi.HeaderGithub()\n    // Set http method: Post\n    gitApi.SetPost()\n    // Do request\n    success := gitApi.Do().Ok()\n    ```\n\n### Used By Project\n\n- [go-mygit](https://github.com/J-Siu/go-mygit)\n### Repository\n\n- [go-gitapi](https://github.com/J-Siu/go-gitapi)\n\n### Contributors\n\n- [John, Sing Dao, Siu](https://github.com/J-Siu)\n\n### License\n\nThe MIT License (MIT)\n\nCopyright © 2025 John, Sing Dao, Siu \u003cjohn.sd.siu@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-siu%2Fgo-gitapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-siu%2Fgo-gitapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-siu%2Fgo-gitapi/lists"}