1mod admin;
14mod branch;
15mod commit;
16mod common;
17mod content;
18mod diff;
19mod lfs;
20pub mod pagination;
21mod repo;
22
23pub use admin::{ApiKey, ApiKeyCreated, ApiKeyScope, CreateApiKeyRequest, ListApiKeysResponse};
24pub use branch::{Branch, CreateBranchRequest, ListBranchesResponse};
25pub use commit::{
26 Author, Commit, CommitFile, CommitFileAction, CommitFileChange, CommitSummary,
27 CreateCommitRequest, CreateCommitWithLfsRequest, ListCommitsResponse,
28};
29pub use common::SuccessResponse;
30pub use content::{Content, DirEntry, DirEntryType};
31pub use diff::{Diff, DiffFile, DiffStats};
32pub use lfs::{
33 CommitLfsFile, LfsFileRef, LfsObjectError, LfsObjectSpec, LfsObjectStatus,
34 UploadLfsObjectsRequest, UploadLfsObjectsResponse,
35};
36pub use pagination::{Paginated, PaginationParams};
37pub use repo::{CreateRepoRequest, ListReposResponse, RenameRepoRequest, Repo};
38
39impl Paginated for ListReposResponse {
42 type Item = Repo;
43
44 fn items(self) -> Vec<Self::Item> {
45 self.repos
46 }
47
48 fn next_cursor(&self) -> Option<&str> {
49 self.next_cursor.as_deref()
50 }
51
52 fn has_more(&self) -> bool {
53 self.has_more
54 }
55}
56
57impl Paginated for ListBranchesResponse {
58 type Item = Branch;
59
60 fn items(self) -> Vec<Self::Item> {
61 self.branches
62 }
63
64 fn next_cursor(&self) -> Option<&str> {
65 self.next_cursor.as_deref()
66 }
67
68 fn has_more(&self) -> bool {
69 self.has_more
70 }
71}
72
73impl Paginated for ListCommitsResponse {
74 type Item = CommitSummary;
75
76 fn items(self) -> Vec<Self::Item> {
77 self.commits
78 }
79
80 fn next_cursor(&self) -> Option<&str> {
81 self.next_cursor.as_deref()
82 }
83
84 fn has_more(&self) -> bool {
85 self.has_more
86 }
87}