lakefs/api/api_data/
request_data.rs

1#![allow(dead_code)]
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Deserialize)]
5pub struct Pagination {
6    pub has_more: bool,
7    pub next_offset: String,
8    pub results: u64,
9    pub max_per_page: u64,
10}
11
12#[derive(Debug, Deserialize)]
13pub struct ResultData<T> {
14    pub pagination: Pagination,
15    pub results: T,
16}
17
18#[derive(Debug, Clone, Deserialize, Serialize)]
19pub struct QueryData {
20    pub after: String,
21    pub amount: u64,
22    pub prefix: String,
23    pub delimiter: String,
24    pub user_metadata: bool,
25    pub presign: bool,
26    #[serde(rename = "path")]
27    pub file_name: String,
28}
29
30impl Default for QueryData {
31    fn default() -> Self {
32        Self {
33            after: String::new(),
34            amount: 100,
35            prefix: String::new(),
36            delimiter: String::new(),
37            user_metadata: false,
38            presign: false,
39            file_name: String::new(),
40        }
41    }
42}