git_store/types
Types
pub type CommitInfo {
CommitInfo(
sha: String,
url: String,
html_url: String,
message: String,
)
}
Constructors
-
CommitInfo( sha: String, url: String, html_url: String, message: String, )
pub type DirListing {
DirListing(
name: String,
path: String,
sha: String,
size: Int,
type_: String,
download_url: option.Option(String),
)
}
Constructors
-
DirListing( name: String, path: String, sha: String, size: Int, type_: String, download_url: option.Option(String), )
pub type ExpectResponseType {
ExpectFile
ExpectDir
}
Constructors
-
ExpectFile -
ExpectDir
pub type FileInfo {
FileInfo(
name: String,
path: String,
sha: String,
size: Int,
url: String,
html_url: String,
git_url: String,
download_url: String,
type_: String,
)
}
Constructors
-
FileInfo( name: String, path: String, sha: String, size: Int, url: String, html_url: String, git_url: String, download_url: String, type_: String, )
The required fields to create a new file in a GitHub repo. Message is the commit message Content is the base64 encoded text content of the file
pub type GitHubFile {
GitHubFileCreate(message: String, content: String)
GitHubFileUpdate(message: String, content: String, sha: String)
GitHubFileDelete(message: String, sha: String)
}
Constructors
-
GitHubFileCreate(message: String, content: String) -
GitHubFileUpdate(message: String, content: String, sha: String) -
GitHubFileDelete(message: String, sha: String)
pub type GitHubResponse {
GitHubGetFileResponse(
content: String,
encoding: String,
sha: String,
size: Int,
)
GitHubGetDirResponse(List(DirListing))
GitHubCreateFileResponse(content: FileInfo, commit: CommitInfo)
GitHubUpdateFileResponse(content: FileInfo, commit: CommitInfo)
GitHubDeleteFileResponse(
content: option.Option(String),
commit: CommitInfo,
)
}
Constructors
-
GitHubGetFileResponse( content: String, encoding: String, sha: String, size: Int, ) -
GitHubGetDirResponse(List(DirListing)) -
GitHubCreateFileResponse(content: FileInfo, commit: CommitInfo) -
GitHubUpdateFileResponse(content: FileInfo, commit: CommitInfo) -
GitHubDeleteFileResponse( content: option.Option(String), commit: CommitInfo, )
Values
pub fn expect_to_string(expect: ExpectResponseType) -> String
pub fn response_to_string(response: GitHubResponse) -> String