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 @@ -1612,6 +1612,58 @@ local html = import 'html.libsonnet';
16121612 Encodes the given value into an MD5 string.
16131613 ||| ,
16141614 },
1615+ {
1616+ name: 'sha1' ,
1617+ params: ['s' ],
1618+ availableSince: 'upcoming' ,
1619+ description: [
1620+ html.p({}, |||
1621+ Encodes the given value into an SHA1 string.
1622+ ||| ),
1623+ html.p({}, |||
1624+ This function is only available in Go version of jsonnet.
1625+ ||| ),
1626+ ],
1627+ },
1628+ {
1629+ name: 'sha256' ,
1630+ params: ['s' ],
1631+ availableSince: 'upcoming' ,
1632+ description: [
1633+ html.p({}, |||
1634+ Encodes the given value into an SHA256 string.
1635+ ||| ),
1636+ html.p({}, |||
1637+ This function is only available in Go version of jsonnet.
1638+ ||| ),
1639+ ],
1640+ },
1641+ {
1642+ name: 'sha512' ,
1643+ params: ['s' ],
1644+ availableSince: 'upcoming' ,
1645+ description: [
1646+ html.p({}, |||
1647+ Encodes the given value into an SHA512 string.
1648+ ||| ),
1649+ html.p({}, |||
1650+ This function is only available in Go version of jsonnet.
1651+ ||| ),
1652+ ],
1653+ },
1654+ {
1655+ name: 'sha3' ,
1656+ params: ['s' ],
1657+ availableSince: 'upcoming' ,
1658+ description: [
1659+ html.p({}, |||
1660+ Encodes the given value into an SHA3 string.
1661+ ||| ),
1662+ html.p({}, |||
1663+ This function is only available in Go version of jsonnet.
1664+ ||| ),
1665+ ],
1666+ },
16151667 ],
16161668 },
16171669 {
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' ,
@@ -1759,4 +1761,9 @@ limitations under the License.
17591761 for k in std.objectFields (obj)
17601762 if k != key
17611763 },
1764+
1765+ sha1(str):: go_only_function,
1766+ sha256(str):: go_only_function,
1767+ sha512(str):: go_only_function,
1768+ sha3(str):: go_only_function,
17621769}
You can’t perform that action at this time.
0 commit comments