Task collection improvements (#109)
This commit is contained in:
parent
d96831fe3a
commit
7e4deab8f7
81 changed files with 44585 additions and 38569 deletions
22
go.mod
22
go.mod
|
@ -30,8 +30,10 @@ require (
|
|||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/fzipp/gocyclo v0.0.0-20150627053110-6acd4345c835
|
||||
github.com/garyburd/redigo v1.6.0 // indirect
|
||||
github.com/gin-gonic/gin v1.5.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.3 // indirect
|
||||
github.com/go-openapi/spec v0.19.3 // indirect
|
||||
github.com/go-openapi/spec v0.19.4 // indirect
|
||||
github.com/go-playground/universal-translator v0.17.0 // indirect
|
||||
github.com/go-redis/redis v6.15.2+incompatible
|
||||
github.com/go-sql-driver/mysql v1.4.1
|
||||
github.com/go-xorm/builder v0.3.4
|
||||
|
@ -39,16 +41,16 @@ require (
|
|||
github.com/go-xorm/tests v0.5.6 // indirect
|
||||
github.com/go-xorm/xorm v0.7.1
|
||||
github.com/go-xorm/xorm-redis-cache v0.0.0-20180727005610-859b313566b2
|
||||
github.com/golang/protobuf v1.3.2 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.0.0-20180909121442-1003c8bd00dc
|
||||
github.com/imdario/mergo v0.3.7
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/jgautheron/goconst v0.0.0-20170703170152-9740945f5dcb
|
||||
github.com/json-iterator/go v1.1.7 // indirect
|
||||
github.com/json-iterator/go v1.1.8 // indirect
|
||||
github.com/kr/pty v1.1.8 // indirect
|
||||
github.com/labstack/echo/v4 v4.1.11
|
||||
github.com/labstack/gommon v0.3.0
|
||||
github.com/laurent22/ical-go v0.1.1-0.20181107184520-7e5d6ade8eef
|
||||
github.com/leodido/go-urn v1.2.0 // indirect
|
||||
github.com/mailru/easyjson v0.7.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.4 // indirect
|
||||
github.com/mattn/go-isatty v0.0.10 // indirect
|
||||
|
@ -71,24 +73,24 @@ require (
|
|||
github.com/spf13/viper v1.3.2
|
||||
github.com/stretchr/testify v1.4.0
|
||||
github.com/swaggo/swag v1.6.3
|
||||
github.com/ugorji/go v1.1.7 // indirect
|
||||
github.com/ulule/limiter/v3 v3.3.0
|
||||
github.com/urfave/cli v1.22.1 // indirect
|
||||
github.com/urfave/cli v1.22.2 // indirect
|
||||
github.com/valyala/fasttemplate v1.1.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
|
||||
golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422
|
||||
golang.org/x/net v0.0.0-20191021144547-ec77196f6094 // indirect
|
||||
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933 // indirect
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
|
||||
golang.org/x/sys v0.0.0-20191023151326-f89234f9a2c2 // indirect
|
||||
golang.org/x/tools v0.0.0-20191023202404-2b779830f9d3 // indirect
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect
|
||||
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d // indirect
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect
|
||||
google.golang.org/appengine v1.5.0 // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
gopkg.in/d4l3k/messagediff.v1 v1.2.1
|
||||
gopkg.in/go-playground/validator.v9 v9.30.2 // indirect
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
||||
gopkg.in/testfixtures.v2 v2.5.3
|
||||
gopkg.in/yaml.v2 v2.2.4 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.7 // indirect
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a
|
||||
src.techknowlogick.com/xgo v0.0.0-20190507142556-a5b29ecb0ff4
|
||||
src.techknowlogick.com/xormigrate v0.0.0-20190321151057-24497c23c09c
|
||||
|
|
24
go.sum
24
go.sum
|
@ -81,6 +81,7 @@ github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NB
|
|||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y=
|
||||
github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
|
||||
github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do=
|
||||
github.com/go-chi/chi v3.3.3+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
|
||||
github.com/go-openapi/jsonpointer v0.17.0 h1:nH6xp8XdXHx8dqveo0ZuJBluCO2qGrPbDNZ0dwoRHP0=
|
||||
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||
|
@ -103,6 +104,8 @@ github.com/go-openapi/spec v0.19.0 h1:A4SZ6IWh3lnjH0rG0Z5lkxazMGBECtrZcbyYQi+64k
|
|||
github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
|
||||
github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc=
|
||||
github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
|
||||
github.com/go-openapi/spec v0.19.4 h1:ixzUSnHTd6hCemgtAJgluaTSGYpLNpJY4mA2DIkdOAo=
|
||||
github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
|
||||
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||
github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||
github.com/go-openapi/swag v0.19.0 h1:Kg7Wl7LkTPlmc393QZQ/5rQadPhi7pBVEMZxyTi0Ii8=
|
||||
|
@ -110,6 +113,10 @@ github.com/go-openapi/swag v0.19.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/
|
|||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY=
|
||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
||||
github.com/go-redis/redis v6.14.0+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
||||
github.com/go-redis/redis v6.15.2+incompatible h1:9SpNVG76gr6InJGxoZ6IuuxaCOQwDAhzyXg+Bs+0Sb4=
|
||||
github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
||||
|
@ -163,6 +170,7 @@ github.com/json-iterator/go v0.0.0-20180806060727-1624edc4454b/go.mod h1:+SdeFBv
|
|||
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/kolaente/caldav-go v3.0.1-0.20190524174923-9e5cd1688227+incompatible h1:PkEEpmbrFXlMul8cOplR8nkcIM/NDbx+H6fq2+vaKAA=
|
||||
github.com/kolaente/caldav-go v3.0.1-0.20190524174923-9e5cd1688227+incompatible/go.mod h1:y1UhTNI4g0hVymJrI6yJ5/ohy09hNBeU8iJEZjgdDOw=
|
||||
github.com/kolaente/echo/v4 v4.0.0-20190507190305-3725a216d803/go.mod h1:3LbYC6VkwmUnmLPZ8WFdHdQHG77e9GQbjyhWdb1QvC4=
|
||||
|
@ -194,6 +202,8 @@ github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0
|
|||
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
||||
github.com/laurent22/ical-go v0.1.1-0.20181107184520-7e5d6ade8eef h1:RZnRnSID1skF35j/15KJ6hKZkdIC/teQClJK5wP5LU4=
|
||||
github.com/laurent22/ical-go v0.1.1-0.20181107184520-7e5d6ade8eef/go.mod h1:4LATl0uhhtytR6p9n1AlktDyIz4u2iUnWEdI3L/hXiw=
|
||||
github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw=
|
||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||
github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
|
||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
|
||||
|
@ -329,6 +339,8 @@ github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
|
|||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
|
||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
|
||||
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8=
|
||||
|
@ -352,6 +364,8 @@ golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1 h1:anGSYQpPhQwXlwsu5wmfq0nWkCNaMEMUwAv13Y92hd8=
|
||||
golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 h1:QzoH/1pFpZguR8NrRHLcO6jKqfv2zpuSqZLgdm7ZmjI=
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -378,6 +392,8 @@ golang.org/x/net v0.0.0-20191011234655-491137f69257 h1:ry8e2D+cwaV6hk7lb3aRTjjZo
|
|||
golang.org/x/net v0.0.0-20191011234655-491137f69257/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191021144547-ec77196f6094 h1:5O4U9trLjNpuhpynaDsqwCk+Tw6seqJz1EbqbnzHrc8=
|
||||
golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933 h1:e6HwijUxhDe+hPNjZQQn9bA5PW3vNmnN64U2ZW759Lk=
|
||||
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
@ -411,6 +427,8 @@ golang.org/x/sys v0.0.0-20191023145028-b69606af412f h1:HNixo/W24k2W4EliZfUFl5ApI
|
|||
golang.org/x/sys v0.0.0-20191023145028-b69606af412f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191023151326-f89234f9a2c2 h1:I7efaDQAsIQmkTF+WSdcydwVWzK07Yuz8IFF8rNkDe0=
|
||||
golang.org/x/sys v0.0.0-20191023151326-f89234f9a2c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU=
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
|
@ -437,6 +455,8 @@ golang.org/x/tools v0.0.0-20191023163450-98e333b8b3a3 h1:4haCIJia9wHJUU7z9f7PTC8
|
|||
golang.org/x/tools v0.0.0-20191023163450-98e333b8b3a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191023202404-2b779830f9d3 h1:0vQisIa3mUFShxg7Xyq8WFt/ArQ1soDk5A5uF62IJCc=
|
||||
golang.org/x/tools v0.0.0-20191023202404-2b779830f9d3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d h1:/iIZNFGxc/a7C3yWjGcnboV+Tkc7mxr+p6fDztwoxuM=
|
||||
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.3.0 h1:FBSsiFRMz3LBeXIomRnVzrQwSDj4ibvcRexLG0LZGQk=
|
||||
|
@ -457,6 +477,8 @@ gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
|||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
|
||||
gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
|
||||
gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
|
||||
gopkg.in/go-playground/validator.v9 v9.30.2/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
|
||||
gopkg.in/stretchr/testify.v1 v1.2.2 h1:yhQC6Uy5CqibAIlk1wlusa/MJ3iAN49/BsR/dCCKz3M=
|
||||
|
@ -471,6 +493,8 @@ gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
|||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo=
|
||||
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a h1:LJwr7TCTghdatWv40WobzlKXc9c4s8oGa7QKJUtHhWA=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
src.techknowlogick.com/xgo v0.0.0-20190507142556-a5b29ecb0ff4 h1:DZKMg4qnT7UIyB5ZaC6ZqltF2K5KhA1oQ2PdxOLZ3jg=
|
||||
|
|
|
@ -409,6 +409,27 @@ func TestLinkSharing(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("Tasks", func(t *testing.T) {
|
||||
testHandlerTaskReadOnlyCollection := webHandlerTest{
|
||||
linkShare: linkshareRead,
|
||||
strFunc: func() handler.CObject {
|
||||
return &models.TaskCollection{}
|
||||
},
|
||||
t: t,
|
||||
}
|
||||
testHandlerTaskWriteCollection := webHandlerTest{
|
||||
linkShare: linkShareWrite,
|
||||
strFunc: func() handler.CObject {
|
||||
return &models.TaskCollection{}
|
||||
},
|
||||
t: t,
|
||||
}
|
||||
testHandlerTaskAdminCollection := webHandlerTest{
|
||||
linkShare: linkShareAdmin,
|
||||
strFunc: func() handler.CObject {
|
||||
return &models.TaskCollection{}
|
||||
},
|
||||
t: t,
|
||||
}
|
||||
testHandlerTaskReadOnly := webHandlerTest{
|
||||
linkShare: linkshareRead,
|
||||
strFunc: func() handler.CObject {
|
||||
|
@ -432,7 +453,7 @@ func TestLinkSharing(t *testing.T) {
|
|||
}
|
||||
t.Run("ReadAll", func(t *testing.T) {
|
||||
t.Run("Shared readonly", func(t *testing.T) {
|
||||
rec, err := testHandlerTaskReadOnly.testReadAllWithLinkShare(nil, nil)
|
||||
rec, err := testHandlerTaskReadOnlyCollection.testReadAllWithLinkShare(nil, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `task #1`)
|
||||
assert.Contains(t, rec.Body.String(), `task #2`)
|
||||
|
@ -450,7 +471,7 @@ func TestLinkSharing(t *testing.T) {
|
|||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
})
|
||||
t.Run("Shared write", func(t *testing.T) {
|
||||
rec, err := testHandlerTaskWrite.testReadAllWithLinkShare(nil, nil)
|
||||
rec, err := testHandlerTaskWriteCollection.testReadAllWithLinkShare(nil, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `task #2`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #3`)
|
||||
|
@ -467,7 +488,7 @@ func TestLinkSharing(t *testing.T) {
|
|||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
})
|
||||
t.Run("Shared admin", func(t *testing.T) {
|
||||
rec, err := testHandlerTaskAdmin.testReadAllWithLinkShare(nil, nil)
|
||||
rec, err := testHandlerTaskAdminCollection.testReadAllWithLinkShare(nil, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `task #2`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #4`)
|
||||
|
|
|
@ -61,7 +61,7 @@ func TestList(t *testing.T) {
|
|||
assert.NotContains(t, rec.Body.String(), `"title":"Test2"`)
|
||||
assert.Contains(t, rec.Body.String(), `"owner":{"id":1,"username":"user1",`)
|
||||
assert.NotContains(t, rec.Body.String(), `"owner":{"id":2,"username":"user2",`)
|
||||
assert.Contains(t, rec.Body.String(), `"tasks":[{"id":1,"text":"task #1",`)
|
||||
assert.NotContains(t, rec.Body.String(), `"tasks":`)
|
||||
})
|
||||
t.Run("Nonexisting", func(t *testing.T) {
|
||||
_, err := testHandler.testReadOneWithUser(nil, map[string]string{"list": "9999"})
|
||||
|
@ -338,7 +338,7 @@ func TestList(t *testing.T) {
|
|||
assert.Contains(t, rec.Body.String(), `"title":"Lorem"`)
|
||||
assert.Contains(t, rec.Body.String(), `"description":""`)
|
||||
assert.Contains(t, rec.Body.String(), `"owner":{"id":1`)
|
||||
assert.Contains(t, rec.Body.String(), `"tasks":null`)
|
||||
assert.NotContains(t, rec.Body.String(), `"tasks":`)
|
||||
})
|
||||
t.Run("Normal with description", func(t *testing.T) {
|
||||
rec, err := testHandler.testCreateWithUser(nil, map[string]string{"namespace": "1"}, `{"title":"Lorem","description":"Lorem Ipsum"}`)
|
||||
|
@ -346,7 +346,7 @@ func TestList(t *testing.T) {
|
|||
assert.Contains(t, rec.Body.String(), `"title":"Lorem"`)
|
||||
assert.Contains(t, rec.Body.String(), `"description":"Lorem Ipsum"`)
|
||||
assert.Contains(t, rec.Body.String(), `"owner":{"id":1`)
|
||||
assert.Contains(t, rec.Body.String(), `"tasks":null`)
|
||||
assert.NotContains(t, rec.Body.String(), `"tasks":`)
|
||||
})
|
||||
t.Run("Nonexisting Namespace", func(t *testing.T) {
|
||||
_, err := testHandler.testCreateWithUser(nil, map[string]string{"namespace": "999999"}, `{"title":"Lorem"}`)
|
||||
|
@ -388,7 +388,7 @@ func TestList(t *testing.T) {
|
|||
assert.Contains(t, rec.Body.String(), `"title":"Lorem"`)
|
||||
assert.Contains(t, rec.Body.String(), `"description":""`)
|
||||
assert.Contains(t, rec.Body.String(), `"owner":{"id":1`)
|
||||
assert.Contains(t, rec.Body.String(), `"tasks":null`)
|
||||
assert.NotContains(t, rec.Body.String(), `"tasks":`)
|
||||
})
|
||||
t.Run("Shared Via NamespaceTeam admin", func(t *testing.T) {
|
||||
rec, err := testHandler.testCreateWithUser(nil, map[string]string{"namespace": "9"}, `{"title":"Lorem"}`)
|
||||
|
@ -396,7 +396,7 @@ func TestList(t *testing.T) {
|
|||
assert.Contains(t, rec.Body.String(), `"title":"Lorem"`)
|
||||
assert.Contains(t, rec.Body.String(), `"description":""`)
|
||||
assert.Contains(t, rec.Body.String(), `"owner":{"id":1`)
|
||||
assert.Contains(t, rec.Body.String(), `"tasks":null`)
|
||||
assert.NotContains(t, rec.Body.String(), `"tasks":`)
|
||||
})
|
||||
|
||||
t.Run("Shared Via NamespaceUser readonly", func(t *testing.T) {
|
||||
|
@ -410,7 +410,7 @@ func TestList(t *testing.T) {
|
|||
assert.Contains(t, rec.Body.String(), `"title":"Lorem"`)
|
||||
assert.Contains(t, rec.Body.String(), `"description":""`)
|
||||
assert.Contains(t, rec.Body.String(), `"owner":{"id":1`)
|
||||
assert.Contains(t, rec.Body.String(), `"tasks":null`)
|
||||
assert.NotContains(t, rec.Body.String(), `"tasks":`)
|
||||
})
|
||||
t.Run("Shared Via NamespaceUser admin", func(t *testing.T) {
|
||||
rec, err := testHandler.testCreateWithUser(nil, map[string]string{"namespace": "12"}, `{"title":"Lorem"}`)
|
||||
|
@ -418,7 +418,7 @@ func TestList(t *testing.T) {
|
|||
assert.Contains(t, rec.Body.String(), `"title":"Lorem"`)
|
||||
assert.Contains(t, rec.Body.String(), `"description":""`)
|
||||
assert.Contains(t, rec.Body.String(), `"owner":{"id":1`)
|
||||
assert.Contains(t, rec.Body.String(), `"tasks":null`)
|
||||
assert.NotContains(t, rec.Body.String(), `"tasks":`)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -33,11 +33,12 @@ func TestTaskCollection(t *testing.T) {
|
|||
},
|
||||
t: t,
|
||||
}
|
||||
// Only run specific nested tests:
|
||||
// ^TestTask$/^Update$/^Update_task_items$/^Removing_Assignees_null$
|
||||
t.Run("ReadAll", func(t *testing.T) {
|
||||
t.Run("ReadAll on list", func(t *testing.T) {
|
||||
|
||||
urlParams := map[string]string{"list": "1"}
|
||||
|
||||
t.Run("Normal", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(nil, map[string]string{"list": "1"})
|
||||
rec, err := testHandler.testReadAllWithUser(nil, urlParams)
|
||||
assert.NoError(t, err)
|
||||
// Not using assert.Equal to avoid having the tests break every time we add new fixtures
|
||||
assert.Contains(t, rec.Body.String(), `task #1`)
|
||||
|
@ -70,6 +71,150 @@ func TestTaskCollection(t *testing.T) {
|
|||
assert.Contains(t, rec.Body.String(), `task #28`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #32`)
|
||||
})
|
||||
t.Run("Search", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"s": []string{"task #6"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `task #1`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #2`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #3`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #4`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #5`)
|
||||
assert.Contains(t, rec.Body.String(), `task #6`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #7`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #8`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #9`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #10`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #11`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #12`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
})
|
||||
t.Run("Sort Order", func(t *testing.T) {
|
||||
// should equal priority desc
|
||||
t.Run("by priority", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"priority"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":1,`)
|
||||
})
|
||||
t.Run("by priority desc", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"prioritydesc"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":1,`)
|
||||
})
|
||||
t.Run("by priority asc", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"priorityasc"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `{"id":33,"text":"task #33 with percent done","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0.5,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":1,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}}]`)
|
||||
})
|
||||
// should equal duedate desc
|
||||
t.Run("by duedate", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedate"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
||||
})
|
||||
t.Run("by duedate desc", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedatedesc"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
||||
})
|
||||
t.Run("by duedate asc", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedateasc"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `{"id":6,"text":"task #6 lower due date","description":"","done":false,"doneAt":0,"dueDate":1543616724,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}}]`)
|
||||
})
|
||||
t.Run("invalid parameter", func(t *testing.T) {
|
||||
// Invalid parameter should not sort at all
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"loremipsum"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"dueDate":0,"reminderDates":null,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"dueDate":0,"reminderDates":null,"repeatAfter":0,"priority":1`)
|
||||
assert.NotContains(t, rec.Body.String(), `{"id":4,"text":"task #4 low prio","description":"","done":false,"dueDate":0,"reminderDates":null,"repeatAfter":0,"priority":1,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}},{"id":3,"text":"task #3 high prio","description":"","done":false,"dueDate":0,"reminderDates":null,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}}]`)
|
||||
assert.NotContains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"dueDate":1543636724,"reminderDates":null,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
||||
assert.NotContains(t, rec.Body.String(), `{"id":6,"text":"task #6 lower due date","description":"","done":false,"dueDate":1543616724,"reminderDates":null,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}},{"id":5,"text":"task #5 higher due date","description":"","done":false,"dueDate":1543636724,"reminderDates":null,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}}]`)
|
||||
})
|
||||
})
|
||||
t.Run("Date range", func(t *testing.T) {
|
||||
t.Run("start and end date", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"startdate": []string{"1540000000"}, "enddate": []string{"1544700001"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `task #1`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #2`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #3`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #4`)
|
||||
assert.Contains(t, rec.Body.String(), `task #5`)
|
||||
assert.Contains(t, rec.Body.String(), `task #6`)
|
||||
assert.Contains(t, rec.Body.String(), `task #7`)
|
||||
assert.Contains(t, rec.Body.String(), `task #8`)
|
||||
assert.Contains(t, rec.Body.String(), `task #9`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #10`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #11`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #12`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
})
|
||||
t.Run("start date only", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"startdate": []string{"1540000000"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `task #1`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #2`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #3`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #4`)
|
||||
assert.Contains(t, rec.Body.String(), `task #5`)
|
||||
assert.Contains(t, rec.Body.String(), `task #6`)
|
||||
assert.Contains(t, rec.Body.String(), `task #7`)
|
||||
assert.Contains(t, rec.Body.String(), `task #8`)
|
||||
assert.Contains(t, rec.Body.String(), `task #9`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #10`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #11`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #12`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
})
|
||||
t.Run("end date only", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"enddate": []string{"1544700001"}}, urlParams)
|
||||
assert.NoError(t, err)
|
||||
// If no start date but an end date is specified, this should be null
|
||||
// since we don't have any tasks in the fixtures with an end date >
|
||||
// the current date.
|
||||
assert.Equal(t, "null\n", rec.Body.String())
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("ReadAll for all tasks", func(t *testing.T) {
|
||||
t.Run("Normal", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(nil, nil)
|
||||
assert.NoError(t, err)
|
||||
// Not using assert.Equal to avoid having the tests break every time we add new fixtures
|
||||
assert.Contains(t, rec.Body.String(), `task #1`)
|
||||
assert.Contains(t, rec.Body.String(), `task #2`)
|
||||
assert.Contains(t, rec.Body.String(), `task #3`)
|
||||
assert.Contains(t, rec.Body.String(), `task #4`)
|
||||
assert.Contains(t, rec.Body.String(), `task #5`)
|
||||
assert.Contains(t, rec.Body.String(), `task #6`)
|
||||
assert.Contains(t, rec.Body.String(), `task #7`)
|
||||
assert.Contains(t, rec.Body.String(), `task #8`)
|
||||
assert.Contains(t, rec.Body.String(), `task #9`)
|
||||
assert.Contains(t, rec.Body.String(), `task #10`)
|
||||
assert.Contains(t, rec.Body.String(), `task #11`)
|
||||
assert.Contains(t, rec.Body.String(), `task #12`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
assert.Contains(t, rec.Body.String(), `task #15`) // Shared via team readonly
|
||||
assert.Contains(t, rec.Body.String(), `task #16`) // Shared via team write
|
||||
assert.Contains(t, rec.Body.String(), `task #17`) // Shared via team admin
|
||||
assert.Contains(t, rec.Body.String(), `task #18`) // Shared via user readonly
|
||||
assert.Contains(t, rec.Body.String(), `task #19`) // Shared via user write
|
||||
assert.Contains(t, rec.Body.String(), `task #20`) // Shared via user admin
|
||||
assert.Contains(t, rec.Body.String(), `task #21`) // Shared via namespace team readonly
|
||||
assert.Contains(t, rec.Body.String(), `task #22`) // Shared via namespace team write
|
||||
assert.Contains(t, rec.Body.String(), `task #23`) // Shared via namespace team admin
|
||||
assert.Contains(t, rec.Body.String(), `task #24`) // Shared via namespace user readonly
|
||||
assert.Contains(t, rec.Body.String(), `task #25`) // Shared via namespace user write
|
||||
assert.Contains(t, rec.Body.String(), `task #26`) // Shared via namespace user admin
|
||||
// TODO: Add some cases where the user has access to the list, somhow shared
|
||||
})
|
||||
t.Run("Search", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"s": []string{"task #6"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
|
|
|
@ -21,7 +21,6 @@ import (
|
|||
"code.vikunja.io/web/handler"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"net/url"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -35,149 +34,6 @@ func TestTask(t *testing.T) {
|
|||
}
|
||||
// Only run specific nested tests:
|
||||
// ^TestTask$/^Update$/^Update_task_items$/^Removing_Assignees_null$
|
||||
t.Run("ReadAll", func(t *testing.T) {
|
||||
t.Run("Normal", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(nil, nil)
|
||||
assert.NoError(t, err)
|
||||
// Not using assert.Equal to avoid having the tests break every time we add new fixtures
|
||||
assert.Contains(t, rec.Body.String(), `task #1`)
|
||||
assert.Contains(t, rec.Body.String(), `task #2`)
|
||||
assert.Contains(t, rec.Body.String(), `task #3`)
|
||||
assert.Contains(t, rec.Body.String(), `task #4`)
|
||||
assert.Contains(t, rec.Body.String(), `task #5`)
|
||||
assert.Contains(t, rec.Body.String(), `task #6`)
|
||||
assert.Contains(t, rec.Body.String(), `task #7`)
|
||||
assert.Contains(t, rec.Body.String(), `task #8`)
|
||||
assert.Contains(t, rec.Body.String(), `task #9`)
|
||||
assert.Contains(t, rec.Body.String(), `task #10`)
|
||||
assert.Contains(t, rec.Body.String(), `task #11`)
|
||||
assert.Contains(t, rec.Body.String(), `task #12`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
assert.Contains(t, rec.Body.String(), `task #15`) // Shared via team readonly
|
||||
assert.Contains(t, rec.Body.String(), `task #16`) // Shared via team write
|
||||
assert.Contains(t, rec.Body.String(), `task #17`) // Shared via team admin
|
||||
assert.Contains(t, rec.Body.String(), `task #18`) // Shared via user readonly
|
||||
assert.Contains(t, rec.Body.String(), `task #19`) // Shared via user write
|
||||
assert.Contains(t, rec.Body.String(), `task #20`) // Shared via user admin
|
||||
assert.Contains(t, rec.Body.String(), `task #21`) // Shared via namespace team readonly
|
||||
assert.Contains(t, rec.Body.String(), `task #22`) // Shared via namespace team write
|
||||
assert.Contains(t, rec.Body.String(), `task #23`) // Shared via namespace team admin
|
||||
assert.Contains(t, rec.Body.String(), `task #24`) // Shared via namespace user readonly
|
||||
assert.Contains(t, rec.Body.String(), `task #25`) // Shared via namespace user write
|
||||
assert.Contains(t, rec.Body.String(), `task #26`) // Shared via namespace user admin
|
||||
// TODO: Add some cases where the user has access to the list, somhow shared
|
||||
})
|
||||
t.Run("Search", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"s": []string{"task #6"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `task #1`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #2`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #3`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #4`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #5`)
|
||||
assert.Contains(t, rec.Body.String(), `task #6`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #7`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #8`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #9`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #10`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #11`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #12`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
})
|
||||
t.Run("Sort Order", func(t *testing.T) {
|
||||
// should equal priority desc
|
||||
t.Run("by priority", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"priority"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":1,`)
|
||||
})
|
||||
t.Run("by priority desc", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"prioritydesc"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":1,`)
|
||||
})
|
||||
t.Run("by priority asc", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"priorityasc"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `{"id":33,"text":"task #33 with percent done","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0.5,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":1,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}}]`)
|
||||
})
|
||||
// should equal duedate desc
|
||||
t.Run("by duedate", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedate"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
||||
})
|
||||
t.Run("by duedate desc", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedatedesc"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
||||
})
|
||||
t.Run("by duedate asc", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedateasc"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, rec.Body.String(), `{"id":6,"text":"task #6 lower due date","description":"","done":false,"doneAt":0,"dueDate":1543616724,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"related_tasks":{},"attachments":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}}]`)
|
||||
})
|
||||
t.Run("invalid parameter", func(t *testing.T) {
|
||||
// Invalid parameter should not sort at all
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"loremipsum"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"dueDate":0,"reminderDates":null,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"dueDate":0,"reminderDates":null,"repeatAfter":0,"priority":1`)
|
||||
assert.NotContains(t, rec.Body.String(), `{"id":4,"text":"task #4 low prio","description":"","done":false,"dueDate":0,"reminderDates":null,"repeatAfter":0,"priority":1,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}},{"id":3,"text":"task #3 high prio","description":"","done":false,"dueDate":0,"reminderDates":null,"repeatAfter":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}}]`)
|
||||
assert.NotContains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"dueDate":1543636724,"reminderDates":null,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
||||
assert.NotContains(t, rec.Body.String(), `{"id":6,"text":"task #6 lower due date","description":"","done":false,"dueDate":1543616724,"reminderDates":null,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}},{"id":5,"text":"task #5 higher due date","description":"","done":false,"dueDate":1543636724,"reminderDates":null,"repeatAfter":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":0,"username":"","email":"","created":0,"updated":0}}]`)
|
||||
})
|
||||
})
|
||||
t.Run("Date range", func(t *testing.T) {
|
||||
t.Run("start and end date", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"startdate": []string{"1540000000"}, "enddate": []string{"1544700001"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `task #1`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #2`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #3`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #4`)
|
||||
assert.Contains(t, rec.Body.String(), `task #5`)
|
||||
assert.Contains(t, rec.Body.String(), `task #6`)
|
||||
assert.Contains(t, rec.Body.String(), `task #7`)
|
||||
assert.Contains(t, rec.Body.String(), `task #8`)
|
||||
assert.Contains(t, rec.Body.String(), `task #9`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #10`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #11`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #12`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
})
|
||||
t.Run("start date only", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"startdate": []string{"1540000000"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, rec.Body.String(), `task #1`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #2`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #3`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #4`)
|
||||
assert.Contains(t, rec.Body.String(), `task #5`)
|
||||
assert.Contains(t, rec.Body.String(), `task #6`)
|
||||
assert.Contains(t, rec.Body.String(), `task #7`)
|
||||
assert.Contains(t, rec.Body.String(), `task #8`)
|
||||
assert.Contains(t, rec.Body.String(), `task #9`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #10`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #11`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #12`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #13`)
|
||||
assert.NotContains(t, rec.Body.String(), `task #14`)
|
||||
})
|
||||
t.Run("end date only", func(t *testing.T) {
|
||||
rec, err := testHandler.testReadAllWithUser(url.Values{"enddate": []string{"1544700001"}}, nil)
|
||||
assert.NoError(t, err)
|
||||
// If no start date but an end date is specified, this should be null
|
||||
// since we don't have any tasks in the fixtures with an end date >
|
||||
// the current date.
|
||||
assert.Equal(t, "null\n", rec.Body.String())
|
||||
})
|
||||
})
|
||||
})
|
||||
t.Run("Update", func(t *testing.T) {
|
||||
t.Run("Update task items", func(t *testing.T) {
|
||||
t.Run("Text", func(t *testing.T) {
|
||||
|
|
|
@ -35,7 +35,8 @@ type List struct {
|
|||
// The user who created this list.
|
||||
Owner *User `xorm:"-" json:"owner" valid:"-"`
|
||||
// An array of tasks which belong to the list.
|
||||
Tasks []*Task `xorm:"-" json:"tasks"`
|
||||
// Deprecated: you should use the dedicated task list endpoint because it has support for pagination and filtering
|
||||
Tasks []*Task `xorm:"-" json:"-"`
|
||||
|
||||
// A unix timestamp when this list was created. You cannot change this value.
|
||||
Created int64 `xorm:"created not null" json:"created"`
|
||||
|
@ -122,12 +123,6 @@ func (l *List) ReadAll(a web.Auth, search string, page int, perPage int) (result
|
|||
// @Failure 500 {object} models.Message "Internal error"
|
||||
// @Router /lists/{id} [get]
|
||||
func (l *List) ReadOne() (err error) {
|
||||
// Get list tasks
|
||||
l.Tasks, err = GetTasksByListID(l.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Get list owner
|
||||
l.Owner, err = GetUserByID(l.OwnerID)
|
||||
return
|
||||
|
@ -233,20 +228,11 @@ func getRawListsForUser(search string, u *User, page int, perPage int) (lists []
|
|||
|
||||
// AddListDetails adds owner user objects and list tasks to all lists in the slice
|
||||
func AddListDetails(lists []*List) (err error) {
|
||||
var listIDs []int64
|
||||
var ownerIDs []int64
|
||||
for _, l := range lists {
|
||||
listIDs = append(listIDs, l.ID)
|
||||
ownerIDs = append(ownerIDs, l.OwnerID)
|
||||
}
|
||||
|
||||
// Get all tasks
|
||||
ts := []*Task{}
|
||||
err = x.In("list_id", listIDs).Find(&ts)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Get all list owners
|
||||
owners := []*User{}
|
||||
err = x.In("id", ownerIDs).Find(&owners)
|
||||
|
@ -263,13 +249,6 @@ func AddListDetails(lists []*List) (err error) {
|
|||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Tasks
|
||||
for _, task := range ts {
|
||||
if task.ListID == list.ID {
|
||||
lists[in].Tasks = append(lists[in].Tasks, task)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
|
|
|
@ -471,22 +471,11 @@ func TestTask_ReadAll(t *testing.T) {
|
|||
}
|
||||
|
||||
type fields struct {
|
||||
ID int64
|
||||
Text string
|
||||
Description string
|
||||
Done bool
|
||||
DueDateUnix int64
|
||||
RemindersUnix []int64
|
||||
CreatedByID int64
|
||||
ListID int64
|
||||
RepeatAfter int64
|
||||
Priority int64
|
||||
Sorting string
|
||||
StartDateSortUnix int64
|
||||
EndDateSortUnix int64
|
||||
Created int64
|
||||
Updated int64
|
||||
CreatedBy *User
|
||||
Lists []*List
|
||||
CRUDable web.CRUDable
|
||||
Rights web.Rights
|
||||
}
|
||||
|
@ -708,23 +697,11 @@ func TestTask_ReadAll(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
lt := &Task{
|
||||
ID: tt.fields.ID,
|
||||
Text: tt.fields.Text,
|
||||
Description: tt.fields.Description,
|
||||
Done: tt.fields.Done,
|
||||
DueDateUnix: tt.fields.DueDateUnix,
|
||||
RemindersUnix: tt.fields.RemindersUnix,
|
||||
CreatedByID: tt.fields.CreatedByID,
|
||||
lt := &TaskCollection{
|
||||
ListID: tt.fields.ListID,
|
||||
RepeatAfter: tt.fields.RepeatAfter,
|
||||
Priority: tt.fields.Priority,
|
||||
Sorting: tt.fields.Sorting,
|
||||
StartDateSortUnix: tt.fields.StartDateSortUnix,
|
||||
EndDateSortUnix: tt.fields.EndDateSortUnix,
|
||||
Created: tt.fields.Created,
|
||||
Updated: tt.fields.Updated,
|
||||
CreatedBy: tt.fields.CreatedBy,
|
||||
CRUDable: tt.fields.CRUDable,
|
||||
Rights: tt.fields.Rights,
|
||||
}
|
||||
|
|
|
@ -117,7 +117,16 @@ const (
|
|||
SortTasksByPriorityDesc
|
||||
)
|
||||
|
||||
// ReadAll gets all tasks for a user
|
||||
type taskOptions struct {
|
||||
search string
|
||||
sortby SortBy
|
||||
startDate time.Time
|
||||
endDate time.Time
|
||||
page int
|
||||
perPage int
|
||||
}
|
||||
|
||||
// ReadAll is a dummy function to still have that endpoint documented
|
||||
// @Summary Get tasks
|
||||
// @Description Returns all tasks on any list the user has access to.
|
||||
// @tags task
|
||||
|
@ -134,21 +143,7 @@ const (
|
|||
// @Failure 500 {object} models.Message "Internal error"
|
||||
// @Router /tasks/all [get]
|
||||
func (t *Task) ReadAll(a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error) {
|
||||
tc := &TaskCollection{
|
||||
Sorting: t.Sorting,
|
||||
StartDateSortUnix: t.StartDateSortUnix,
|
||||
EndDateSortUnix: t.EndDateSortUnix,
|
||||
}
|
||||
return tc.ReadAll(a, search, page, perPage)
|
||||
}
|
||||
|
||||
type taskOptions struct {
|
||||
search string
|
||||
sortby SortBy
|
||||
startDate time.Time
|
||||
endDate time.Time
|
||||
page int
|
||||
perPage int
|
||||
return nil, 0, 0, nil
|
||||
}
|
||||
|
||||
func getRawTasksForLists(lists []*List, opts *taskOptions) (taskMap map[int64]*Task, resultCount int, totalItems int64, err error) {
|
||||
|
|
|
@ -215,6 +215,13 @@ func registerAPIRoutes(a *echo.Group) {
|
|||
a.DELETE("/lists/:list/shares/:share", listSharingHandler.DeleteWeb)
|
||||
}
|
||||
|
||||
taskCollectionHandler := &handler.WebHandler{
|
||||
EmptyStruct: func() handler.CObject {
|
||||
return &models.TaskCollection{}
|
||||
},
|
||||
}
|
||||
a.GET("/lists/:list/tasks", taskCollectionHandler.ReadAllWeb)
|
||||
|
||||
taskHandler := &handler.WebHandler{
|
||||
EmptyStruct: func() handler.CObject {
|
||||
return &models.Task{}
|
||||
|
@ -222,17 +229,10 @@ func registerAPIRoutes(a *echo.Group) {
|
|||
}
|
||||
a.PUT("/lists/:list", taskHandler.CreateWeb)
|
||||
a.GET("/tasks/:listtask", taskHandler.ReadOneWeb)
|
||||
a.GET("/tasks/all", taskHandler.ReadAllWeb)
|
||||
a.GET("/tasks/all", taskCollectionHandler.ReadAllWeb)
|
||||
a.DELETE("/tasks/:listtask", taskHandler.DeleteWeb)
|
||||
a.POST("/tasks/:listtask", taskHandler.UpdateWeb)
|
||||
|
||||
taskCollectionHandler := &handler.WebHandler{
|
||||
EmptyStruct: func() handler.CObject {
|
||||
return &models.TaskCollection{}
|
||||
},
|
||||
}
|
||||
a.GET("/lists/:list/tasks", taskCollectionHandler.ReadAllWeb)
|
||||
|
||||
bulkTaskHandler := &handler.WebHandler{
|
||||
EmptyStruct: func() handler.CObject {
|
||||
return &models.BulkTask{}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-11-29 18:11:53.766019702 +0100 CET m=+0.153156633
|
||||
// 2019-12-01 13:20:36.822585642 +0100 CET m=+0.129079038
|
||||
|
||||
package swagger
|
||||
|
||||
|
@ -407,7 +407,7 @@ var doc = `{
|
|||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a team by its ID.",
|
||||
"description": "Returns a list by its ID.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
|
@ -415,13 +415,13 @@ var doc = `{
|
|||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"team"
|
||||
"list"
|
||||
],
|
||||
"summary": "Gets one team",
|
||||
"summary": "Gets one list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Team ID",
|
||||
"description": "List ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
|
@ -429,13 +429,13 @@ var doc = `{
|
|||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The team",
|
||||
"description": "The list",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Team"
|
||||
"$ref": "#/definitions/models.List"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "The user does not have access to the team",
|
||||
"description": "The user does not have access to the list",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
|
|
|
@ -389,7 +389,7 @@
|
|||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a team by its ID.",
|
||||
"description": "Returns a list by its ID.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
|
@ -397,13 +397,13 @@
|
|||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"team"
|
||||
"list"
|
||||
],
|
||||
"summary": "Gets one team",
|
||||
"summary": "Gets one list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Team ID",
|
||||
"description": "List ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
|
@ -411,13 +411,13 @@
|
|||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The team",
|
||||
"description": "The list",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Team"
|
||||
"$ref": "#/definitions/models.List"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "The user does not have access to the team",
|
||||
"description": "The user does not have access to the list",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
|
|
|
@ -1138,9 +1138,9 @@ paths:
|
|||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns a team by its ID.
|
||||
description: Returns a list by its ID.
|
||||
parameters:
|
||||
- description: Team ID
|
||||
- description: List ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
|
@ -1149,11 +1149,11 @@ paths:
|
|||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The team
|
||||
description: The list
|
||||
schema:
|
||||
$ref: '#/definitions/models.Team'
|
||||
$ref: '#/definitions/models.List'
|
||||
"403":
|
||||
description: The user does not have access to the team
|
||||
description: The user does not have access to the list
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
"500":
|
||||
|
@ -1162,9 +1162,9 @@ paths:
|
|||
$ref: '#/definitions/models.Message'
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Gets one team
|
||||
summary: Gets one list
|
||||
tags:
|
||||
- team
|
||||
- list
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
|
|
36
vendor/github.com/go-openapi/spec/bindata.go
generated
vendored
36
vendor/github.com/go-openapi/spec/bindata.go
generated
vendored
File diff suppressed because one or more lines are too long
1
vendor/github.com/go-openapi/spec/ref.go
generated
vendored
1
vendor/github.com/go-openapi/spec/ref.go
generated
vendored
|
@ -72,6 +72,7 @@ func (r *Ref) IsValidURI(basepaths ...string) bool {
|
|||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer rr.Body.Close()
|
||||
|
||||
return rr.StatusCode/100 == 2
|
||||
}
|
||||
|
|
4
vendor/github.com/urfave/cli/.travis.yml
generated
vendored
4
vendor/github.com/urfave/cli/.travis.yml
generated
vendored
|
@ -28,8 +28,8 @@ before_script:
|
|||
script:
|
||||
- go run build.go vet
|
||||
- go run build.go test
|
||||
- go run build.go gfmrun
|
||||
- go run build.go toc
|
||||
- go run build.go gfmrun docs/v1/manual.md
|
||||
- go run build.go toc docs/v1/manual.md
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
|
504
vendor/github.com/urfave/cli/CHANGELOG.md
generated
vendored
504
vendor/github.com/urfave/cli/CHANGELOG.md
generated
vendored
|
@ -1,504 +0,0 @@
|
|||
# Change Log
|
||||
|
||||
**ATTN**: This project uses [semantic versioning](http://semver.org/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.22.1] - 2019-09-11
|
||||
|
||||
### Fixed
|
||||
|
||||
* Hide output of hidden commands on man pages in [urfave/cli/pull/889](https://github.com/urfave/cli/pull/889) via [@crosbymichael](https://github.com/crosbymichael)
|
||||
* Don't generate fish completion for hidden commands [urfave/cli/pull/891](https://github.com/urfave/891) via [@saschagrunert](https://github.com/saschagrunert)
|
||||
* Using short flag names for required flags throws an error in [urfave/cli/pull/890](https://github.com/urfave/cli/pull/890) via [@asahasrabuddhe](https://github.com/asahasrabuddhe)
|
||||
|
||||
### Changed
|
||||
|
||||
* Remove flag code generation logic, legacy python test runner in [urfave/cli/pull/883](https://github.com/urfave/cli/pull/883) via [@asahasrabuddhe](https://github.com/asahasrabuddhe)
|
||||
* Enable Go Modules support, drop support for `Go 1.10` add support for `Go 1.13` in [urfave/cli/pull/885](https://github.com/urfave/cli/pull/885) via [@asahasrabuddhe](https://github.com/asahasrabuddhe)
|
||||
|
||||
## [1.22.0] - 2019-09-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fix Subcommands not falling back to `app.ExitEventHandler` in [urfave/cli/pull/856](https://github.com/urfave/cli/pull/856) via [@FaranIdo](https://github.com/FaranIdo)
|
||||
|
||||
### Changed
|
||||
|
||||
* Clarify that altsrc supports both TOML and JSON in [urfave/cli/pull/774](https://github.com/urfave/cli/pull/774) via [@whereswaldon](https://github.com/whereswaldon)
|
||||
* Made the exit code example more clear in [urfave/cli/pull/823](https://github.com/urfave/cli/pull/823) via [@xordspar0](https://github.com/xordspar0)
|
||||
* Removed the use of python for internal flag generation in [urfave/cli/pull/836](https://github.com/urfave/cli/pull/836) via [@asahasrabuddhe](https://github.com/asahasrabuddhe)
|
||||
* Changed the supported go versions to `1.10`, `1.11`, `1.12` in [urfave/cli/pull/843](https://github.com/urfave/cli/pull/843) via [@lafriks](https://github.com/lafriks)
|
||||
* Changed the v1 releases section in the readme in [urfave/cli/pull/862](https://github.com/urfave/cli/pull/862) via [@russoj88](https://github.com/russoj88)
|
||||
* Cleaned up go modules in [urfave/cli/pull/874](https://github.com/urfave/cli/pull/874) via [@saschagrunert](https://github.com/saschagrunert)
|
||||
|
||||
### Added
|
||||
|
||||
* Added `UseShortOptionHandling` for combining short flags in [urfave/cli/pull/735](https://github.com/urfave/cli/pull/735) via [@rliebz](https://github.com/rliebz)
|
||||
* Added support for flags bash completion in [urfave/cli/pull/808](https://github.com/urfave/cli/pull/808) via [@yogeshlonkar](https://github.com/yogeshlonkar)
|
||||
* Added the `TakesFile` indicator to flag in [urfave/cli/pull/851](https://github.com/urfave/cli/pull/851) via [@saschagrunert](https://github.com/saschagrunert)
|
||||
* Added fish shell completion support in [urfave/cli/pull/848](https://github.com/urfave/cli/pull/848) via [@saschagrunert](https://github.com/saschagrunert)
|
||||
|
||||
## [1.21.0] - 2019-08-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fix using "slice" flag types with `EnvVar` in [urfave/cli/pull/687](https://github.com/urfave/cli/pull/687) via [@joshuarubin](https://github.com/joshuarubin)
|
||||
* Fix regression of `SkipFlagParsing` behavior in [urfave/cli/pull/697](https://github.com/urfave/cli/pull/697) via [@jszwedko](https://github.com/jszwedko)
|
||||
* Fix handling `ShortOptions` and `SkipArgReorder` in [urfave/cli/pull/686](https://github.com/urfave/cli/pull/686) via [@baude](https://github.com/baude)
|
||||
* Fix args reordering when bool flags are present in [urfave/cli/pull/712](https://github.com/urfave/cli/pull/712) via [@windler](https://github.com/windler)
|
||||
* Fix parsing of short options in [urfave/cli/pull/758](https://github.com/urfave/cli/pull/758) via [@vrothberg](https://github.com/vrothberg)
|
||||
* Fix unaligned indents for the command help messages in [urfave/cli/pull/806](https://github.com/urfave/cli/pull/806) via [@mingrammer](https://github.com/mingrammer)
|
||||
|
||||
### Changed
|
||||
|
||||
* Cleaned up help output in [urfave/cli/pull/664](https://github.com/urfave/cli/pull/664) via [@maguro](https://github.com/maguro)
|
||||
* Remove redundant nil checks in [urfave/cli/pull/773](https://github.com/urfave/cli/pull/773) via [@teresy](https://github.com/teresy)
|
||||
* Case is now considered when sorting strings in [urfave/cli/pull/676](https://github.com/urfave/cli/pull/676) via [@rliebz](https://github.com/rliebz)
|
||||
|
||||
### Added
|
||||
|
||||
* Added _"required flags"_ support in [urfave/cli/pull/819](https://github.com/urfave/cli/pull/819) via [@lynncyrin](https://github.com/lynncyrin/)
|
||||
* Backport JSON `InputSource` to v1 in [urfave/cli/pull/598](https://github.com/urfave/cli/pull/598) via [@jszwedko](https://github.com/jszwedko)
|
||||
* Allow more customization of flag help strings in [urfave/cli/pull/661](https://github.com/urfave/cli/pull/661) via [@rliebz](https://github.com/rliebz)
|
||||
* Allow custom `ExitError` handler function in [urfave/cli/pull/628](https://github.com/urfave/cli/pull/628) via [@phinnaeus](https://github.com/phinnaeus)
|
||||
* Allow loading a variable from a file in [urfave/cli/pull/675](https://github.com/urfave/cli/pull/675) via [@jmccann](https://github.com/jmccann)
|
||||
* Allow combining short bool names in [urfave/cli/pull/684](https://github.com/urfave/cli/pull/684) via [@baude](https://github.com/baude)
|
||||
* Added test coverage to context in [urfave/cli/pull/788](https://github.com/urfave/cli/pull/788) via [@benzvan](https://github.com/benzvan)
|
||||
* Added go module support in [urfave/cli/pull/831](https://github.com/urfave/cli/pull/831) via [@saschagrunert](https://github.com/saschagrunert)
|
||||
|
||||
## [1.20.0] - 2017-08-10
|
||||
|
||||
### Fixed
|
||||
|
||||
* `HandleExitCoder` is now correctly iterates over all errors in
|
||||
a `MultiError`. The exit code is the exit code of the last error or `1` if
|
||||
there are no `ExitCoder`s in the `MultiError`.
|
||||
* Fixed YAML file loading on Windows (previously would fail validate the file path)
|
||||
* Subcommand `Usage`, `Description`, `ArgsUsage`, `OnUsageError` correctly
|
||||
propogated
|
||||
* `ErrWriter` is now passed downwards through command structure to avoid the
|
||||
need to redefine it
|
||||
* Pass `Command` context into `OnUsageError` rather than parent context so that
|
||||
all fields are avaiable
|
||||
* Errors occuring in `Before` funcs are no longer double printed
|
||||
* Use `UsageText` in the help templates for commands and subcommands if
|
||||
defined; otherwise build the usage as before (was previously ignoring this
|
||||
field)
|
||||
* `IsSet` and `GlobalIsSet` now correctly return whether a flag is set if
|
||||
a program calls `Set` or `GlobalSet` directly after flag parsing (would
|
||||
previously only return `true` if the flag was set during parsing)
|
||||
|
||||
### Changed
|
||||
|
||||
* No longer exit the program on command/subcommand error if the error raised is
|
||||
not an `OsExiter`. This exiting behavior was introduced in 1.19.0, but was
|
||||
determined to be a regression in functionality. See [the
|
||||
PR](https://github.com/urfave/cli/pull/595) for discussion.
|
||||
|
||||
### Added
|
||||
|
||||
* `CommandsByName` type was added to make it easy to sort `Command`s by name,
|
||||
alphabetically
|
||||
* `altsrc` now handles loading of string and int arrays from TOML
|
||||
* Support for definition of custom help templates for `App` via
|
||||
`CustomAppHelpTemplate`
|
||||
* Support for arbitrary key/value fields on `App` to be used with
|
||||
`CustomAppHelpTemplate` via `ExtraInfo`
|
||||
* `HelpFlag`, `VersionFlag`, and `BashCompletionFlag` changed to explictly be
|
||||
`cli.Flag`s allowing for the use of custom flags satisfying the `cli.Flag`
|
||||
interface to be used.
|
||||
|
||||
|
||||
## [1.19.1] - 2016-11-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixes regression introduced in 1.19.0 where using an `ActionFunc` as
|
||||
the `Action` for a command would cause it to error rather than calling the
|
||||
function. Should not have a affected declarative cases using `func(c
|
||||
*cli.Context) err)`.
|
||||
- Shell completion now handles the case where the user specifies
|
||||
`--generate-bash-completion` immediately after a flag that takes an argument.
|
||||
Previously it call the application with `--generate-bash-completion` as the
|
||||
flag value.
|
||||
|
||||
## [1.19.0] - 2016-11-19
|
||||
### Added
|
||||
- `FlagsByName` was added to make it easy to sort flags (e.g. `sort.Sort(cli.FlagsByName(app.Flags))`)
|
||||
- A `Description` field was added to `App` for a more detailed description of
|
||||
the application (similar to the existing `Description` field on `Command`)
|
||||
- Flag type code generation via `go generate`
|
||||
- Write to stderr and exit 1 if action returns non-nil error
|
||||
- Added support for TOML to the `altsrc` loader
|
||||
- `SkipArgReorder` was added to allow users to skip the argument reordering.
|
||||
This is useful if you want to consider all "flags" after an argument as
|
||||
arguments rather than flags (the default behavior of the stdlib `flag`
|
||||
library). This is backported functionality from the [removal of the flag
|
||||
reordering](https://github.com/urfave/cli/pull/398) in the unreleased version
|
||||
2
|
||||
- For formatted errors (those implementing `ErrorFormatter`), the errors will
|
||||
be formatted during output. Compatible with `pkg/errors`.
|
||||
|
||||
### Changed
|
||||
- Raise minimum tested/supported Go version to 1.2+
|
||||
|
||||
### Fixed
|
||||
- Consider empty environment variables as set (previously environment variables
|
||||
with the equivalent of `""` would be skipped rather than their value used).
|
||||
- Return an error if the value in a given environment variable cannot be parsed
|
||||
as the flag type. Previously these errors were silently swallowed.
|
||||
- Print full error when an invalid flag is specified (which includes the invalid flag)
|
||||
- `App.Writer` defaults to `stdout` when `nil`
|
||||
- If no action is specified on a command or app, the help is now printed instead of `panic`ing
|
||||
- `App.Metadata` is initialized automatically now (previously was `nil` unless initialized)
|
||||
- Correctly show help message if `-h` is provided to a subcommand
|
||||
- `context.(Global)IsSet` now respects environment variables. Previously it
|
||||
would return `false` if a flag was specified in the environment rather than
|
||||
as an argument
|
||||
- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
|
||||
- `altsrc`s import paths were updated to use `gopkg.in/urfave/cli.v1`. This
|
||||
fixes issues that occurred when `gopkg.in/urfave/cli.v1` was imported as well
|
||||
as `altsrc` where Go would complain that the types didn't match
|
||||
|
||||
## [1.18.1] - 2016-08-28
|
||||
### Fixed
|
||||
- Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)
|
||||
|
||||
## [1.18.0] - 2016-06-27
|
||||
### Added
|
||||
- `./runtests` test runner with coverage tracking by default
|
||||
- testing on OS X
|
||||
- testing on Windows
|
||||
- `UintFlag`, `Uint64Flag`, and `Int64Flag` types and supporting code
|
||||
|
||||
### Changed
|
||||
- Use spaces for alignment in help/usage output instead of tabs, making the
|
||||
output alignment consistent regardless of tab width
|
||||
|
||||
### Fixed
|
||||
- Printing of command aliases in help text
|
||||
- Printing of visible flags for both struct and struct pointer flags
|
||||
- Display the `help` subcommand when using `CommandCategories`
|
||||
- No longer swallows `panic`s that occur within the `Action`s themselves when
|
||||
detecting the signature of the `Action` field
|
||||
|
||||
## [1.17.1] - 2016-08-28
|
||||
### Fixed
|
||||
- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
|
||||
|
||||
## [1.17.0] - 2016-05-09
|
||||
### Added
|
||||
- Pluggable flag-level help text rendering via `cli.DefaultFlagStringFunc`
|
||||
- `context.GlobalBoolT` was added as an analogue to `context.GlobalBool`
|
||||
- Support for hiding commands by setting `Hidden: true` -- this will hide the
|
||||
commands in help output
|
||||
|
||||
### Changed
|
||||
- `Float64Flag`, `IntFlag`, and `DurationFlag` default values are no longer
|
||||
quoted in help text output.
|
||||
- All flag types now include `(default: {value})` strings following usage when a
|
||||
default value can be (reasonably) detected.
|
||||
- `IntSliceFlag` and `StringSliceFlag` usage strings are now more consistent
|
||||
with non-slice flag types
|
||||
- Apps now exit with a code of 3 if an unknown subcommand is specified
|
||||
(previously they printed "No help topic for...", but still exited 0. This
|
||||
makes it easier to script around apps built using `cli` since they can trust
|
||||
that a 0 exit code indicated a successful execution.
|
||||
- cleanups based on [Go Report Card
|
||||
feedback](https://goreportcard.com/report/github.com/urfave/cli)
|
||||
|
||||
## [1.16.1] - 2016-08-28
|
||||
### Fixed
|
||||
- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
|
||||
|
||||
## [1.16.0] - 2016-05-02
|
||||
### Added
|
||||
- `Hidden` field on all flag struct types to omit from generated help text
|
||||
|
||||
### Changed
|
||||
- `BashCompletionFlag` (`--enable-bash-completion`) is now omitted from
|
||||
generated help text via the `Hidden` field
|
||||
|
||||
### Fixed
|
||||
- handling of error values in `HandleAction` and `HandleExitCoder`
|
||||
|
||||
## [1.15.0] - 2016-04-30
|
||||
### Added
|
||||
- This file!
|
||||
- Support for placeholders in flag usage strings
|
||||
- `App.Metadata` map for arbitrary data/state management
|
||||
- `Set` and `GlobalSet` methods on `*cli.Context` for altering values after
|
||||
parsing.
|
||||
- Support for nested lookup of dot-delimited keys in structures loaded from
|
||||
YAML.
|
||||
|
||||
### Changed
|
||||
- The `App.Action` and `Command.Action` now prefer a return signature of
|
||||
`func(*cli.Context) error`, as defined by `cli.ActionFunc`. If a non-nil
|
||||
`error` is returned, there may be two outcomes:
|
||||
- If the error fulfills `cli.ExitCoder`, then `os.Exit` will be called
|
||||
automatically
|
||||
- Else the error is bubbled up and returned from `App.Run`
|
||||
- Specifying an `Action` with the legacy return signature of
|
||||
`func(*cli.Context)` will produce a deprecation message to stderr
|
||||
- Specifying an `Action` that is not a `func` type will produce a non-zero exit
|
||||
from `App.Run`
|
||||
- Specifying an `Action` func that has an invalid (input) signature will
|
||||
produce a non-zero exit from `App.Run`
|
||||
|
||||
### Deprecated
|
||||
- <a name="deprecated-cli-app-runandexitonerror"></a>
|
||||
`cli.App.RunAndExitOnError`, which should now be done by returning an error
|
||||
that fulfills `cli.ExitCoder` to `cli.App.Run`.
|
||||
- <a name="deprecated-cli-app-action-signature"></a> the legacy signature for
|
||||
`cli.App.Action` of `func(*cli.Context)`, which should now have a return
|
||||
signature of `func(*cli.Context) error`, as defined by `cli.ActionFunc`.
|
||||
|
||||
### Fixed
|
||||
- Added missing `*cli.Context.GlobalFloat64` method
|
||||
|
||||
## [1.14.0] - 2016-04-03 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Codebeat badge
|
||||
- Support for categorization via `CategorizedHelp` and `Categories` on app.
|
||||
|
||||
### Changed
|
||||
- Use `filepath.Base` instead of `path.Base` in `Name` and `HelpName`.
|
||||
|
||||
### Fixed
|
||||
- Ensure version is not shown in help text when `HideVersion` set.
|
||||
|
||||
## [1.13.0] - 2016-03-06 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- YAML file input support.
|
||||
- `NArg` method on context.
|
||||
|
||||
## [1.12.0] - 2016-02-17 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Custom usage error handling.
|
||||
- Custom text support in `USAGE` section of help output.
|
||||
- Improved help messages for empty strings.
|
||||
- AppVeyor CI configuration.
|
||||
|
||||
### Changed
|
||||
- Removed `panic` from default help printer func.
|
||||
- De-duping and optimizations.
|
||||
|
||||
### Fixed
|
||||
- Correctly handle `Before`/`After` at command level when no subcommands.
|
||||
- Case of literal `-` argument causing flag reordering.
|
||||
- Environment variable hints on Windows.
|
||||
- Docs updates.
|
||||
|
||||
## [1.11.1] - 2015-12-21 (backfilled 2016-04-25)
|
||||
### Changed
|
||||
- Use `path.Base` in `Name` and `HelpName`
|
||||
- Export `GetName` on flag types.
|
||||
|
||||
### Fixed
|
||||
- Flag parsing when skipping is enabled.
|
||||
- Test output cleanup.
|
||||
- Move completion check to account for empty input case.
|
||||
|
||||
## [1.11.0] - 2015-11-15 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Destination scan support for flags.
|
||||
- Testing against `tip` in Travis CI config.
|
||||
|
||||
### Changed
|
||||
- Go version in Travis CI config.
|
||||
|
||||
### Fixed
|
||||
- Removed redundant tests.
|
||||
- Use correct example naming in tests.
|
||||
|
||||
## [1.10.2] - 2015-10-29 (backfilled 2016-04-25)
|
||||
### Fixed
|
||||
- Remove unused var in bash completion.
|
||||
|
||||
## [1.10.1] - 2015-10-21 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Coverage and reference logos in README.
|
||||
|
||||
### Fixed
|
||||
- Use specified values in help and version parsing.
|
||||
- Only display app version and help message once.
|
||||
|
||||
## [1.10.0] - 2015-10-06 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- More tests for existing functionality.
|
||||
- `ArgsUsage` at app and command level for help text flexibility.
|
||||
|
||||
### Fixed
|
||||
- Honor `HideHelp` and `HideVersion` in `App.Run`.
|
||||
- Remove juvenile word from README.
|
||||
|
||||
## [1.9.0] - 2015-09-08 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- `FullName` on command with accompanying help output update.
|
||||
- Set default `$PROG` in bash completion.
|
||||
|
||||
### Changed
|
||||
- Docs formatting.
|
||||
|
||||
### Fixed
|
||||
- Removed self-referential imports in tests.
|
||||
|
||||
## [1.8.0] - 2015-06-30 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Support for `Copyright` at app level.
|
||||
- `Parent` func at context level to walk up context lineage.
|
||||
|
||||
### Fixed
|
||||
- Global flag processing at top level.
|
||||
|
||||
## [1.7.1] - 2015-06-11 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Aggregate errors from `Before`/`After` funcs.
|
||||
- Doc comments on flag structs.
|
||||
- Include non-global flags when checking version and help.
|
||||
- Travis CI config updates.
|
||||
|
||||
### Fixed
|
||||
- Ensure slice type flags have non-nil values.
|
||||
- Collect global flags from the full command hierarchy.
|
||||
- Docs prose.
|
||||
|
||||
## [1.7.0] - 2015-05-03 (backfilled 2016-04-25)
|
||||
### Changed
|
||||
- `HelpPrinter` signature includes output writer.
|
||||
|
||||
### Fixed
|
||||
- Specify go 1.1+ in docs.
|
||||
- Set `Writer` when running command as app.
|
||||
|
||||
## [1.6.0] - 2015-03-23 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Multiple author support.
|
||||
- `NumFlags` at context level.
|
||||
- `Aliases` at command level.
|
||||
|
||||
### Deprecated
|
||||
- `ShortName` at command level.
|
||||
|
||||
### Fixed
|
||||
- Subcommand help output.
|
||||
- Backward compatible support for deprecated `Author` and `Email` fields.
|
||||
- Docs regarding `Names`/`Aliases`.
|
||||
|
||||
## [1.5.0] - 2015-02-20 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- `After` hook func support at app and command level.
|
||||
|
||||
### Fixed
|
||||
- Use parsed context when running command as subcommand.
|
||||
- Docs prose.
|
||||
|
||||
## [1.4.1] - 2015-01-09 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Support for hiding `-h / --help` flags, but not `help` subcommand.
|
||||
- Stop flag parsing after `--`.
|
||||
|
||||
### Fixed
|
||||
- Help text for generic flags to specify single value.
|
||||
- Use double quotes in output for defaults.
|
||||
- Use `ParseInt` instead of `ParseUint` for int environment var values.
|
||||
- Use `0` as base when parsing int environment var values.
|
||||
|
||||
## [1.4.0] - 2014-12-12 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Support for environment variable lookup "cascade".
|
||||
- Support for `Stdout` on app for output redirection.
|
||||
|
||||
### Fixed
|
||||
- Print command help instead of app help in `ShowCommandHelp`.
|
||||
|
||||
## [1.3.1] - 2014-11-13 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- Docs and example code updates.
|
||||
|
||||
### Changed
|
||||
- Default `-v / --version` flag made optional.
|
||||
|
||||
## [1.3.0] - 2014-08-10 (backfilled 2016-04-25)
|
||||
### Added
|
||||
- `FlagNames` at context level.
|
||||
- Exposed `VersionPrinter` var for more control over version output.
|
||||
- Zsh completion hook.
|
||||
- `AUTHOR` section in default app help template.
|
||||
- Contribution guidelines.
|
||||
- `DurationFlag` type.
|
||||
|
||||
## [1.2.0] - 2014-08-02
|
||||
### Added
|
||||
- Support for environment variable defaults on flags plus tests.
|
||||
|
||||
## [1.1.0] - 2014-07-15
|
||||
### Added
|
||||
- Bash completion.
|
||||
- Optional hiding of built-in help command.
|
||||
- Optional skipping of flag parsing at command level.
|
||||
- `Author`, `Email`, and `Compiled` metadata on app.
|
||||
- `Before` hook func support at app and command level.
|
||||
- `CommandNotFound` func support at app level.
|
||||
- Command reference available on context.
|
||||
- `GenericFlag` type.
|
||||
- `Float64Flag` type.
|
||||
- `BoolTFlag` type.
|
||||
- `IsSet` flag helper on context.
|
||||
- More flag lookup funcs at context level.
|
||||
- More tests & docs.
|
||||
|
||||
### Changed
|
||||
- Help template updates to account for presence/absence of flags.
|
||||
- Separated subcommand help template.
|
||||
- Exposed `HelpPrinter` var for more control over help output.
|
||||
|
||||
## [1.0.0] - 2013-11-01
|
||||
### Added
|
||||
- `help` flag in default app flag set and each command flag set.
|
||||
- Custom handling of argument parsing errors.
|
||||
- Command lookup by name at app level.
|
||||
- `StringSliceFlag` type and supporting `StringSlice` type.
|
||||
- `IntSliceFlag` type and supporting `IntSlice` type.
|
||||
- Slice type flag lookups by name at context level.
|
||||
- Export of app and command help functions.
|
||||
- More tests & docs.
|
||||
|
||||
## 0.1.0 - 2013-07-22
|
||||
### Added
|
||||
- Initial implementation.
|
||||
|
||||
[Unreleased]: https://github.com/urfave/cli/compare/v1.22.1...HEAD
|
||||
[1.22.1]: https://github.com/urfave/cli/compare/v1.22.0...v1.22.1
|
||||
[1.22.0]: https://github.com/urfave/cli/compare/v1.21.0...v1.22.0
|
||||
[1.21.0]: https://github.com/urfave/cli/compare/v1.20.0...v1.21.0
|
||||
[1.20.0]: https://github.com/urfave/cli/compare/v1.19.1...v1.20.0
|
||||
[1.19.1]: https://github.com/urfave/cli/compare/v1.19.0...v1.19.1
|
||||
[1.19.0]: https://github.com/urfave/cli/compare/v1.18.0...v1.19.0
|
||||
[1.18.0]: https://github.com/urfave/cli/compare/v1.17.0...v1.18.0
|
||||
[1.17.0]: https://github.com/urfave/cli/compare/v1.16.0...v1.17.0
|
||||
[1.16.0]: https://github.com/urfave/cli/compare/v1.15.0...v1.16.0
|
||||
[1.15.0]: https://github.com/urfave/cli/compare/v1.14.0...v1.15.0
|
||||
[1.14.0]: https://github.com/urfave/cli/compare/v1.13.0...v1.14.0
|
||||
[1.13.0]: https://github.com/urfave/cli/compare/v1.12.0...v1.13.0
|
||||
[1.12.0]: https://github.com/urfave/cli/compare/v1.11.1...v1.12.0
|
||||
[1.11.1]: https://github.com/urfave/cli/compare/v1.11.0...v1.11.1
|
||||
[1.11.0]: https://github.com/urfave/cli/compare/v1.10.2...v1.11.0
|
||||
[1.10.2]: https://github.com/urfave/cli/compare/v1.10.1...v1.10.2
|
||||
[1.10.1]: https://github.com/urfave/cli/compare/v1.10.0...v1.10.1
|
||||
[1.10.0]: https://github.com/urfave/cli/compare/v1.9.0...v1.10.0
|
||||
[1.9.0]: https://github.com/urfave/cli/compare/v1.8.0...v1.9.0
|
||||
[1.8.0]: https://github.com/urfave/cli/compare/v1.7.1...v1.8.0
|
||||
[1.7.1]: https://github.com/urfave/cli/compare/v1.7.0...v1.7.1
|
||||
[1.7.0]: https://github.com/urfave/cli/compare/v1.6.0...v1.7.0
|
||||
[1.6.0]: https://github.com/urfave/cli/compare/v1.5.0...v1.6.0
|
||||
[1.5.0]: https://github.com/urfave/cli/compare/v1.4.1...v1.5.0
|
||||
[1.4.1]: https://github.com/urfave/cli/compare/v1.4.0...v1.4.1
|
||||
[1.4.0]: https://github.com/urfave/cli/compare/v1.3.1...v1.4.0
|
||||
[1.3.1]: https://github.com/urfave/cli/compare/v1.3.0...v1.3.1
|
||||
[1.3.0]: https://github.com/urfave/cli/compare/v1.2.0...v1.3.0
|
||||
[1.2.0]: https://github.com/urfave/cli/compare/v1.1.0...v1.2.0
|
||||
[1.1.0]: https://github.com/urfave/cli/compare/v1.0.0...v1.1.0
|
||||
[1.0.0]: https://github.com/urfave/cli/compare/v0.1.0...v1.0.0
|
18
vendor/github.com/urfave/cli/CONTRIBUTING.md
generated
vendored
18
vendor/github.com/urfave/cli/CONTRIBUTING.md
generated
vendored
|
@ -1,18 +0,0 @@
|
|||
## Contributing
|
||||
|
||||
Use @urfave/cli to ping the maintainers.
|
||||
|
||||
Feel free to put up a pull request to fix a bug or maybe add a feature. We will
|
||||
give it a code review and make sure that it does not break backwards
|
||||
compatibility. If collaborators agree that it is in line with
|
||||
the vision of the project, we will work with you to get the code into
|
||||
a mergeable state and merge it into the master branch.
|
||||
|
||||
If you have contributed something significant to the project, we will most
|
||||
likely add you as a collaborator. As a collaborator you are given the ability
|
||||
to merge others pull requests. It is very important that new code does not
|
||||
break existing code, so be careful about what code you do choose to merge.
|
||||
|
||||
If you feel like you have contributed to the project but have not yet been added
|
||||
as a collaborator, we probably forgot to add you :sweat_smile:. Please open an
|
||||
issue!
|
1523
vendor/github.com/urfave/cli/README.md
generated
vendored
1523
vendor/github.com/urfave/cli/README.md
generated
vendored
File diff suppressed because it is too large
Load diff
8
vendor/github.com/urfave/cli/app.go
generated
vendored
8
vendor/github.com/urfave/cli/app.go
generated
vendored
|
@ -199,12 +199,12 @@ func (a *App) Run(arguments []string) (err error) {
|
|||
// always appends the completion flag at the end of the command
|
||||
shellComplete, arguments := checkShellCompleteFlag(a, arguments)
|
||||
|
||||
_, err = a.newFlagSet()
|
||||
set, err := a.newFlagSet()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
set, err := parseIter(a, arguments[1:])
|
||||
err = parseIter(set, a, arguments[1:])
|
||||
nerr := normalizeFlags(a.Flags, set)
|
||||
context := NewContext(a, set, nil)
|
||||
if nerr != nil {
|
||||
|
@ -322,12 +322,12 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
|
|||
}
|
||||
a.Commands = newCmds
|
||||
|
||||
_, err = a.newFlagSet()
|
||||
set, err := a.newFlagSet()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
set, err := parseIter(a, ctx.Args().Tail())
|
||||
err = parseIter(set, a, ctx.Args().Tail())
|
||||
nerr := normalizeFlags(a.Flags, set)
|
||||
context := NewContext(a, set, ctx)
|
||||
|
||||
|
|
11
vendor/github.com/urfave/cli/appveyor.yml
generated
vendored
11
vendor/github.com/urfave/cli/appveyor.yml
generated
vendored
|
@ -6,18 +6,23 @@ image: Visual Studio 2017
|
|||
|
||||
clone_folder: c:\gopath\src\github.com\urfave\cli
|
||||
|
||||
cache:
|
||||
- node_modules
|
||||
|
||||
environment:
|
||||
GOPATH: C:\gopath
|
||||
GOVERSION: 1.11.x
|
||||
GO111MODULE: on
|
||||
GOPROXY: https://proxy.golang.org
|
||||
|
||||
install:
|
||||
- set PATH=%GOPATH%\bin;C:\go\bin;%PATH%
|
||||
- go version
|
||||
- go env
|
||||
- go get github.com/urfave/gfmrun/...
|
||||
- go get -v -t ./...
|
||||
- go get github.com/urfave/gfmrun/cmd/gfmrun
|
||||
- go mod vendor
|
||||
|
||||
build_script:
|
||||
- go run build.go vet
|
||||
- go run build.go test
|
||||
- go run build.go gfmrun
|
||||
- go run build.go gfmrun docs/v1/manual.md
|
||||
|
|
20
vendor/github.com/urfave/cli/build.go
generated
vendored
20
vendor/github.com/urfave/cli/build.go
generated
vendored
|
@ -127,8 +127,13 @@ func testCleanup() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func GfmrunActionFunc(_ *cli.Context) error {
|
||||
file, err := os.Open("README.md")
|
||||
func GfmrunActionFunc(c *cli.Context) error {
|
||||
filename := c.Args().Get(0)
|
||||
if filename == "" {
|
||||
filename = "README.md"
|
||||
}
|
||||
|
||||
file, err := os.Open(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -146,11 +151,16 @@ func GfmrunActionFunc(_ *cli.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
return runCmd("gfmrun", "-c", fmt.Sprint(counter), "-s", "README.md")
|
||||
return runCmd("gfmrun", "-c", fmt.Sprint(counter), "-s", filename)
|
||||
}
|
||||
|
||||
func TocActionFunc(_ *cli.Context) error {
|
||||
err := runCmd("node_modules/.bin/markdown-toc", "-i", "README.md")
|
||||
func TocActionFunc(c *cli.Context) error {
|
||||
filename := c.Args().Get(0)
|
||||
if filename == "" {
|
||||
filename = "README.md"
|
||||
}
|
||||
|
||||
err := runCmd("node_modules/.bin/markdown-toc", "-i", filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
82
vendor/github.com/urfave/cli/command.go
generated
vendored
82
vendor/github.com/urfave/cli/command.go
generated
vendored
|
@ -190,10 +190,15 @@ func (c *Command) parseFlags(args Args) (*flag.FlagSet, error) {
|
|||
}
|
||||
|
||||
if !c.SkipArgReorder {
|
||||
args = reorderArgs(args)
|
||||
args = reorderArgs(c.Flags, args)
|
||||
}
|
||||
|
||||
set, err := parseIter(c, args)
|
||||
set, err := c.newFlagSet()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = parseIter(set, c, args)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -214,34 +219,73 @@ func (c *Command) useShortOptionHandling() bool {
|
|||
return c.UseShortOptionHandling
|
||||
}
|
||||
|
||||
// reorderArgs moves all flags before arguments as this is what flag expects
|
||||
func reorderArgs(args []string) []string {
|
||||
var nonflags, flags []string
|
||||
// reorderArgs moves all flags (via reorderedArgs) before the rest of
|
||||
// the arguments (remainingArgs) as this is what flag expects.
|
||||
func reorderArgs(commandFlags []Flag, args []string) []string {
|
||||
var remainingArgs, reorderedArgs []string
|
||||
|
||||
readFlagValue := false
|
||||
nextIndexMayContainValue := false
|
||||
for i, arg := range args {
|
||||
|
||||
// dont reorder any args after a --
|
||||
// read about -- here:
|
||||
// https://unix.stackexchange.com/questions/11376/what-does-double-dash-mean-also-known-as-bare-double-dash
|
||||
if arg == "--" {
|
||||
nonflags = append(nonflags, args[i:]...)
|
||||
remainingArgs = append(remainingArgs, args[i:]...)
|
||||
break
|
||||
}
|
||||
|
||||
if readFlagValue && !strings.HasPrefix(arg, "-") && !strings.HasPrefix(arg, "--") {
|
||||
readFlagValue = false
|
||||
flags = append(flags, arg)
|
||||
continue
|
||||
}
|
||||
readFlagValue = false
|
||||
// checks if this arg is a value that should be re-ordered next to its associated flag
|
||||
} else if nextIndexMayContainValue && !strings.HasPrefix(arg, "-") {
|
||||
nextIndexMayContainValue = false
|
||||
reorderedArgs = append(reorderedArgs, arg)
|
||||
|
||||
if arg != "-" && strings.HasPrefix(arg, "-") {
|
||||
flags = append(flags, arg)
|
||||
// checks if this is an arg that should be re-ordered
|
||||
} else if argIsFlag(commandFlags, arg) {
|
||||
// we have determined that this is a flag that we should re-order
|
||||
reorderedArgs = append(reorderedArgs, arg)
|
||||
// if this arg does not contain a "=", then the next index may contain the value for this flag
|
||||
nextIndexMayContainValue = !strings.Contains(arg, "=")
|
||||
|
||||
readFlagValue = !strings.Contains(arg, "=")
|
||||
// simply append any remaining args
|
||||
} else {
|
||||
nonflags = append(nonflags, arg)
|
||||
remainingArgs = append(remainingArgs, arg)
|
||||
}
|
||||
}
|
||||
|
||||
return append(flags, nonflags...)
|
||||
return append(reorderedArgs, remainingArgs...)
|
||||
}
|
||||
|
||||
// argIsFlag checks if an arg is one of our command flags
|
||||
func argIsFlag(commandFlags []Flag, arg string) bool {
|
||||
// checks if this is just a `-`, and so definitely not a flag
|
||||
if arg == "-" {
|
||||
return false
|
||||
}
|
||||
// flags always start with a -
|
||||
if !strings.HasPrefix(arg, "-") {
|
||||
return false
|
||||
}
|
||||
// this line turns `--flag` into `flag`
|
||||
if strings.HasPrefix(arg, "--") {
|
||||
arg = strings.Replace(arg, "-", "", 2)
|
||||
}
|
||||
// this line turns `-flag` into `flag`
|
||||
if strings.HasPrefix(arg, "-") {
|
||||
arg = strings.Replace(arg, "-", "", 1)
|
||||
}
|
||||
// this line turns `flag=value` into `flag`
|
||||
arg = strings.Split(arg, "=")[0]
|
||||
// look through all the flags, to see if the `arg` is one of our flags
|
||||
for _, flag := range commandFlags {
|
||||
for _, key := range strings.Split(flag.GetName(), ",") {
|
||||
key := strings.TrimSpace(key)
|
||||
if key == arg {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
// return false if this arg was not one of our flags
|
||||
return false
|
||||
}
|
||||
|
||||
// Names returns the names including short names and aliases.
|
||||
|
|
2
vendor/github.com/urfave/cli/flag.go
generated
vendored
2
vendor/github.com/urfave/cli/flag.go
generated
vendored
|
@ -86,7 +86,7 @@ type RequiredFlag interface {
|
|||
type DocGenerationFlag interface {
|
||||
Flag
|
||||
|
||||
// TakesValue returns true of the flag takes a value, otherwise false
|
||||
// TakesValue returns true if the flag takes a value, otherwise false
|
||||
TakesValue() bool
|
||||
|
||||
// GetUsage returns the usage string for the flag
|
||||
|
|
55
vendor/github.com/urfave/cli/help.go
generated
vendored
55
vendor/github.com/urfave/cli/help.go
generated
vendored
|
@ -47,13 +47,18 @@ type helpPrinter func(w io.Writer, templ string, data interface{})
|
|||
// Prints help for the App or Command with custom template function.
|
||||
type helpPrinterCustom func(w io.Writer, templ string, data interface{}, customFunc map[string]interface{})
|
||||
|
||||
// HelpPrinter is a function that writes the help output. If not set a default
|
||||
// is used. The function signature is:
|
||||
// func(w io.Writer, templ string, data interface{})
|
||||
// HelpPrinter is a function that writes the help output. If not set explicitly,
|
||||
// this calls HelpPrinterCustom using only the default template functions.
|
||||
//
|
||||
// If custom logic for printing help is required, this function can be
|
||||
// overridden. If the ExtraInfo field is defined on an App, this function
|
||||
// should not be modified, as HelpPrinterCustom will be used directly in order
|
||||
// to capture the extra information.
|
||||
var HelpPrinter helpPrinter = printHelp
|
||||
|
||||
// HelpPrinterCustom is same as HelpPrinter but
|
||||
// takes a custom function for template function map.
|
||||
// HelpPrinterCustom is a function that writes the help output. It is used as
|
||||
// the default implementation of HelpPrinter, and may be called directly if
|
||||
// the ExtraInfo field is set on an App.
|
||||
var HelpPrinterCustom helpPrinterCustom = printHelpCustom
|
||||
|
||||
// VersionPrinter prints the version for the App
|
||||
|
@ -66,20 +71,24 @@ func ShowAppHelpAndExit(c *Context, exitCode int) {
|
|||
}
|
||||
|
||||
// ShowAppHelp is an action that displays the help.
|
||||
func ShowAppHelp(c *Context) (err error) {
|
||||
if c.App.CustomAppHelpTemplate == "" {
|
||||
HelpPrinter(c.App.Writer, AppHelpTemplate, c.App)
|
||||
return
|
||||
func ShowAppHelp(c *Context) error {
|
||||
template := c.App.CustomAppHelpTemplate
|
||||
if template == "" {
|
||||
template = AppHelpTemplate
|
||||
}
|
||||
|
||||
if c.App.ExtraInfo == nil {
|
||||
HelpPrinter(c.App.Writer, template, c.App)
|
||||
return nil
|
||||
}
|
||||
|
||||
customAppData := func() map[string]interface{} {
|
||||
if c.App.ExtraInfo == nil {
|
||||
return nil
|
||||
}
|
||||
return map[string]interface{}{
|
||||
"ExtraInfo": c.App.ExtraInfo,
|
||||
}
|
||||
}
|
||||
HelpPrinterCustom(c.App.Writer, c.App.CustomAppHelpTemplate, c.App, customAppData())
|
||||
HelpPrinterCustom(c.App.Writer, template, c.App, customAppData())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -186,11 +195,13 @@ func ShowCommandHelp(ctx *Context, command string) error {
|
|||
|
||||
for _, c := range ctx.App.Commands {
|
||||
if c.HasName(command) {
|
||||
if c.CustomHelpTemplate != "" {
|
||||
HelpPrinterCustom(ctx.App.Writer, c.CustomHelpTemplate, c, nil)
|
||||
} else {
|
||||
HelpPrinter(ctx.App.Writer, CommandHelpTemplate, c)
|
||||
templ := c.CustomHelpTemplate
|
||||
if templ == "" {
|
||||
templ = CommandHelpTemplate
|
||||
}
|
||||
|
||||
HelpPrinter(ctx.App.Writer, templ, c)
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@ -238,11 +249,15 @@ func ShowCommandCompletions(ctx *Context, command string) {
|
|||
|
||||
}
|
||||
|
||||
func printHelpCustom(out io.Writer, templ string, data interface{}, customFunc map[string]interface{}) {
|
||||
// printHelpCustom is the default implementation of HelpPrinterCustom.
|
||||
//
|
||||
// The customFuncs map will be combined with a default template.FuncMap to
|
||||
// allow using arbitrary functions in template rendering.
|
||||
func printHelpCustom(out io.Writer, templ string, data interface{}, customFuncs map[string]interface{}) {
|
||||
funcMap := template.FuncMap{
|
||||
"join": strings.Join,
|
||||
}
|
||||
for key, value := range customFunc {
|
||||
for key, value := range customFuncs {
|
||||
funcMap[key] = value
|
||||
}
|
||||
|
||||
|
@ -261,7 +276,7 @@ func printHelpCustom(out io.Writer, templ string, data interface{}, customFunc m
|
|||
}
|
||||
|
||||
func printHelp(out io.Writer, templ string, data interface{}) {
|
||||
printHelpCustom(out, templ, data, nil)
|
||||
HelpPrinterCustom(out, templ, data, nil)
|
||||
}
|
||||
|
||||
func checkVersion(c *Context) bool {
|
||||
|
|
47
vendor/github.com/urfave/cli/parse.go
generated
vendored
47
vendor/github.com/urfave/cli/parse.go
generated
vendored
|
@ -14,42 +14,51 @@ type iterativeParser interface {
|
|||
// iteratively catch parsing errors. This way we achieve LR parsing without
|
||||
// transforming any arguments. Otherwise, there is no way we can discriminate
|
||||
// combined short options from common arguments that should be left untouched.
|
||||
func parseIter(ip iterativeParser, args []string) (*flag.FlagSet, error) {
|
||||
func parseIter(set *flag.FlagSet, ip iterativeParser, args []string) error {
|
||||
for {
|
||||
set, err := ip.newFlagSet()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = set.Parse(args)
|
||||
err := set.Parse(args)
|
||||
if !ip.useShortOptionHandling() || err == nil {
|
||||
return set, err
|
||||
return err
|
||||
}
|
||||
|
||||
errStr := err.Error()
|
||||
trimmed := strings.TrimPrefix(errStr, "flag provided but not defined: ")
|
||||
trimmed := strings.TrimPrefix(errStr, "flag provided but not defined: -")
|
||||
if errStr == trimmed {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
// regenerate the initial args with the split short opts
|
||||
newArgs := []string{}
|
||||
argsWereSplit := false
|
||||
for i, arg := range args {
|
||||
if arg != trimmed {
|
||||
newArgs = append(newArgs, arg)
|
||||
// skip args that are not part of the error message
|
||||
if name := strings.TrimLeft(arg, "-"); name != trimmed {
|
||||
continue
|
||||
}
|
||||
|
||||
shortOpts := splitShortOptions(set, trimmed)
|
||||
// if we can't split, the error was accurate
|
||||
shortOpts := splitShortOptions(set, arg)
|
||||
if len(shortOpts) == 1 {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
// add each short option and all remaining arguments
|
||||
newArgs = append(newArgs, shortOpts...)
|
||||
newArgs = append(newArgs, args[i+1:]...)
|
||||
args = newArgs
|
||||
// swap current argument with the split version
|
||||
args = append(args[:i], append(shortOpts, args[i+1:]...)...)
|
||||
argsWereSplit = true
|
||||
break
|
||||
}
|
||||
|
||||
// This should be an impossible to reach code path, but in case the arg
|
||||
// splitting failed to happen, this will prevent infinite loops
|
||||
if !argsWereSplit {
|
||||
return err
|
||||
}
|
||||
|
||||
// Since custom parsing failed, replace the flag set before retrying
|
||||
newSet, err := ip.newFlagSet()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*set = *newSet
|
||||
}
|
||||
}
|
||||
|
||||
|
|
6
vendor/golang.org/x/crypto/acme/autocert/autocert.go
generated
vendored
6
vendor/golang.org/x/crypto/acme/autocert/autocert.go
generated
vendored
|
@ -770,9 +770,9 @@ AuthorizeOrderLoop:
|
|||
}
|
||||
// Remove all hanging authorizations to reduce rate limit quotas
|
||||
// after we're done.
|
||||
defer func() {
|
||||
go m.deactivatePendingAuthz(o.AuthzURLs)
|
||||
}()
|
||||
defer func(urls []string) {
|
||||
go m.deactivatePendingAuthz(urls)
|
||||
}(o.AuthzURLs)
|
||||
|
||||
// Check if there's actually anything we need to do.
|
||||
switch o.Status {
|
||||
|
|
2
vendor/golang.org/x/net/idna/tables11.0.0.go
generated
vendored
2
vendor/golang.org/x/net/idna/tables11.0.0.go
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||
|
||||
// +build go1.13
|
||||
// +build go1.13,!go1.14
|
||||
|
||||
package idna
|
||||
|
||||
|
|
4733
vendor/golang.org/x/net/idna/tables12.00.go
generated
vendored
Normal file
4733
vendor/golang.org/x/net/idna/tables12.00.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
vendor/golang.org/x/sys/unix/bluetooth_linux.go
generated
vendored
1
vendor/golang.org/x/sys/unix/bluetooth_linux.go
generated
vendored
|
@ -23,6 +23,7 @@ const (
|
|||
HCI_CHANNEL_USER = 1
|
||||
HCI_CHANNEL_MONITOR = 2
|
||||
HCI_CHANNEL_CONTROL = 3
|
||||
HCI_CHANNEL_LOGGING = 4
|
||||
)
|
||||
|
||||
// Socketoption Level
|
||||
|
|
29
vendor/golang.org/x/sys/unix/fdset.go
generated
vendored
Normal file
29
vendor/golang.org/x/sys/unix/fdset.go
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
package unix
|
||||
|
||||
// Set adds fd to the set fds.
|
||||
func (fds *FdSet) Set(fd int) {
|
||||
fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
|
||||
}
|
||||
|
||||
// Clear removes fd from the set fds.
|
||||
func (fds *FdSet) Clear(fd int) {
|
||||
fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
|
||||
}
|
||||
|
||||
// IsSet returns whether fd is in the set fds.
|
||||
func (fds *FdSet) IsSet(fd int) bool {
|
||||
return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
|
||||
}
|
||||
|
||||
// Zero clears the set fds.
|
||||
func (fds *FdSet) Zero() {
|
||||
for i := range fds.Bits {
|
||||
fds.Bits[i] = 0
|
||||
}
|
||||
}
|
8
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
8
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
|
@ -44,6 +44,7 @@ includes_AIX='
|
|||
#include <sys/stropts.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/termio.h>
|
||||
#include <termios.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -190,11 +191,13 @@ struct ltchars {
|
|||
#include <linux/can.h>
|
||||
#include <linux/capability.h>
|
||||
#include <linux/cryptouser.h>
|
||||
#include <linux/devlink.h>
|
||||
#include <linux/errqueue.h>
|
||||
#include <linux/falloc.h>
|
||||
#include <linux/fanotify.h>
|
||||
#include <linux/filter.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fscrypt.h>
|
||||
#include <linux/genetlink.h>
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/icmpv6.h>
|
||||
|
@ -494,7 +497,9 @@ ccflags="$@"
|
|||
$2 ~ /^CAN_/ ||
|
||||
$2 ~ /^CAP_/ ||
|
||||
$2 ~ /^ALG_/ ||
|
||||
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ ||
|
||||
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ ||
|
||||
$2 ~ /^FS_IOC_.*ENCRYPTION/ ||
|
||||
$2 ~ /^FSCRYPT_/ ||
|
||||
$2 ~ /^GRND_/ ||
|
||||
$2 ~ /^RND/ ||
|
||||
$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
|
||||
|
@ -524,6 +529,7 @@ ccflags="$@"
|
|||
$2 ~ /^(HDIO|WIN|SMART)_/ ||
|
||||
$2 ~ /^CRYPTO_/ ||
|
||||
$2 ~ /^TIPC_/ ||
|
||||
$2 ~ /^DEVLINK_/ ||
|
||||
$2 !~ "WMESGLEN" &&
|
||||
$2 ~ /^W[A-Z0-9]+$/ ||
|
||||
$2 ~/^PPPIOC/ ||
|
||||
|
|
2
vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
generated
vendored
|
@ -27,8 +27,6 @@ func libc_fdopendir_trampoline()
|
|||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
// Simulate Getdirentries using fdopendir/readdir_r/closedir.
|
||||
const ptrSize = unsafe.Sizeof(uintptr(0))
|
||||
|
||||
// We store the number of entries to skip in the seek
|
||||
// offset of fd. See issue #31368.
|
||||
// It's not the full required semantics, but should handle the case
|
||||
|
|
9
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
9
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
|
@ -462,8 +462,12 @@ func convertFromDirents11(buf []byte, old []byte) int {
|
|||
dstPos := 0
|
||||
srcPos := 0
|
||||
for dstPos+fixedSize < len(buf) && srcPos+oldFixedSize < len(old) {
|
||||
dstDirent := (*Dirent)(unsafe.Pointer(&buf[dstPos]))
|
||||
srcDirent := (*dirent_freebsd11)(unsafe.Pointer(&old[srcPos]))
|
||||
var dstDirent Dirent
|
||||
var srcDirent dirent_freebsd11
|
||||
|
||||
// If multiple direntries are written, sometimes when we reach the final one,
|
||||
// we may have cap of old less than size of dirent_freebsd11.
|
||||
copy((*[unsafe.Sizeof(srcDirent)]byte)(unsafe.Pointer(&srcDirent))[:], old[srcPos:])
|
||||
|
||||
reclen := roundup(fixedSize+int(srcDirent.Namlen)+1, 8)
|
||||
if dstPos+reclen > len(buf) {
|
||||
|
@ -479,6 +483,7 @@ func convertFromDirents11(buf []byte, old []byte) int {
|
|||
dstDirent.Pad1 = 0
|
||||
|
||||
copy(dstDirent.Name[:], srcDirent.Name[:srcDirent.Namlen])
|
||||
copy(buf[dstPos:], (*[unsafe.Sizeof(dstDirent)]byte)(unsafe.Pointer(&dstDirent))[:])
|
||||
padding := buf[dstPos+fixedSize+int(dstDirent.Namlen) : dstPos+reclen]
|
||||
for i := range padding {
|
||||
padding[i] = 0
|
||||
|
|
12
vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
generated
vendored
|
@ -459,6 +459,15 @@ const (
|
|||
MAP_SHARED = 0x1
|
||||
MAP_TYPE = 0xf0
|
||||
MAP_VARIABLE = 0x0
|
||||
MCAST_BLOCK_SOURCE = 0x40
|
||||
MCAST_EXCLUDE = 0x2
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x3e
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x42
|
||||
MCAST_LEAVE_GROUP = 0x3f
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x43
|
||||
MCAST_SOURCE_FILTER = 0x49
|
||||
MCAST_UNBLOCK_SOURCE = 0x41
|
||||
MCL_CURRENT = 0x100
|
||||
MCL_FUTURE = 0x200
|
||||
MSG_ANY = 0x4
|
||||
|
@ -483,6 +492,7 @@ const (
|
|||
MS_INVALIDATE = 0x40
|
||||
MS_PER_SEC = 0x3e8
|
||||
MS_SYNC = 0x20
|
||||
NFDBITS = 0x20
|
||||
NL0 = 0x0
|
||||
NL1 = 0x4000
|
||||
NL2 = 0x8000
|
||||
|
@ -688,7 +698,7 @@ const (
|
|||
SIOCGHIWAT = 0x40047301
|
||||
SIOCGIFADDR = -0x3fd796df
|
||||
SIOCGIFADDRS = 0x2000698c
|
||||
SIOCGIFBAUDRATE = -0x3fd79693
|
||||
SIOCGIFBAUDRATE = -0x3fdf9669
|
||||
SIOCGIFBRDADDR = -0x3fd796dd
|
||||
SIOCGIFCONF = -0x3ff796bb
|
||||
SIOCGIFCONFGLOB = -0x3ff79670
|
||||
|
|
12
vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
generated
vendored
|
@ -459,6 +459,15 @@ const (
|
|||
MAP_SHARED = 0x1
|
||||
MAP_TYPE = 0xf0
|
||||
MAP_VARIABLE = 0x0
|
||||
MCAST_BLOCK_SOURCE = 0x40
|
||||
MCAST_EXCLUDE = 0x2
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x3e
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x42
|
||||
MCAST_LEAVE_GROUP = 0x3f
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x43
|
||||
MCAST_SOURCE_FILTER = 0x49
|
||||
MCAST_UNBLOCK_SOURCE = 0x41
|
||||
MCL_CURRENT = 0x100
|
||||
MCL_FUTURE = 0x200
|
||||
MSG_ANY = 0x4
|
||||
|
@ -483,6 +492,7 @@ const (
|
|||
MS_INVALIDATE = 0x40
|
||||
MS_PER_SEC = 0x3e8
|
||||
MS_SYNC = 0x20
|
||||
NFDBITS = 0x40
|
||||
NL0 = 0x0
|
||||
NL1 = 0x4000
|
||||
NL2 = 0x8000
|
||||
|
@ -688,7 +698,7 @@ const (
|
|||
SIOCGHIWAT = 0x40047301
|
||||
SIOCGIFADDR = -0x3fd796df
|
||||
SIOCGIFADDRS = 0x2000698c
|
||||
SIOCGIFBAUDRATE = -0x3fd79693
|
||||
SIOCGIFBAUDRATE = -0x3fdf9669
|
||||
SIOCGIFBRDADDR = -0x3fd796dd
|
||||
SIOCGIFCONF = -0x3fef96bb
|
||||
SIOCGIFCONFGLOB = -0x3fef9670
|
||||
|
|
5563
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
5563
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
File diff suppressed because it is too large
Load diff
5563
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
5563
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
File diff suppressed because it is too large
Load diff
5575
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
5575
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
File diff suppressed because it is too large
Load diff
5549
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
5549
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
File diff suppressed because it is too large
Load diff
5567
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
5567
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
File diff suppressed because it is too large
Load diff
5567
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
5567
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
File diff suppressed because it is too large
Load diff
5567
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
5567
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
File diff suppressed because it is too large
Load diff
5567
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
5567
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
File diff suppressed because it is too large
Load diff
5685
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
5685
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
File diff suppressed because it is too large
Load diff
5685
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
5685
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
File diff suppressed because it is too large
Load diff
5537
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
5537
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
File diff suppressed because it is too large
Load diff
5683
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
5683
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
File diff suppressed because it is too large
Load diff
5663
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
5663
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
File diff suppressed because it is too large
Load diff
4
vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
generated
vendored
4
vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
generated
vendored
|
@ -40,8 +40,6 @@ TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_sendmsg(SB)
|
||||
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kevent(SB)
|
||||
TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___sysctl(SB)
|
||||
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
|
@ -90,6 +88,8 @@ TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sysctl(SB)
|
||||
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendfile(SB)
|
||||
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||
|
|
4
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
4
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
|
@ -40,8 +40,6 @@ TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_sendmsg(SB)
|
||||
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kevent(SB)
|
||||
TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___sysctl(SB)
|
||||
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
|
@ -90,6 +88,8 @@ TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sysctl(SB)
|
||||
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendfile(SB)
|
||||
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||
|
|
4
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
4
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
|
@ -40,8 +40,6 @@ TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_sendmsg(SB)
|
||||
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kevent(SB)
|
||||
TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___sysctl(SB)
|
||||
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
|
@ -90,6 +88,8 @@ TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sysctl(SB)
|
||||
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendfile(SB)
|
||||
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||
|
|
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
|
@ -415,4 +415,5 @@ const (
|
|||
SYS_FSMOUNT = 4432
|
||||
SYS_FSPICK = 4433
|
||||
SYS_PIDFD_OPEN = 4434
|
||||
SYS_CLONE3 = 4435
|
||||
)
|
||||
|
|
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
|
@ -345,4 +345,5 @@ const (
|
|||
SYS_FSMOUNT = 5432
|
||||
SYS_FSPICK = 5433
|
||||
SYS_PIDFD_OPEN = 5434
|
||||
SYS_CLONE3 = 5435
|
||||
)
|
||||
|
|
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
|
@ -345,4 +345,5 @@ const (
|
|||
SYS_FSMOUNT = 5432
|
||||
SYS_FSPICK = 5433
|
||||
SYS_PIDFD_OPEN = 5434
|
||||
SYS_CLONE3 = 5435
|
||||
)
|
||||
|
|
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
|
@ -415,4 +415,5 @@ const (
|
|||
SYS_FSMOUNT = 4432
|
||||
SYS_FSPICK = 4433
|
||||
SYS_PIDFD_OPEN = 4434
|
||||
SYS_CLONE3 = 4435
|
||||
)
|
||||
|
|
2
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
generated
vendored
|
@ -397,7 +397,7 @@ type Reg struct {
|
|||
}
|
||||
|
||||
type FpReg struct {
|
||||
Fp_q [32]uint128
|
||||
Fp_q [512]uint8
|
||||
Fp_sr uint32
|
||||
Fp_cr uint32
|
||||
}
|
||||
|
|
184
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
184
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
|
@ -179,6 +179,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -256,7 +305,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -427,7 +476,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2041,6 +2090,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2055,6 +2105,7 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2626,3 +2677,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
|
@ -179,6 +179,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -256,7 +305,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -428,7 +477,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2054,6 +2103,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2068,6 +2118,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2640,3 +2692,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
|
@ -183,6 +183,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -260,7 +309,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -431,7 +480,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2032,6 +2081,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2046,6 +2096,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2617,3 +2669,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
|
@ -180,6 +180,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -257,7 +306,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -429,7 +478,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2033,6 +2082,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2047,6 +2097,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2619,3 +2671,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
|
@ -182,6 +182,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -259,7 +308,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -430,7 +479,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2038,6 +2087,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2052,6 +2102,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2623,3 +2675,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
186
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
186
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
|
@ -180,6 +180,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -257,7 +306,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -429,7 +478,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -783,6 +832,7 @@ type Ustat_t struct {
|
|||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
_ int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
}
|
||||
|
@ -2035,6 +2085,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2049,6 +2100,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2621,3 +2674,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
186
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
186
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
|
@ -180,6 +180,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -257,7 +306,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -429,7 +478,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -783,6 +832,7 @@ type Ustat_t struct {
|
|||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
_ int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
}
|
||||
|
@ -2035,6 +2085,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2049,6 +2100,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2621,3 +2674,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
|
@ -182,6 +182,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -259,7 +308,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -430,7 +479,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2038,6 +2087,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2052,6 +2102,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2623,3 +2675,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
|
@ -181,6 +181,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -258,7 +307,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -430,7 +479,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2043,6 +2092,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2057,6 +2107,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2629,3 +2681,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
|
@ -181,6 +181,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -258,7 +307,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -430,7 +479,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2043,6 +2092,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2057,6 +2107,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2629,3 +2681,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
generated
vendored
|
@ -180,6 +180,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -257,7 +306,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -429,7 +478,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2061,6 +2110,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2075,6 +2125,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2647,3 +2699,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
|
@ -179,6 +179,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -256,7 +305,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -428,7 +477,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2057,6 +2106,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2071,6 +2121,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2643,3 +2695,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
185
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
185
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
|
@ -183,6 +183,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -260,7 +309,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -432,7 +481,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2038,6 +2087,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2052,6 +2102,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2624,3 +2676,132 @@ const (
|
|||
SYSLOG_ACTION_SIZE_UNREAD = 9
|
||||
SYSLOG_ACTION_SIZE_BUFFER = 10
|
||||
)
|
||||
|
||||
const (
|
||||
DEVLINK_CMD_UNSPEC = 0x0
|
||||
DEVLINK_CMD_GET = 0x1
|
||||
DEVLINK_CMD_SET = 0x2
|
||||
DEVLINK_CMD_NEW = 0x3
|
||||
DEVLINK_CMD_DEL = 0x4
|
||||
DEVLINK_CMD_PORT_GET = 0x5
|
||||
DEVLINK_CMD_PORT_SET = 0x6
|
||||
DEVLINK_CMD_PORT_NEW = 0x7
|
||||
DEVLINK_CMD_PORT_DEL = 0x8
|
||||
DEVLINK_CMD_PORT_SPLIT = 0x9
|
||||
DEVLINK_CMD_PORT_UNSPLIT = 0xa
|
||||
DEVLINK_CMD_SB_GET = 0xb
|
||||
DEVLINK_CMD_SB_SET = 0xc
|
||||
DEVLINK_CMD_SB_NEW = 0xd
|
||||
DEVLINK_CMD_SB_DEL = 0xe
|
||||
DEVLINK_CMD_SB_POOL_GET = 0xf
|
||||
DEVLINK_CMD_SB_POOL_SET = 0x10
|
||||
DEVLINK_CMD_SB_POOL_NEW = 0x11
|
||||
DEVLINK_CMD_SB_POOL_DEL = 0x12
|
||||
DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
|
||||
DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
|
||||
DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
|
||||
DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
|
||||
DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
|
||||
DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
|
||||
DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
|
||||
DEVLINK_CMD_ESWITCH_GET = 0x1d
|
||||
DEVLINK_CMD_ESWITCH_SET = 0x1e
|
||||
DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
|
||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
DEVLINK_PORT_TYPE_IB = 0x3
|
||||
DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
|
||||
DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
|
||||
DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
|
||||
DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
|
||||
DEVLINK_ESWITCH_MODE_LEGACY = 0x0
|
||||
DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
|
||||
DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
|
||||
DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
|
||||
DEVLINK_ATTR_UNSPEC = 0x0
|
||||
DEVLINK_ATTR_BUS_NAME = 0x1
|
||||
DEVLINK_ATTR_DEV_NAME = 0x2
|
||||
DEVLINK_ATTR_PORT_INDEX = 0x3
|
||||
DEVLINK_ATTR_PORT_TYPE = 0x4
|
||||
DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
|
||||
DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
|
||||
DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
|
||||
DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
|
||||
DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
|
||||
DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
|
||||
DEVLINK_ATTR_SB_INDEX = 0xb
|
||||
DEVLINK_ATTR_SB_SIZE = 0xc
|
||||
DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
|
||||
DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
|
||||
DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
|
||||
DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
|
||||
DEVLINK_ATTR_SB_POOL_INDEX = 0x11
|
||||
DEVLINK_ATTR_SB_POOL_TYPE = 0x12
|
||||
DEVLINK_ATTR_SB_POOL_SIZE = 0x13
|
||||
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
|
||||
DEVLINK_ATTR_SB_THRESHOLD = 0x15
|
||||
DEVLINK_ATTR_SB_TC_INDEX = 0x16
|
||||
DEVLINK_ATTR_SB_OCC_CUR = 0x17
|
||||
DEVLINK_ATTR_SB_OCC_MAX = 0x18
|
||||
DEVLINK_ATTR_ESWITCH_MODE = 0x19
|
||||
DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
|
||||
DEVLINK_ATTR_DPIPE_TABLES = 0x1b
|
||||
DEVLINK_ATTR_DPIPE_TABLE = 0x1c
|
||||
DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
|
||||
DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
|
||||
DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
|
||||
DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
|
||||
DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
|
||||
DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
|
||||
DEVLINK_ATTR_DPIPE_ENTRY = 0x23
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
|
||||
DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
|
||||
DEVLINK_ATTR_DPIPE_MATCH = 0x28
|
||||
DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
|
||||
DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
|
||||
DEVLINK_ATTR_DPIPE_ACTION = 0x2b
|
||||
DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
|
||||
DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
|
||||
DEVLINK_ATTR_DPIPE_VALUE = 0x2e
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
|
||||
DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
|
||||
DEVLINK_ATTR_DPIPE_HEADERS = 0x31
|
||||
DEVLINK_ATTR_DPIPE_HEADER = 0x32
|
||||
DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
|
||||
DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
|
||||
DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
|
||||
DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
|
||||
DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
|
||||
DEVLINK_ATTR_DPIPE_FIELD = 0x38
|
||||
DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
|
||||
DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
|
||||
DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
|
||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
|
||||
DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
|
||||
DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
|
||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||
)
|
||||
|
|
17
vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go
generated
vendored
17
vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go
generated
vendored
|
@ -81,13 +81,13 @@ func GetSizesGolist(ctx context.Context, buildFlags, env []string, dir string, u
|
|||
args := []string{"list", "-f", "{{context.GOARCH}} {{context.Compiler}}"}
|
||||
args = append(args, buildFlags...)
|
||||
args = append(args, "--", "unsafe")
|
||||
stdout, err := InvokeGo(ctx, env, dir, usesExportData, args...)
|
||||
stdout, stderr, err := invokeGo(ctx, env, dir, usesExportData, args...)
|
||||
var goarch, compiler string
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "cannot find main module") {
|
||||
// User's running outside of a module. All bets are off. Get GOARCH and guess compiler is gc.
|
||||
// TODO(matloob): Is this a problem in practice?
|
||||
envout, enverr := InvokeGo(ctx, env, dir, usesExportData, "env", "GOARCH")
|
||||
envout, _, enverr := invokeGo(ctx, env, dir, usesExportData, "env", "GOARCH")
|
||||
if enverr != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -99,7 +99,8 @@ func GetSizesGolist(ctx context.Context, buildFlags, env []string, dir string, u
|
|||
} else {
|
||||
fields := strings.Fields(stdout.String())
|
||||
if len(fields) < 2 {
|
||||
return nil, fmt.Errorf("could not determine GOARCH and Go compiler")
|
||||
return nil, fmt.Errorf("could not parse GOARCH and Go compiler in format \"<GOARCH> <compiler>\" from stdout of go command:\n%s\ndir: %s\nstdout: <<%s>>\nstderr: <<%s>>",
|
||||
cmdDebugStr(env, args...), dir, stdout.String(), stderr.String())
|
||||
}
|
||||
goarch = fields[0]
|
||||
compiler = fields[1]
|
||||
|
@ -107,8 +108,8 @@ func GetSizesGolist(ctx context.Context, buildFlags, env []string, dir string, u
|
|||
return types.SizesFor(compiler, goarch), nil
|
||||
}
|
||||
|
||||
// InvokeGo returns the stdout of a go command invocation.
|
||||
func InvokeGo(ctx context.Context, env []string, dir string, usesExportData bool, args ...string) (*bytes.Buffer, error) {
|
||||
// invokeGo returns the stdout and stderr of a go command invocation.
|
||||
func invokeGo(ctx context.Context, env []string, dir string, usesExportData bool, args ...string) (*bytes.Buffer, *bytes.Buffer, error) {
|
||||
if debug {
|
||||
defer func(start time.Time) { log.Printf("%s for %v", time.Since(start), cmdDebugStr(env, args...)) }(time.Now())
|
||||
}
|
||||
|
@ -131,7 +132,7 @@ func InvokeGo(ctx context.Context, env []string, dir string, usesExportData bool
|
|||
// Catastrophic error:
|
||||
// - executable not found
|
||||
// - context cancellation
|
||||
return nil, fmt.Errorf("couldn't exec 'go %v': %s %T", args, err, err)
|
||||
return nil, nil, fmt.Errorf("couldn't exec 'go %v': %s %T", args, err, err)
|
||||
}
|
||||
|
||||
// Export mode entails a build.
|
||||
|
@ -139,7 +140,7 @@ func InvokeGo(ctx context.Context, env []string, dir string, usesExportData bool
|
|||
// (despite the -e flag) and the Export field is blank.
|
||||
// Do not fail in that case.
|
||||
if !usesExportData {
|
||||
return nil, fmt.Errorf("go %v: %s: %s", args, exitErr, stderr)
|
||||
return nil, nil, fmt.Errorf("go %v: %s: %s", args, exitErr, stderr)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,7 +159,7 @@ func InvokeGo(ctx context.Context, env []string, dir string, usesExportData bool
|
|||
fmt.Fprintf(os.Stderr, "%s stdout: <<%s>>\n", cmdDebugStr(env, args...), stdout)
|
||||
}
|
||||
|
||||
return stdout, nil
|
||||
return stdout, stderr, nil
|
||||
}
|
||||
|
||||
func cmdDebugStr(envlist []string, args ...string) string {
|
||||
|
|
8
vendor/golang.org/x/tools/go/packages/external.go
generated
vendored
8
vendor/golang.org/x/tools/go/packages/external.go
generated
vendored
|
@ -12,6 +12,7 @@ import (
|
|||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
@ -76,12 +77,17 @@ func findExternalDriver(cfg *Config) driver {
|
|||
}
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
stderr := new(bytes.Buffer)
|
||||
cmd := exec.CommandContext(cfg.Context, tool, words...)
|
||||
cmd.Dir = cfg.Dir
|
||||
cmd.Env = cfg.Env
|
||||
cmd.Stdin = bytes.NewReader(req)
|
||||
cmd.Stdout = buf
|
||||
cmd.Stderr = new(bytes.Buffer)
|
||||
cmd.Stderr = stderr
|
||||
if len(stderr.Bytes()) != 0 && os.Getenv("GOPACKAGESPRINTDRIVERERRORS") != "" {
|
||||
fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(cmd, words...), stderr)
|
||||
}
|
||||
|
||||
if err := cmd.Run(); err != nil {
|
||||
return nil, fmt.Errorf("%v: %v: %s", tool, err, cmd.Stderr)
|
||||
}
|
||||
|
|
24
vendor/golang.org/x/tools/go/packages/golist.go
generated
vendored
24
vendor/golang.org/x/tools/go/packages/golist.go
generated
vendored
|
@ -110,6 +110,7 @@ func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) {
|
|||
sizeswg.Done()
|
||||
}()
|
||||
}
|
||||
defer sizeswg.Wait()
|
||||
|
||||
// start fetching rootDirs
|
||||
var info goInfo
|
||||
|
@ -128,6 +129,10 @@ func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) {
|
|||
return &info
|
||||
}
|
||||
|
||||
// Ensure that we don't leak goroutines: Load is synchronous, so callers will
|
||||
// not expect it to access the fields of cfg after the call returns.
|
||||
defer getGoInfo()
|
||||
|
||||
// always pass getGoInfo to golistDriver
|
||||
golistDriver := func(cfg *Config, patterns ...string) (*driverResponse, error) {
|
||||
return golistDriver(cfg, getGoInfo, patterns...)
|
||||
|
@ -265,10 +270,7 @@ func addNeededOverlayPackages(cfg *Config, driver driver, response *responseDedu
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addNeededOverlayPackages(cfg, driver, response, needPkgs, getGoInfo); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return addNeededOverlayPackages(cfg, driver, response, needPkgs, getGoInfo)
|
||||
}
|
||||
|
||||
func runContainsQueries(cfg *Config, driver driver, response *responseDeduper, queries []string, goInfo func() *goInfo) error {
|
||||
|
@ -368,7 +370,8 @@ func adHocPackage(cfg *Config, driver driver, pattern, query string) (*driverRes
|
|||
// Special case to handle issue #33482:
|
||||
// If this is a file= query for ad-hoc packages where the file only exists on an overlay,
|
||||
// and exists outside of a module, add the file in for the package.
|
||||
if len(dirResponse.Packages) == 1 && (dirResponse.Packages[0].ID == "command-line-arguments" || dirResponse.Packages[0].PkgPath == filepath.ToSlash(query)) {
|
||||
if len(dirResponse.Packages) == 1 && (dirResponse.Packages[0].ID == "command-line-arguments" ||
|
||||
filepath.ToSlash(dirResponse.Packages[0].PkgPath) == filepath.ToSlash(query)) {
|
||||
if len(dirResponse.Packages[0].GoFiles) == 0 {
|
||||
filename := filepath.Join(pattern, filepath.Base(query)) // avoid recomputing abspath
|
||||
// TODO(matloob): check if the file is outside of a root dir?
|
||||
|
@ -734,9 +737,9 @@ func golistDriver(cfg *Config, rootsDirs func() *goInfo, words ...string) (*driv
|
|||
// go list uses the following identifiers in ImportPath and Imports:
|
||||
//
|
||||
// "p" -- importable package or main (command)
|
||||
// "q.test" -- q's test executable
|
||||
// "q.test" -- q's test executable
|
||||
// "p [q.test]" -- variant of p as built for q's test executable
|
||||
// "q_test [q.test]" -- q's external test package
|
||||
// "q_test [q.test]" -- q's external test package
|
||||
//
|
||||
// The packages p that are built differently for a test q.test
|
||||
// are q itself, plus any helpers used by the external test q_test,
|
||||
|
@ -1061,7 +1064,14 @@ func invokeGo(cfg *Config, args ...string) (*bytes.Buffer, error) {
|
|||
// TODO(matloob): command-line-arguments isn't correct here.
|
||||
"command-line-arguments", strings.Trim(stderr.String(), "\n"))
|
||||
return bytes.NewBufferString(output), nil
|
||||
}
|
||||
|
||||
// Another variation of the previous error
|
||||
if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "outside module root") {
|
||||
output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
|
||||
// TODO(matloob): command-line-arguments isn't correct here.
|
||||
"command-line-arguments", strings.Trim(stderr.String(), "\n"))
|
||||
return bytes.NewBufferString(output), nil
|
||||
}
|
||||
|
||||
// Workaround for an instance of golang.org/issue/26755: go list -e will return a non-zero exit
|
||||
|
|
57
vendor/golang.org/x/tools/go/packages/loadmode_string.go
generated
vendored
Normal file
57
vendor/golang.org/x/tools/go/packages/loadmode_string.go
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package packages
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var allModes = []LoadMode{
|
||||
NeedName,
|
||||
NeedFiles,
|
||||
NeedCompiledGoFiles,
|
||||
NeedImports,
|
||||
NeedDeps,
|
||||
NeedExportsFile,
|
||||
NeedTypes,
|
||||
NeedSyntax,
|
||||
NeedTypesInfo,
|
||||
NeedTypesSizes,
|
||||
}
|
||||
|
||||
var modeStrings = []string{
|
||||
"NeedName",
|
||||
"NeedFiles",
|
||||
"NeedCompiledGoFiles",
|
||||
"NeedImports",
|
||||
"NeedDeps",
|
||||
"NeedExportsFile",
|
||||
"NeedTypes",
|
||||
"NeedSyntax",
|
||||
"NeedTypesInfo",
|
||||
"NeedTypesSizes",
|
||||
}
|
||||
|
||||
func (mod LoadMode) String() string {
|
||||
m := mod
|
||||
if m == 0 {
|
||||
return fmt.Sprintf("LoadMode(0)")
|
||||
}
|
||||
var out []string
|
||||
for i, x := range allModes {
|
||||
if x > m {
|
||||
break
|
||||
}
|
||||
if (m & x) != 0 {
|
||||
out = append(out, modeStrings[i])
|
||||
m = m ^ x
|
||||
}
|
||||
}
|
||||
if m != 0 {
|
||||
out = append(out, "Unknown")
|
||||
}
|
||||
return fmt.Sprintf("LoadMode(%s)", strings.Join(out, "|"))
|
||||
}
|
11
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
11
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
|
@ -467,7 +467,7 @@ func newLoader(cfg *Config) *loader {
|
|||
ld.requestedMode = ld.Mode
|
||||
ld.Mode = impliedLoadMode(ld.Mode)
|
||||
|
||||
if ld.Mode&NeedTypes != 0 {
|
||||
if ld.Mode&NeedTypes != 0 || ld.Mode&NeedSyntax != 0 {
|
||||
if ld.Fset == nil {
|
||||
ld.Fset = token.NewFileSet()
|
||||
}
|
||||
|
@ -609,9 +609,9 @@ func (ld *loader) refine(roots []string, list ...*Package) ([]*Package, error) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// Load type data if needed, starting at
|
||||
// Load type data and syntax if needed, starting at
|
||||
// the initial packages (roots of the import DAG).
|
||||
if ld.Mode&NeedTypes != 0 {
|
||||
if ld.Mode&NeedTypes != 0 || ld.Mode&NeedSyntax != 0 {
|
||||
var wg sync.WaitGroup
|
||||
for _, lpkg := range initial {
|
||||
wg.Add(1)
|
||||
|
@ -770,7 +770,7 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
|
|||
lpkg.Errors = append(lpkg.Errors, errs...)
|
||||
}
|
||||
|
||||
if len(lpkg.CompiledGoFiles) == 0 && lpkg.ExportFile != "" {
|
||||
if ld.Config.Mode&NeedTypes != 0 && len(lpkg.CompiledGoFiles) == 0 && lpkg.ExportFile != "" {
|
||||
// The config requested loading sources and types, but sources are missing.
|
||||
// Add an error to the package and fall back to loading from export data.
|
||||
appendError(Error{"-", fmt.Sprintf("sources missing for package %s", lpkg.ID), ParseError})
|
||||
|
@ -784,6 +784,9 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
|
|||
}
|
||||
|
||||
lpkg.Syntax = files
|
||||
if ld.Config.Mode&NeedTypes == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
lpkg.TypesInfo = &types.Info{
|
||||
Types: make(map[ast.Expr]types.TypeAndValue),
|
||||
|
|
68
vendor/golang.org/x/tools/internal/span/token.go
generated
vendored
68
vendor/golang.org/x/tools/internal/span/token.go
generated
vendored
|
@ -13,9 +13,10 @@ import (
|
|||
// It also carries the FileSet that produced the positions, so that it is
|
||||
// self contained.
|
||||
type Range struct {
|
||||
FileSet *token.FileSet
|
||||
Start token.Pos
|
||||
End token.Pos
|
||||
FileSet *token.FileSet
|
||||
Start token.Pos
|
||||
End token.Pos
|
||||
Converter Converter
|
||||
}
|
||||
|
||||
// TokenConverter is a Converter backed by a token file set and file.
|
||||
|
@ -64,23 +65,56 @@ func (r Range) Span() (Span, error) {
|
|||
if f == nil {
|
||||
return Span{}, fmt.Errorf("file not found in FileSet")
|
||||
}
|
||||
s := Span{v: span{URI: FileURI(f.Name())}}
|
||||
var s Span
|
||||
var err error
|
||||
s.v.Start.Offset, err = offset(f, r.Start)
|
||||
var startFilename string
|
||||
startFilename, s.v.Start.Line, s.v.Start.Column, err = position(f, r.Start)
|
||||
if err != nil {
|
||||
return Span{}, err
|
||||
}
|
||||
s.v.URI = FileURI(startFilename)
|
||||
if r.End.IsValid() {
|
||||
s.v.End.Offset, err = offset(f, r.End)
|
||||
var endFilename string
|
||||
endFilename, s.v.End.Line, s.v.End.Column, err = position(f, r.End)
|
||||
if err != nil {
|
||||
return Span{}, err
|
||||
}
|
||||
// In the presence of line directives, a single File can have sections from
|
||||
// multiple file names.
|
||||
if endFilename != startFilename {
|
||||
return Span{}, fmt.Errorf("span begins in file %q but ends in %q", startFilename, endFilename)
|
||||
}
|
||||
}
|
||||
s.v.Start.clean()
|
||||
s.v.End.clean()
|
||||
s.v.clean()
|
||||
converter := NewTokenConverter(r.FileSet, f)
|
||||
return s.WithPosition(converter)
|
||||
if r.Converter != nil {
|
||||
return s.WithOffset(r.Converter)
|
||||
}
|
||||
if startFilename != f.Name() {
|
||||
return Span{}, fmt.Errorf("must supply Converter for file %q containing lines from %q", f.Name(), startFilename)
|
||||
}
|
||||
return s.WithOffset(NewTokenConverter(r.FileSet, f))
|
||||
}
|
||||
|
||||
func position(f *token.File, pos token.Pos) (string, int, int, error) {
|
||||
off, err := offset(f, pos)
|
||||
if err != nil {
|
||||
return "", 0, 0, err
|
||||
}
|
||||
return positionFromOffset(f, off)
|
||||
}
|
||||
|
||||
func positionFromOffset(f *token.File, offset int) (string, int, int, error) {
|
||||
if offset > f.Size() {
|
||||
return "", 0, 0, fmt.Errorf("offset %v is past the end of the file %v", offset, f.Size())
|
||||
}
|
||||
pos := f.Pos(offset)
|
||||
p := f.Position(pos)
|
||||
if offset == f.Size() {
|
||||
return p.Filename, p.Line + 1, 1, nil
|
||||
}
|
||||
return p.Filename, p.Line, p.Column, nil
|
||||
}
|
||||
|
||||
// offset is a copy of the Offset function in go/token, but with the adjustment
|
||||
|
@ -108,22 +142,16 @@ func (s Span) Range(converter *TokenConverter) (Range, error) {
|
|||
return Range{}, fmt.Errorf("end offset %v is past the end of the file %v", s.End(), converter.file.Size())
|
||||
}
|
||||
return Range{
|
||||
FileSet: converter.fset,
|
||||
Start: converter.file.Pos(s.Start().Offset()),
|
||||
End: converter.file.Pos(s.End().Offset()),
|
||||
FileSet: converter.fset,
|
||||
Start: converter.file.Pos(s.Start().Offset()),
|
||||
End: converter.file.Pos(s.End().Offset()),
|
||||
Converter: converter,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (l *TokenConverter) ToPosition(offset int) (int, int, error) {
|
||||
if offset > l.file.Size() {
|
||||
return 0, 0, fmt.Errorf("offset %v is past the end of the file %v", offset, l.file.Size())
|
||||
}
|
||||
pos := l.file.Pos(offset)
|
||||
p := l.fset.Position(pos)
|
||||
if offset == l.file.Size() {
|
||||
return p.Line + 1, 1, nil
|
||||
}
|
||||
return p.Line, p.Column, nil
|
||||
_, line, col, err := positionFromOffset(l.file, offset)
|
||||
return line, col, err
|
||||
}
|
||||
|
||||
func (l *TokenConverter) ToOffset(line, col int) (int, error) {
|
||||
|
|
18
vendor/gopkg.in/yaml.v2/.travis.yml
generated
vendored
18
vendor/gopkg.in/yaml.v2/.travis.yml
generated
vendored
|
@ -1,12 +1,16 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
- 1.4
|
||||
- 1.5
|
||||
- 1.6
|
||||
- 1.7
|
||||
- 1.8
|
||||
- 1.9
|
||||
- tip
|
||||
- "1.4.x"
|
||||
- "1.5.x"
|
||||
- "1.6.x"
|
||||
- "1.7.x"
|
||||
- "1.8.x"
|
||||
- "1.9.x"
|
||||
- "1.10.x"
|
||||
- "1.11.x"
|
||||
- "1.12.x"
|
||||
- "1.13.x"
|
||||
- "tip"
|
||||
|
||||
go_import_path: gopkg.in/yaml.v2
|
||||
|
|
14
vendor/gopkg.in/yaml.v2/decode.go
generated
vendored
14
vendor/gopkg.in/yaml.v2/decode.go
generated
vendored
|
@ -319,10 +319,14 @@ func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unm
|
|||
}
|
||||
|
||||
const (
|
||||
// 400,000 decode operations is ~500kb of dense object declarations, or ~5kb of dense object declarations with 10000% alias expansion
|
||||
// 400,000 decode operations is ~500kb of dense object declarations, or
|
||||
// ~5kb of dense object declarations with 10000% alias expansion
|
||||
alias_ratio_range_low = 400000
|
||||
// 4,000,000 decode operations is ~5MB of dense object declarations, or ~4.5MB of dense object declarations with 10% alias expansion
|
||||
|
||||
// 4,000,000 decode operations is ~5MB of dense object declarations, or
|
||||
// ~4.5MB of dense object declarations with 10% alias expansion
|
||||
alias_ratio_range_high = 4000000
|
||||
|
||||
// alias_ratio_range is the range over which we scale allowed alias ratios
|
||||
alias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low)
|
||||
)
|
||||
|
@ -784,8 +788,7 @@ func (d *decoder) merge(n *node, out reflect.Value) {
|
|||
case mappingNode:
|
||||
d.unmarshal(n, out)
|
||||
case aliasNode:
|
||||
an, ok := d.doc.anchors[n.value]
|
||||
if ok && an.kind != mappingNode {
|
||||
if n.alias != nil && n.alias.kind != mappingNode {
|
||||
failWantMap()
|
||||
}
|
||||
d.unmarshal(n, out)
|
||||
|
@ -794,8 +797,7 @@ func (d *decoder) merge(n *node, out reflect.Value) {
|
|||
for i := len(n.children) - 1; i >= 0; i-- {
|
||||
ni := n.children[i]
|
||||
if ni.kind == aliasNode {
|
||||
an, ok := d.doc.anchors[ni.value]
|
||||
if ok && an.kind != mappingNode {
|
||||
if ni.alias != nil && ni.alias.kind != mappingNode {
|
||||
failWantMap()
|
||||
}
|
||||
} else if ni.kind != mappingNode {
|
||||
|
|
78
vendor/gopkg.in/yaml.v2/scannerc.go
generated
vendored
78
vendor/gopkg.in/yaml.v2/scannerc.go
generated
vendored
|
@ -634,13 +634,14 @@ func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool {
|
|||
need_more_tokens = true
|
||||
} else {
|
||||
// Check if any potential simple key may occupy the head position.
|
||||
if !yaml_parser_stale_simple_keys(parser) {
|
||||
return false
|
||||
}
|
||||
|
||||
for i := range parser.simple_keys {
|
||||
for i := len(parser.simple_keys) - 1; i >= 0; i-- {
|
||||
simple_key := &parser.simple_keys[i]
|
||||
if simple_key.possible && simple_key.token_number == parser.tokens_parsed {
|
||||
if simple_key.token_number < parser.tokens_parsed {
|
||||
break
|
||||
}
|
||||
if valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok {
|
||||
return false
|
||||
} else if valid && simple_key.token_number == parser.tokens_parsed {
|
||||
need_more_tokens = true
|
||||
break
|
||||
}
|
||||
|
@ -678,11 +679,6 @@ func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// Remove obsolete potential simple keys.
|
||||
if !yaml_parser_stale_simple_keys(parser) {
|
||||
return false
|
||||
}
|
||||
|
||||
// Check the indentation level against the current column.
|
||||
if !yaml_parser_unroll_indent(parser, parser.mark.column) {
|
||||
return false
|
||||
|
@ -837,29 +833,30 @@ func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool {
|
|||
"found character that cannot start any token")
|
||||
}
|
||||
|
||||
// Check the list of potential simple keys and remove the positions that
|
||||
// cannot contain simple keys anymore.
|
||||
func yaml_parser_stale_simple_keys(parser *yaml_parser_t) bool {
|
||||
// Check for a potential simple key for each flow level.
|
||||
for i := range parser.simple_keys {
|
||||
simple_key := &parser.simple_keys[i]
|
||||
|
||||
// The specification requires that a simple key
|
||||
//
|
||||
// - is limited to a single line,
|
||||
// - is shorter than 1024 characters.
|
||||
if simple_key.possible && (simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index) {
|
||||
|
||||
// Check if the potential simple key to be removed is required.
|
||||
if simple_key.required {
|
||||
return yaml_parser_set_scanner_error(parser,
|
||||
"while scanning a simple key", simple_key.mark,
|
||||
"could not find expected ':'")
|
||||
}
|
||||
simple_key.possible = false
|
||||
}
|
||||
func yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) {
|
||||
if !simple_key.possible {
|
||||
return false, true
|
||||
}
|
||||
return true
|
||||
|
||||
// The 1.2 specification says:
|
||||
//
|
||||
// "If the ? indicator is omitted, parsing needs to see past the
|
||||
// implicit key to recognize it as such. To limit the amount of
|
||||
// lookahead required, the “:” indicator must appear at most 1024
|
||||
// Unicode characters beyond the start of the key. In addition, the key
|
||||
// is restricted to a single line."
|
||||
//
|
||||
if simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index {
|
||||
// Check if the potential simple key to be removed is required.
|
||||
if simple_key.required {
|
||||
return false, yaml_parser_set_scanner_error(parser,
|
||||
"while scanning a simple key", simple_key.mark,
|
||||
"could not find expected ':'")
|
||||
}
|
||||
simple_key.possible = false
|
||||
return false, true
|
||||
}
|
||||
return true, true
|
||||
}
|
||||
|
||||
// Check if a simple key may start at the current position and add it if
|
||||
|
@ -879,8 +876,8 @@ func yaml_parser_save_simple_key(parser *yaml_parser_t) bool {
|
|||
possible: true,
|
||||
required: required,
|
||||
token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head),
|
||||
mark: parser.mark,
|
||||
}
|
||||
simple_key.mark = parser.mark
|
||||
|
||||
if !yaml_parser_remove_simple_key(parser) {
|
||||
return false
|
||||
|
@ -912,7 +909,12 @@ const max_flow_level = 10000
|
|||
// Increase the flow level and resize the simple key list if needed.
|
||||
func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool {
|
||||
// Reset the simple key on the next level.
|
||||
parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{})
|
||||
parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{
|
||||
possible: false,
|
||||
required: false,
|
||||
token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head),
|
||||
mark: parser.mark,
|
||||
})
|
||||
|
||||
// Increase the flow level.
|
||||
parser.flow_level++
|
||||
|
@ -1286,7 +1288,11 @@ func yaml_parser_fetch_value(parser *yaml_parser_t) bool {
|
|||
simple_key := &parser.simple_keys[len(parser.simple_keys)-1]
|
||||
|
||||
// Have we found a simple key?
|
||||
if simple_key.possible {
|
||||
if valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok {
|
||||
return false
|
||||
|
||||
} else if valid {
|
||||
|
||||
// Create the KEY token and insert it into the queue.
|
||||
token := yaml_token_t{
|
||||
typ: yaml_KEY_TOKEN,
|
||||
|
|
2
vendor/gopkg.in/yaml.v2/yaml.go
generated
vendored
2
vendor/gopkg.in/yaml.v2/yaml.go
generated
vendored
|
@ -89,7 +89,7 @@ func UnmarshalStrict(in []byte, out interface{}) (err error) {
|
|||
return unmarshal(in, out, true)
|
||||
}
|
||||
|
||||
// A Decorder reads and decodes YAML values from an input stream.
|
||||
// A Decoder reads and decodes YAML values from an input stream.
|
||||
type Decoder struct {
|
||||
strict bool
|
||||
parser *parser
|
||||
|
|
14
vendor/modules.txt
vendored
14
vendor/modules.txt
vendored
|
@ -42,7 +42,7 @@ github.com/ghodss/yaml
|
|||
github.com/go-openapi/jsonpointer
|
||||
# github.com/go-openapi/jsonreference v0.19.3
|
||||
github.com/go-openapi/jsonreference
|
||||
# github.com/go-openapi/spec v0.19.3
|
||||
# github.com/go-openapi/spec v0.19.4
|
||||
github.com/go-openapi/spec
|
||||
# github.com/go-openapi/swag v0.19.5
|
||||
github.com/go-openapi/swag
|
||||
|
@ -183,13 +183,13 @@ github.com/ulule/limiter/v3
|
|||
github.com/ulule/limiter/v3/drivers/store/memory
|
||||
github.com/ulule/limiter/v3/drivers/store/redis
|
||||
github.com/ulule/limiter/v3/drivers/store/common
|
||||
# github.com/urfave/cli v1.22.1
|
||||
# github.com/urfave/cli v1.22.2
|
||||
github.com/urfave/cli
|
||||
# github.com/valyala/bytebufferpool v1.0.0
|
||||
github.com/valyala/bytebufferpool
|
||||
# github.com/valyala/fasttemplate v1.1.0
|
||||
github.com/valyala/fasttemplate
|
||||
# golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
|
||||
# golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1
|
||||
golang.org/x/crypto/bcrypt
|
||||
golang.org/x/crypto/acme
|
||||
golang.org/x/crypto/acme/autocert
|
||||
|
@ -197,9 +197,9 @@ golang.org/x/crypto/blowfish
|
|||
# golang.org/x/lint v0.0.0-20190409202823-959b441ac422
|
||||
golang.org/x/lint/golint
|
||||
golang.org/x/lint
|
||||
# golang.org/x/net v0.0.0-20191021144547-ec77196f6094
|
||||
# golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933
|
||||
golang.org/x/net/idna
|
||||
# golang.org/x/sys v0.0.0-20191023151326-f89234f9a2c2
|
||||
# golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9
|
||||
golang.org/x/sys/unix
|
||||
# golang.org/x/text v0.3.2
|
||||
golang.org/x/text/transform
|
||||
|
@ -207,7 +207,7 @@ golang.org/x/text/unicode/norm
|
|||
golang.org/x/text/secure/bidirule
|
||||
golang.org/x/text/unicode/bidi
|
||||
golang.org/x/text/width
|
||||
# golang.org/x/tools v0.0.0-20191023202404-2b779830f9d3
|
||||
# golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d
|
||||
golang.org/x/tools/go/loader
|
||||
golang.org/x/tools/go/ast/astutil
|
||||
golang.org/x/tools/go/gcexportdata
|
||||
|
@ -232,7 +232,7 @@ gopkg.in/d4l3k/messagediff.v1
|
|||
gopkg.in/gomail.v2
|
||||
# gopkg.in/testfixtures.v2 v2.5.3
|
||||
gopkg.in/testfixtures.v2
|
||||
# gopkg.in/yaml.v2 v2.2.4
|
||||
# gopkg.in/yaml.v2 v2.2.7
|
||||
gopkg.in/yaml.v2
|
||||
# honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a
|
||||
honnef.co/go/tools/cmd/staticcheck
|
||||
|
|
Loading…
Reference in a new issue