common: rabbit refactor
Generalize interface to allow processing of any events, not just Gitea events.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user