mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-05-17 12:41:38 +00:00
72 lines
1.7 KiB
Protocol Buffer
72 lines
1.7 KiB
Protocol Buffer
edition = "2023";
|
|
|
|
option go_package = "codeberg.org/git-pages/git-pages/main";
|
|
|
|
enum Type {
|
|
// Invalid entry.
|
|
Invalid = 0;
|
|
// Directory.
|
|
Directory = 1;
|
|
// Inline file. `Blob.Data` contains file contents.
|
|
InlineFile = 2;
|
|
// External file. `Blob.Data` contains object reference.
|
|
ExternalFile = 3;
|
|
// Symlink. `Blob.Data` contains relative path.
|
|
Symlink = 4;
|
|
}
|
|
|
|
enum Transform {
|
|
// No transformation.
|
|
None = 0;
|
|
// Zstandard compression.
|
|
Zstandard = 1;
|
|
}
|
|
|
|
message Entry {
|
|
Type type = 1;
|
|
// Only present for `type == InlineFile` and `type == ExternalFile`.
|
|
// For transformed entries, refers to the post-transformation (compressed) size.
|
|
uint32 size = 2;
|
|
// Meaning depends on `type`:
|
|
// * If `type == InlineFile`, contains file data.
|
|
// * If `type == ExternalFile`, contains blob name (an otherwise unspecified
|
|
// cryptographically secure content hash).
|
|
// * If `type == Symlink`, contains link target.
|
|
// * Otherwise not present.
|
|
bytes data = 3;
|
|
// Only present for `type == InlineFile` and `type == ExternalFile` that
|
|
// have been transformed.
|
|
Transform xfrm = 4;
|
|
}
|
|
|
|
// See https://docs.netlify.com/manage/routing/redirects/overview/ for details.
|
|
// Only a subset of the Netlify specification is representable here.
|
|
message Redirect {
|
|
string from = 1;
|
|
string to = 2;
|
|
uint32 status = 3;
|
|
bool force = 4;
|
|
}
|
|
|
|
message Problem {
|
|
string path = 1;
|
|
string cause = 2;
|
|
}
|
|
|
|
message Manifest {
|
|
// Source metadata
|
|
string repo_url = 1;
|
|
string branch = 2;
|
|
string commit = 3;
|
|
|
|
// Contents
|
|
map<string, Entry> contents = 4;
|
|
uint32 total_size = 5;
|
|
|
|
// Netlify-style `_redirects`
|
|
repeated Redirect redirects = 6;
|
|
|
|
// Diagnostics for non-fatal errors
|
|
repeated Problem problems = 7;
|
|
}
|