1# Qualifier Lexicon 2 3This lexicon defines standard qualifier names that servers 4**MAY** support in the `Qualifier` message to facilitate interoperability. 5 6The following standard qualifier `name`s are defined: 7 8* `resource_type`: This describes the type of resource. 9 10 File assests should use an existing [media type](https://www.iana.org/assignments/media-types/media-types.xhtml). 11 12 Git repositories should use `application/x-git`. 13 14 Example: 15 ```json 16 // (FetchDirectoryRequest proto) 17 { 18 "uris": [ 19 "https://github.com/bazelbuild/remote-apis.git" 20 ], 21 "qualifiers": [ 22 { 23 "name": "resource_type", 24 "value": "application/x-git" 25 } 26 ] 27 } 28 ``` 29 30* `checksum.sri`: The value represents a [Subresource Integrity](https://www.w3.org/TR/SRI/) 31 checksum of the content. 32 33 Example: 34 ```json 35 // (FetchBlobRequest proto) 36 { 37 "uris": [ 38 "https://github.com/bazelbuild/remote-apis/archive/v2.0.0.tar.gz" 39 ], 40 "qualifiers": [ 41 { 42 "name": "checksum.sri", 43 "value": "sha384-G9d9sKLNRfeFfGn1mnVXeJzXSbkCsYt11kl5hJnHpdzfVuLIuruIDnrs/lZyB4Gs" 44 } 45 ] 46 } 47 ``` 48 49* `directory`: This is the relative path of a subdirectory of the resource. There should 50 be no trailing `/`. 51 52 Example: 53 ```json 54 // (FetchDirectoryRequest proto) 55 { 56 "uris": [ 57 "https://github.com/bazelbuild/remote-apis.git" 58 ], 59 "qualifiers": [ 60 { 61 "name": "directory", 62 "value": "build/bazel/remote/execution/v2" 63 } 64 ] 65 } 66 ``` 67 68* `vcs.branch`: This is the name of the branch under source control management 69 70 Example: 71 ```json 72 // (FetchDirectoryRequest proto) 73 { 74 "uris": [ 75 "https://github.com/bazelbuild/remote-apis.git" 76 ], 77 "qualifiers": [ 78 { 79 "name": "vcs.branch", 80 "value": "master" 81 } 82 ] 83 } 84 ``` 85 86* `vcs.commit`: The value is the identity of a specific version of the content 87 under source control management. For git this is a commit-ish, for subversion 88 this is a revision, for example. 89 90 Example: 91 ```json 92 // (FetchDirectoryRequest proto) 93 { 94 "uris": [ 95 "https://github.com/bazelbuild/remote-apis.git" 96 ], 97 "qualifiers": [ 98 { 99 "name": "vcs.commit", 100 "value": "b5123b1bb2853393c7b9aa43236db924d7e32d61" 101 } 102 ] 103 } 104 ``` 105