common: rabbit refactor

Generalize interface to allow processing of any events, not just
Gitea events.
This commit is contained in:
2025-07-21 22:30:04 +02:00
parent 69dac4ec31
commit 3d24dce5c0
11 changed files with 260 additions and 151 deletions

View File

@@ -562,7 +562,21 @@ func (c *ObsClient) DeleteProject(project string) error {
}
return nil
}
func (c *ObsClient) BuildLog(prj, pkg, repo, arch string) (io.ReadCloser, error) {
url := c.baseUrl.JoinPath("build", prj, repo, arch, pkg, "_log")
query := url.Query()
query.Add("nostream", "1")
query.Add("start", "0")
url.RawQuery = query.Encode()
res, err := c.ObsRequestRaw("GET", url.String(), nil)
if err != nil {
return nil, err
}
return res.Body, nil
}
type PackageBuildStatus struct {