feat: implement Gitea API client

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
panw
2026-03-31 16:17:39 +08:00
parent 6e935a6a41
commit 872bab34b6
2 changed files with 123 additions and 0 deletions

25
internal/gitea/types.go Normal file
View File

@@ -0,0 +1,25 @@
package gitea
type GiteaUser struct {
ID int64 `json:"id"`
Login string `json:"login"`
FullName string `json:"full_name"`
Email string `json:"email"`
}
type GiteaRepo struct {
ID int64 `json:"id"`
Name string `json:"name"`
FullName string `json:"full_name"`
CloneURL string `json:"clone_url"`
SSHURL string `json:"ssh_url"`
Private bool `json:"private"`
Size int64 `json:"size"`
Updated string `json:"updated_at"`
Owner *GiteaUser `json:"owner"`
}
type GiteaSearchResponse struct {
OK bool `json:"ok"`
Data []GiteaRepo `json:"data"`
}