File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change @@ -1648,6 +1648,58 @@ local html = import 'html.libsonnet';
16481648 Encodes the given value into an MD5 string.
16491649 ||| ,
16501650 },
1651+ {
1652+ name: 'sha1' ,
1653+ params: ['s' ],
1654+ availableSince: 'upcoming' ,
1655+ description: [
1656+ html.p({}, |||
1657+ Encodes the given value into an SHA1 string.
1658+ ||| ),
1659+ html.p({}, |||
1660+ This function is only available in Go version of jsonnet.
1661+ ||| ),
1662+ ],
1663+ },
1664+ {
1665+ name: 'sha256' ,
1666+ params: ['s' ],
1667+ availableSince: 'upcoming' ,
1668+ description: [
1669+ html.p({}, |||
1670+ Encodes the given value into an SHA256 string.
1671+ ||| ),
1672+ html.p({}, |||
1673+ This function is only available in Go version of jsonnet.
1674+ ||| ),
1675+ ],
1676+ },
1677+ {
1678+ name: 'sha512' ,
1679+ params: ['s' ],
1680+ availableSince: 'upcoming' ,
1681+ description: [
1682+ html.p({}, |||
1683+ Encodes the given value into an SHA512 string.
1684+ ||| ),
1685+ html.p({}, |||
1686+ This function is only available in Go version of jsonnet.
1687+ ||| ),
1688+ ],
1689+ },
1690+ {
1691+ name: 'sha3' ,
1692+ params: ['s' ],
1693+ availableSince: 'upcoming' ,
1694+ description: [
1695+ html.p({}, |||
1696+ Encodes the given value into an SHA3 string.
1697+ ||| ),
1698+ html.p({}, |||
1699+ This function is only available in Go version of jsonnet.
1700+ ||| ),
1701+ ],
1702+ },
16511703 ],
16521704 },
16531705 {
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ limitations under the License.
2525 local std = self ,
2626 local id = function (x) x,
2727
28+ local go_only_function = error 'This function is only supported in go version of jsonnet. See https://github.com/google/go-jsonnet' ,
29+
2830 isString(v):: std.type (v) == 'string' ,
2931 isNumber(v):: std.type (v) == 'number' ,
3032 isBoolean(v):: std.type (v) == 'boolean' ,
@@ -1772,5 +1774,10 @@ limitations under the License.
17721774 if k != key
17731775 },
17741776
1777+ sha1(str):: go_only_function,
1778+ sha256(str):: go_only_function,
1779+ sha512(str):: go_only_function,
1780+ sha3(str):: go_only_function,
1781+
17751782 trim(str):: std.stripChars(str, ' \t\n\f\r\u0085\u00A0 ' ),
17761783}
You can’t perform that action at this time.
0 commit comments