blob: a1e61f9af2b398ab8dfd15f47bce0f9a14c1a58e [file] [log] [blame]
syntax = "proto3";
package bufman.dubbo.apache.org.module.v1alpha1;
import "breaking/v1/config.proto";
import "lint/v1/config.proto";
import "google/protobuf/timestamp.proto";
enum DigestType {
DIGEST_TYPE_UNSPECIFIED = 0;
DIGEST_TYPE_SHAKE256 = 1;
}
// Digest represents a hash function's value.
message Digest {
// digest_type describes the hash algorithm. e.g. "SHAKE256"
DigestType digest_type = 1;
// digest is the hash's output without encoding.
bytes digest = 2;
}
// Blob represents some module content with an associated hash.
message Blob {
// Digest of the content.
Digest digest = 1;
// Content of the blob. Optional when Blob is used as a content pointer.
bytes content = 2;
}
// Module is a module.
message Module {
// files are the files that make up the set.
//
// Sorted by path.
// Path must be unique.
// Only the target files. No imports.
//
// Maximum total size of all content: 32MB.
repeated ModuleFile files = 1;
// dependencies are the dependencies.
repeated ModulePin dependencies = 2;
// documentation is the string representation of the contents of the file at documentation_path.
//
// string is used to enforce UTF-8 encoding or 7-bit ASCII text.
string documentation = 3;
// breaking_config is the breaking change detection configuration set for the module.
bufman.dubbo.apache.org.breaking.v1.Config breaking_config = 4;
// lint_config is the lint configuration set for the module.
bufman.dubbo.apache.org.lint.v1.Config lint_config = 5;
// license is the string representation of the contents of the `LICENSE` file.
//
// string is used to enforce UTF-8 encoding or 7-bit ASCII text.
string license = 6;
// documentation_path is the path of the file which contains the module documentation.
//
// either `buf.md`, `README.md` or `README.markdown`.
// if empty, assumes buf.md.
string documentation_path = 7;
}
// ModuleFile is a file within a FileSet.
message ModuleFile {
// path is the relative path of the file.
// Path can only use '/' as the separator character, and includes no ".." components.
string path = 1;
// content is the content of the file.
bytes content = 2;
}
// ModuleReference is a module reference.
message ModuleReference {
string remote = 1;
string owner = 2;
string repository = 3;
// either tag, or commit
string reference = 4;
}
// ModulePin is a module pin.
message ModulePin {
reserved 6;
reserved "digest";
string remote = 1;
string owner = 2;
string repository = 3;
string branch = 4;
string commit = 5;
google.protobuf.Timestamp create_time = 7;
// Module's manifest digest. Replacement for previous b1/b3 digests.
string manifest_digest = 8;
}