feat(cli): added commands for interacting with build logs

This commit is contained in:
Jef Roosens 2022-05-07 21:50:20 +02:00
parent fa6603bd45
commit 5b016df85d
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
7 changed files with 145 additions and 11 deletions

View file

@ -27,6 +27,12 @@ pub fn (c &Client) get_build_log(id int) ?Response<BuildLog> {
return data
}
pub fn (c &Client) get_build_log_content(id int) ?string {
data := c.send_request_raw_response(Method.get, '/api/logs/$id/content', {}, '') ?
return data
}
pub fn (c &Client) add_build_log(repo_id int, start_time time.Time, end_time time.Time, arch string, exit_code int, content string) ?Response<string> {
params := {
'repo': repo_id.str()