krz/hutch

an ios client for sourcehut

clone: git clone https://gitbay.org/krz/hutch.git

v3.11.0: Shared/HutchDeepLinkURLs.swift · raw

 1import Foundation
 2
 3/// Canonical `hutch://` URLs for widgets, tests, and in-app links.
 4enum HutchDeepLinkURL {
 5    static let home = URL(string: "hutch://home")!
 6    static let emptyHost = URL(string: "hutch://")!
 7    static let repositoryGit = URL(string: "hutch://git/~user/repo")!
 8    static let repositoryHg = URL(string: "hutch://hg/~user/repo")!
 9    static let gitOwnerRoot = URL(string: "hutch://git/~owner/")!
10    static let ticket = URL(string: "hutch://todo/~owner/tracker/42")!
11    static let buildJob = URL(string: "hutch://builds/12345")!
12    static let buildJobWithOwner = URL(string: "hutch://builds/~owner/job/12345")!
13    static let mailingList = URL(string: "hutch://lists/~owner/list")!
14    static let trackers = URL(string: "hutch://trackers")!
15    static let builds = URL(string: "hutch://builds")!
16    static let repositories = URL(string: "hutch://repositories")!
17    static let status = URL(string: "hutch://status")!
18    static let lookup = URL(string: "hutch://lookup")!
19    static let userProfile = URL(string: "hutch://lookup/~owner")!
20    static let unknown = URL(string: "hutch://unknown")!
21    static let invalidTicketId = URL(string: "hutch://todo/~owner/tracker/abc")!
22    static let invalidBuildId = URL(string: "hutch://builds/abc")!
23}
24
25/// Default Hutch Stats API base URL (mirrors `AppConfiguration` fallback).
26enum HutchStatsAPI {
27    static let defaultBaseURL = URL(string: "https://hs.krz.sh")!
28}