rust_codecov/
repos.rs

1use crate::author::Author;
2use crate::url::Url;
3/**
4 * Codecov v2 API
5 * /repos endpoint returns a list of repos for a given owner.
6 */
7use serde::{Deserialize, Serialize};
8
9/**
10 * ReposAPIResponse is a struct that represents the response from the repos API.
11 */
12#[derive(Serialize, Deserialize, Debug)]
13pub struct ReposAPIResponse {
14    pub results: Vec<Repo>,
15    pub count: usize,
16    pub next: Option<Url>,
17    pub previous: Option<Url>,
18    pub total_pages: usize,
19}
20
21/**
22 * Repo is a struct that represents a repo.
23 */
24#[derive(Serialize, Deserialize, Debug)]
25pub struct Repo {
26    pub name: String,
27    pub private: bool,
28    pub updatestamp: String, // TODO: ISO Date
29    pub author: Author,
30    pub language: Option<String>,
31    pub branch: Option<String>,
32    pub active: bool,
33    pub activated: bool,
34}