diff --git a/README.md b/README.md
index 4028b396..1f7eafda 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,7 @@ Designed as a [drop-in replacement](#difference-to-kubectx) for [kubectx](https:
- [OVH](docs/stores/ovh/ovh.md)
- [Rancher](docs/stores/rancher/rancher.md)
- Scaleway (documentation tbd)
+ - [Akamai / Linode](docs/stores/akamai/akamai.md)
- Your favorite Cloud Provider or Managed Kubernetes Platform is not supported yet? Looking for contributions!
- **Change the namespace**
- **Change to any context and namespace from the history**
diff --git a/cmd/switcher/switcher.go b/cmd/switcher/switcher.go
index 1bce6c59..f083aa36 100644
--- a/cmd/switcher/switcher.go
+++ b/cmd/switcher/switcher.go
@@ -297,6 +297,15 @@ func initialize() ([]store.KubeconfigStore, *types.Config, error) {
}
s = doStore
digitalOceanStoreAddedViaConfig = true
+ case types.StoreKindAkamai:
+ akamaiStore, err := store.NewAkamaiStore(kubeconfigStoreFromConfig)
+ if err != nil {
+ if kubeconfigStoreFromConfig.Required != nil && !*kubeconfigStoreFromConfig.Required {
+ continue
+ }
+ return nil, nil, err
+ }
+ s = akamaiStore
default:
return nil, nil, fmt.Errorf("unknown store %q", kubeconfigStoreFromConfig.Kind)
}
diff --git a/docs/stores/akamai/akamai.md b/docs/stores/akamai/akamai.md
new file mode 100644
index 00000000..9e8bbc5d
--- /dev/null
+++ b/docs/stores/akamai/akamai.md
@@ -0,0 +1,23 @@
+# Akamai store
+
+To use the Akamai store a token should be created [on linode's website](https://cloud.linode.com/profile/tokens)
+
+In order to create this token you also need to specify the scope.
+The required permissions for this plugin to work are the following:
+- `read/write` for Kubernetes
+
+## Configuration
+
+The Akamai store configuration is defined in the `kubeswitch` configuration file.
+An example configuration is shown below:
+
+```yaml
+kind: SwitchConfig
+version: v1alpha1
+kubeconfigStores:
+- kind: akamai
+ config:
+ linode_token: "your-linode-token"
+```
+
+`linode_token` can be ignored if set with the environment variable `LINODE_TOKEN`.
diff --git a/go.mod b/go.mod
index 44dd2685..44250933 100644
--- a/go.mod
+++ b/go.mod
@@ -33,7 +33,7 @@ require (
github.com/rancher/rancher/pkg/client v0.0.0-20240416202124-a6da228939da
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
- golang.org/x/tools v0.13.0
+ golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
google.golang.org/api v0.126.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
@@ -48,15 +48,15 @@ require (
require (
github.com/digitalocean/doctl v1.105.0
github.com/digitalocean/godo v1.113.0
+ github.com/linode/linodego v1.42.0
github.com/ovh/go-ovh v1.4.3
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816
- golang.org/x/oauth2 v0.10.0
+ golang.org/x/oauth2 v0.23.0
)
require (
- cloud.google.com/go/compute v1.21.0 // indirect
- cloud.google.com/go/compute/metadata v0.2.3 // indirect
+ cloud.google.com/go/compute/metadata v0.3.0 // indirect
github.com/Azure/azure-sdk-for-go v58.0.0+incompatible // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
@@ -98,6 +98,7 @@ require (
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
+ github.com/go-resty/resty/v2 v2.13.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
@@ -167,14 +168,14 @@ require (
github.com/subosito/gotenv v1.4.2 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/mock v0.2.0 // indirect
- golang.org/x/crypto v0.22.0 // indirect
- golang.org/x/mod v0.12.0 // indirect
- golang.org/x/net v0.24.0 // indirect
- golang.org/x/sync v0.3.0 // indirect
- golang.org/x/sys v0.20.0 // indirect
- golang.org/x/term v0.19.0 // indirect
- golang.org/x/text v0.14.0 // indirect
- golang.org/x/time v0.3.0 // indirect
+ golang.org/x/crypto v0.28.0 // indirect
+ golang.org/x/mod v0.17.0 // indirect
+ golang.org/x/net v0.30.0 // indirect
+ golang.org/x/sync v0.8.0 // indirect
+ golang.org/x/sys v0.26.0 // indirect
+ golang.org/x/term v0.25.0 // indirect
+ golang.org/x/text v0.19.0 // indirect
+ golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc v1.58.3 // indirect
diff --git a/go.sum b/go.sum
index cd69f5ec..47ea4488 100644
--- a/go.sum
+++ b/go.sum
@@ -23,10 +23,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
-cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk=
-cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
-cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
-cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
+cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=
+cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
@@ -205,6 +203,8 @@ github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2Kv
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
+github.com/go-resty/resty/v2 v2.13.1 h1:x+LHXBI2nMB1vqndymf26quycC4aggYJ7DECYbiz03g=
+github.com/go-resty/resty/v2 v2.13.1/go.mod h1:GznXlLxkq6Nh4sU59rPmUw3VtgpO3aS96ORAI6Q7d+0=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
@@ -337,8 +337,8 @@ github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
-github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc=
-github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg=
+github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww=
+github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg=
github.com/jedib0t/go-pretty/v6 v6.1.0 h1:NVS2PT3ZvzMb47DzS50cmsK6xkf8SSyLfroSSIG20JI=
github.com/jedib0t/go-pretty/v6 v6.1.0/go.mod h1:+nE9fyyHGil+PuISTCrp7avEdo6bqoMwqZnuiK2r2a0=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
@@ -372,6 +372,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/ktr0731/go-fuzzyfinder v0.6.0 h1:lP6B3B8CjqbKGf/K5f1X5kdpxiSkCH0+9AzgA3Cm+VU=
github.com/ktr0731/go-fuzzyfinder v0.6.0/go.mod h1:QrbU5RFMEFBbPZnlJBqctX6028IV8qW/yCX3DCAzi1Y=
+github.com/linode/linodego v1.42.0 h1:ZSbi4MtvwrfB9Y6bknesorvvueBGGilcmh2D5dq76RM=
+github.com/linode/linodego v1.42.0/go.mod h1:2yzmY6pegPBDgx2HDllmt0eIk2IlzqcgK6NR0wFCFRY=
github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
@@ -535,8 +537,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
-github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
-github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
+github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816 h1:J6v8awz+me+xeb/cUTotKgceAYouhIB3pjzgRd6IlGk=
@@ -572,8 +574,10 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
-golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
+golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
+golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
+golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
+golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -610,8 +614,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
-golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
+golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -650,8 +655,12 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
-golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
+golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
+golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
+golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
+golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -661,8 +670,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8=
-golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI=
+golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
+golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -674,8 +683,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
-golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
+golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -730,14 +740,22 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
+golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
-golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
+golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
+golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
+golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
+golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24=
+golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -747,13 +765,17 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
-golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
+golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
-golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
+golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -805,8 +827,9 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
-golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
+golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
+golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
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=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/pkg/store/kubeconfig_store_akamai.go b/pkg/store/kubeconfig_store_akamai.go
new file mode 100644
index 00000000..b0556a2b
--- /dev/null
+++ b/pkg/store/kubeconfig_store_akamai.go
@@ -0,0 +1,172 @@
+// Copyright 2024 The Kubeswitch authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package store
+
+import (
+ "context"
+ "encoding/base64"
+ "fmt"
+ "net/http"
+ "os"
+ "strconv"
+ "time"
+
+ "golang.org/x/oauth2"
+ "gopkg.in/yaml.v3"
+
+ "github.com/danielfoehrkn/kubeswitch/types"
+ "github.com/linode/linodego"
+ "github.com/sirupsen/logrus"
+)
+
+func NewAkamaiStore(store types.KubeconfigStore) (*AkamaiStore, error) {
+ akamaiStoreConfig := &types.StoreConfigAkamai{}
+ if store.Config != nil {
+ buf, err := yaml.Marshal(store.Config)
+ if err != nil {
+ return nil, fmt.Errorf("failed to process akamai store config: %w", err)
+ }
+
+ err = yaml.Unmarshal(buf, akamaiStoreConfig)
+ if err != nil {
+ return nil, fmt.Errorf("failed to unmarshal akami config: %w", err)
+ }
+ }
+
+ return &AkamaiStore{
+ Logger: logrus.New().WithField("store", types.StoreKindAkamai),
+ KubeconfigStore: store,
+ Config: akamaiStoreConfig,
+ }, nil
+}
+
+// InitializeAkamaiStore the Akamai client
+func (s *AkamaiStore) InitializeAkamaiStore() error {
+ // use environment variables if token is not set
+ token := s.Config.LinodeToken
+ if token == "" {
+ envToken, ok := os.LookupEnv("LINODE_TOKEN")
+ if !ok {
+ return fmt.Errorf("linode token not set")
+ }
+ token = envToken
+ }
+
+ tokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: token})
+
+ oauth2Client := &http.Client{
+ Transport: &oauth2.Transport{
+ Source: tokenSource,
+ },
+ }
+
+ linodeClient := linodego.NewClient(oauth2Client)
+
+ s.Client = &linodeClient
+
+ return nil
+}
+
+// GetID returns the unique store ID
+func (s *AkamaiStore) GetID() string {
+ return fmt.Sprintf("%s.default", s.GetKind())
+}
+
+func (s *AkamaiStore) GetKind() types.StoreKind {
+ return types.StoreKindAkamai
+}
+
+func (s *AkamaiStore) GetContextPrefix(path string) string {
+ return fmt.Sprintf("%s/%s", s.GetKind(), path)
+}
+
+func (s *AkamaiStore) VerifyKubeconfigPaths() error {
+ // NOOP
+ return nil
+}
+
+func (s *AkamaiStore) GetStoreConfig() types.KubeconfigStore {
+ return s.KubeconfigStore
+}
+
+func (s *AkamaiStore) GetLogger() *logrus.Entry {
+ return s.Logger
+}
+
+func (s *AkamaiStore) StartSearch(channel chan SearchResult) {
+ s.Logger.Debug("Akamai: start search")
+
+ ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
+ defer cancel()
+
+ if err := s.InitializeAkamaiStore(); err != nil {
+ channel <- SearchResult{
+ KubeconfigPath: "",
+ Error: err,
+ }
+ return
+ }
+
+ // list linode instances
+ instances, err := s.Client.ListLKEClusters(ctx, nil)
+ if err != nil {
+ channel <- SearchResult{
+ KubeconfigPath: "",
+ Error: err,
+ }
+ return
+ }
+
+ for _, instance := range instances {
+ channel <- SearchResult{
+ KubeconfigPath: instance.Label,
+ Tags: map[string]string{
+ "clusterID": strconv.Itoa(instance.ID),
+ "region": instance.Region,
+ },
+ }
+ }
+}
+
+func (s *AkamaiStore) GetKubeconfigForPath(path string, tags map[string]string) ([]byte, error) {
+ s.Logger.Debugf("Akamai: get kubeconfig for path %s", path)
+
+ // initialize client
+ if err := s.InitializeAkamaiStore(); err != nil {
+ return nil, err
+ }
+
+ clusterID, err := strconv.Atoi(tags["clusterID"])
+ if err != nil {
+ return nil, fmt.Errorf("failed to get clusterID: %w", err)
+ }
+
+ ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
+ defer cancel()
+
+ // get kubeconfig
+ LKEkubeconfig, err := s.Client.GetLKEClusterKubeconfig(ctx, clusterID)
+ if err != nil {
+ return nil, err
+ }
+
+ // decode base64 kubeconfig
+ kubeconfig, err := base64.StdEncoding.DecodeString(LKEkubeconfig.KubeConfig)
+ if err != nil {
+ return nil, err
+ }
+
+ return kubeconfig, nil
+}
diff --git a/pkg/store/types.go b/pkg/store/types.go
index af9535e7..464ae3ce 100644
--- a/pkg/store/types.go
+++ b/pkg/store/types.go
@@ -28,6 +28,7 @@ import (
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
seedmanagementv1alpha1 "github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1"
vaultapi "github.com/hashicorp/vault/api"
+ "github.com/linode/linodego"
"github.com/ovh/go-ovh/ovh"
"github.com/rancher/norman/clientbase"
managementClient "github.com/rancher/rancher/pkg/client/generated/management/v3"
@@ -203,3 +204,10 @@ type DigitalOceanStore struct {
ContextToKubernetesService map[string]do.KubernetesService
Config doks.DoctlConfig
}
+
+type AkamaiStore struct {
+ Logger *logrus.Entry
+ KubeconfigStore types.KubeconfigStore
+ Client *linodego.Client
+ Config *types.StoreConfigAkamai
+}
diff --git a/types/config.go b/types/config.go
index 572dfb48..3be1a585 100644
--- a/types/config.go
+++ b/types/config.go
@@ -24,7 +24,7 @@ import (
type StoreKind string
// ValidStoreKinds contains all valid store kinds
-var ValidStoreKinds = sets.NewString(string(StoreKindVault), string(StoreKindFilesystem), string(StoreKindGardener), string(StoreKindGKE), string(StoreKindAzure), string(StoreKindEKS), string(StoreKindRancher), string(StoreKindOVH), string(StoreKindScaleway), string(StoreKindDigitalOcean))
+var ValidStoreKinds = sets.NewString(string(StoreKindVault), string(StoreKindFilesystem), string(StoreKindGardener), string(StoreKindGKE), string(StoreKindAzure), string(StoreKindEKS), string(StoreKindRancher), string(StoreKindOVH), string(StoreKindScaleway), string(StoreKindDigitalOcean), string(StoreKindAkamai))
// ValidConfigVersions contains all valid config versions
var ValidConfigVersions = sets.NewString("v1alpha1")
@@ -50,6 +50,8 @@ const (
StoreKindScaleway StoreKind = "scaleway"
// StoreKindDigitalOcean is an identifier for the Azure store
StoreKindDigitalOcean StoreKind = "digitalocean"
+ // StoreKindAkamai is an identifier for the Akamai store
+ StoreKindAkamai StoreKind = "akamai"
)
type Config struct {
@@ -250,3 +252,7 @@ type StoreConfigScaleway struct {
ScalewaySecretKey string `yaml:"secret_key"`
ScalewayRegion string `yaml:"region"`
}
+
+type StoreConfigAkamai struct {
+ LinodeToken string `yaml:"linode_token"`
+}
diff --git a/vendor/cloud.google.com/go/compute/LICENSE b/vendor/cloud.google.com/go/compute/LICENSE
deleted file mode 100644
index d6456956..00000000
--- a/vendor/cloud.google.com/go/compute/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/cloud.google.com/go/compute/internal/version.go b/vendor/cloud.google.com/go/compute/internal/version.go
deleted file mode 100644
index b1672963..00000000
--- a/vendor/cloud.google.com/go/compute/internal/version.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2022 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package internal
-
-// Version is the current tagged release of the library.
-const Version = "1.21.0"
diff --git a/vendor/cloud.google.com/go/compute/metadata/CHANGES.md b/vendor/cloud.google.com/go/compute/metadata/CHANGES.md
index 06b95734..967e0607 100644
--- a/vendor/cloud.google.com/go/compute/metadata/CHANGES.md
+++ b/vendor/cloud.google.com/go/compute/metadata/CHANGES.md
@@ -1,5 +1,12 @@
# Changes
+## [0.3.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.2.3...compute/metadata/v0.3.0) (2024-04-15)
+
+
+### Features
+
+* **compute/metadata:** Add context aware functions ([#9733](https://github.com/googleapis/google-cloud-go/issues/9733)) ([e4eb5b4](https://github.com/googleapis/google-cloud-go/commit/e4eb5b46ee2aec9d2fc18300bfd66015e25a0510))
+
## [0.2.3](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.2.2...compute/metadata/v0.2.3) (2022-12-15)
diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go
index c17faa14..f67e3c7e 100644
--- a/vendor/cloud.google.com/go/compute/metadata/metadata.go
+++ b/vendor/cloud.google.com/go/compute/metadata/metadata.go
@@ -23,7 +23,7 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net"
"net/http"
"net/url"
@@ -95,9 +95,9 @@ func (c *cachedValue) get(cl *Client) (v string, err error) {
return c.v, nil
}
if c.trim {
- v, err = cl.getTrimmed(c.k)
+ v, err = cl.getTrimmed(context.Background(), c.k)
} else {
- v, err = cl.Get(c.k)
+ v, err = cl.GetWithContext(context.Background(), c.k)
}
if err == nil {
c.v = v
@@ -197,18 +197,32 @@ func systemInfoSuggestsGCE() bool {
// We don't have any non-Linux clues available, at least yet.
return false
}
- slurp, _ := ioutil.ReadFile("/sys/class/dmi/id/product_name")
+ slurp, _ := os.ReadFile("/sys/class/dmi/id/product_name")
name := strings.TrimSpace(string(slurp))
return name == "Google" || name == "Google Compute Engine"
}
-// Subscribe calls Client.Subscribe on the default client.
+// Subscribe calls Client.SubscribeWithContext on the default client.
func Subscribe(suffix string, fn func(v string, ok bool) error) error {
- return defaultClient.Subscribe(suffix, fn)
+ return defaultClient.SubscribeWithContext(context.Background(), suffix, func(ctx context.Context, v string, ok bool) error { return fn(v, ok) })
}
-// Get calls Client.Get on the default client.
-func Get(suffix string) (string, error) { return defaultClient.Get(suffix) }
+// SubscribeWithContext calls Client.SubscribeWithContext on the default client.
+func SubscribeWithContext(ctx context.Context, suffix string, fn func(ctx context.Context, v string, ok bool) error) error {
+ return defaultClient.SubscribeWithContext(ctx, suffix, fn)
+}
+
+// Get calls Client.GetWithContext on the default client.
+//
+// Deprecated: Please use the context aware variant [GetWithContext].
+func Get(suffix string) (string, error) {
+ return defaultClient.GetWithContext(context.Background(), suffix)
+}
+
+// GetWithContext calls Client.GetWithContext on the default client.
+func GetWithContext(ctx context.Context, suffix string) (string, error) {
+ return defaultClient.GetWithContext(ctx, suffix)
+}
// ProjectID returns the current instance's project ID string.
func ProjectID() (string, error) { return defaultClient.ProjectID() }
@@ -288,8 +302,7 @@ func NewClient(c *http.Client) *Client {
// getETag returns a value from the metadata service as well as the associated ETag.
// This func is otherwise equivalent to Get.
-func (c *Client) getETag(suffix string) (value, etag string, err error) {
- ctx := context.TODO()
+func (c *Client) getETag(ctx context.Context, suffix string) (value, etag string, err error) {
// Using a fixed IP makes it very difficult to spoof the metadata service in
// a container, which is an important use-case for local testing of cloud
// deployments. To enable spoofing of the metadata service, the environment
@@ -306,7 +319,7 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) {
}
suffix = strings.TrimLeft(suffix, "/")
u := "http://" + host + "/computeMetadata/v1/" + suffix
- req, err := http.NewRequest("GET", u, nil)
+ req, err := http.NewRequestWithContext(ctx, "GET", u, nil)
if err != nil {
return "", "", err
}
@@ -336,7 +349,7 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) {
if res.StatusCode == http.StatusNotFound {
return "", "", NotDefinedError(suffix)
}
- all, err := ioutil.ReadAll(res.Body)
+ all, err := io.ReadAll(res.Body)
if err != nil {
return "", "", err
}
@@ -354,19 +367,33 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) {
//
// If the requested metadata is not defined, the returned error will
// be of type NotDefinedError.
+//
+// Deprecated: Please use the context aware variant [Client.GetWithContext].
func (c *Client) Get(suffix string) (string, error) {
- val, _, err := c.getETag(suffix)
+ return c.GetWithContext(context.Background(), suffix)
+}
+
+// GetWithContext returns a value from the metadata service.
+// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/".
+//
+// If the GCE_METADATA_HOST environment variable is not defined, a default of
+// 169.254.169.254 will be used instead.
+//
+// If the requested metadata is not defined, the returned error will
+// be of type NotDefinedError.
+func (c *Client) GetWithContext(ctx context.Context, suffix string) (string, error) {
+ val, _, err := c.getETag(ctx, suffix)
return val, err
}
-func (c *Client) getTrimmed(suffix string) (s string, err error) {
- s, err = c.Get(suffix)
+func (c *Client) getTrimmed(ctx context.Context, suffix string) (s string, err error) {
+ s, err = c.GetWithContext(ctx, suffix)
s = strings.TrimSpace(s)
return
}
func (c *Client) lines(suffix string) ([]string, error) {
- j, err := c.Get(suffix)
+ j, err := c.GetWithContext(context.Background(), suffix)
if err != nil {
return nil, err
}
@@ -388,7 +415,7 @@ func (c *Client) InstanceID() (string, error) { return instID.get(c) }
// InternalIP returns the instance's primary internal IP address.
func (c *Client) InternalIP() (string, error) {
- return c.getTrimmed("instance/network-interfaces/0/ip")
+ return c.getTrimmed(context.Background(), "instance/network-interfaces/0/ip")
}
// Email returns the email address associated with the service account.
@@ -398,25 +425,25 @@ func (c *Client) Email(serviceAccount string) (string, error) {
if serviceAccount == "" {
serviceAccount = "default"
}
- return c.getTrimmed("instance/service-accounts/" + serviceAccount + "/email")
+ return c.getTrimmed(context.Background(), "instance/service-accounts/"+serviceAccount+"/email")
}
// ExternalIP returns the instance's primary external (public) IP address.
func (c *Client) ExternalIP() (string, error) {
- return c.getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip")
+ return c.getTrimmed(context.Background(), "instance/network-interfaces/0/access-configs/0/external-ip")
}
// Hostname returns the instance's hostname. This will be of the form
// ".c..internal".
func (c *Client) Hostname() (string, error) {
- return c.getTrimmed("instance/hostname")
+ return c.getTrimmed(context.Background(), "instance/hostname")
}
// InstanceTags returns the list of user-defined instance tags,
// assigned when initially creating a GCE instance.
func (c *Client) InstanceTags() ([]string, error) {
var s []string
- j, err := c.Get("instance/tags")
+ j, err := c.GetWithContext(context.Background(), "instance/tags")
if err != nil {
return nil, err
}
@@ -428,12 +455,12 @@ func (c *Client) InstanceTags() ([]string, error) {
// InstanceName returns the current VM's instance ID string.
func (c *Client) InstanceName() (string, error) {
- return c.getTrimmed("instance/name")
+ return c.getTrimmed(context.Background(), "instance/name")
}
// Zone returns the current VM's zone, such as "us-central1-b".
func (c *Client) Zone() (string, error) {
- zone, err := c.getTrimmed("instance/zone")
+ zone, err := c.getTrimmed(context.Background(), "instance/zone")
// zone is of the form "projects//zones/".
if err != nil {
return "", err
@@ -460,7 +487,7 @@ func (c *Client) ProjectAttributes() ([]string, error) { return c.lines("project
// InstanceAttributeValue may return ("", nil) if the attribute was
// defined to be the empty string.
func (c *Client) InstanceAttributeValue(attr string) (string, error) {
- return c.Get("instance/attributes/" + attr)
+ return c.GetWithContext(context.Background(), "instance/attributes/"+attr)
}
// ProjectAttributeValue returns the value of the provided
@@ -472,7 +499,7 @@ func (c *Client) InstanceAttributeValue(attr string) (string, error) {
// ProjectAttributeValue may return ("", nil) if the attribute was
// defined to be the empty string.
func (c *Client) ProjectAttributeValue(attr string) (string, error) {
- return c.Get("project/attributes/" + attr)
+ return c.GetWithContext(context.Background(), "project/attributes/"+attr)
}
// Scopes returns the service account scopes for the given account.
@@ -489,21 +516,30 @@ func (c *Client) Scopes(serviceAccount string) ([]string, error) {
// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/".
// The suffix may contain query parameters.
//
-// Subscribe calls fn with the latest metadata value indicated by the provided
-// suffix. If the metadata value is deleted, fn is called with the empty string
-// and ok false. Subscribe blocks until fn returns a non-nil error or the value
-// is deleted. Subscribe returns the error value returned from the last call to
-// fn, which may be nil when ok == false.
+// Deprecated: Please use the context aware variant [Client.SubscribeWithContext].
func (c *Client) Subscribe(suffix string, fn func(v string, ok bool) error) error {
+ return c.SubscribeWithContext(context.Background(), suffix, func(ctx context.Context, v string, ok bool) error { return fn(v, ok) })
+}
+
+// SubscribeWithContext subscribes to a value from the metadata service.
+// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/".
+// The suffix may contain query parameters.
+//
+// SubscribeWithContext calls fn with the latest metadata value indicated by the
+// provided suffix. If the metadata value is deleted, fn is called with the
+// empty string and ok false. Subscribe blocks until fn returns a non-nil error
+// or the value is deleted. Subscribe returns the error value returned from the
+// last call to fn, which may be nil when ok == false.
+func (c *Client) SubscribeWithContext(ctx context.Context, suffix string, fn func(ctx context.Context, v string, ok bool) error) error {
const failedSubscribeSleep = time.Second * 5
// First check to see if the metadata value exists at all.
- val, lastETag, err := c.getETag(suffix)
+ val, lastETag, err := c.getETag(ctx, suffix)
if err != nil {
return err
}
- if err := fn(val, true); err != nil {
+ if err := fn(ctx, val, true); err != nil {
return err
}
@@ -514,7 +550,7 @@ func (c *Client) Subscribe(suffix string, fn func(v string, ok bool) error) erro
suffix += "?wait_for_change=true&last_etag="
}
for {
- val, etag, err := c.getETag(suffix + url.QueryEscape(lastETag))
+ val, etag, err := c.getETag(ctx, suffix+url.QueryEscape(lastETag))
if err != nil {
if _, deleted := err.(NotDefinedError); !deleted {
time.Sleep(failedSubscribeSleep)
@@ -524,7 +560,7 @@ func (c *Client) Subscribe(suffix string, fn func(v string, ok bool) error) erro
}
lastETag = etag
- if err := fn(val, ok); err != nil || !ok {
+ if err := fn(ctx, val, ok); err != nil || !ok {
return err
}
}
diff --git a/vendor/cloud.google.com/go/compute/metadata/retry.go b/vendor/cloud.google.com/go/compute/metadata/retry.go
index 0f18f3cd..3d4bc75d 100644
--- a/vendor/cloud.google.com/go/compute/metadata/retry.go
+++ b/vendor/cloud.google.com/go/compute/metadata/retry.go
@@ -27,7 +27,7 @@ const (
)
var (
- syscallRetryable = func(err error) bool { return false }
+ syscallRetryable = func(error) bool { return false }
)
// defaultBackoff is basically equivalent to gax.Backoff without the need for
diff --git a/vendor/cloud.google.com/go/compute/metadata/tidyfix.go b/vendor/cloud.google.com/go/compute/metadata/tidyfix.go
deleted file mode 100644
index 4cef4850..00000000
--- a/vendor/cloud.google.com/go/compute/metadata/tidyfix.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2022 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// This file, and the {{.RootMod}} import, won't actually become part of
-// the resultant binary.
-//go:build modhack
-// +build modhack
-
-package metadata
-
-// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
-import _ "cloud.google.com/go/compute/internal"
diff --git a/vendor/github.com/go-resty/resty/v2/.gitignore b/vendor/github.com/go-resty/resty/v2/.gitignore
new file mode 100644
index 00000000..9e856bd4
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/.gitignore
@@ -0,0 +1,30 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
+
+coverage.out
+coverage.txt
+
+# Exclude intellij IDE folders
+.idea/*
diff --git a/vendor/github.com/go-resty/resty/v2/BUILD.bazel b/vendor/github.com/go-resty/resty/v2/BUILD.bazel
new file mode 100644
index 00000000..f461c29d
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/BUILD.bazel
@@ -0,0 +1,51 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@bazel_gazelle//:def.bzl", "gazelle")
+
+# gazelle:prefix github.com/go-resty/resty/v2
+# gazelle:go_naming_convention import_alias
+gazelle(name = "gazelle")
+
+go_library(
+ name = "resty",
+ srcs = [
+ "client.go",
+ "digest.go",
+ "middleware.go",
+ "redirect.go",
+ "request.go",
+ "response.go",
+ "resty.go",
+ "retry.go",
+ "trace.go",
+ "transport_js.go",
+ "transport_other.go",
+ "transport.go",
+ "transport112.go",
+ "util.go",
+ ],
+ importpath = "github.com/go-resty/resty/v2",
+ visibility = ["//visibility:public"],
+ deps = ["@org_golang_x_net//publicsuffix:go_default_library"],
+)
+
+go_test(
+ name = "resty_test",
+ srcs = [
+ "client_test.go",
+ "context_test.go",
+ "example_test.go",
+ "request_test.go",
+ "resty_test.go",
+ "retry_test.go",
+ "util_test.go",
+ ],
+ data = glob([".testdata/*"]),
+ embed = [":resty"],
+ deps = ["@org_golang_x_net//proxy:go_default_library"],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":resty",
+ visibility = ["//visibility:public"],
+)
diff --git a/vendor/github.com/go-resty/resty/v2/LICENSE b/vendor/github.com/go-resty/resty/v2/LICENSE
new file mode 100644
index 00000000..0c2d38a3
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-2023 Jeevanandam M., https://myjeeva.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/go-resty/resty/v2/README.md b/vendor/github.com/go-resty/resty/v2/README.md
new file mode 100644
index 00000000..eccca8bc
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/README.md
@@ -0,0 +1,925 @@
+
+
Resty
+Simple HTTP and REST client library for Go (inspired by Ruby rest-client)
+Features section describes in detail about Resty capabilities
+
+
+
+
+
+
Resty Communication Channels
+
+
+
+## News
+
+ * v2.13.1 [released](https://github.com/go-resty/resty/releases/tag/v2.13.1) and tagged on May 10, 2024.
+ * v2.0.0 [released](https://github.com/go-resty/resty/releases/tag/v2.0.0) and tagged on Jul 16, 2019.
+ * v1.12.0 [released](https://github.com/go-resty/resty/releases/tag/v1.12.0) and tagged on Feb 27, 2019.
+ * v1.0 released and tagged on Sep 25, 2017. - Resty's first version was released on Sep 15, 2015 then it grew gradually as a very handy and helpful library. Its been a two years since first release. I'm very thankful to Resty users and its [contributors](https://github.com/go-resty/resty/graphs/contributors).
+
+## Features
+
+ * GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS, etc.
+ * Simple and chainable methods for settings and request
+ * [Request](https://pkg.go.dev/github.com/go-resty/resty/v2#Request) Body can be `string`, `[]byte`, `struct`, `map`, `slice` and `io.Reader` too
+ * Auto detects `Content-Type`
+ * Buffer less processing for `io.Reader`
+ * Native `*http.Request` instance may be accessed during middleware and request execution via `Request.RawRequest`
+ * Request Body can be read multiple times via `Request.RawRequest.GetBody()`
+ * [Response](https://pkg.go.dev/github.com/go-resty/resty/v2#Response) object gives you more possibility
+ * Access as `[]byte` array - `response.Body()` OR Access as `string` - `response.String()`
+ * Know your `response.Time()` and when we `response.ReceivedAt()`
+ * Automatic marshal and unmarshal for `JSON` and `XML` content type
+ * Default is `JSON`, if you supply `struct/map` without header `Content-Type`
+ * For auto-unmarshal, refer to -
+ - Success scenario [Request.SetResult()](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.SetResult) and [Response.Result()](https://pkg.go.dev/github.com/go-resty/resty/v2#Response.Result).
+ - Error scenario [Request.SetError()](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.SetError) and [Response.Error()](https://pkg.go.dev/github.com/go-resty/resty/v2#Response.Error).
+ - Supports [RFC7807](https://tools.ietf.org/html/rfc7807) - `application/problem+json` & `application/problem+xml`
+ * Resty provides an option to override [JSON Marshal/Unmarshal and XML Marshal/Unmarshal](#override-json--xml-marshalunmarshal)
+ * Easy to upload one or more file(s) via `multipart/form-data`
+ * Auto detects file content type
+ * Request URL [Path Params (aka URI Params)](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.SetPathParams)
+ * Backoff Retry Mechanism with retry condition function [reference](retry_test.go)
+ * Resty client HTTP & REST [Request](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.OnBeforeRequest) and [Response](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.OnAfterResponse) middlewares
+ * `Request.SetContext` supported
+ * Authorization option of `BasicAuth` and `Bearer` token
+ * Set request `ContentLength` value for all request or particular request
+ * Custom [Root Certificates](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetRootCertificate) and Client [Certificates](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetCertificates)
+ * Download/Save HTTP response directly into File, like `curl -o` flag. See [SetOutputDirectory](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetOutputDirectory) & [SetOutput](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.SetOutput).
+ * Cookies for your request and CookieJar support
+ * SRV Record based request instead of Host URL
+ * Client settings like `Timeout`, `RedirectPolicy`, `Proxy`, `TLSClientConfig`, `Transport`, etc.
+ * Optionally allows GET request with payload, see [SetAllowGetMethodPayload](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetAllowGetMethodPayload)
+ * Supports registering external JSON library into resty, see [how to use](https://github.com/go-resty/resty/issues/76#issuecomment-314015250)
+ * Exposes Response reader without reading response (no auto-unmarshaling) if need be, see [how to use](https://github.com/go-resty/resty/issues/87#issuecomment-322100604)
+ * Option to specify expected `Content-Type` when response `Content-Type` header missing. Refer to [#92](https://github.com/go-resty/resty/issues/92)
+ * Resty design
+ * Have client level settings & options and also override at Request level if you want to
+ * Request and Response middleware
+ * Create Multiple clients if you want to `resty.New()`
+ * Supports `http.RoundTripper` implementation, see [SetTransport](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetTransport)
+ * goroutine concurrent safe
+ * Resty Client trace, see [Client.EnableTrace](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.EnableTrace) and [Request.EnableTrace](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.EnableTrace)
+ * Since v2.4.0, trace info contains a `RequestAttempt` value, and the `Request` object contains an `Attempt` attribute
+ * Debug mode - clean and informative logging presentation
+ * Gzip - Go does it automatically also resty has fallback handling too
+ * Works fine with `HTTP/2` and `HTTP/1.1`
+ * [Bazel support](#bazel-support)
+ * Easily mock Resty for testing, [for e.g.](#mocking-http-requests-using-httpmock-library)
+ * Well tested client library
+
+### Included Batteries
+
+ * Redirect Policies - see [how to use](#redirect-policy)
+ * NoRedirectPolicy
+ * FlexibleRedirectPolicy
+ * DomainCheckRedirectPolicy
+ * etc. [more info](redirect.go)
+ * Retry Mechanism [how to use](#retries)
+ * Backoff Retry
+ * Conditional Retry
+ * Since v2.6.0, Retry Hooks - [Client](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.AddRetryHook), [Request](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.AddRetryHook)
+ * SRV Record based request instead of Host URL [how to use](resty_test.go#L1412)
+ * etc (upcoming - throw your idea's [here](https://github.com/go-resty/resty/issues)).
+
+
+#### Supported Go Versions
+
+Recommended to use `go1.16` and above.
+
+Initially Resty started supporting `go modules` since `v1.10.0` release.
+
+Starting Resty v2 and higher versions, it fully embraces [go modules](https://github.com/golang/go/wiki/Modules) package release. It requires a Go version capable of understanding `/vN` suffixed imports:
+
+- 1.9.7+
+- 1.10.3+
+- 1.11+
+
+
+## It might be beneficial for your project :smile:
+
+Resty author also published following projects for Go Community.
+
+ * [aah framework](https://aahframework.org) - A secure, flexible, rapid Go web framework.
+ * [THUMBAI](https://thumbai.app) - Go Mod Repository, Go Vanity Service and Simple Proxy Server.
+ * [go-model](https://github.com/jeevatkm/go-model) - Robust & Easy to use model mapper and utility methods for Go `struct`.
+
+
+## Installation
+
+```bash
+# Go Modules
+require github.com/go-resty/resty/v2 v2.11.0
+```
+
+## Usage
+
+The following samples will assist you to become as comfortable as possible with resty library.
+
+```go
+// Import resty into your code and refer it as `resty`.
+import "github.com/go-resty/resty/v2"
+```
+
+#### Simple GET
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+resp, err := client.R().
+ EnableTrace().
+ Get("https://httpbin.org/get")
+
+// Explore response object
+fmt.Println("Response Info:")
+fmt.Println(" Error :", err)
+fmt.Println(" Status Code:", resp.StatusCode())
+fmt.Println(" Status :", resp.Status())
+fmt.Println(" Proto :", resp.Proto())
+fmt.Println(" Time :", resp.Time())
+fmt.Println(" Received At:", resp.ReceivedAt())
+fmt.Println(" Body :\n", resp)
+fmt.Println()
+
+// Explore trace info
+fmt.Println("Request Trace Info:")
+ti := resp.Request.TraceInfo()
+fmt.Println(" DNSLookup :", ti.DNSLookup)
+fmt.Println(" ConnTime :", ti.ConnTime)
+fmt.Println(" TCPConnTime :", ti.TCPConnTime)
+fmt.Println(" TLSHandshake :", ti.TLSHandshake)
+fmt.Println(" ServerTime :", ti.ServerTime)
+fmt.Println(" ResponseTime :", ti.ResponseTime)
+fmt.Println(" TotalTime :", ti.TotalTime)
+fmt.Println(" IsConnReused :", ti.IsConnReused)
+fmt.Println(" IsConnWasIdle :", ti.IsConnWasIdle)
+fmt.Println(" ConnIdleTime :", ti.ConnIdleTime)
+fmt.Println(" RequestAttempt:", ti.RequestAttempt)
+fmt.Println(" RemoteAddr :", ti.RemoteAddr.String())
+
+/* Output
+Response Info:
+ Error :
+ Status Code: 200
+ Status : 200 OK
+ Proto : HTTP/2.0
+ Time : 457.034718ms
+ Received At: 2020-09-14 15:35:29.784681 -0700 PDT m=+0.458137045
+ Body :
+ {
+ "args": {},
+ "headers": {
+ "Accept-Encoding": "gzip",
+ "Host": "httpbin.org",
+ "User-Agent": "go-resty/2.4.0 (https://github.com/go-resty/resty)",
+ "X-Amzn-Trace-Id": "Root=1-5f5ff031-000ff6292204aa6898e4de49"
+ },
+ "origin": "0.0.0.0",
+ "url": "https://httpbin.org/get"
+ }
+
+Request Trace Info:
+ DNSLookup : 4.074657ms
+ ConnTime : 381.709936ms
+ TCPConnTime : 77.428048ms
+ TLSHandshake : 299.623597ms
+ ServerTime : 75.414703ms
+ ResponseTime : 79.337Β΅s
+ TotalTime : 457.034718ms
+ IsConnReused : false
+ IsConnWasIdle : false
+ ConnIdleTime : 0s
+ RequestAttempt: 1
+ RemoteAddr : 3.221.81.55:443
+*/
+```
+
+#### Enhanced GET
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+resp, err := client.R().
+ SetQueryParams(map[string]string{
+ "page_no": "1",
+ "limit": "20",
+ "sort":"name",
+ "order": "asc",
+ "random":strconv.FormatInt(time.Now().Unix(), 10),
+ }).
+ SetHeader("Accept", "application/json").
+ SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F").
+ Get("/search_result")
+
+
+// Sample of using Request.SetQueryString method
+resp, err := client.R().
+ SetQueryString("productId=232&template=fresh-sample&cat=resty&source=google&kw=buy a lot more").
+ SetHeader("Accept", "application/json").
+ SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F").
+ Get("/show_product")
+
+
+// If necessary, you can force response content type to tell Resty to parse a JSON response into your struct
+resp, err := client.R().
+ SetResult(result).
+ ForceContentType("application/json").
+ Get("v2/alpine/manifests/latest")
+```
+
+#### Various POST method combinations
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// POST JSON string
+// No need to set content type, if you have client level setting
+resp, err := client.R().
+ SetHeader("Content-Type", "application/json").
+ SetBody(`{"username":"testuser", "password":"testpass"}`).
+ SetResult(&AuthSuccess{}). // or SetResult(AuthSuccess{}).
+ Post("https://myapp.com/login")
+
+// POST []byte array
+// No need to set content type, if you have client level setting
+resp, err := client.R().
+ SetHeader("Content-Type", "application/json").
+ SetBody([]byte(`{"username":"testuser", "password":"testpass"}`)).
+ SetResult(&AuthSuccess{}). // or SetResult(AuthSuccess{}).
+ Post("https://myapp.com/login")
+
+// POST Struct, default is JSON content type. No need to set one
+resp, err := client.R().
+ SetBody(User{Username: "testuser", Password: "testpass"}).
+ SetResult(&AuthSuccess{}). // or SetResult(AuthSuccess{}).
+ SetError(&AuthError{}). // or SetError(AuthError{}).
+ Post("https://myapp.com/login")
+
+// POST Map, default is JSON content type. No need to set one
+resp, err := client.R().
+ SetBody(map[string]interface{}{"username": "testuser", "password": "testpass"}).
+ SetResult(&AuthSuccess{}). // or SetResult(AuthSuccess{}).
+ SetError(&AuthError{}). // or SetError(AuthError{}).
+ Post("https://myapp.com/login")
+
+// POST of raw bytes for file upload. For example: upload file to Dropbox
+fileBytes, _ := os.ReadFile("/Users/jeeva/mydocument.pdf")
+
+// See we are not setting content-type header, since go-resty automatically detects Content-Type for you
+resp, err := client.R().
+ SetBody(fileBytes).
+ SetContentLength(true). // Dropbox expects this value
+ SetAuthToken("").
+ SetError(&DropboxError{}). // or SetError(DropboxError{}).
+ Post("https://content.dropboxapi.com/1/files_put/auto/resty/mydocument.pdf") // for upload Dropbox supports PUT too
+
+// Note: resty detects Content-Type for request body/payload if content type header is not set.
+// * For struct and map data type defaults to 'application/json'
+// * Fallback is plain text content type
+```
+
+#### Sample PUT
+
+You can use various combinations of `PUT` method call like demonstrated for `POST`.
+
+```go
+// Note: This is one sample of PUT method usage, refer POST for more combination
+
+// Create a Resty Client
+client := resty.New()
+
+// Request goes as JSON content type
+// No need to set auth token, error, if you have client level settings
+resp, err := client.R().
+ SetBody(Article{
+ Title: "go-resty",
+ Content: "This is my article content, oh ya!",
+ Author: "Jeevanandam M",
+ Tags: []string{"article", "sample", "resty"},
+ }).
+ SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD").
+ SetError(&Error{}). // or SetError(Error{}).
+ Put("https://myapp.com/article/1234")
+```
+
+#### Sample PATCH
+
+You can use various combinations of `PATCH` method call like demonstrated for `POST`.
+
+```go
+// Note: This is one sample of PUT method usage, refer POST for more combination
+
+// Create a Resty Client
+client := resty.New()
+
+// Request goes as JSON content type
+// No need to set auth token, error, if you have client level settings
+resp, err := client.R().
+ SetBody(Article{
+ Tags: []string{"new tag1", "new tag2"},
+ }).
+ SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD").
+ SetError(&Error{}). // or SetError(Error{}).
+ Patch("https://myapp.com/articles/1234")
+```
+
+#### Sample DELETE, HEAD, OPTIONS
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// DELETE a article
+// No need to set auth token, error, if you have client level settings
+resp, err := client.R().
+ SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD").
+ SetError(&Error{}). // or SetError(Error{}).
+ Delete("https://myapp.com/articles/1234")
+
+// DELETE a articles with payload/body as a JSON string
+// No need to set auth token, error, if you have client level settings
+resp, err := client.R().
+ SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD").
+ SetError(&Error{}). // or SetError(Error{}).
+ SetHeader("Content-Type", "application/json").
+ SetBody(`{article_ids: [1002, 1006, 1007, 87683, 45432] }`).
+ Delete("https://myapp.com/articles")
+
+// HEAD of resource
+// No need to set auth token, if you have client level settings
+resp, err := client.R().
+ SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD").
+ Head("https://myapp.com/videos/hi-res-video")
+
+// OPTIONS of resource
+// No need to set auth token, if you have client level settings
+resp, err := client.R().
+ SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD").
+ Options("https://myapp.com/servers/nyc-dc-01")
+```
+
+#### Override JSON & XML Marshal/Unmarshal
+
+User could register choice of JSON/XML library into resty or write your own. By default resty registers standard `encoding/json` and `encoding/xml` respectively.
+```go
+// Example of registering json-iterator
+import jsoniter "github.com/json-iterator/go"
+
+json := jsoniter.ConfigCompatibleWithStandardLibrary
+
+client := resty.New().
+ SetJSONMarshaler(json.Marshal).
+ SetJSONUnmarshaler(json.Unmarshal)
+
+// similarly user could do for XML too with -
+client.SetXMLMarshaler(xml.Marshal).
+ SetXMLUnmarshaler(xml.Unmarshal)
+```
+
+### Multipart File(s) upload
+
+#### Using io.Reader
+
+```go
+profileImgBytes, _ := os.ReadFile("/Users/jeeva/test-img.png")
+notesBytes, _ := os.ReadFile("/Users/jeeva/text-file.txt")
+
+// Create a Resty Client
+client := resty.New()
+
+resp, err := client.R().
+ SetFileReader("profile_img", "test-img.png", bytes.NewReader(profileImgBytes)).
+ SetFileReader("notes", "text-file.txt", bytes.NewReader(notesBytes)).
+ SetFormData(map[string]string{
+ "first_name": "Jeevanandam",
+ "last_name": "M",
+ }).
+ Post("http://myapp.com/upload")
+```
+
+#### Using File directly from Path
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Single file scenario
+resp, err := client.R().
+ SetFile("profile_img", "/Users/jeeva/test-img.png").
+ Post("http://myapp.com/upload")
+
+// Multiple files scenario
+resp, err := client.R().
+ SetFiles(map[string]string{
+ "profile_img": "/Users/jeeva/test-img.png",
+ "notes": "/Users/jeeva/text-file.txt",
+ }).
+ Post("http://myapp.com/upload")
+
+// Multipart of form fields and files
+resp, err := client.R().
+ SetFiles(map[string]string{
+ "profile_img": "/Users/jeeva/test-img.png",
+ "notes": "/Users/jeeva/text-file.txt",
+ }).
+ SetFormData(map[string]string{
+ "first_name": "Jeevanandam",
+ "last_name": "M",
+ "zip_code": "00001",
+ "city": "my city",
+ "access_token": "C6A79608-782F-4ED0-A11D-BD82FAD829CD",
+ }).
+ Post("http://myapp.com/profile")
+```
+
+#### Sample Form submission
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// just mentioning about POST as an example with simple flow
+// User Login
+resp, err := client.R().
+ SetFormData(map[string]string{
+ "username": "jeeva",
+ "password": "mypass",
+ }).
+ Post("http://myapp.com/login")
+
+// Followed by profile update
+resp, err := client.R().
+ SetFormData(map[string]string{
+ "first_name": "Jeevanandam",
+ "last_name": "M",
+ "zip_code": "00001",
+ "city": "new city update",
+ }).
+ Post("http://myapp.com/profile")
+
+// Multi value form data
+criteria := url.Values{
+ "search_criteria": []string{"book", "glass", "pencil"},
+}
+resp, err := client.R().
+ SetFormDataFromValues(criteria).
+ Post("http://myapp.com/search")
+```
+
+#### Save HTTP Response into File
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Setting output directory path, If directory not exists then resty creates one!
+// This is optional one, if you're planning using absolute path in
+// `Request.SetOutput` and can used together.
+client.SetOutputDirectory("/Users/jeeva/Downloads")
+
+// HTTP response gets saved into file, similar to curl -o flag
+_, err := client.R().
+ SetOutput("plugin/ReplyWithHeader-v5.1-beta.zip").
+ Get("http://bit.ly/1LouEKr")
+
+// OR using absolute path
+// Note: output directory path is not used for absolute path
+_, err := client.R().
+ SetOutput("/MyDownloads/plugin/ReplyWithHeader-v5.1-beta.zip").
+ Get("http://bit.ly/1LouEKr")
+```
+
+#### Request URL Path Params
+
+Resty provides easy to use dynamic request URL path params. Params can be set at client and request level. Client level params value can be overridden at request level.
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+client.R().SetPathParams(map[string]string{
+ "userId": "sample@sample.com",
+ "subAccountId": "100002",
+}).
+Get("/v1/users/{userId}/{subAccountId}/details")
+
+// Result:
+// Composed URL - /v1/users/sample@sample.com/100002/details
+```
+
+#### Request and Response Middleware
+
+Resty provides middleware ability to manipulate for Request and Response. It is more flexible than callback approach.
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Registering Request Middleware
+client.OnBeforeRequest(func(c *resty.Client, req *resty.Request) error {
+ // Now you have access to Client and current Request object
+ // manipulate it as per your need
+
+ return nil // if its success otherwise return error
+ })
+
+// Registering Response Middleware
+client.OnAfterResponse(func(c *resty.Client, resp *resty.Response) error {
+ // Now you have access to Client and current Response object
+ // manipulate it as per your need
+
+ return nil // if its success otherwise return error
+ })
+```
+
+#### OnError Hooks
+
+Resty provides OnError hooks that may be called because:
+
+- The client failed to send the request due to connection timeout, TLS handshake failure, etc...
+- The request was retried the maximum amount of times, and still failed.
+
+If there was a response from the server, the original error will be wrapped in `*resty.ResponseError` which contains the last response received.
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+client.OnError(func(req *resty.Request, err error) {
+ if v, ok := err.(*resty.ResponseError); ok {
+ // v.Response contains the last response from the server
+ // v.Err contains the original error
+ }
+ // Log the error, increment a metric, etc...
+})
+```
+
+#### Redirect Policy
+
+Resty provides few ready to use redirect policy(s) also it supports multiple policies together.
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Assign Client Redirect Policy. Create one as per you need
+client.SetRedirectPolicy(resty.FlexibleRedirectPolicy(15))
+
+// Wanna multiple policies such as redirect count, domain name check, etc
+client.SetRedirectPolicy(resty.FlexibleRedirectPolicy(20),
+ resty.DomainCheckRedirectPolicy("host1.com", "host2.org", "host3.net"))
+```
+
+##### Custom Redirect Policy
+
+Implement [RedirectPolicy](redirect.go#L20) interface and register it with resty client. Have a look [redirect.go](redirect.go) for more information.
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Using raw func into resty.SetRedirectPolicy
+client.SetRedirectPolicy(resty.RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error {
+ // Implement your logic here
+
+ // return nil for continue redirect otherwise return error to stop/prevent redirect
+ return nil
+}))
+
+//---------------------------------------------------
+
+// Using struct create more flexible redirect policy
+type CustomRedirectPolicy struct {
+ // variables goes here
+}
+
+func (c *CustomRedirectPolicy) Apply(req *http.Request, via []*http.Request) error {
+ // Implement your logic here
+
+ // return nil for continue redirect otherwise return error to stop/prevent redirect
+ return nil
+}
+
+// Registering in resty
+client.SetRedirectPolicy(CustomRedirectPolicy{/* initialize variables */})
+```
+
+#### Custom Root Certificates and Client Certificates
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Custom Root certificates, just supply .pem file.
+// you can add one or more root certificates, its get appended
+client.SetRootCertificate("/path/to/root/pemFile1.pem")
+client.SetRootCertificate("/path/to/root/pemFile2.pem")
+// ... and so on!
+
+// Adding Client Certificates, you add one or more certificates
+// Sample for creating certificate object
+// Parsing public/private key pair from a pair of files. The files must contain PEM encoded data.
+cert1, err := tls.LoadX509KeyPair("certs/client.pem", "certs/client.key")
+if err != nil {
+ log.Fatalf("ERROR client certificate: %s", err)
+}
+// ...
+
+// You add one or more certificates
+client.SetCertificates(cert1, cert2, cert3)
+```
+
+#### Custom Root Certificates and Client Certificates from string
+
+```go
+// Custom Root certificates from string
+// You can pass you certificates through env variables as strings
+// you can add one or more root certificates, its get appended
+client.SetRootCertificateFromString("-----BEGIN CERTIFICATE-----content-----END CERTIFICATE-----")
+client.SetRootCertificateFromString("-----BEGIN CERTIFICATE-----content-----END CERTIFICATE-----")
+// ... and so on!
+
+// Adding Client Certificates, you add one or more certificates
+// Sample for creating certificate object
+// Parsing public/private key pair from a pair of files. The files must contain PEM encoded data.
+cert1, err := tls.X509KeyPair([]byte("-----BEGIN CERTIFICATE-----content-----END CERTIFICATE-----"), []byte("-----BEGIN CERTIFICATE-----content-----END CERTIFICATE-----"))
+if err != nil {
+ log.Fatalf("ERROR client certificate: %s", err)
+}
+// ...
+
+// You add one or more certificates
+client.SetCertificates(cert1, cert2, cert3)
+```
+
+#### Proxy Settings
+
+Default `Go` supports Proxy via environment variable `HTTP_PROXY`. Resty provides support via `SetProxy` & `RemoveProxy`.
+Choose as per your need.
+
+**Client Level Proxy** settings applied to all the request
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Setting a Proxy URL and Port
+client.SetProxy("http://proxyserver:8888")
+
+// Want to remove proxy setting
+client.RemoveProxy()
+```
+
+#### Retries
+
+Resty uses [backoff](http://www.awsarchitectureblog.com/2015/03/backoff.html)
+to increase retry intervals after each attempt.
+
+Usage example:
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Retries are configured per client
+client.
+ // Set retry count to non zero to enable retries
+ SetRetryCount(3).
+ // You can override initial retry wait time.
+ // Default is 100 milliseconds.
+ SetRetryWaitTime(5 * time.Second).
+ // MaxWaitTime can be overridden as well.
+ // Default is 2 seconds.
+ SetRetryMaxWaitTime(20 * time.Second).
+ // SetRetryAfter sets callback to calculate wait time between retries.
+ // Default (nil) implies exponential backoff with jitter
+ SetRetryAfter(func(client *resty.Client, resp *resty.Response) (time.Duration, error) {
+ return 0, errors.New("quota exceeded")
+ })
+```
+
+By default, resty will retry requests that return a non-nil error during execution.
+Therefore, the above setup will result in resty retrying requests with non-nil errors up to 3 times,
+with the delay increasing after each attempt.
+
+You can optionally provide client with [custom retry conditions](https://pkg.go.dev/github.com/go-resty/resty/v2#RetryConditionFunc):
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+client.AddRetryCondition(
+ // RetryConditionFunc type is for retry condition function
+ // input: non-nil Response OR request execution error
+ func(r *resty.Response, err error) bool {
+ return r.StatusCode() == http.StatusTooManyRequests
+ },
+)
+```
+
+The above example will make resty retry requests that end with a `429 Too Many Requests` status code.
+It's important to note that when you specify conditions using `AddRetryCondition`,
+it will override the default retry behavior, which retries on errors encountered during the request.
+If you want to retry on errors encountered during the request, similar to the default behavior,
+you'll need to configure it as follows:
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+client.AddRetryCondition(
+ func(r *resty.Response, err error) bool {
+ // Including "err != nil" emulates the default retry behavior for errors encountered during the request.
+ return err != nil || r.StatusCode() == http.StatusTooManyRequests
+ },
+)
+```
+
+Multiple retry conditions can be added.
+Note that if multiple conditions are specified, a retry will occur if any of the conditions are met.
+
+It is also possible to use `resty.Backoff(...)` to get arbitrary retry scenarios
+implemented. [Reference](retry_test.go).
+
+#### Allow GET request with Payload
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Allow GET request with Payload. This is disabled by default.
+client.SetAllowGetMethodPayload(true)
+```
+
+#### Wanna Multiple Clients
+
+```go
+// Here you go!
+// Client 1
+client1 := resty.New()
+client1.R().Get("http://httpbin.org")
+// ...
+
+// Client 2
+client2 := resty.New()
+client2.R().Head("http://httpbin.org")
+// ...
+
+// Bend it as per your need!!!
+```
+
+#### Remaining Client Settings & its Options
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Unique settings at Client level
+//--------------------------------
+// Enable debug mode
+client.SetDebug(true)
+
+// Assign Client TLSClientConfig
+// One can set custom root-certificate. Refer: http://golang.org/pkg/crypto/tls/#example_Dial
+client.SetTLSClientConfig(&tls.Config{ RootCAs: roots })
+
+// or One can disable security check (https)
+client.SetTLSClientConfig(&tls.Config{ InsecureSkipVerify: true })
+
+// Set client timeout as per your need
+client.SetTimeout(1 * time.Minute)
+
+
+// You can override all below settings and options at request level if you want to
+//--------------------------------------------------------------------------------
+// Host URL for all request. So you can use relative URL in the request
+client.SetBaseURL("http://httpbin.org")
+
+// Headers for all request
+client.SetHeader("Accept", "application/json")
+client.SetHeaders(map[string]string{
+ "Content-Type": "application/json",
+ "User-Agent": "My custom User Agent String",
+ })
+
+// Cookies for all request
+client.SetCookie(&http.Cookie{
+ Name:"go-resty",
+ Value:"This is cookie value",
+ Path: "/",
+ Domain: "sample.com",
+ MaxAge: 36000,
+ HttpOnly: true,
+ Secure: false,
+ })
+client.SetCookies(cookies)
+
+// URL query parameters for all request
+client.SetQueryParam("user_id", "00001")
+client.SetQueryParams(map[string]string{ // sample of those who use this manner
+ "api_key": "api-key-here",
+ "api_secret": "api-secret",
+ })
+client.R().SetQueryString("productId=232&template=fresh-sample&cat=resty&source=google&kw=buy a lot more")
+
+// Form data for all request. Typically used with POST and PUT
+client.SetFormData(map[string]string{
+ "access_token": "BC594900-518B-4F7E-AC75-BD37F019E08F",
+ })
+
+// Basic Auth for all request
+client.SetBasicAuth("myuser", "mypass")
+
+// Bearer Auth Token for all request
+client.SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F")
+
+// Enabling Content length value for all request
+client.SetContentLength(true)
+
+// Registering global Error object structure for JSON/XML request
+client.SetError(&Error{}) // or resty.SetError(Error{})
+```
+
+#### Unix Socket
+
+```go
+unixSocket := "/var/run/my_socket.sock"
+
+// Create a Go's http.Transport so we can set it in resty.
+transport := http.Transport{
+ Dial: func(_, _ string) (net.Conn, error) {
+ return net.Dial("unix", unixSocket)
+ },
+}
+
+// Create a Resty Client
+client := resty.New()
+
+// Set the previous transport that we created, set the scheme of the communication to the
+// socket and set the unixSocket as the HostURL.
+client.SetTransport(&transport).SetScheme("http").SetBaseURL(unixSocket)
+
+// No need to write the host's URL on the request, just the path.
+client.R().Get("http://localhost/index.html")
+```
+
+#### Bazel Support
+
+Resty can be built, tested and depended upon via [Bazel](https://bazel.build).
+For example, to run all tests:
+
+```shell
+bazel test :resty_test
+```
+
+#### Mocking http requests using [httpmock](https://github.com/jarcoal/httpmock) library
+
+In order to mock the http requests when testing your application you
+could use the `httpmock` library.
+
+When using the default resty client, you should pass the client to the library as follow:
+
+```go
+// Create a Resty Client
+client := resty.New()
+
+// Get the underlying HTTP Client and set it to Mock
+httpmock.ActivateNonDefault(client.GetClient())
+```
+
+More detailed example of mocking resty http requests using ginko could be found [here](https://github.com/jarcoal/httpmock#ginkgo--resty-example).
+
+## Versioning
+
+Resty releases versions according to [Semantic Versioning](http://semver.org)
+
+ * Resty v2 does not use `gopkg.in` service for library versioning.
+ * Resty fully adapted to `go mod` capabilities since `v1.10.0` release.
+ * Resty v1 series was using `gopkg.in` to provide versioning. `gopkg.in/resty.vX` points to appropriate tagged versions; `X` denotes version series number and it's a stable release for production use. For e.g. `gopkg.in/resty.v0`.
+ * Development takes place at the master branch. Although the code in master should always compile and test successfully, it might break API's. I aim to maintain backwards compatibility, but sometimes API's and behavior might be changed to fix a bug.
+
+## Contribution
+
+I would welcome your contribution! If you find any improvement or issue you want to fix, feel free to send a pull request, I like pull requests that include test cases for fix/enhancement. I have done my best to bring pretty good code coverage. Feel free to write tests.
+
+BTW, I'd like to know what you think about `Resty`. Kindly open an issue or send me an email; it'd mean a lot to me.
+
+## Creator
+
+[Jeevanandam M.](https://github.com/jeevatkm) (jeeva@myjeeva.com)
+
+## Core Team
+
+Have a look on [Members](https://github.com/orgs/go-resty/people) page.
+
+## Contributors
+
+Have a look on [Contributors](https://github.com/go-resty/resty/graphs/contributors) page.
+
+## License
+
+Resty released under MIT license, refer [LICENSE](LICENSE) file.
diff --git a/vendor/github.com/go-resty/resty/v2/WORKSPACE b/vendor/github.com/go-resty/resty/v2/WORKSPACE
new file mode 100644
index 00000000..9ef03e95
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/WORKSPACE
@@ -0,0 +1,31 @@
+workspace(name = "resty")
+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+http_archive(
+ name = "io_bazel_rules_go",
+ sha256 = "69de5c704a05ff37862f7e0f5534d4f479418afc21806c887db544a316f3cb6b",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.27.0/rules_go-v0.27.0.tar.gz",
+ "https://github.com/bazelbuild/rules_go/releases/download/v0.27.0/rules_go-v0.27.0.tar.gz",
+ ],
+)
+
+http_archive(
+ name = "bazel_gazelle",
+ sha256 = "62ca106be173579c0a167deb23358fdfe71ffa1e4cfdddf5582af26520f1c66f",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz",
+ "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz",
+ ],
+)
+
+load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
+
+go_rules_dependencies()
+
+go_register_toolchains(version = "1.16")
+
+load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
+
+gazelle_dependencies()
diff --git a/vendor/github.com/go-resty/resty/v2/client.go b/vendor/github.com/go-resty/resty/v2/client.go
new file mode 100644
index 00000000..1bcafba8
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/client.go
@@ -0,0 +1,1412 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "bytes"
+ "compress/gzip"
+ "crypto/tls"
+ "crypto/x509"
+ "encoding/json"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "net/http"
+ "net/url"
+ "os"
+ "reflect"
+ "regexp"
+ "strings"
+ "sync"
+ "time"
+)
+
+const (
+ // MethodGet HTTP method
+ MethodGet = "GET"
+
+ // MethodPost HTTP method
+ MethodPost = "POST"
+
+ // MethodPut HTTP method
+ MethodPut = "PUT"
+
+ // MethodDelete HTTP method
+ MethodDelete = "DELETE"
+
+ // MethodPatch HTTP method
+ MethodPatch = "PATCH"
+
+ // MethodHead HTTP method
+ MethodHead = "HEAD"
+
+ // MethodOptions HTTP method
+ MethodOptions = "OPTIONS"
+)
+
+var (
+ hdrUserAgentKey = http.CanonicalHeaderKey("User-Agent")
+ hdrAcceptKey = http.CanonicalHeaderKey("Accept")
+ hdrContentTypeKey = http.CanonicalHeaderKey("Content-Type")
+ hdrContentLengthKey = http.CanonicalHeaderKey("Content-Length")
+ hdrContentEncodingKey = http.CanonicalHeaderKey("Content-Encoding")
+ hdrLocationKey = http.CanonicalHeaderKey("Location")
+ hdrAuthorizationKey = http.CanonicalHeaderKey("Authorization")
+ hdrWwwAuthenticateKey = http.CanonicalHeaderKey("WWW-Authenticate")
+
+ plainTextType = "text/plain; charset=utf-8"
+ jsonContentType = "application/json"
+ formContentType = "application/x-www-form-urlencoded"
+
+ jsonCheck = regexp.MustCompile(`(?i:(application|text)/(.*json.*)(;|$))`)
+ xmlCheck = regexp.MustCompile(`(?i:(application|text)/(.*xml.*)(;|$))`)
+
+ hdrUserAgentValue = "go-resty/" + Version + " (https://github.com/go-resty/resty)"
+ bufPool = &sync.Pool{New: func() interface{} { return &bytes.Buffer{} }}
+)
+
+type (
+ // RequestMiddleware type is for request middleware, called before a request is sent
+ RequestMiddleware func(*Client, *Request) error
+
+ // ResponseMiddleware type is for response middleware, called after a response has been received
+ ResponseMiddleware func(*Client, *Response) error
+
+ // PreRequestHook type is for the request hook, called right before the request is sent
+ PreRequestHook func(*Client, *http.Request) error
+
+ // RequestLogCallback type is for request logs, called before the request is logged
+ RequestLogCallback func(*RequestLog) error
+
+ // ResponseLogCallback type is for response logs, called before the response is logged
+ ResponseLogCallback func(*ResponseLog) error
+
+ // ErrorHook type is for reacting to request errors, called after all retries were attempted
+ ErrorHook func(*Request, error)
+
+ // SuccessHook type is for reacting to request success
+ SuccessHook func(*Client, *Response)
+)
+
+// Client struct is used to create Resty client with client level settings,
+// these settings are applicable to all the request raised from the client.
+//
+// Resty also provides an options to override most of the client settings
+// at request level.
+type Client struct {
+ BaseURL string
+ HostURL string // Deprecated: use BaseURL instead. To be removed in v3.0.0 release.
+ QueryParam url.Values
+ FormData url.Values
+ PathParams map[string]string
+ RawPathParams map[string]string
+ Header http.Header
+ UserInfo *User
+ Token string
+ AuthScheme string
+ Cookies []*http.Cookie
+ Error reflect.Type
+ Debug bool
+ DisableWarn bool
+ AllowGetMethodPayload bool
+ RetryCount int
+ RetryWaitTime time.Duration
+ RetryMaxWaitTime time.Duration
+ RetryConditions []RetryConditionFunc
+ RetryHooks []OnRetryFunc
+ RetryAfter RetryAfterFunc
+ RetryResetReaders bool
+ JSONMarshal func(v interface{}) ([]byte, error)
+ JSONUnmarshal func(data []byte, v interface{}) error
+ XMLMarshal func(v interface{}) ([]byte, error)
+ XMLUnmarshal func(data []byte, v interface{}) error
+
+ // HeaderAuthorizationKey is used to set/access Request Authorization header
+ // value when `SetAuthToken` option is used.
+ HeaderAuthorizationKey string
+
+ jsonEscapeHTML bool
+ setContentLength bool
+ closeConnection bool
+ notParseResponse bool
+ trace bool
+ debugBodySizeLimit int64
+ outputDirectory string
+ scheme string
+ log Logger
+ httpClient *http.Client
+ proxyURL *url.URL
+ beforeRequest []RequestMiddleware
+ udBeforeRequest []RequestMiddleware
+ udBeforeRequestLock *sync.RWMutex
+ preReqHook PreRequestHook
+ successHooks []SuccessHook
+ afterResponse []ResponseMiddleware
+ afterResponseLock *sync.RWMutex
+ requestLog RequestLogCallback
+ responseLog ResponseLogCallback
+ errorHooks []ErrorHook
+ invalidHooks []ErrorHook
+ panicHooks []ErrorHook
+ rateLimiter RateLimiter
+}
+
+// User type is to hold an username and password information
+type User struct {
+ Username, Password string
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Client methods
+//___________________________________
+
+// SetHostURL method is to set Host URL in the client instance. It will be used with request
+// raised from this client with relative URL
+//
+// // Setting HTTP address
+// client.SetHostURL("http://myjeeva.com")
+//
+// // Setting HTTPS address
+// client.SetHostURL("https://myjeeva.com")
+//
+// Deprecated: use SetBaseURL instead. To be removed in v3.0.0 release.
+func (c *Client) SetHostURL(url string) *Client {
+ c.SetBaseURL(url)
+ return c
+}
+
+// SetBaseURL method is to set Base URL in the client instance. It will be used with request
+// raised from this client with relative URL
+//
+// // Setting HTTP address
+// client.SetBaseURL("http://myjeeva.com")
+//
+// // Setting HTTPS address
+// client.SetBaseURL("https://myjeeva.com")
+//
+// Since v2.7.0
+func (c *Client) SetBaseURL(url string) *Client {
+ c.BaseURL = strings.TrimRight(url, "/")
+ c.HostURL = c.BaseURL
+ return c
+}
+
+// SetHeader method sets a single header field and its value in the client instance.
+// These headers will be applied to all requests raised from this client instance.
+// Also it can be overridden at request level header options.
+//
+// See `Request.SetHeader` or `Request.SetHeaders`.
+//
+// For Example: To set `Content-Type` and `Accept` as `application/json`
+//
+// client.
+// SetHeader("Content-Type", "application/json").
+// SetHeader("Accept", "application/json")
+func (c *Client) SetHeader(header, value string) *Client {
+ c.Header.Set(header, value)
+ return c
+}
+
+// SetHeaders method sets multiple headers field and its values at one go in the client instance.
+// These headers will be applied to all requests raised from this client instance. Also it can be
+// overridden at request level headers options.
+//
+// See `Request.SetHeaders` or `Request.SetHeader`.
+//
+// For Example: To set `Content-Type` and `Accept` as `application/json`
+//
+// client.SetHeaders(map[string]string{
+// "Content-Type": "application/json",
+// "Accept": "application/json",
+// })
+func (c *Client) SetHeaders(headers map[string]string) *Client {
+ for h, v := range headers {
+ c.Header.Set(h, v)
+ }
+ return c
+}
+
+// SetHeaderVerbatim method is to set a single header field and its value verbatim in the current request.
+//
+// For Example: To set `all_lowercase` and `UPPERCASE` as `available`.
+//
+// client.R().
+// SetHeaderVerbatim("all_lowercase", "available").
+// SetHeaderVerbatim("UPPERCASE", "available")
+//
+// Also you can override header value, which was set at client instance level.
+//
+// Since v2.6.0
+func (c *Client) SetHeaderVerbatim(header, value string) *Client {
+ c.Header[header] = []string{value}
+ return c
+}
+
+// SetCookieJar method sets custom http.CookieJar in the resty client. Its way to override default.
+//
+// For Example: sometimes we don't want to save cookies in api contacting, we can remove the default
+// CookieJar in resty client.
+//
+// client.SetCookieJar(nil)
+func (c *Client) SetCookieJar(jar http.CookieJar) *Client {
+ c.httpClient.Jar = jar
+ return c
+}
+
+// SetCookie method appends a single cookie in the client instance.
+// These cookies will be added to all the request raised from this client instance.
+//
+// client.SetCookie(&http.Cookie{
+// Name:"go-resty",
+// Value:"This is cookie value",
+// })
+func (c *Client) SetCookie(hc *http.Cookie) *Client {
+ c.Cookies = append(c.Cookies, hc)
+ return c
+}
+
+// SetCookies method sets an array of cookies in the client instance.
+// These cookies will be added to all the request raised from this client instance.
+//
+// cookies := []*http.Cookie{
+// &http.Cookie{
+// Name:"go-resty-1",
+// Value:"This is cookie 1 value",
+// },
+// &http.Cookie{
+// Name:"go-resty-2",
+// Value:"This is cookie 2 value",
+// },
+// }
+//
+// // Setting a cookies into resty
+// client.SetCookies(cookies)
+func (c *Client) SetCookies(cs []*http.Cookie) *Client {
+ c.Cookies = append(c.Cookies, cs...)
+ return c
+}
+
+// SetQueryParam method sets single parameter and its value in the client instance.
+// It will be formed as query string for the request.
+//
+// For Example: `search=kitchen%20papers&size=large`
+// in the URL after `?` mark. These query params will be added to all the request raised from
+// this client instance. Also it can be overridden at request level Query Param options.
+//
+// See `Request.SetQueryParam` or `Request.SetQueryParams`.
+//
+// client.
+// SetQueryParam("search", "kitchen papers").
+// SetQueryParam("size", "large")
+func (c *Client) SetQueryParam(param, value string) *Client {
+ c.QueryParam.Set(param, value)
+ return c
+}
+
+// SetQueryParams method sets multiple parameters and their values at one go in the client instance.
+// It will be formed as query string for the request.
+//
+// For Example: `search=kitchen%20papers&size=large`
+// in the URL after `?` mark. These query params will be added to all the request raised from this
+// client instance. Also it can be overridden at request level Query Param options.
+//
+// See `Request.SetQueryParams` or `Request.SetQueryParam`.
+//
+// client.SetQueryParams(map[string]string{
+// "search": "kitchen papers",
+// "size": "large",
+// })
+func (c *Client) SetQueryParams(params map[string]string) *Client {
+ for p, v := range params {
+ c.SetQueryParam(p, v)
+ }
+ return c
+}
+
+// SetFormData method sets Form parameters and their values in the client instance.
+// It's applicable only HTTP method `POST` and `PUT` and request content type would be set as
+// `application/x-www-form-urlencoded`. These form data will be added to all the request raised from
+// this client instance. Also it can be overridden at request level form data.
+//
+// See `Request.SetFormData`.
+//
+// client.SetFormData(map[string]string{
+// "access_token": "BC594900-518B-4F7E-AC75-BD37F019E08F",
+// "user_id": "3455454545",
+// })
+func (c *Client) SetFormData(data map[string]string) *Client {
+ for k, v := range data {
+ c.FormData.Set(k, v)
+ }
+ return c
+}
+
+// SetBasicAuth method sets the basic authentication header in the HTTP request. For Example:
+//
+// Authorization: Basic
+//
+// For Example: To set the header for username "go-resty" and password "welcome"
+//
+// client.SetBasicAuth("go-resty", "welcome")
+//
+// This basic auth information gets added to all the request raised from this client instance.
+// Also it can be overridden or set one at the request level is supported.
+//
+// See `Request.SetBasicAuth`.
+func (c *Client) SetBasicAuth(username, password string) *Client {
+ c.UserInfo = &User{Username: username, Password: password}
+ return c
+}
+
+// SetAuthToken method sets the auth token of the `Authorization` header for all HTTP requests.
+// The default auth scheme is `Bearer`, it can be customized with the method `SetAuthScheme`. For Example:
+//
+// Authorization:
+//
+// For Example: To set auth token BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F
+//
+// client.SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F")
+//
+// This auth token gets added to all the requests raised from this client instance.
+// Also it can be overridden or set one at the request level is supported.
+//
+// See `Request.SetAuthToken`.
+func (c *Client) SetAuthToken(token string) *Client {
+ c.Token = token
+ return c
+}
+
+// SetAuthScheme method sets the auth scheme type in the HTTP request. For Example:
+//
+// Authorization:
+//
+// For Example: To set the scheme to use OAuth
+//
+// client.SetAuthScheme("OAuth")
+//
+// This auth scheme gets added to all the requests raised from this client instance.
+// Also it can be overridden or set one at the request level is supported.
+//
+// Information about auth schemes can be found in RFC7235 which is linked to below
+// along with the page containing the currently defined official authentication schemes:
+//
+// https://tools.ietf.org/html/rfc7235
+// https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml#authschemes
+//
+// See `Request.SetAuthToken`.
+func (c *Client) SetAuthScheme(scheme string) *Client {
+ c.AuthScheme = scheme
+ return c
+}
+
+// SetDigestAuth method sets the Digest Access auth scheme for the client. If a server responds with 401 and sends
+// a Digest challenge in the WWW-Authenticate Header, requests will be resent with the appropriate Authorization Header.
+//
+// For Example: To set the Digest scheme with user "Mufasa" and password "Circle Of Life"
+//
+// client.SetDigestAuth("Mufasa", "Circle Of Life")
+//
+// Information about Digest Access Authentication can be found in RFC7616:
+//
+// https://datatracker.ietf.org/doc/html/rfc7616
+//
+// See `Request.SetDigestAuth`.
+func (c *Client) SetDigestAuth(username, password string) *Client {
+ oldTransport := c.httpClient.Transport
+ c.OnBeforeRequest(func(c *Client, _ *Request) error {
+ c.httpClient.Transport = &digestTransport{
+ digestCredentials: digestCredentials{username, password},
+ transport: oldTransport,
+ }
+ return nil
+ })
+ c.OnAfterResponse(func(c *Client, _ *Response) error {
+ c.httpClient.Transport = oldTransport
+ return nil
+ })
+ return c
+}
+
+// R method creates a new request instance, its used for Get, Post, Put, Delete, Patch, Head, Options, etc.
+func (c *Client) R() *Request {
+ r := &Request{
+ QueryParam: url.Values{},
+ FormData: url.Values{},
+ Header: http.Header{},
+ Cookies: make([]*http.Cookie, 0),
+ PathParams: map[string]string{},
+ RawPathParams: map[string]string{},
+ Debug: c.Debug,
+
+ client: c,
+ multipartFiles: []*File{},
+ multipartFields: []*MultipartField{},
+ jsonEscapeHTML: c.jsonEscapeHTML,
+ log: c.log,
+ }
+ return r
+}
+
+// NewRequest is an alias for method `R()`. Creates a new request instance, its used for
+// Get, Post, Put, Delete, Patch, Head, Options, etc.
+func (c *Client) NewRequest() *Request {
+ return c.R()
+}
+
+// OnBeforeRequest method appends a request middleware into the before request chain.
+// The user defined middlewares get applied before the default Resty request middlewares.
+// After all middlewares have been applied, the request is sent from Resty to the host server.
+//
+// client.OnBeforeRequest(func(c *resty.Client, r *resty.Request) error {
+// // Now you have access to Client and Request instance
+// // manipulate it as per your need
+//
+// return nil // if its success otherwise return error
+// })
+func (c *Client) OnBeforeRequest(m RequestMiddleware) *Client {
+ c.udBeforeRequestLock.Lock()
+ defer c.udBeforeRequestLock.Unlock()
+
+ c.udBeforeRequest = append(c.udBeforeRequest, m)
+
+ return c
+}
+
+// OnAfterResponse method appends response middleware into the after response chain.
+// Once we receive response from host server, default Resty response middleware
+// gets applied and then user assigned response middlewares applied.
+//
+// client.OnAfterResponse(func(c *resty.Client, r *resty.Response) error {
+// // Now you have access to Client and Response instance
+// // manipulate it as per your need
+//
+// return nil // if its success otherwise return error
+// })
+func (c *Client) OnAfterResponse(m ResponseMiddleware) *Client {
+ c.afterResponseLock.Lock()
+ defer c.afterResponseLock.Unlock()
+
+ c.afterResponse = append(c.afterResponse, m)
+
+ return c
+}
+
+// OnError method adds a callback that will be run whenever a request execution fails.
+// This is called after all retries have been attempted (if any).
+// If there was a response from the server, the error will be wrapped in *ResponseError
+// which has the last response received from the server.
+//
+// client.OnError(func(req *resty.Request, err error) {
+// if v, ok := err.(*resty.ResponseError); ok {
+// // Do something with v.Response
+// }
+// // Log the error, increment a metric, etc...
+// })
+//
+// Out of the OnSuccess, OnError, OnInvalid, OnPanic callbacks, exactly one
+// set will be invoked for each call to Request.Execute() that completes.
+func (c *Client) OnError(h ErrorHook) *Client {
+ c.errorHooks = append(c.errorHooks, h)
+ return c
+}
+
+// OnSuccess method adds a callback that will be run whenever a request execution
+// succeeds. This is called after all retries have been attempted (if any).
+//
+// Out of the OnSuccess, OnError, OnInvalid, OnPanic callbacks, exactly one
+// set will be invoked for each call to Request.Execute() that completes.
+//
+// Since v2.8.0
+func (c *Client) OnSuccess(h SuccessHook) *Client {
+ c.successHooks = append(c.successHooks, h)
+ return c
+}
+
+// OnInvalid method adds a callback that will be run whenever a request execution
+// fails before it starts because the request is invalid.
+//
+// Out of the OnSuccess, OnError, OnInvalid, OnPanic callbacks, exactly one
+// set will be invoked for each call to Request.Execute() that completes.
+//
+// Since v2.8.0
+func (c *Client) OnInvalid(h ErrorHook) *Client {
+ c.invalidHooks = append(c.invalidHooks, h)
+ return c
+}
+
+// OnPanic method adds a callback that will be run whenever a request execution
+// panics.
+//
+// Out of the OnSuccess, OnError, OnInvalid, OnPanic callbacks, exactly one
+// set will be invoked for each call to Request.Execute() that completes.
+// If an OnSuccess, OnError, or OnInvalid callback panics, then the exactly
+// one rule can be violated.
+//
+// Since v2.8.0
+func (c *Client) OnPanic(h ErrorHook) *Client {
+ c.panicHooks = append(c.panicHooks, h)
+ return c
+}
+
+// SetPreRequestHook method sets the given pre-request function into resty client.
+// It is called right before the request is fired.
+//
+// Note: Only one pre-request hook can be registered. Use `client.OnBeforeRequest` for multiple.
+func (c *Client) SetPreRequestHook(h PreRequestHook) *Client {
+ if c.preReqHook != nil {
+ c.log.Warnf("Overwriting an existing pre-request hook: %s", functionName(h))
+ }
+ c.preReqHook = h
+ return c
+}
+
+// SetDebug method enables the debug mode on Resty client. Client logs details of every request and response.
+// For `Request` it logs information such as HTTP verb, Relative URL path, Host, Headers, Body if it has one.
+// For `Response` it logs information such as Status, Response Time, Headers, Body if it has one.
+//
+// client.SetDebug(true)
+//
+// Also it can be enabled at request level for particular request, see `Request.SetDebug`.
+func (c *Client) SetDebug(d bool) *Client {
+ c.Debug = d
+ return c
+}
+
+// SetDebugBodyLimit sets the maximum size for which the response and request body will be logged in debug mode.
+//
+// client.SetDebugBodyLimit(1000000)
+func (c *Client) SetDebugBodyLimit(sl int64) *Client {
+ c.debugBodySizeLimit = sl
+ return c
+}
+
+// OnRequestLog method used to set request log callback into Resty. Registered callback gets
+// called before the resty actually logs the information.
+func (c *Client) OnRequestLog(rl RequestLogCallback) *Client {
+ if c.requestLog != nil {
+ c.log.Warnf("Overwriting an existing on-request-log callback from=%s to=%s",
+ functionName(c.requestLog), functionName(rl))
+ }
+ c.requestLog = rl
+ return c
+}
+
+// OnResponseLog method used to set response log callback into Resty. Registered callback gets
+// called before the resty actually logs the information.
+func (c *Client) OnResponseLog(rl ResponseLogCallback) *Client {
+ if c.responseLog != nil {
+ c.log.Warnf("Overwriting an existing on-response-log callback from=%s to=%s",
+ functionName(c.responseLog), functionName(rl))
+ }
+ c.responseLog = rl
+ return c
+}
+
+// SetDisableWarn method disables the warning message on Resty client.
+//
+// For Example: Resty warns the user when BasicAuth used on non-TLS mode.
+//
+// client.SetDisableWarn(true)
+func (c *Client) SetDisableWarn(d bool) *Client {
+ c.DisableWarn = d
+ return c
+}
+
+// SetAllowGetMethodPayload method allows the GET method with payload on Resty client.
+//
+// For Example: Resty allows the user sends request with a payload on HTTP GET method.
+//
+// client.SetAllowGetMethodPayload(true)
+func (c *Client) SetAllowGetMethodPayload(a bool) *Client {
+ c.AllowGetMethodPayload = a
+ return c
+}
+
+// SetLogger method sets given writer for logging Resty request and response details.
+//
+// Compliant to interface `resty.Logger`.
+func (c *Client) SetLogger(l Logger) *Client {
+ c.log = l
+ return c
+}
+
+// SetContentLength method enables the HTTP header `Content-Length` value for every request.
+// By default Resty won't set `Content-Length`.
+//
+// client.SetContentLength(true)
+//
+// Also you have an option to enable for particular request. See `Request.SetContentLength`
+func (c *Client) SetContentLength(l bool) *Client {
+ c.setContentLength = l
+ return c
+}
+
+// SetTimeout method sets timeout for request raised from client.
+//
+// client.SetTimeout(time.Duration(1 * time.Minute))
+func (c *Client) SetTimeout(timeout time.Duration) *Client {
+ c.httpClient.Timeout = timeout
+ return c
+}
+
+// SetError method is to register the global or client common `Error` object into Resty.
+// It is used for automatic unmarshalling if response status code is greater than 399 and
+// content type either JSON or XML. Can be pointer or non-pointer.
+//
+// client.SetError(&Error{})
+// // OR
+// client.SetError(Error{})
+func (c *Client) SetError(err interface{}) *Client {
+ c.Error = typeOf(err)
+ return c
+}
+
+// SetRedirectPolicy method sets the client redirect policy. Resty provides ready to use
+// redirect policies. Wanna create one for yourself refer to `redirect.go`.
+//
+// client.SetRedirectPolicy(FlexibleRedirectPolicy(20))
+//
+// // Need multiple redirect policies together
+// client.SetRedirectPolicy(FlexibleRedirectPolicy(20), DomainCheckRedirectPolicy("host1.com", "host2.net"))
+func (c *Client) SetRedirectPolicy(policies ...interface{}) *Client {
+ for _, p := range policies {
+ if _, ok := p.(RedirectPolicy); !ok {
+ c.log.Errorf("%v does not implement resty.RedirectPolicy (missing Apply method)",
+ functionName(p))
+ }
+ }
+
+ c.httpClient.CheckRedirect = func(req *http.Request, via []*http.Request) error {
+ for _, p := range policies {
+ if err := p.(RedirectPolicy).Apply(req, via); err != nil {
+ return err
+ }
+ }
+ return nil // looks good, go ahead
+ }
+
+ return c
+}
+
+// SetRetryCount method enables retry on Resty client and allows you
+// to set no. of retry count. Resty uses a Backoff mechanism.
+func (c *Client) SetRetryCount(count int) *Client {
+ c.RetryCount = count
+ return c
+}
+
+// SetRetryWaitTime method sets default wait time to sleep before retrying
+// request.
+//
+// Default is 100 milliseconds.
+func (c *Client) SetRetryWaitTime(waitTime time.Duration) *Client {
+ c.RetryWaitTime = waitTime
+ return c
+}
+
+// SetRetryMaxWaitTime method sets max wait time to sleep before retrying
+// request.
+//
+// Default is 2 seconds.
+func (c *Client) SetRetryMaxWaitTime(maxWaitTime time.Duration) *Client {
+ c.RetryMaxWaitTime = maxWaitTime
+ return c
+}
+
+// SetRetryAfter sets callback to calculate wait time between retries.
+// Default (nil) implies exponential backoff with jitter
+func (c *Client) SetRetryAfter(callback RetryAfterFunc) *Client {
+ c.RetryAfter = callback
+ return c
+}
+
+// SetJSONMarshaler method sets the JSON marshaler function to marshal the request body.
+// By default, Resty uses `encoding/json` package to marshal the request body.
+//
+// Since v2.8.0
+func (c *Client) SetJSONMarshaler(marshaler func(v interface{}) ([]byte, error)) *Client {
+ c.JSONMarshal = marshaler
+ return c
+}
+
+// SetJSONUnmarshaler method sets the JSON unmarshaler function to unmarshal the response body.
+// By default, Resty uses `encoding/json` package to unmarshal the response body.
+//
+// Since v2.8.0
+func (c *Client) SetJSONUnmarshaler(unmarshaler func(data []byte, v interface{}) error) *Client {
+ c.JSONUnmarshal = unmarshaler
+ return c
+}
+
+// SetXMLMarshaler method sets the XML marshaler function to marshal the request body.
+// By default, Resty uses `encoding/xml` package to marshal the request body.
+//
+// Since v2.8.0
+func (c *Client) SetXMLMarshaler(marshaler func(v interface{}) ([]byte, error)) *Client {
+ c.XMLMarshal = marshaler
+ return c
+}
+
+// SetXMLUnmarshaler method sets the XML unmarshaler function to unmarshal the response body.
+// By default, Resty uses `encoding/xml` package to unmarshal the response body.
+//
+// Since v2.8.0
+func (c *Client) SetXMLUnmarshaler(unmarshaler func(data []byte, v interface{}) error) *Client {
+ c.XMLUnmarshal = unmarshaler
+ return c
+}
+
+// AddRetryCondition method adds a retry condition function to array of functions
+// that are checked to determine if the request is retried. The request will
+// retry if any of the functions return true and error is nil.
+//
+// Note: These retry conditions are applied on all Request made using this Client.
+// For Request specific retry conditions check *Request.AddRetryCondition
+func (c *Client) AddRetryCondition(condition RetryConditionFunc) *Client {
+ c.RetryConditions = append(c.RetryConditions, condition)
+ return c
+}
+
+// AddRetryAfterErrorCondition adds the basic condition of retrying after encountering
+// an error from the http response
+//
+// Since v2.6.0
+func (c *Client) AddRetryAfterErrorCondition() *Client {
+ c.AddRetryCondition(func(response *Response, err error) bool {
+ return response.IsError()
+ })
+ return c
+}
+
+// AddRetryHook adds a side-effecting retry hook to an array of hooks
+// that will be executed on each retry.
+//
+// Since v2.6.0
+func (c *Client) AddRetryHook(hook OnRetryFunc) *Client {
+ c.RetryHooks = append(c.RetryHooks, hook)
+ return c
+}
+
+// SetRetryResetReaders method enables the Resty client to seek the start of all
+// file readers given as multipart files, if the given object implements `io.ReadSeeker`.
+//
+// Since ...
+func (c *Client) SetRetryResetReaders(b bool) *Client {
+ c.RetryResetReaders = b
+ return c
+}
+
+// SetTLSClientConfig method sets TLSClientConfig for underling client Transport.
+//
+// For Example:
+//
+// // One can set custom root-certificate. Refer: http://golang.org/pkg/crypto/tls/#example_Dial
+// client.SetTLSClientConfig(&tls.Config{ RootCAs: roots })
+//
+// // or One can disable security check (https)
+// client.SetTLSClientConfig(&tls.Config{ InsecureSkipVerify: true })
+//
+// Note: This method overwrites existing `TLSClientConfig`.
+func (c *Client) SetTLSClientConfig(config *tls.Config) *Client {
+ transport, err := c.Transport()
+ if err != nil {
+ c.log.Errorf("%v", err)
+ return c
+ }
+ transport.TLSClientConfig = config
+ return c
+}
+
+// SetProxy method sets the Proxy URL and Port for Resty client.
+//
+// client.SetProxy("http://proxyserver:8888")
+//
+// OR Without this `SetProxy` method, you could also set Proxy via environment variable.
+//
+// Refer to godoc `http.ProxyFromEnvironment`.
+func (c *Client) SetProxy(proxyURL string) *Client {
+ transport, err := c.Transport()
+ if err != nil {
+ c.log.Errorf("%v", err)
+ return c
+ }
+
+ pURL, err := url.Parse(proxyURL)
+ if err != nil {
+ c.log.Errorf("%v", err)
+ return c
+ }
+
+ c.proxyURL = pURL
+ transport.Proxy = http.ProxyURL(c.proxyURL)
+ return c
+}
+
+// RemoveProxy method removes the proxy configuration from Resty client
+//
+// client.RemoveProxy()
+func (c *Client) RemoveProxy() *Client {
+ transport, err := c.Transport()
+ if err != nil {
+ c.log.Errorf("%v", err)
+ return c
+ }
+ c.proxyURL = nil
+ transport.Proxy = nil
+ return c
+}
+
+// SetCertificates method helps to set client certificates into Resty conveniently.
+func (c *Client) SetCertificates(certs ...tls.Certificate) *Client {
+ config, err := c.tlsConfig()
+ if err != nil {
+ c.log.Errorf("%v", err)
+ return c
+ }
+ config.Certificates = append(config.Certificates, certs...)
+ return c
+}
+
+// SetRootCertificate method helps to add one or more root certificates into Resty client
+//
+// client.SetRootCertificate("/path/to/root/pemFile.pem")
+func (c *Client) SetRootCertificate(pemFilePath string) *Client {
+ rootPemData, err := os.ReadFile(pemFilePath)
+ if err != nil {
+ c.log.Errorf("%v", err)
+ return c
+ }
+
+ config, err := c.tlsConfig()
+ if err != nil {
+ c.log.Errorf("%v", err)
+ return c
+ }
+ if config.RootCAs == nil {
+ config.RootCAs = x509.NewCertPool()
+ }
+
+ config.RootCAs.AppendCertsFromPEM(rootPemData)
+ return c
+}
+
+// SetRootCertificateFromString method helps to add one or more root certificates into Resty client
+//
+// client.SetRootCertificateFromString("pem file content")
+func (c *Client) SetRootCertificateFromString(pemContent string) *Client {
+ config, err := c.tlsConfig()
+ if err != nil {
+ c.log.Errorf("%v", err)
+ return c
+ }
+ if config.RootCAs == nil {
+ config.RootCAs = x509.NewCertPool()
+ }
+
+ config.RootCAs.AppendCertsFromPEM([]byte(pemContent))
+ return c
+}
+
+// SetOutputDirectory method sets output directory for saving HTTP response into file.
+// If the output directory not exists then resty creates one. This setting is optional one,
+// if you're planning using absolute path in `Request.SetOutput` and can used together.
+//
+// client.SetOutputDirectory("/save/http/response/here")
+func (c *Client) SetOutputDirectory(dirPath string) *Client {
+ c.outputDirectory = dirPath
+ return c
+}
+
+// SetRateLimiter sets an optional `RateLimiter`. If set the rate limiter will control
+// all requests made with this client.
+//
+// Since v2.9.0
+func (c *Client) SetRateLimiter(rl RateLimiter) *Client {
+ c.rateLimiter = rl
+ return c
+}
+
+// SetTransport method sets custom `*http.Transport` or any `http.RoundTripper`
+// compatible interface implementation in the resty client.
+//
+// Note:
+//
+// - If transport is not type of `*http.Transport` then you may not be able to
+// take advantage of some of the Resty client settings.
+//
+// - It overwrites the Resty client transport instance and it's configurations.
+//
+// transport := &http.Transport{
+// // something like Proxying to httptest.Server, etc...
+// Proxy: func(req *http.Request) (*url.URL, error) {
+// return url.Parse(server.URL)
+// },
+// }
+//
+// client.SetTransport(transport)
+func (c *Client) SetTransport(transport http.RoundTripper) *Client {
+ if transport != nil {
+ c.httpClient.Transport = transport
+ }
+ return c
+}
+
+// SetScheme method sets custom scheme in the Resty client. It's way to override default.
+//
+// client.SetScheme("http")
+func (c *Client) SetScheme(scheme string) *Client {
+ if !IsStringEmpty(scheme) {
+ c.scheme = strings.TrimSpace(scheme)
+ }
+ return c
+}
+
+// SetCloseConnection method sets variable `Close` in http request struct with the given
+// value. More info: https://golang.org/src/net/http/request.go
+func (c *Client) SetCloseConnection(close bool) *Client {
+ c.closeConnection = close
+ return c
+}
+
+// SetDoNotParseResponse method instructs `Resty` not to parse the response body automatically.
+// Resty exposes the raw response body as `io.ReadCloser`. Also do not forget to close the body,
+// otherwise you might get into connection leaks, no connection reuse.
+//
+// Note: Response middlewares are not applicable, if you use this option. Basically you have
+// taken over the control of response parsing from `Resty`.
+func (c *Client) SetDoNotParseResponse(parse bool) *Client {
+ c.notParseResponse = parse
+ return c
+}
+
+// SetPathParam method sets single URL path key-value pair in the
+// Resty client instance.
+//
+// client.SetPathParam("userId", "sample@sample.com")
+//
+// Result:
+// URL - /v1/users/{userId}/details
+// Composed URL - /v1/users/sample@sample.com/details
+//
+// It replaces the value of the key while composing the request URL.
+// The value will be escaped using `url.PathEscape` function.
+//
+// Also it can be overridden at request level Path Params options,
+// see `Request.SetPathParam` or `Request.SetPathParams`.
+func (c *Client) SetPathParam(param, value string) *Client {
+ c.PathParams[param] = value
+ return c
+}
+
+// SetPathParams method sets multiple URL path key-value pairs at one go in the
+// Resty client instance.
+//
+// client.SetPathParams(map[string]string{
+// "userId": "sample@sample.com",
+// "subAccountId": "100002",
+// "path": "groups/developers",
+// })
+//
+// Result:
+// URL - /v1/users/{userId}/{subAccountId}/{path}/details
+// Composed URL - /v1/users/sample@sample.com/100002/groups%2Fdevelopers/details
+//
+// It replaces the value of the key while composing the request URL.
+// The values will be escaped using `url.PathEscape` function.
+//
+// Also it can be overridden at request level Path Params options,
+// see `Request.SetPathParam` or `Request.SetPathParams`.
+func (c *Client) SetPathParams(params map[string]string) *Client {
+ for p, v := range params {
+ c.SetPathParam(p, v)
+ }
+ return c
+}
+
+// SetRawPathParam method sets single URL path key-value pair in the
+// Resty client instance.
+//
+// client.SetPathParam("userId", "sample@sample.com")
+//
+// Result:
+// URL - /v1/users/{userId}/details
+// Composed URL - /v1/users/sample@sample.com/details
+//
+// client.SetPathParam("path", "groups/developers")
+//
+// Result:
+// URL - /v1/users/{userId}/details
+// Composed URL - /v1/users/groups%2Fdevelopers/details
+//
+// It replaces the value of the key while composing the request URL.
+// The value will be used as it is and will not be escaped.
+//
+// Also it can be overridden at request level Path Params options,
+// see `Request.SetPathParam` or `Request.SetPathParams`.
+//
+// Since v2.8.0
+func (c *Client) SetRawPathParam(param, value string) *Client {
+ c.RawPathParams[param] = value
+ return c
+}
+
+// SetRawPathParams method sets multiple URL path key-value pairs at one go in the
+// Resty client instance.
+//
+// client.SetPathParams(map[string]string{
+// "userId": "sample@sample.com",
+// "subAccountId": "100002",
+// "path": "groups/developers",
+// })
+//
+// Result:
+// URL - /v1/users/{userId}/{subAccountId}/{path}/details
+// Composed URL - /v1/users/sample@sample.com/100002/groups/developers/details
+//
+// It replaces the value of the key while composing the request URL.
+// The values will be used as they are and will not be escaped.
+//
+// Also it can be overridden at request level Path Params options,
+// see `Request.SetPathParam` or `Request.SetPathParams`.
+//
+// Since v2.8.0
+func (c *Client) SetRawPathParams(params map[string]string) *Client {
+ for p, v := range params {
+ c.SetRawPathParam(p, v)
+ }
+ return c
+}
+
+// SetJSONEscapeHTML method is to enable/disable the HTML escape on JSON marshal.
+//
+// Note: This option only applicable to standard JSON Marshaller.
+func (c *Client) SetJSONEscapeHTML(b bool) *Client {
+ c.jsonEscapeHTML = b
+ return c
+}
+
+// EnableTrace method enables the Resty client trace for the requests fired from
+// the client using `httptrace.ClientTrace` and provides insights.
+//
+// client := resty.New().EnableTrace()
+//
+// resp, err := client.R().Get("https://httpbin.org/get")
+// fmt.Println("Error:", err)
+// fmt.Println("Trace Info:", resp.Request.TraceInfo())
+//
+// Also `Request.EnableTrace` available too to get trace info for single request.
+//
+// Since v2.0.0
+func (c *Client) EnableTrace() *Client {
+ c.trace = true
+ return c
+}
+
+// DisableTrace method disables the Resty client trace. Refer to `Client.EnableTrace`.
+//
+// Since v2.0.0
+func (c *Client) DisableTrace() *Client {
+ c.trace = false
+ return c
+}
+
+// IsProxySet method returns the true is proxy is set from resty client otherwise
+// false. By default proxy is set from environment, refer to `http.ProxyFromEnvironment`.
+func (c *Client) IsProxySet() bool {
+ return c.proxyURL != nil
+}
+
+// GetClient method returns the current `http.Client` used by the resty client.
+func (c *Client) GetClient() *http.Client {
+ return c.httpClient
+}
+
+// Clone returns a clone of the original client.
+//
+// Be careful when using this function:
+// - Interface values are not deeply cloned. Thus, both the original and the clone will use the
+// same value.
+// - This function is not safe for concurrent use. You should only use this when you are sure that
+// the client is not being used by any other goroutine.
+//
+// Since v2.12.0
+func (c *Client) Clone() *Client {
+ // dereference the pointer and copy the value
+ cc := *c
+
+ // lock values should not be copied - thus new values are used.
+ cc.afterResponseLock = &sync.RWMutex{}
+ cc.udBeforeRequestLock = &sync.RWMutex{}
+ return &cc
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Client Unexported methods
+//_______________________________________________________________________
+
+// Executes method executes the given `Request` object and returns response
+// error.
+func (c *Client) execute(req *Request) (*Response, error) {
+ // Lock the user-defined pre-request hooks.
+ c.udBeforeRequestLock.RLock()
+ defer c.udBeforeRequestLock.RUnlock()
+
+ // Lock the post-request hooks.
+ c.afterResponseLock.RLock()
+ defer c.afterResponseLock.RUnlock()
+
+ // Apply Request middleware
+ var err error
+
+ // user defined on before request methods
+ // to modify the *resty.Request object
+ for _, f := range c.udBeforeRequest {
+ if err = f(c, req); err != nil {
+ return nil, wrapNoRetryErr(err)
+ }
+ }
+
+ // If there is a rate limiter set for this client, the Execute call
+ // will return an error if the rate limit is exceeded.
+ if req.client.rateLimiter != nil {
+ if !req.client.rateLimiter.Allow() {
+ return nil, wrapNoRetryErr(ErrRateLimitExceeded)
+ }
+ }
+
+ // resty middlewares
+ for _, f := range c.beforeRequest {
+ if err = f(c, req); err != nil {
+ return nil, wrapNoRetryErr(err)
+ }
+ }
+
+ if hostHeader := req.Header.Get("Host"); hostHeader != "" {
+ req.RawRequest.Host = hostHeader
+ }
+
+ // call pre-request if defined
+ if c.preReqHook != nil {
+ if err = c.preReqHook(c, req.RawRequest); err != nil {
+ return nil, wrapNoRetryErr(err)
+ }
+ }
+
+ if err = requestLogger(c, req); err != nil {
+ return nil, wrapNoRetryErr(err)
+ }
+
+ req.RawRequest.Body = newRequestBodyReleaser(req.RawRequest.Body, req.bodyBuf)
+
+ req.Time = time.Now()
+ resp, err := c.httpClient.Do(req.RawRequest)
+
+ response := &Response{
+ Request: req,
+ RawResponse: resp,
+ }
+
+ if err != nil || req.notParseResponse || c.notParseResponse {
+ response.setReceivedAt()
+ return response, err
+ }
+
+ if !req.isSaveResponse {
+ defer closeq(resp.Body)
+ body := resp.Body
+
+ // GitHub #142 & #187
+ if strings.EqualFold(resp.Header.Get(hdrContentEncodingKey), "gzip") && resp.ContentLength != 0 {
+ if _, ok := body.(*gzip.Reader); !ok {
+ body, err = gzip.NewReader(body)
+ if err != nil {
+ response.setReceivedAt()
+ return response, err
+ }
+ defer closeq(body)
+ }
+ }
+
+ if response.body, err = io.ReadAll(body); err != nil {
+ response.setReceivedAt()
+ return response, err
+ }
+
+ response.size = int64(len(response.body))
+ }
+
+ response.setReceivedAt() // after we read the body
+
+ // Apply Response middleware
+ for _, f := range c.afterResponse {
+ if err = f(c, response); err != nil {
+ break
+ }
+ }
+
+ return response, wrapNoRetryErr(err)
+}
+
+// getting TLS client config if not exists then create one
+func (c *Client) tlsConfig() (*tls.Config, error) {
+ transport, err := c.Transport()
+ if err != nil {
+ return nil, err
+ }
+ if transport.TLSClientConfig == nil {
+ transport.TLSClientConfig = &tls.Config{}
+ }
+ return transport.TLSClientConfig, nil
+}
+
+// Transport method returns `*http.Transport` currently in use or error
+// in case currently used `transport` is not a `*http.Transport`.
+//
+// Since v2.8.0 become exported method.
+func (c *Client) Transport() (*http.Transport, error) {
+ if transport, ok := c.httpClient.Transport.(*http.Transport); ok {
+ return transport, nil
+ }
+ return nil, errors.New("current transport is not an *http.Transport instance")
+}
+
+// just an internal helper method
+func (c *Client) outputLogTo(w io.Writer) *Client {
+ c.log.(*logger).l.SetOutput(w)
+ return c
+}
+
+// ResponseError is a wrapper for including the server response with an error.
+// Neither the err nor the response should be nil.
+type ResponseError struct {
+ Response *Response
+ Err error
+}
+
+func (e *ResponseError) Error() string {
+ return e.Err.Error()
+}
+
+func (e *ResponseError) Unwrap() error {
+ return e.Err
+}
+
+// Helper to run errorHooks hooks.
+// It wraps the error in a ResponseError if the resp is not nil
+// so hooks can access it.
+func (c *Client) onErrorHooks(req *Request, resp *Response, err error) {
+ if err != nil {
+ if resp != nil { // wrap with ResponseError
+ err = &ResponseError{Response: resp, Err: err}
+ }
+ for _, h := range c.errorHooks {
+ h(req, err)
+ }
+ } else {
+ for _, h := range c.successHooks {
+ h(c, resp)
+ }
+ }
+}
+
+// Helper to run panicHooks hooks.
+func (c *Client) onPanicHooks(req *Request, err error) {
+ for _, h := range c.panicHooks {
+ h(req, err)
+ }
+}
+
+// Helper to run invalidHooks hooks.
+func (c *Client) onInvalidHooks(req *Request, err error) {
+ for _, h := range c.invalidHooks {
+ h(req, err)
+ }
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// File struct and its methods
+//_______________________________________________________________________
+
+// File struct represent file information for multipart request
+type File struct {
+ Name string
+ ParamName string
+ io.Reader
+}
+
+// String returns string value of current file details
+func (f *File) String() string {
+ return fmt.Sprintf("ParamName: %v; FileName: %v", f.ParamName, f.Name)
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// MultipartField struct
+//_______________________________________________________________________
+
+// MultipartField struct represent custom data part for multipart request
+type MultipartField struct {
+ Param string
+ FileName string
+ ContentType string
+ io.Reader
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Unexported package methods
+//_______________________________________________________________________
+
+func createClient(hc *http.Client) *Client {
+ if hc.Transport == nil {
+ hc.Transport = createTransport(nil)
+ }
+
+ c := &Client{ // not setting lang default values
+ QueryParam: url.Values{},
+ FormData: url.Values{},
+ Header: http.Header{},
+ Cookies: make([]*http.Cookie, 0),
+ RetryWaitTime: defaultWaitTime,
+ RetryMaxWaitTime: defaultMaxWaitTime,
+ PathParams: make(map[string]string),
+ RawPathParams: make(map[string]string),
+ JSONMarshal: json.Marshal,
+ JSONUnmarshal: json.Unmarshal,
+ XMLMarshal: xml.Marshal,
+ XMLUnmarshal: xml.Unmarshal,
+ HeaderAuthorizationKey: http.CanonicalHeaderKey("Authorization"),
+
+ jsonEscapeHTML: true,
+ httpClient: hc,
+ debugBodySizeLimit: math.MaxInt32,
+ udBeforeRequestLock: &sync.RWMutex{},
+ afterResponseLock: &sync.RWMutex{},
+ }
+
+ // Logger
+ c.SetLogger(createLogger())
+
+ // default before request middlewares
+ c.beforeRequest = []RequestMiddleware{
+ parseRequestURL,
+ parseRequestHeader,
+ parseRequestBody,
+ createHTTPRequest,
+ addCredentials,
+ }
+
+ // user defined request middlewares
+ c.udBeforeRequest = []RequestMiddleware{}
+
+ // default after response middlewares
+ c.afterResponse = []ResponseMiddleware{
+ responseLogger,
+ parseResponseBody,
+ saveResponseIntoFile,
+ }
+
+ return c
+}
diff --git a/vendor/github.com/go-resty/resty/v2/digest.go b/vendor/github.com/go-resty/resty/v2/digest.go
new file mode 100644
index 00000000..3cd19637
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/digest.go
@@ -0,0 +1,327 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com)
+// 2023 Segev Dagan (https://github.com/segevda)
+// 2024 Philipp Wolfer (https://github.com/phw)
+// All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "crypto/md5"
+ "crypto/rand"
+ "crypto/sha256"
+ "crypto/sha512"
+ "errors"
+ "fmt"
+ "hash"
+ "io"
+ "net/http"
+ "strings"
+)
+
+var (
+ ErrDigestBadChallenge = errors.New("digest: challenge is bad")
+ ErrDigestCharset = errors.New("digest: unsupported charset")
+ ErrDigestAlgNotSupported = errors.New("digest: algorithm is not supported")
+ ErrDigestQopNotSupported = errors.New("digest: no supported qop in list")
+ ErrDigestNoQop = errors.New("digest: qop must be specified")
+)
+
+var hashFuncs = map[string]func() hash.Hash{
+ "": md5.New,
+ "MD5": md5.New,
+ "MD5-sess": md5.New,
+ "SHA-256": sha256.New,
+ "SHA-256-sess": sha256.New,
+ "SHA-512-256": sha512.New,
+ "SHA-512-256-sess": sha512.New,
+}
+
+type digestCredentials struct {
+ username, password string
+}
+
+type digestTransport struct {
+ digestCredentials
+ transport http.RoundTripper
+}
+
+func (dt *digestTransport) RoundTrip(req *http.Request) (*http.Response, error) {
+ // Copy the request, so we don't modify the input.
+ req2 := new(http.Request)
+ *req2 = *req
+ req2.Header = make(http.Header)
+ for k, s := range req.Header {
+ req2.Header[k] = s
+ }
+
+ // Fix http: ContentLength=xxx with Body length 0
+ if req2.Body == nil {
+ req2.ContentLength = 0
+ } else if req2.GetBody != nil {
+ var err error
+ req2.Body, err = req2.GetBody()
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // Make a request to get the 401 that contains the challenge.
+ resp, err := dt.transport.RoundTrip(req)
+ if err != nil || resp.StatusCode != http.StatusUnauthorized {
+ return resp, err
+ }
+ chal := resp.Header.Get(hdrWwwAuthenticateKey)
+ if chal == "" {
+ return resp, ErrDigestBadChallenge
+ }
+
+ c, err := parseChallenge(chal)
+ if err != nil {
+ return resp, err
+ }
+
+ // Form credentials based on the challenge
+ cr := dt.newCredentials(req2, c)
+ auth, err := cr.authorize()
+ if err != nil {
+ return resp, err
+ }
+ err = resp.Body.Close()
+ if err != nil {
+ return nil, err
+ }
+
+ // Make authenticated request
+ req2.Header.Set(hdrAuthorizationKey, auth)
+ return dt.transport.RoundTrip(req2)
+}
+
+func (dt *digestTransport) newCredentials(req *http.Request, c *challenge) *credentials {
+ return &credentials{
+ username: dt.username,
+ userhash: c.userhash,
+ realm: c.realm,
+ nonce: c.nonce,
+ digestURI: req.URL.RequestURI(),
+ algorithm: c.algorithm,
+ sessionAlg: strings.HasSuffix(c.algorithm, "-sess"),
+ opaque: c.opaque,
+ messageQop: c.qop,
+ nc: 0,
+ method: req.Method,
+ password: dt.password,
+ }
+}
+
+type challenge struct {
+ realm string
+ domain string
+ nonce string
+ opaque string
+ stale string
+ algorithm string
+ qop string
+ userhash string
+}
+
+func (c *challenge) setValue(k, v string) error {
+ switch k {
+ case "realm":
+ c.realm = v
+ case "domain":
+ c.domain = v
+ case "nonce":
+ c.nonce = v
+ case "opaque":
+ c.opaque = v
+ case "stale":
+ c.stale = v
+ case "algorithm":
+ c.algorithm = v
+ case "qop":
+ c.qop = v
+ case "charset":
+ if strings.ToUpper(v) != "UTF-8" {
+ return ErrDigestCharset
+ }
+ case "userhash":
+ c.userhash = v
+ default:
+ return ErrDigestBadChallenge
+ }
+ return nil
+}
+
+func parseChallenge(input string) (*challenge, error) {
+ const ws = " \n\r\t"
+ s := strings.Trim(input, ws)
+ if !strings.HasPrefix(s, "Digest ") {
+ return nil, ErrDigestBadChallenge
+ }
+ s = strings.Trim(s[7:], ws)
+ c := &challenge{}
+ b := strings.Builder{}
+ key := ""
+ quoted := false
+ for _, r := range s {
+ switch r {
+ case '"':
+ quoted = !quoted
+ case ',':
+ if quoted {
+ b.WriteRune(r)
+ } else {
+ val := strings.Trim(b.String(), ws)
+ b.Reset()
+ if err := c.setValue(key, val); err != nil {
+ return nil, err
+ }
+ key = ""
+ }
+ case '=':
+ if quoted {
+ b.WriteRune(r)
+ } else {
+ key = strings.Trim(b.String(), ws)
+ b.Reset()
+ }
+ default:
+ b.WriteRune(r)
+ }
+ }
+ if quoted || (key == "" && b.Len() > 0) {
+ return nil, ErrDigestBadChallenge
+ }
+ if key != "" {
+ val := strings.Trim(b.String(), ws)
+ if err := c.setValue(key, val); err != nil {
+ return nil, err
+ }
+ }
+ return c, nil
+}
+
+type credentials struct {
+ username string
+ userhash string
+ realm string
+ nonce string
+ digestURI string
+ algorithm string
+ sessionAlg bool
+ cNonce string
+ opaque string
+ messageQop string
+ nc int
+ method string
+ password string
+}
+
+func (c *credentials) authorize() (string, error) {
+ if _, ok := hashFuncs[c.algorithm]; !ok {
+ return "", ErrDigestAlgNotSupported
+ }
+
+ if err := c.validateQop(); err != nil {
+ return "", err
+ }
+
+ resp, err := c.resp()
+ if err != nil {
+ return "", err
+ }
+
+ sl := make([]string, 0, 10)
+ if c.userhash == "true" {
+ // RFC 7616 3.4.4
+ c.username = c.h(fmt.Sprintf("%s:%s", c.username, c.realm))
+ sl = append(sl, fmt.Sprintf(`userhash=%s`, c.userhash))
+ }
+ sl = append(sl, fmt.Sprintf(`username="%s"`, c.username))
+ sl = append(sl, fmt.Sprintf(`realm="%s"`, c.realm))
+ sl = append(sl, fmt.Sprintf(`nonce="%s"`, c.nonce))
+ sl = append(sl, fmt.Sprintf(`uri="%s"`, c.digestURI))
+ sl = append(sl, fmt.Sprintf(`response="%s"`, resp))
+ sl = append(sl, fmt.Sprintf(`algorithm=%s`, c.algorithm))
+ if c.opaque != "" {
+ sl = append(sl, fmt.Sprintf(`opaque="%s"`, c.opaque))
+ }
+ if c.messageQop != "" {
+ sl = append(sl, fmt.Sprintf("qop=%s", c.messageQop))
+ sl = append(sl, fmt.Sprintf("nc=%08x", c.nc))
+ sl = append(sl, fmt.Sprintf(`cnonce="%s"`, c.cNonce))
+ }
+
+ return fmt.Sprintf("Digest %s", strings.Join(sl, ", ")), nil
+}
+
+func (c *credentials) validateQop() error {
+ // Currently only supporting auth quality of protection. TODO: add auth-int support
+ // NOTE: cURL support auth-int qop for requests other than POST and PUT (i.e. w/o body) by hashing an empty string
+ // is this applicable for resty? see: https://github.com/curl/curl/blob/307b7543ea1e73ab04e062bdbe4b5bb409eaba3a/lib/vauth/digest.c#L774
+ if c.messageQop == "" {
+ return ErrDigestNoQop
+ }
+ possibleQops := strings.Split(c.messageQop, ",")
+ var authSupport bool
+ for _, qop := range possibleQops {
+ qop = strings.TrimSpace(qop)
+ if qop == "auth" {
+ authSupport = true
+ break
+ }
+ }
+ if !authSupport {
+ return ErrDigestQopNotSupported
+ }
+
+ c.messageQop = "auth"
+
+ return nil
+}
+
+func (c *credentials) h(data string) string {
+ hfCtor := hashFuncs[c.algorithm]
+ hf := hfCtor()
+ _, _ = hf.Write([]byte(data)) // Hash.Write never returns an error
+ return fmt.Sprintf("%x", hf.Sum(nil))
+}
+
+func (c *credentials) resp() (string, error) {
+ c.nc++
+
+ b := make([]byte, 16)
+ _, err := io.ReadFull(rand.Reader, b)
+ if err != nil {
+ return "", err
+ }
+ c.cNonce = fmt.Sprintf("%x", b)[:32]
+
+ ha1 := c.ha1()
+ ha2 := c.ha2()
+
+ return c.kd(ha1, fmt.Sprintf("%s:%08x:%s:%s:%s",
+ c.nonce, c.nc, c.cNonce, c.messageQop, ha2)), nil
+}
+
+func (c *credentials) kd(secret, data string) string {
+ return c.h(fmt.Sprintf("%s:%s", secret, data))
+}
+
+// RFC 7616 3.4.2
+func (c *credentials) ha1() string {
+ ret := c.h(fmt.Sprintf("%s:%s:%s", c.username, c.realm, c.password))
+ if c.sessionAlg {
+ return c.h(fmt.Sprintf("%s:%s:%s", ret, c.nonce, c.cNonce))
+ }
+
+ return ret
+}
+
+// RFC 7616 3.4.3
+func (c *credentials) ha2() string {
+ // currently no auth-int support
+ return c.h(fmt.Sprintf("%s:%s", c.method, c.digestURI))
+}
diff --git a/vendor/github.com/go-resty/resty/v2/middleware.go b/vendor/github.com/go-resty/resty/v2/middleware.go
new file mode 100644
index 00000000..603448df
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/middleware.go
@@ -0,0 +1,589 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "io"
+ "mime/multipart"
+ "net/http"
+ "net/url"
+ "os"
+ "path/filepath"
+ "reflect"
+ "strconv"
+ "strings"
+ "time"
+)
+
+const debugRequestLogKey = "__restyDebugRequestLog"
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Request Middleware(s)
+//_______________________________________________________________________
+
+func parseRequestURL(c *Client, r *Request) error {
+ if l := len(c.PathParams) + len(c.RawPathParams) + len(r.PathParams) + len(r.RawPathParams); l > 0 {
+ params := make(map[string]string, l)
+
+ // GitHub #103 Path Params
+ for p, v := range r.PathParams {
+ params[p] = url.PathEscape(v)
+ }
+ for p, v := range c.PathParams {
+ if _, ok := params[p]; !ok {
+ params[p] = url.PathEscape(v)
+ }
+ }
+
+ // GitHub #663 Raw Path Params
+ for p, v := range r.RawPathParams {
+ if _, ok := params[p]; !ok {
+ params[p] = v
+ }
+ }
+ for p, v := range c.RawPathParams {
+ if _, ok := params[p]; !ok {
+ params[p] = v
+ }
+ }
+
+ if len(params) > 0 {
+ var prev int
+ buf := acquireBuffer()
+ defer releaseBuffer(buf)
+ // search for the next or first opened curly bracket
+ for curr := strings.Index(r.URL, "{"); curr == 0 || curr > prev; curr = prev + strings.Index(r.URL[prev:], "{") {
+ // write everything from the previous position up to the current
+ if curr > prev {
+ buf.WriteString(r.URL[prev:curr])
+ }
+ // search for the closed curly bracket from current position
+ next := curr + strings.Index(r.URL[curr:], "}")
+ // if not found, then write the remainder and exit
+ if next < curr {
+ buf.WriteString(r.URL[curr:])
+ prev = len(r.URL)
+ break
+ }
+ // special case for {}, without parameter's name
+ if next == curr+1 {
+ buf.WriteString("{}")
+ } else {
+ // check for the replacement
+ key := r.URL[curr+1 : next]
+ value, ok := params[key]
+ /// keep the original string if the replacement not found
+ if !ok {
+ value = r.URL[curr : next+1]
+ }
+ buf.WriteString(value)
+ }
+
+ // set the previous position after the closed curly bracket
+ prev = next + 1
+ if prev >= len(r.URL) {
+ break
+ }
+ }
+ if buf.Len() > 0 {
+ // write remainder
+ if prev < len(r.URL) {
+ buf.WriteString(r.URL[prev:])
+ }
+ r.URL = buf.String()
+ }
+ }
+ }
+
+ // Parsing request URL
+ reqURL, err := url.Parse(r.URL)
+ if err != nil {
+ return err
+ }
+
+ // If Request.URL is relative path then added c.HostURL into
+ // the request URL otherwise Request.URL will be used as-is
+ if !reqURL.IsAbs() {
+ r.URL = reqURL.String()
+ if len(r.URL) > 0 && r.URL[0] != '/' {
+ r.URL = "/" + r.URL
+ }
+
+ // TODO: change to use c.BaseURL only in v3.0.0
+ baseURL := c.BaseURL
+ if len(baseURL) == 0 {
+ baseURL = c.HostURL
+ }
+ reqURL, err = url.Parse(baseURL + r.URL)
+ if err != nil {
+ return err
+ }
+ }
+
+ // GH #407 && #318
+ if reqURL.Scheme == "" && len(c.scheme) > 0 {
+ reqURL.Scheme = c.scheme
+ }
+
+ // Adding Query Param
+ if len(c.QueryParam)+len(r.QueryParam) > 0 {
+ for k, v := range c.QueryParam {
+ // skip query parameter if it was set in request
+ if _, ok := r.QueryParam[k]; ok {
+ continue
+ }
+
+ r.QueryParam[k] = v[:]
+ }
+
+ // GitHub #123 Preserve query string order partially.
+ // Since not feasible in `SetQuery*` resty methods, because
+ // standard package `url.Encode(...)` sorts the query params
+ // alphabetically
+ if len(r.QueryParam) > 0 {
+ if IsStringEmpty(reqURL.RawQuery) {
+ reqURL.RawQuery = r.QueryParam.Encode()
+ } else {
+ reqURL.RawQuery = reqURL.RawQuery + "&" + r.QueryParam.Encode()
+ }
+ }
+ }
+
+ r.URL = reqURL.String()
+
+ return nil
+}
+
+func parseRequestHeader(c *Client, r *Request) error {
+ for k, v := range c.Header {
+ if _, ok := r.Header[k]; ok {
+ continue
+ }
+ r.Header[k] = v[:]
+ }
+
+ if IsStringEmpty(r.Header.Get(hdrUserAgentKey)) {
+ r.Header.Set(hdrUserAgentKey, hdrUserAgentValue)
+ }
+
+ if ct := r.Header.Get(hdrContentTypeKey); IsStringEmpty(r.Header.Get(hdrAcceptKey)) && !IsStringEmpty(ct) && (IsJSONType(ct) || IsXMLType(ct)) {
+ r.Header.Set(hdrAcceptKey, r.Header.Get(hdrContentTypeKey))
+ }
+
+ return nil
+}
+
+func parseRequestBody(c *Client, r *Request) error {
+ if isPayloadSupported(r.Method, c.AllowGetMethodPayload) {
+ switch {
+ case r.isMultiPart: // Handling Multipart
+ if err := handleMultipart(c, r); err != nil {
+ return err
+ }
+ case len(c.FormData) > 0 || len(r.FormData) > 0: // Handling Form Data
+ handleFormData(c, r)
+ case r.Body != nil: // Handling Request body
+ handleContentType(c, r)
+
+ if err := handleRequestBody(c, r); err != nil {
+ return err
+ }
+ }
+ }
+
+ // by default resty won't set content length, you can if you want to :)
+ if c.setContentLength || r.setContentLength {
+ if r.bodyBuf == nil {
+ r.Header.Set(hdrContentLengthKey, "0")
+ } else {
+ r.Header.Set(hdrContentLengthKey, strconv.Itoa(r.bodyBuf.Len()))
+ }
+ }
+
+ return nil
+}
+
+func createHTTPRequest(c *Client, r *Request) (err error) {
+ if r.bodyBuf == nil {
+ if reader, ok := r.Body.(io.Reader); ok && isPayloadSupported(r.Method, c.AllowGetMethodPayload) {
+ r.RawRequest, err = http.NewRequest(r.Method, r.URL, reader)
+ } else if c.setContentLength || r.setContentLength {
+ r.RawRequest, err = http.NewRequest(r.Method, r.URL, http.NoBody)
+ } else {
+ r.RawRequest, err = http.NewRequest(r.Method, r.URL, nil)
+ }
+ } else {
+ // fix data race: must deep copy.
+ bodyBuf := bytes.NewBuffer(append([]byte{}, r.bodyBuf.Bytes()...))
+ r.RawRequest, err = http.NewRequest(r.Method, r.URL, bodyBuf)
+ }
+
+ if err != nil {
+ return
+ }
+
+ // Assign close connection option
+ r.RawRequest.Close = c.closeConnection
+
+ // Add headers into http request
+ r.RawRequest.Header = r.Header
+
+ // Add cookies from client instance into http request
+ for _, cookie := range c.Cookies {
+ r.RawRequest.AddCookie(cookie)
+ }
+
+ // Add cookies from request instance into http request
+ for _, cookie := range r.Cookies {
+ r.RawRequest.AddCookie(cookie)
+ }
+
+ // Enable trace
+ if c.trace || r.trace {
+ r.clientTrace = &clientTrace{}
+ r.ctx = r.clientTrace.createContext(r.Context())
+ }
+
+ // Use context if it was specified
+ if r.ctx != nil {
+ r.RawRequest = r.RawRequest.WithContext(r.ctx)
+ }
+
+ bodyCopy, err := getBodyCopy(r)
+ if err != nil {
+ return err
+ }
+
+ // assign get body func for the underlying raw request instance
+ r.RawRequest.GetBody = func() (io.ReadCloser, error) {
+ if bodyCopy != nil {
+ return io.NopCloser(bytes.NewReader(bodyCopy.Bytes())), nil
+ }
+ return nil, nil
+ }
+
+ return
+}
+
+func addCredentials(c *Client, r *Request) error {
+ var isBasicAuth bool
+ // Basic Auth
+ if r.UserInfo != nil { // takes precedence
+ r.RawRequest.SetBasicAuth(r.UserInfo.Username, r.UserInfo.Password)
+ isBasicAuth = true
+ } else if c.UserInfo != nil {
+ r.RawRequest.SetBasicAuth(c.UserInfo.Username, c.UserInfo.Password)
+ isBasicAuth = true
+ }
+
+ if !c.DisableWarn {
+ if isBasicAuth && !strings.HasPrefix(r.URL, "https") {
+ r.log.Warnf("Using Basic Auth in HTTP mode is not secure, use HTTPS")
+ }
+ }
+
+ // Set the Authorization Header Scheme
+ var authScheme string
+ if !IsStringEmpty(r.AuthScheme) {
+ authScheme = r.AuthScheme
+ } else if !IsStringEmpty(c.AuthScheme) {
+ authScheme = c.AuthScheme
+ } else {
+ authScheme = "Bearer"
+ }
+
+ // Build the Token Auth header
+ if !IsStringEmpty(r.Token) { // takes precedence
+ r.RawRequest.Header.Set(c.HeaderAuthorizationKey, authScheme+" "+r.Token)
+ } else if !IsStringEmpty(c.Token) {
+ r.RawRequest.Header.Set(c.HeaderAuthorizationKey, authScheme+" "+c.Token)
+ }
+
+ return nil
+}
+
+func requestLogger(c *Client, r *Request) error {
+ if r.Debug {
+ rr := r.RawRequest
+ rh := copyHeaders(rr.Header)
+ if c.GetClient().Jar != nil {
+ for _, cookie := range c.GetClient().Jar.Cookies(r.RawRequest.URL) {
+ s := fmt.Sprintf("%s=%s", cookie.Name, cookie.Value)
+ if c := rh.Get("Cookie"); c != "" {
+ rh.Set("Cookie", c+"; "+s)
+ } else {
+ rh.Set("Cookie", s)
+ }
+ }
+ }
+ rl := &RequestLog{Header: rh, Body: r.fmtBodyString(c.debugBodySizeLimit)}
+ if c.requestLog != nil {
+ if err := c.requestLog(rl); err != nil {
+ return err
+ }
+ }
+
+ reqLog := "\n==============================================================================\n" +
+ "~~~ REQUEST ~~~\n" +
+ fmt.Sprintf("%s %s %s\n", r.Method, rr.URL.RequestURI(), rr.Proto) +
+ fmt.Sprintf("HOST : %s\n", rr.URL.Host) +
+ fmt.Sprintf("HEADERS:\n%s\n", composeHeaders(c, r, rl.Header)) +
+ fmt.Sprintf("BODY :\n%v\n", rl.Body) +
+ "------------------------------------------------------------------------------\n"
+
+ r.initValuesMap()
+ r.values[debugRequestLogKey] = reqLog
+ }
+
+ return nil
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Response Middleware(s)
+//_______________________________________________________________________
+
+func responseLogger(c *Client, res *Response) error {
+ if res.Request.Debug {
+ rl := &ResponseLog{Header: copyHeaders(res.Header()), Body: res.fmtBodyString(c.debugBodySizeLimit)}
+ if c.responseLog != nil {
+ if err := c.responseLog(rl); err != nil {
+ return err
+ }
+ }
+
+ debugLog := res.Request.values[debugRequestLogKey].(string)
+ debugLog += "~~~ RESPONSE ~~~\n" +
+ fmt.Sprintf("STATUS : %s\n", res.Status()) +
+ fmt.Sprintf("PROTO : %s\n", res.RawResponse.Proto) +
+ fmt.Sprintf("RECEIVED AT : %v\n", res.ReceivedAt().Format(time.RFC3339Nano)) +
+ fmt.Sprintf("TIME DURATION: %v\n", res.Time()) +
+ "HEADERS :\n" +
+ composeHeaders(c, res.Request, rl.Header) + "\n"
+ if res.Request.isSaveResponse {
+ debugLog += "BODY :\n***** RESPONSE WRITTEN INTO FILE *****\n"
+ } else {
+ debugLog += fmt.Sprintf("BODY :\n%v\n", rl.Body)
+ }
+ debugLog += "==============================================================================\n"
+
+ res.Request.log.Debugf("%s", debugLog)
+ }
+
+ return nil
+}
+
+func parseResponseBody(c *Client, res *Response) (err error) {
+ if res.StatusCode() == http.StatusNoContent {
+ res.Request.Error = nil
+ return
+ }
+ // Handles only JSON or XML content type
+ ct := firstNonEmpty(res.Request.forceContentType, res.Header().Get(hdrContentTypeKey), res.Request.fallbackContentType)
+ if IsJSONType(ct) || IsXMLType(ct) {
+ // HTTP status code > 199 and < 300, considered as Result
+ if res.IsSuccess() {
+ res.Request.Error = nil
+ if res.Request.Result != nil {
+ err = Unmarshalc(c, ct, res.body, res.Request.Result)
+ return
+ }
+ }
+
+ // HTTP status code > 399, considered as Error
+ if res.IsError() {
+ // global error interface
+ if res.Request.Error == nil && c.Error != nil {
+ res.Request.Error = reflect.New(c.Error).Interface()
+ }
+
+ if res.Request.Error != nil {
+ unmarshalErr := Unmarshalc(c, ct, res.body, res.Request.Error)
+ if unmarshalErr != nil {
+ c.log.Warnf("Cannot unmarshal response body: %s", unmarshalErr)
+ }
+ }
+ }
+ }
+
+ return
+}
+
+func handleMultipart(c *Client, r *Request) error {
+ r.bodyBuf = acquireBuffer()
+ w := multipart.NewWriter(r.bodyBuf)
+
+ for k, v := range c.FormData {
+ for _, iv := range v {
+ if err := w.WriteField(k, iv); err != nil {
+ return err
+ }
+ }
+ }
+
+ for k, v := range r.FormData {
+ for _, iv := range v {
+ if strings.HasPrefix(k, "@") { // file
+ if err := addFile(w, k[1:], iv); err != nil {
+ return err
+ }
+ } else { // form value
+ if err := w.WriteField(k, iv); err != nil {
+ return err
+ }
+ }
+ }
+ }
+
+ // #21 - adding io.Reader support
+ for _, f := range r.multipartFiles {
+ if err := addFileReader(w, f); err != nil {
+ return err
+ }
+ }
+
+ // GitHub #130 adding multipart field support with content type
+ for _, mf := range r.multipartFields {
+ if err := addMultipartFormField(w, mf); err != nil {
+ return err
+ }
+ }
+
+ r.Header.Set(hdrContentTypeKey, w.FormDataContentType())
+ return w.Close()
+}
+
+func handleFormData(c *Client, r *Request) {
+ for k, v := range c.FormData {
+ if _, ok := r.FormData[k]; ok {
+ continue
+ }
+ r.FormData[k] = v[:]
+ }
+
+ r.bodyBuf = acquireBuffer()
+ r.bodyBuf.WriteString(r.FormData.Encode())
+ r.Header.Set(hdrContentTypeKey, formContentType)
+ r.isFormData = true
+}
+
+func handleContentType(c *Client, r *Request) {
+ contentType := r.Header.Get(hdrContentTypeKey)
+ if IsStringEmpty(contentType) {
+ contentType = DetectContentType(r.Body)
+ r.Header.Set(hdrContentTypeKey, contentType)
+ }
+}
+
+func handleRequestBody(c *Client, r *Request) error {
+ var bodyBytes []byte
+ r.bodyBuf = nil
+
+ switch body := r.Body.(type) {
+ case io.Reader:
+ if c.setContentLength || r.setContentLength { // keep backward compatibility
+ r.bodyBuf = acquireBuffer()
+ if _, err := r.bodyBuf.ReadFrom(body); err != nil {
+ return err
+ }
+ r.Body = nil
+ } else {
+ // Otherwise buffer less processing for `io.Reader`, sounds good.
+ return nil
+ }
+ case []byte:
+ bodyBytes = body
+ case string:
+ bodyBytes = []byte(body)
+ default:
+ contentType := r.Header.Get(hdrContentTypeKey)
+ kind := kindOf(r.Body)
+ var err error
+ if IsJSONType(contentType) && (kind == reflect.Struct || kind == reflect.Map || kind == reflect.Slice) {
+ r.bodyBuf, err = jsonMarshal(c, r, r.Body)
+ } else if IsXMLType(contentType) && (kind == reflect.Struct) {
+ bodyBytes, err = c.XMLMarshal(r.Body)
+ }
+ if err != nil {
+ return err
+ }
+ }
+
+ if bodyBytes == nil && r.bodyBuf == nil {
+ return errors.New("unsupported 'Body' type/value")
+ }
+
+ // []byte into Buffer
+ if bodyBytes != nil && r.bodyBuf == nil {
+ r.bodyBuf = acquireBuffer()
+ _, _ = r.bodyBuf.Write(bodyBytes)
+ }
+
+ return nil
+}
+
+func saveResponseIntoFile(c *Client, res *Response) error {
+ if res.Request.isSaveResponse {
+ file := ""
+
+ if len(c.outputDirectory) > 0 && !filepath.IsAbs(res.Request.outputFile) {
+ file += c.outputDirectory + string(filepath.Separator)
+ }
+
+ file = filepath.Clean(file + res.Request.outputFile)
+ if err := createDirectory(filepath.Dir(file)); err != nil {
+ return err
+ }
+
+ outFile, err := os.Create(file)
+ if err != nil {
+ return err
+ }
+ defer closeq(outFile)
+
+ // io.Copy reads maximum 32kb size, it is perfect for large file download too
+ defer closeq(res.RawResponse.Body)
+
+ written, err := io.Copy(outFile, res.RawResponse.Body)
+ if err != nil {
+ return err
+ }
+
+ res.size = written
+ }
+
+ return nil
+}
+
+func getBodyCopy(r *Request) (*bytes.Buffer, error) {
+ // If r.bodyBuf present, return the copy
+ if r.bodyBuf != nil {
+ bodyCopy := acquireBuffer()
+ if _, err := io.Copy(bodyCopy, bytes.NewReader(r.bodyBuf.Bytes())); err != nil {
+ // cannot use io.Copy(bodyCopy, r.bodyBuf) because io.Copy reset r.bodyBuf
+ return nil, err
+ }
+ return bodyCopy, nil
+ }
+
+ // Maybe body is `io.Reader`.
+ // Note: Resty user have to watchout for large body size of `io.Reader`
+ if r.RawRequest.Body != nil {
+ b, err := io.ReadAll(r.RawRequest.Body)
+ if err != nil {
+ return nil, err
+ }
+
+ // Restore the Body
+ closeq(r.RawRequest.Body)
+ r.RawRequest.Body = io.NopCloser(bytes.NewBuffer(b))
+
+ // Return the Body bytes
+ return bytes.NewBuffer(b), nil
+ }
+ return nil, nil
+}
diff --git a/vendor/github.com/go-resty/resty/v2/redirect.go b/vendor/github.com/go-resty/resty/v2/redirect.go
new file mode 100644
index 00000000..ed58d735
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/redirect.go
@@ -0,0 +1,109 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "errors"
+ "fmt"
+ "net"
+ "net/http"
+ "strings"
+)
+
+var (
+ // Since v2.8.0
+ ErrAutoRedirectDisabled = errors.New("auto redirect is disabled")
+)
+
+type (
+ // RedirectPolicy to regulate the redirects in the resty client.
+ // Objects implementing the RedirectPolicy interface can be registered as
+ //
+ // Apply function should return nil to continue the redirect journey, otherwise
+ // return error to stop the redirect.
+ RedirectPolicy interface {
+ Apply(req *http.Request, via []*http.Request) error
+ }
+
+ // The RedirectPolicyFunc type is an adapter to allow the use of ordinary functions as RedirectPolicy.
+ // If f is a function with the appropriate signature, RedirectPolicyFunc(f) is a RedirectPolicy object that calls f.
+ RedirectPolicyFunc func(*http.Request, []*http.Request) error
+)
+
+// Apply calls f(req, via).
+func (f RedirectPolicyFunc) Apply(req *http.Request, via []*http.Request) error {
+ return f(req, via)
+}
+
+// NoRedirectPolicy is used to disable redirects in the HTTP client
+//
+// resty.SetRedirectPolicy(NoRedirectPolicy())
+func NoRedirectPolicy() RedirectPolicy {
+ return RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error {
+ return ErrAutoRedirectDisabled
+ })
+}
+
+// FlexibleRedirectPolicy is convenient method to create No of redirect policy for HTTP client.
+//
+// resty.SetRedirectPolicy(FlexibleRedirectPolicy(20))
+func FlexibleRedirectPolicy(noOfRedirect int) RedirectPolicy {
+ return RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error {
+ if len(via) >= noOfRedirect {
+ return fmt.Errorf("stopped after %d redirects", noOfRedirect)
+ }
+ checkHostAndAddHeaders(req, via[0])
+ return nil
+ })
+}
+
+// DomainCheckRedirectPolicy is convenient method to define domain name redirect rule in resty client.
+// Redirect is allowed for only mentioned host in the policy.
+//
+// resty.SetRedirectPolicy(DomainCheckRedirectPolicy("host1.com", "host2.org", "host3.net"))
+func DomainCheckRedirectPolicy(hostnames ...string) RedirectPolicy {
+ hosts := make(map[string]bool)
+ for _, h := range hostnames {
+ hosts[strings.ToLower(h)] = true
+ }
+
+ fn := RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error {
+ if ok := hosts[getHostname(req.URL.Host)]; !ok {
+ return errors.New("redirect is not allowed as per DomainCheckRedirectPolicy")
+ }
+
+ return nil
+ })
+
+ return fn
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Package Unexported methods
+//_______________________________________________________________________
+
+func getHostname(host string) (hostname string) {
+ if strings.Index(host, ":") > 0 {
+ host, _, _ = net.SplitHostPort(host)
+ }
+ hostname = strings.ToLower(host)
+ return
+}
+
+// By default Golang will not redirect request headers
+// after go throwing various discussion comments from thread
+// https://github.com/golang/go/issues/4800
+// Resty will add all the headers during a redirect for the same host
+func checkHostAndAddHeaders(cur *http.Request, pre *http.Request) {
+ curHostname := getHostname(cur.URL.Host)
+ preHostname := getHostname(pre.URL.Host)
+ if strings.EqualFold(curHostname, preHostname) {
+ for key, val := range pre.Header {
+ cur.Header[key] = val
+ }
+ } else { // only library User-Agent header is added
+ cur.Header.Set(hdrUserAgentKey, hdrUserAgentValue)
+ }
+}
diff --git a/vendor/github.com/go-resty/resty/v2/request.go b/vendor/github.com/go-resty/resty/v2/request.go
new file mode 100644
index 00000000..4e13ff09
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/request.go
@@ -0,0 +1,1097 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "encoding/xml"
+ "fmt"
+ "io"
+ "net"
+ "net/http"
+ "net/url"
+ "reflect"
+ "strings"
+ "time"
+)
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Request struct and methods
+//_______________________________________________________________________
+
+// Request struct is used to compose and fire individual request from
+// resty client. Request provides an options to override client level
+// settings and also an options for the request composition.
+type Request struct {
+ URL string
+ Method string
+ Token string
+ AuthScheme string
+ QueryParam url.Values
+ FormData url.Values
+ PathParams map[string]string
+ RawPathParams map[string]string
+ Header http.Header
+ Time time.Time
+ Body interface{}
+ Result interface{}
+ Error interface{}
+ RawRequest *http.Request
+ SRV *SRVRecord
+ UserInfo *User
+ Cookies []*http.Cookie
+ Debug bool
+
+ // Attempt is to represent the request attempt made during a Resty
+ // request execution flow, including retry count.
+ //
+ // Since v2.4.0
+ Attempt int
+
+ isMultiPart bool
+ isFormData bool
+ setContentLength bool
+ isSaveResponse bool
+ notParseResponse bool
+ jsonEscapeHTML bool
+ trace bool
+ outputFile string
+ fallbackContentType string
+ forceContentType string
+ ctx context.Context
+ values map[string]interface{}
+ client *Client
+ bodyBuf *bytes.Buffer
+ clientTrace *clientTrace
+ log Logger
+ multipartFiles []*File
+ multipartFields []*MultipartField
+ retryConditions []RetryConditionFunc
+}
+
+// Context method returns the Context if its already set in request
+// otherwise it creates new one using `context.Background()`.
+func (r *Request) Context() context.Context {
+ if r.ctx == nil {
+ return context.Background()
+ }
+ return r.ctx
+}
+
+// SetContext method sets the context.Context for current Request. It allows
+// to interrupt the request execution if ctx.Done() channel is closed.
+// See https://blog.golang.org/context article and the "context" package
+// documentation.
+func (r *Request) SetContext(ctx context.Context) *Request {
+ r.ctx = ctx
+ return r
+}
+
+// SetHeader method is to set a single header field and its value in the current request.
+//
+// For Example: To set `Content-Type` and `Accept` as `application/json`.
+//
+// client.R().
+// SetHeader("Content-Type", "application/json").
+// SetHeader("Accept", "application/json")
+//
+// Also you can override header value, which was set at client instance level.
+func (r *Request) SetHeader(header, value string) *Request {
+ r.Header.Set(header, value)
+ return r
+}
+
+// SetHeaders method sets multiple headers field and its values at one go in the current request.
+//
+// For Example: To set `Content-Type` and `Accept` as `application/json`
+//
+// client.R().
+// SetHeaders(map[string]string{
+// "Content-Type": "application/json",
+// "Accept": "application/json",
+// })
+//
+// Also you can override header value, which was set at client instance level.
+func (r *Request) SetHeaders(headers map[string]string) *Request {
+ for h, v := range headers {
+ r.SetHeader(h, v)
+ }
+ return r
+}
+
+// SetHeaderMultiValues sets multiple headers fields and its values is list of strings at one go in the current request.
+//
+// For Example: To set `Accept` as `text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8`
+//
+// client.R().
+// SetHeaderMultiValues(map[string][]string{
+// "Accept": []string{"text/html", "application/xhtml+xml", "application/xml;q=0.9", "image/webp", "*/*;q=0.8"},
+// })
+//
+// Also you can override header value, which was set at client instance level.
+func (r *Request) SetHeaderMultiValues(headers map[string][]string) *Request {
+ for key, values := range headers {
+ r.SetHeader(key, strings.Join(values, ", "))
+ }
+ return r
+}
+
+// SetHeaderVerbatim method is to set a single header field and its value verbatim in the current request.
+//
+// For Example: To set `all_lowercase` and `UPPERCASE` as `available`.
+//
+// client.R().
+// SetHeaderVerbatim("all_lowercase", "available").
+// SetHeaderVerbatim("UPPERCASE", "available")
+//
+// Also you can override header value, which was set at client instance level.
+//
+// Since v2.6.0
+func (r *Request) SetHeaderVerbatim(header, value string) *Request {
+ r.Header[header] = []string{value}
+ return r
+}
+
+// SetQueryParam method sets single parameter and its value in the current request.
+// It will be formed as query string for the request.
+//
+// For Example: `search=kitchen%20papers&size=large` in the URL after `?` mark.
+//
+// client.R().
+// SetQueryParam("search", "kitchen papers").
+// SetQueryParam("size", "large")
+//
+// Also you can override query params value, which was set at client instance level.
+func (r *Request) SetQueryParam(param, value string) *Request {
+ r.QueryParam.Set(param, value)
+ return r
+}
+
+// SetQueryParams method sets multiple parameters and its values at one go in the current request.
+// It will be formed as query string for the request.
+//
+// For Example: `search=kitchen%20papers&size=large` in the URL after `?` mark.
+//
+// client.R().
+// SetQueryParams(map[string]string{
+// "search": "kitchen papers",
+// "size": "large",
+// })
+//
+// Also you can override query params value, which was set at client instance level.
+func (r *Request) SetQueryParams(params map[string]string) *Request {
+ for p, v := range params {
+ r.SetQueryParam(p, v)
+ }
+ return r
+}
+
+// SetQueryParamsFromValues method appends multiple parameters with multi-value
+// (`url.Values`) at one go in the current request. It will be formed as
+// query string for the request.
+//
+// For Example: `status=pending&status=approved&status=open` in the URL after `?` mark.
+//
+// client.R().
+// SetQueryParamsFromValues(url.Values{
+// "status": []string{"pending", "approved", "open"},
+// })
+//
+// Also you can override query params value, which was set at client instance level.
+func (r *Request) SetQueryParamsFromValues(params url.Values) *Request {
+ for p, v := range params {
+ for _, pv := range v {
+ r.QueryParam.Add(p, pv)
+ }
+ }
+ return r
+}
+
+// SetQueryString method provides ability to use string as an input to set URL query string for the request.
+//
+// Using String as an input
+//
+// client.R().
+// SetQueryString("productId=232&template=fresh-sample&cat=resty&source=google&kw=buy a lot more")
+func (r *Request) SetQueryString(query string) *Request {
+ params, err := url.ParseQuery(strings.TrimSpace(query))
+ if err == nil {
+ for p, v := range params {
+ for _, pv := range v {
+ r.QueryParam.Add(p, pv)
+ }
+ }
+ } else {
+ r.log.Errorf("%v", err)
+ }
+ return r
+}
+
+// SetFormData method sets Form parameters and their values in the current request.
+// It's applicable only HTTP method `POST` and `PUT` and requests content type would be set as
+// `application/x-www-form-urlencoded`.
+//
+// client.R().
+// SetFormData(map[string]string{
+// "access_token": "BC594900-518B-4F7E-AC75-BD37F019E08F",
+// "user_id": "3455454545",
+// })
+//
+// Also you can override form data value, which was set at client instance level.
+func (r *Request) SetFormData(data map[string]string) *Request {
+ for k, v := range data {
+ r.FormData.Set(k, v)
+ }
+ return r
+}
+
+// SetFormDataFromValues method appends multiple form parameters with multi-value
+// (`url.Values`) at one go in the current request.
+//
+// client.R().
+// SetFormDataFromValues(url.Values{
+// "search_criteria": []string{"book", "glass", "pencil"},
+// })
+//
+// Also you can override form data value, which was set at client instance level.
+func (r *Request) SetFormDataFromValues(data url.Values) *Request {
+ for k, v := range data {
+ for _, kv := range v {
+ r.FormData.Add(k, kv)
+ }
+ }
+ return r
+}
+
+// SetBody method sets the request body for the request. It supports various realtime needs as easy.
+// We can say its quite handy or powerful. Supported request body data types is `string`,
+// `[]byte`, `struct`, `map`, `slice` and `io.Reader`. Body value can be pointer or non-pointer.
+// Automatic marshalling for JSON and XML content type, if it is `struct`, `map`, or `slice`.
+//
+// Note: `io.Reader` is processed as bufferless mode while sending request.
+//
+// For Example: Struct as a body input, based on content type, it will be marshalled.
+//
+// client.R().
+// SetBody(User{
+// Username: "jeeva@myjeeva.com",
+// Password: "welcome2resty",
+// })
+//
+// Map as a body input, based on content type, it will be marshalled.
+//
+// client.R().
+// SetBody(map[string]interface{}{
+// "username": "jeeva@myjeeva.com",
+// "password": "welcome2resty",
+// "address": &Address{
+// Address1: "1111 This is my street",
+// Address2: "Apt 201",
+// City: "My City",
+// State: "My State",
+// ZipCode: 00000,
+// },
+// })
+//
+// String as a body input. Suitable for any need as a string input.
+//
+// client.R().
+// SetBody(`{
+// "username": "jeeva@getrightcare.com",
+// "password": "admin"
+// }`)
+//
+// []byte as a body input. Suitable for raw request such as file upload, serialize & deserialize, etc.
+//
+// client.R().
+// SetBody([]byte("This is my raw request, sent as-is"))
+func (r *Request) SetBody(body interface{}) *Request {
+ r.Body = body
+ return r
+}
+
+// SetResult method is to register the response `Result` object for automatic unmarshalling for the request,
+// if response status code is between 200 and 299 and content type either JSON or XML.
+//
+// Note: Result object can be pointer or non-pointer.
+//
+// client.R().SetResult(&AuthToken{})
+// // OR
+// client.R().SetResult(AuthToken{})
+//
+// Accessing a result value from response instance.
+//
+// response.Result().(*AuthToken)
+func (r *Request) SetResult(res interface{}) *Request {
+ if res != nil {
+ r.Result = getPointer(res)
+ }
+ return r
+}
+
+// SetError method is to register the request `Error` object for automatic unmarshalling for the request,
+// if response status code is greater than 399 and content type either JSON or XML.
+//
+// Note: Error object can be pointer or non-pointer.
+//
+// client.R().SetError(&AuthError{})
+// // OR
+// client.R().SetError(AuthError{})
+//
+// Accessing a error value from response instance.
+//
+// response.Error().(*AuthError)
+func (r *Request) SetError(err interface{}) *Request {
+ r.Error = getPointer(err)
+ return r
+}
+
+// SetFile method is to set single file field name and its path for multipart upload.
+//
+// client.R().
+// SetFile("my_file", "/Users/jeeva/Gas Bill - Sep.pdf")
+func (r *Request) SetFile(param, filePath string) *Request {
+ r.isMultiPart = true
+ r.FormData.Set("@"+param, filePath)
+ return r
+}
+
+// SetFiles method is to set multiple file field name and its path for multipart upload.
+//
+// client.R().
+// SetFiles(map[string]string{
+// "my_file1": "/Users/jeeva/Gas Bill - Sep.pdf",
+// "my_file2": "/Users/jeeva/Electricity Bill - Sep.pdf",
+// "my_file3": "/Users/jeeva/Water Bill - Sep.pdf",
+// })
+func (r *Request) SetFiles(files map[string]string) *Request {
+ r.isMultiPart = true
+ for f, fp := range files {
+ r.FormData.Set("@"+f, fp)
+ }
+ return r
+}
+
+// SetFileReader method is to set single file using io.Reader for multipart upload.
+//
+// client.R().
+// SetFileReader("profile_img", "my-profile-img.png", bytes.NewReader(profileImgBytes)).
+// SetFileReader("notes", "user-notes.txt", bytes.NewReader(notesBytes))
+func (r *Request) SetFileReader(param, fileName string, reader io.Reader) *Request {
+ r.isMultiPart = true
+ r.multipartFiles = append(r.multipartFiles, &File{
+ Name: fileName,
+ ParamName: param,
+ Reader: reader,
+ })
+ return r
+}
+
+// SetMultipartFormData method allows simple form data to be attached to the request as `multipart:form-data`
+func (r *Request) SetMultipartFormData(data map[string]string) *Request {
+ for k, v := range data {
+ r = r.SetMultipartField(k, "", "", strings.NewReader(v))
+ }
+
+ return r
+}
+
+// SetMultipartField method is to set custom data using io.Reader for multipart upload.
+func (r *Request) SetMultipartField(param, fileName, contentType string, reader io.Reader) *Request {
+ r.isMultiPart = true
+ r.multipartFields = append(r.multipartFields, &MultipartField{
+ Param: param,
+ FileName: fileName,
+ ContentType: contentType,
+ Reader: reader,
+ })
+ return r
+}
+
+// SetMultipartFields method is to set multiple data fields using io.Reader for multipart upload.
+//
+// For Example:
+//
+// client.R().SetMultipartFields(
+// &resty.MultipartField{
+// Param: "uploadManifest1",
+// FileName: "upload-file-1.json",
+// ContentType: "application/json",
+// Reader: strings.NewReader(`{"input": {"name": "Uploaded document 1", "_filename" : ["file1.txt"]}}`),
+// },
+// &resty.MultipartField{
+// Param: "uploadManifest2",
+// FileName: "upload-file-2.json",
+// ContentType: "application/json",
+// Reader: strings.NewReader(`{"input": {"name": "Uploaded document 2", "_filename" : ["file2.txt"]}}`),
+// })
+//
+// If you have slice already, then simply call-
+//
+// client.R().SetMultipartFields(fields...)
+func (r *Request) SetMultipartFields(fields ...*MultipartField) *Request {
+ r.isMultiPart = true
+ r.multipartFields = append(r.multipartFields, fields...)
+ return r
+}
+
+// SetContentLength method sets the HTTP header `Content-Length` value for current request.
+// By default Resty won't set `Content-Length`. Also you have an option to enable for every
+// request.
+//
+// See `Client.SetContentLength`
+//
+// client.R().SetContentLength(true)
+func (r *Request) SetContentLength(l bool) *Request {
+ r.setContentLength = l
+ return r
+}
+
+// SetBasicAuth method sets the basic authentication header in the current HTTP request.
+//
+// For Example:
+//
+// Authorization: Basic
+//
+// To set the header for username "go-resty" and password "welcome"
+//
+// client.R().SetBasicAuth("go-resty", "welcome")
+//
+// This method overrides the credentials set by method `Client.SetBasicAuth`.
+func (r *Request) SetBasicAuth(username, password string) *Request {
+ r.UserInfo = &User{Username: username, Password: password}
+ return r
+}
+
+// SetAuthToken method sets the auth token header(Default Scheme: Bearer) in the current HTTP request. Header example:
+//
+// Authorization: Bearer
+//
+// For Example: To set auth token BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F
+//
+// client.R().SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F")
+//
+// This method overrides the Auth token set by method `Client.SetAuthToken`.
+func (r *Request) SetAuthToken(token string) *Request {
+ r.Token = token
+ return r
+}
+
+// SetAuthScheme method sets the auth token scheme type in the HTTP request. For Example:
+//
+// Authorization:
+//
+// For Example: To set the scheme to use OAuth
+//
+// client.R().SetAuthScheme("OAuth")
+//
+// This auth header scheme gets added to all the request raised from this client instance.
+// Also it can be overridden or set one at the request level is supported.
+//
+// Information about Auth schemes can be found in RFC7235 which is linked to below along with the page containing
+// the currently defined official authentication schemes:
+//
+// https://tools.ietf.org/html/rfc7235
+// https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml#authschemes
+//
+// This method overrides the Authorization scheme set by method `Client.SetAuthScheme`.
+func (r *Request) SetAuthScheme(scheme string) *Request {
+ r.AuthScheme = scheme
+ return r
+}
+
+// SetDigestAuth method sets the Digest Access auth scheme for the HTTP request. If a server responds with 401 and sends
+// a Digest challenge in the WWW-Authenticate Header, the request will be resent with the appropriate Authorization Header.
+//
+// For Example: To set the Digest scheme with username "Mufasa" and password "Circle Of Life"
+//
+// client.R().SetDigestAuth("Mufasa", "Circle Of Life")
+//
+// Information about Digest Access Authentication can be found in RFC7616:
+//
+// https://datatracker.ietf.org/doc/html/rfc7616
+//
+// This method overrides the username and password set by method `Client.SetDigestAuth`.
+func (r *Request) SetDigestAuth(username, password string) *Request {
+ oldTransport := r.client.httpClient.Transport
+ r.client.OnBeforeRequest(func(c *Client, _ *Request) error {
+ c.httpClient.Transport = &digestTransport{
+ digestCredentials: digestCredentials{username, password},
+ transport: oldTransport,
+ }
+ return nil
+ })
+ r.client.OnAfterResponse(func(c *Client, _ *Response) error {
+ c.httpClient.Transport = oldTransport
+ return nil
+ })
+
+ return r
+}
+
+// SetOutput method sets the output file for current HTTP request. Current HTTP response will be
+// saved into given file. It is similar to `curl -o` flag. Absolute path or relative path can be used.
+// If is it relative path then output file goes under the output directory, as mentioned
+// in the `Client.SetOutputDirectory`.
+//
+// client.R().
+// SetOutput("/Users/jeeva/Downloads/ReplyWithHeader-v5.1-beta.zip").
+// Get("http://bit.ly/1LouEKr")
+//
+// Note: In this scenario `Response.Body` might be nil.
+func (r *Request) SetOutput(file string) *Request {
+ r.outputFile = file
+ r.isSaveResponse = true
+ return r
+}
+
+// SetSRV method sets the details to query the service SRV record and execute the
+// request.
+//
+// client.R().
+// SetSRV(SRVRecord{"web", "testservice.com"}).
+// Get("/get")
+func (r *Request) SetSRV(srv *SRVRecord) *Request {
+ r.SRV = srv
+ return r
+}
+
+// SetDoNotParseResponse method instructs `Resty` not to parse the response body automatically.
+// Resty exposes the raw response body as `io.ReadCloser`. Also do not forget to close the body,
+// otherwise you might get into connection leaks, no connection reuse.
+//
+// Note: Response middlewares are not applicable, if you use this option. Basically you have
+// taken over the control of response parsing from `Resty`.
+func (r *Request) SetDoNotParseResponse(parse bool) *Request {
+ r.notParseResponse = parse
+ return r
+}
+
+// SetPathParam method sets single URL path key-value pair in the
+// Resty current request instance.
+//
+// client.R().SetPathParam("userId", "sample@sample.com")
+//
+// Result:
+// URL - /v1/users/{userId}/details
+// Composed URL - /v1/users/sample@sample.com/details
+//
+// client.R().SetPathParam("path", "groups/developers")
+//
+// Result:
+// URL - /v1/users/{userId}/details
+// Composed URL - /v1/users/groups%2Fdevelopers/details
+//
+// It replaces the value of the key while composing the request URL.
+// The values will be escaped using `url.PathEscape` function.
+//
+// Also you can override Path Params value, which was set at client instance
+// level.
+func (r *Request) SetPathParam(param, value string) *Request {
+ r.PathParams[param] = value
+ return r
+}
+
+// SetPathParams method sets multiple URL path key-value pairs at one go in the
+// Resty current request instance.
+//
+// client.R().SetPathParams(map[string]string{
+// "userId": "sample@sample.com",
+// "subAccountId": "100002",
+// "path": "groups/developers",
+// })
+//
+// Result:
+// URL - /v1/users/{userId}/{subAccountId}/{path}/details
+// Composed URL - /v1/users/sample@sample.com/100002/groups%2Fdevelopers/details
+//
+// It replaces the value of the key while composing request URL.
+// The value will be used as it is and will not be escaped.
+//
+// Also you can override Path Params value, which was set at client instance
+// level.
+func (r *Request) SetPathParams(params map[string]string) *Request {
+ for p, v := range params {
+ r.SetPathParam(p, v)
+ }
+ return r
+}
+
+// SetRawPathParam method sets single URL path key-value pair in the
+// Resty current request instance.
+//
+// client.R().SetPathParam("userId", "sample@sample.com")
+//
+// Result:
+// URL - /v1/users/{userId}/details
+// Composed URL - /v1/users/sample@sample.com/details
+//
+// client.R().SetPathParam("path", "groups/developers")
+//
+// Result:
+// URL - /v1/users/{userId}/details
+// Composed URL - /v1/users/groups/developers/details
+//
+// It replaces the value of the key while composing the request URL.
+// The value will be used as it is and will not be escaped.
+//
+// Also you can override Path Params value, which was set at client instance
+// level.
+//
+// Since v2.8.0
+func (r *Request) SetRawPathParam(param, value string) *Request {
+ r.RawPathParams[param] = value
+ return r
+}
+
+// SetRawPathParams method sets multiple URL path key-value pairs at one go in the
+// Resty current request instance.
+//
+// client.R().SetPathParams(map[string]string{
+// "userId": "sample@sample.com",
+// "subAccountId": "100002",
+// "path": "groups/developers",
+// })
+//
+// Result:
+// URL - /v1/users/{userId}/{subAccountId}/{path}/details
+// Composed URL - /v1/users/sample@sample.com/100002/groups/developers/details
+//
+// It replaces the value of the key while composing request URL.
+// The values will be used as they are and will not be escaped.
+//
+// Also you can override Path Params value, which was set at client instance
+// level.
+//
+// Since v2.8.0
+func (r *Request) SetRawPathParams(params map[string]string) *Request {
+ for p, v := range params {
+ r.SetRawPathParam(p, v)
+ }
+ return r
+}
+
+// ExpectContentType method allows to provide fallback `Content-Type` for automatic unmarshalling
+// when `Content-Type` response header is unavailable.
+func (r *Request) ExpectContentType(contentType string) *Request {
+ r.fallbackContentType = contentType
+ return r
+}
+
+// ForceContentType method provides a strong sense of response `Content-Type` for automatic unmarshalling.
+// Resty gives this a higher priority than the `Content-Type` response header. This means that if both
+// `Request.ForceContentType` is set and the response `Content-Type` is available, `ForceContentType` will win.
+func (r *Request) ForceContentType(contentType string) *Request {
+ r.forceContentType = contentType
+ return r
+}
+
+// SetJSONEscapeHTML method is to enable/disable the HTML escape on JSON marshal.
+//
+// Note: This option only applicable to standard JSON Marshaller.
+func (r *Request) SetJSONEscapeHTML(b bool) *Request {
+ r.jsonEscapeHTML = b
+ return r
+}
+
+// SetCookie method appends a single cookie in the current request instance.
+//
+// client.R().SetCookie(&http.Cookie{
+// Name:"go-resty",
+// Value:"This is cookie value",
+// })
+//
+// Note: Method appends the Cookie value into existing Cookie if already existing.
+//
+// Since v2.1.0
+func (r *Request) SetCookie(hc *http.Cookie) *Request {
+ r.Cookies = append(r.Cookies, hc)
+ return r
+}
+
+// SetCookies method sets an array of cookies in the current request instance.
+//
+// cookies := []*http.Cookie{
+// &http.Cookie{
+// Name:"go-resty-1",
+// Value:"This is cookie 1 value",
+// },
+// &http.Cookie{
+// Name:"go-resty-2",
+// Value:"This is cookie 2 value",
+// },
+// }
+//
+// // Setting a cookies into resty's current request
+// client.R().SetCookies(cookies)
+//
+// Note: Method appends the Cookie value into existing Cookie if already existing.
+//
+// Since v2.1.0
+func (r *Request) SetCookies(rs []*http.Cookie) *Request {
+ r.Cookies = append(r.Cookies, rs...)
+ return r
+}
+
+// SetLogger method sets given writer for logging Resty request and response details.
+// By default, requests and responses inherit their logger from the client.
+//
+// Compliant to interface `resty.Logger`.
+func (r *Request) SetLogger(l Logger) *Request {
+ r.log = l
+ return r
+}
+
+// SetDebug method enables the debug mode on current request Resty request, It logs
+// the details current request and response.
+// For `Request` it logs information such as HTTP verb, Relative URL path, Host, Headers, Body if it has one.
+// For `Response` it logs information such as Status, Response Time, Headers, Body if it has one.
+//
+// client.R().SetDebug(true)
+func (r *Request) SetDebug(d bool) *Request {
+ r.Debug = d
+ return r
+}
+
+// AddRetryCondition method adds a retry condition function to the request's
+// array of functions that are checked to determine if the request is retried.
+// The request will retry if any of the functions return true and error is nil.
+//
+// Note: These retry conditions are checked before all retry conditions of the client.
+//
+// Since v2.7.0
+func (r *Request) AddRetryCondition(condition RetryConditionFunc) *Request {
+ r.retryConditions = append(r.retryConditions, condition)
+ return r
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// HTTP request tracing
+//_______________________________________________________________________
+
+// EnableTrace method enables trace for the current request
+// using `httptrace.ClientTrace` and provides insights.
+//
+// client := resty.New()
+//
+// resp, err := client.R().EnableTrace().Get("https://httpbin.org/get")
+// fmt.Println("Error:", err)
+// fmt.Println("Trace Info:", resp.Request.TraceInfo())
+//
+// See `Client.EnableTrace` available too to get trace info for all requests.
+//
+// Since v2.0.0
+func (r *Request) EnableTrace() *Request {
+ r.trace = true
+ return r
+}
+
+// TraceInfo method returns the trace info for the request.
+// If either the Client or Request EnableTrace function has not been called
+// prior to the request being made, an empty TraceInfo object will be returned.
+//
+// Since v2.0.0
+func (r *Request) TraceInfo() TraceInfo {
+ ct := r.clientTrace
+
+ if ct == nil {
+ return TraceInfo{}
+ }
+
+ ti := TraceInfo{
+ DNSLookup: ct.dnsDone.Sub(ct.dnsStart),
+ TLSHandshake: ct.tlsHandshakeDone.Sub(ct.tlsHandshakeStart),
+ ServerTime: ct.gotFirstResponseByte.Sub(ct.gotConn),
+ IsConnReused: ct.gotConnInfo.Reused,
+ IsConnWasIdle: ct.gotConnInfo.WasIdle,
+ ConnIdleTime: ct.gotConnInfo.IdleTime,
+ RequestAttempt: r.Attempt,
+ }
+
+ // Calculate the total time accordingly,
+ // when connection is reused
+ if ct.gotConnInfo.Reused {
+ ti.TotalTime = ct.endTime.Sub(ct.getConn)
+ } else {
+ ti.TotalTime = ct.endTime.Sub(ct.dnsStart)
+ }
+
+ // Only calculate on successful connections
+ if !ct.connectDone.IsZero() {
+ ti.TCPConnTime = ct.connectDone.Sub(ct.dnsDone)
+ }
+
+ // Only calculate on successful connections
+ if !ct.gotConn.IsZero() {
+ ti.ConnTime = ct.gotConn.Sub(ct.getConn)
+ }
+
+ // Only calculate on successful connections
+ if !ct.gotFirstResponseByte.IsZero() {
+ ti.ResponseTime = ct.endTime.Sub(ct.gotFirstResponseByte)
+ }
+
+ // Capture remote address info when connection is non-nil
+ if ct.gotConnInfo.Conn != nil {
+ ti.RemoteAddr = ct.gotConnInfo.Conn.RemoteAddr()
+ }
+
+ return ti
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// HTTP verb method starts here
+//_______________________________________________________________________
+
+// Get method does GET HTTP request. It's defined in section 4.3.1 of RFC7231.
+func (r *Request) Get(url string) (*Response, error) {
+ return r.Execute(MethodGet, url)
+}
+
+// Head method does HEAD HTTP request. It's defined in section 4.3.2 of RFC7231.
+func (r *Request) Head(url string) (*Response, error) {
+ return r.Execute(MethodHead, url)
+}
+
+// Post method does POST HTTP request. It's defined in section 4.3.3 of RFC7231.
+func (r *Request) Post(url string) (*Response, error) {
+ return r.Execute(MethodPost, url)
+}
+
+// Put method does PUT HTTP request. It's defined in section 4.3.4 of RFC7231.
+func (r *Request) Put(url string) (*Response, error) {
+ return r.Execute(MethodPut, url)
+}
+
+// Delete method does DELETE HTTP request. It's defined in section 4.3.5 of RFC7231.
+func (r *Request) Delete(url string) (*Response, error) {
+ return r.Execute(MethodDelete, url)
+}
+
+// Options method does OPTIONS HTTP request. It's defined in section 4.3.7 of RFC7231.
+func (r *Request) Options(url string) (*Response, error) {
+ return r.Execute(MethodOptions, url)
+}
+
+// Patch method does PATCH HTTP request. It's defined in section 2 of RFC5789.
+func (r *Request) Patch(url string) (*Response, error) {
+ return r.Execute(MethodPatch, url)
+}
+
+// Send method performs the HTTP request using the method and URL already defined
+// for current `Request`.
+//
+// req := client.R()
+// req.Method = resty.GET
+// req.URL = "http://httpbin.org/get"
+// resp, err := req.Send()
+func (r *Request) Send() (*Response, error) {
+ return r.Execute(r.Method, r.URL)
+}
+
+// Execute method performs the HTTP request with given HTTP method and URL
+// for current `Request`.
+//
+// resp, err := client.R().Execute(resty.GET, "http://httpbin.org/get")
+func (r *Request) Execute(method, url string) (*Response, error) {
+ var addrs []*net.SRV
+ var resp *Response
+ var err error
+
+ defer func() {
+ if rec := recover(); rec != nil {
+ if err, ok := rec.(error); ok {
+ r.client.onPanicHooks(r, err)
+ } else {
+ r.client.onPanicHooks(r, fmt.Errorf("panic %v", rec))
+ }
+ panic(rec)
+ }
+ }()
+
+ if r.isMultiPart && !(method == MethodPost || method == MethodPut || method == MethodPatch) {
+ // No OnError hook here since this is a request validation error
+ err := fmt.Errorf("multipart content is not allowed in HTTP verb [%v]", method)
+ r.client.onInvalidHooks(r, err)
+ return nil, err
+ }
+
+ if r.SRV != nil {
+ _, addrs, err = net.LookupSRV(r.SRV.Service, "tcp", r.SRV.Domain)
+ if err != nil {
+ r.client.onErrorHooks(r, nil, err)
+ return nil, err
+ }
+ }
+
+ r.Method = method
+ r.URL = r.selectAddr(addrs, url, 0)
+
+ if r.client.RetryCount == 0 {
+ r.Attempt = 1
+ resp, err = r.client.execute(r)
+ r.client.onErrorHooks(r, resp, unwrapNoRetryErr(err))
+ return resp, unwrapNoRetryErr(err)
+ }
+
+ err = Backoff(
+ func() (*Response, error) {
+ r.Attempt++
+
+ r.URL = r.selectAddr(addrs, url, r.Attempt)
+
+ resp, err = r.client.execute(r)
+ if err != nil {
+ r.log.Warnf("%v, Attempt %v", err, r.Attempt)
+ }
+
+ return resp, err
+ },
+ Retries(r.client.RetryCount),
+ WaitTime(r.client.RetryWaitTime),
+ MaxWaitTime(r.client.RetryMaxWaitTime),
+ RetryConditions(append(r.retryConditions, r.client.RetryConditions...)),
+ RetryHooks(r.client.RetryHooks),
+ ResetMultipartReaders(r.client.RetryResetReaders),
+ )
+
+ if err != nil {
+ r.log.Errorf("%v", err)
+ }
+
+ r.client.onErrorHooks(r, resp, unwrapNoRetryErr(err))
+ return resp, unwrapNoRetryErr(err)
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// SRVRecord struct
+//_______________________________________________________________________
+
+// SRVRecord struct holds the data to query the SRV record for the
+// following service.
+type SRVRecord struct {
+ Service string
+ Domain string
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Request Unexported methods
+//_______________________________________________________________________
+
+func (r *Request) fmtBodyString(sl int64) (body string) {
+ body = "***** NO CONTENT *****"
+ if !isPayloadSupported(r.Method, r.client.AllowGetMethodPayload) {
+ return
+ }
+
+ if _, ok := r.Body.(io.Reader); ok {
+ body = "***** BODY IS io.Reader *****"
+ return
+ }
+
+ // multipart or form-data
+ if r.isMultiPart || r.isFormData {
+ bodySize := int64(r.bodyBuf.Len())
+ if bodySize > sl {
+ body = fmt.Sprintf("***** REQUEST TOO LARGE (size - %d) *****", bodySize)
+ return
+ }
+ body = r.bodyBuf.String()
+ return
+ }
+
+ // request body data
+ if r.Body == nil {
+ return
+ }
+ var prtBodyBytes []byte
+ var err error
+
+ contentType := r.Header.Get(hdrContentTypeKey)
+ kind := kindOf(r.Body)
+ if canJSONMarshal(contentType, kind) {
+ var bodyBuf *bytes.Buffer
+ bodyBuf, err = noescapeJSONMarshalIndent(&r.Body)
+ if err == nil {
+ prtBodyBytes = bodyBuf.Bytes()
+ defer releaseBuffer(bodyBuf)
+ }
+ } else if IsXMLType(contentType) && (kind == reflect.Struct) {
+ prtBodyBytes, err = xml.MarshalIndent(&r.Body, "", " ")
+ } else if b, ok := r.Body.(string); ok {
+ if IsJSONType(contentType) {
+ bodyBytes := []byte(b)
+ out := acquireBuffer()
+ defer releaseBuffer(out)
+ if err = json.Indent(out, bodyBytes, "", " "); err == nil {
+ prtBodyBytes = out.Bytes()
+ }
+ } else {
+ body = b
+ }
+ } else if b, ok := r.Body.([]byte); ok {
+ body = fmt.Sprintf("***** BODY IS byte(s) (size - %d) *****", len(b))
+ return
+ }
+
+ if prtBodyBytes != nil && err == nil {
+ body = string(prtBodyBytes)
+ }
+
+ if len(body) > 0 {
+ bodySize := int64(len([]byte(body)))
+ if bodySize > sl {
+ body = fmt.Sprintf("***** REQUEST TOO LARGE (size - %d) *****", bodySize)
+ }
+ }
+
+ return
+}
+
+func (r *Request) selectAddr(addrs []*net.SRV, path string, attempt int) string {
+ if addrs == nil {
+ return path
+ }
+
+ idx := attempt % len(addrs)
+ domain := strings.TrimRight(addrs[idx].Target, ".")
+ path = strings.TrimLeft(path, "/")
+
+ return fmt.Sprintf("%s://%s:%d/%s", r.client.scheme, domain, addrs[idx].Port, path)
+}
+
+func (r *Request) initValuesMap() {
+ if r.values == nil {
+ r.values = make(map[string]interface{})
+ }
+}
+
+var noescapeJSONMarshal = func(v interface{}) (*bytes.Buffer, error) {
+ buf := acquireBuffer()
+ encoder := json.NewEncoder(buf)
+ encoder.SetEscapeHTML(false)
+ if err := encoder.Encode(v); err != nil {
+ releaseBuffer(buf)
+ return nil, err
+ }
+
+ return buf, nil
+}
+
+var noescapeJSONMarshalIndent = func(v interface{}) (*bytes.Buffer, error) {
+ buf := acquireBuffer()
+ encoder := json.NewEncoder(buf)
+ encoder.SetEscapeHTML(false)
+ encoder.SetIndent("", " ")
+
+ if err := encoder.Encode(v); err != nil {
+ releaseBuffer(buf)
+ return nil, err
+ }
+
+ return buf, nil
+}
diff --git a/vendor/github.com/go-resty/resty/v2/response.go b/vendor/github.com/go-resty/resty/v2/response.go
new file mode 100644
index 00000000..63c95c41
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/response.go
@@ -0,0 +1,189 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "encoding/json"
+ "fmt"
+ "io"
+ "net/http"
+ "strings"
+ "time"
+)
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Response struct and methods
+//_______________________________________________________________________
+
+// Response struct holds response values of executed request.
+type Response struct {
+ Request *Request
+ RawResponse *http.Response
+
+ body []byte
+ size int64
+ receivedAt time.Time
+}
+
+// Body method returns HTTP response as []byte array for the executed request.
+//
+// Note: `Response.Body` might be nil, if `Request.SetOutput` is used.
+func (r *Response) Body() []byte {
+ if r.RawResponse == nil {
+ return []byte{}
+ }
+ return r.body
+}
+
+// SetBody method is to set Response body in byte slice. Typically,
+// its helpful for test cases.
+//
+// resp.SetBody([]byte("This is test body content"))
+// resp.SetBody(nil)
+//
+// Since v2.10.0
+func (r *Response) SetBody(b []byte) *Response {
+ r.body = b
+ return r
+}
+
+// Status method returns the HTTP status string for the executed request.
+//
+// Example: 200 OK
+func (r *Response) Status() string {
+ if r.RawResponse == nil {
+ return ""
+ }
+ return r.RawResponse.Status
+}
+
+// StatusCode method returns the HTTP status code for the executed request.
+//
+// Example: 200
+func (r *Response) StatusCode() int {
+ if r.RawResponse == nil {
+ return 0
+ }
+ return r.RawResponse.StatusCode
+}
+
+// Proto method returns the HTTP response protocol used for the request.
+func (r *Response) Proto() string {
+ if r.RawResponse == nil {
+ return ""
+ }
+ return r.RawResponse.Proto
+}
+
+// Result method returns the response value as an object if it has one
+func (r *Response) Result() interface{} {
+ return r.Request.Result
+}
+
+// Error method returns the error object if it has one
+func (r *Response) Error() interface{} {
+ return r.Request.Error
+}
+
+// Header method returns the response headers
+func (r *Response) Header() http.Header {
+ if r.RawResponse == nil {
+ return http.Header{}
+ }
+ return r.RawResponse.Header
+}
+
+// Cookies method to access all the response cookies
+func (r *Response) Cookies() []*http.Cookie {
+ if r.RawResponse == nil {
+ return make([]*http.Cookie, 0)
+ }
+ return r.RawResponse.Cookies()
+}
+
+// String method returns the body of the server response as String.
+func (r *Response) String() string {
+ if len(r.body) == 0 {
+ return ""
+ }
+ return strings.TrimSpace(string(r.body))
+}
+
+// Time method returns the time of HTTP response time that from request we sent and received a request.
+//
+// See `Response.ReceivedAt` to know when client received response and see `Response.Request.Time` to know
+// when client sent a request.
+func (r *Response) Time() time.Duration {
+ if r.Request.clientTrace != nil {
+ return r.Request.TraceInfo().TotalTime
+ }
+ return r.receivedAt.Sub(r.Request.Time)
+}
+
+// ReceivedAt method returns when response got received from server for the request.
+func (r *Response) ReceivedAt() time.Time {
+ return r.receivedAt
+}
+
+// Size method returns the HTTP response size in bytes. Ya, you can relay on HTTP `Content-Length` header,
+// however it won't be good for chucked transfer/compressed response. Since Resty calculates response size
+// at the client end. You will get actual size of the http response.
+func (r *Response) Size() int64 {
+ return r.size
+}
+
+// RawBody method exposes the HTTP raw response body. Use this method in-conjunction with `SetDoNotParseResponse`
+// option otherwise you get an error as `read err: http: read on closed response body`.
+//
+// Do not forget to close the body, otherwise you might get into connection leaks, no connection reuse.
+// Basically you have taken over the control of response parsing from `Resty`.
+func (r *Response) RawBody() io.ReadCloser {
+ if r.RawResponse == nil {
+ return nil
+ }
+ return r.RawResponse.Body
+}
+
+// IsSuccess method returns true if HTTP status `code >= 200 and <= 299` otherwise false.
+func (r *Response) IsSuccess() bool {
+ return r.StatusCode() > 199 && r.StatusCode() < 300
+}
+
+// IsError method returns true if HTTP status `code >= 400` otherwise false.
+func (r *Response) IsError() bool {
+ return r.StatusCode() > 399
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Response Unexported methods
+//_______________________________________________________________________
+
+func (r *Response) setReceivedAt() {
+ r.receivedAt = time.Now()
+ if r.Request.clientTrace != nil {
+ r.Request.clientTrace.endTime = r.receivedAt
+ }
+}
+
+func (r *Response) fmtBodyString(sl int64) string {
+ if len(r.body) > 0 {
+ if int64(len(r.body)) > sl {
+ return fmt.Sprintf("***** RESPONSE TOO LARGE (size - %d) *****", len(r.body))
+ }
+ ct := r.Header().Get(hdrContentTypeKey)
+ if IsJSONType(ct) {
+ out := acquireBuffer()
+ defer releaseBuffer(out)
+ err := json.Indent(out, r.body, "", " ")
+ if err != nil {
+ return fmt.Sprintf("*** Error: Unable to format response body - \"%s\" ***\n\nLog Body as-is:\n%s", err, r.String())
+ }
+ return out.String()
+ }
+ return r.String()
+ }
+
+ return "***** NO CONTENT *****"
+}
diff --git a/vendor/github.com/go-resty/resty/v2/resty.go b/vendor/github.com/go-resty/resty/v2/resty.go
new file mode 100644
index 00000000..f8becec6
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/resty.go
@@ -0,0 +1,40 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+// Package resty provides Simple HTTP and REST client library for Go.
+package resty
+
+import (
+ "net"
+ "net/http"
+ "net/http/cookiejar"
+
+ "golang.org/x/net/publicsuffix"
+)
+
+// Version # of resty
+const Version = "2.13.1"
+
+// New method creates a new Resty client.
+func New() *Client {
+ cookieJar, _ := cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List})
+ return createClient(&http.Client{
+ Jar: cookieJar,
+ })
+}
+
+// NewWithClient method creates a new Resty client with given `http.Client`.
+func NewWithClient(hc *http.Client) *Client {
+ return createClient(hc)
+}
+
+// NewWithLocalAddr method creates a new Resty client with given Local Address
+// to dial from.
+func NewWithLocalAddr(localAddr net.Addr) *Client {
+ cookieJar, _ := cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List})
+ return createClient(&http.Client{
+ Jar: cookieJar,
+ Transport: createTransport(localAddr),
+ })
+}
diff --git a/vendor/github.com/go-resty/resty/v2/retry.go b/vendor/github.com/go-resty/resty/v2/retry.go
new file mode 100644
index 00000000..c5eda26b
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/retry.go
@@ -0,0 +1,252 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "context"
+ "io"
+ "math"
+ "math/rand"
+ "sync"
+ "time"
+)
+
+const (
+ defaultMaxRetries = 3
+ defaultWaitTime = time.Duration(100) * time.Millisecond
+ defaultMaxWaitTime = time.Duration(2000) * time.Millisecond
+)
+
+type (
+ // Option is to create convenient retry options like wait time, max retries, etc.
+ Option func(*Options)
+
+ // RetryConditionFunc type is for retry condition function
+ // input: non-nil Response OR request execution error
+ RetryConditionFunc func(*Response, error) bool
+
+ // OnRetryFunc is for side-effecting functions triggered on retry
+ OnRetryFunc func(*Response, error)
+
+ // RetryAfterFunc returns time to wait before retry
+ // For example, it can parse HTTP Retry-After header
+ // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
+ // Non-nil error is returned if it is found that request is not retryable
+ // (0, nil) is a special result means 'use default algorithm'
+ RetryAfterFunc func(*Client, *Response) (time.Duration, error)
+
+ // Options struct is used to hold retry settings.
+ Options struct {
+ maxRetries int
+ waitTime time.Duration
+ maxWaitTime time.Duration
+ retryConditions []RetryConditionFunc
+ retryHooks []OnRetryFunc
+ resetReaders bool
+ }
+)
+
+// Retries sets the max number of retries
+func Retries(value int) Option {
+ return func(o *Options) {
+ o.maxRetries = value
+ }
+}
+
+// WaitTime sets the default wait time to sleep between requests
+func WaitTime(value time.Duration) Option {
+ return func(o *Options) {
+ o.waitTime = value
+ }
+}
+
+// MaxWaitTime sets the max wait time to sleep between requests
+func MaxWaitTime(value time.Duration) Option {
+ return func(o *Options) {
+ o.maxWaitTime = value
+ }
+}
+
+// RetryConditions sets the conditions that will be checked for retry.
+func RetryConditions(conditions []RetryConditionFunc) Option {
+ return func(o *Options) {
+ o.retryConditions = conditions
+ }
+}
+
+// RetryHooks sets the hooks that will be executed after each retry
+func RetryHooks(hooks []OnRetryFunc) Option {
+ return func(o *Options) {
+ o.retryHooks = hooks
+ }
+}
+
+// ResetMultipartReaders sets a boolean value which will lead the start being seeked out
+// on all multipart file readers, if they implement io.ReadSeeker
+func ResetMultipartReaders(value bool) Option {
+ return func(o *Options) {
+ o.resetReaders = value
+ }
+}
+
+// Backoff retries with increasing timeout duration up until X amount of retries
+// (Default is 3 attempts, Override with option Retries(n))
+func Backoff(operation func() (*Response, error), options ...Option) error {
+ // Defaults
+ opts := Options{
+ maxRetries: defaultMaxRetries,
+ waitTime: defaultWaitTime,
+ maxWaitTime: defaultMaxWaitTime,
+ retryConditions: []RetryConditionFunc{},
+ }
+
+ for _, o := range options {
+ o(&opts)
+ }
+
+ var (
+ resp *Response
+ err error
+ )
+
+ for attempt := 0; attempt <= opts.maxRetries; attempt++ {
+ resp, err = operation()
+ ctx := context.Background()
+ if resp != nil && resp.Request.ctx != nil {
+ ctx = resp.Request.ctx
+ }
+ if ctx.Err() != nil {
+ return err
+ }
+
+ err1 := unwrapNoRetryErr(err) // raw error, it used for return users callback.
+ needsRetry := err != nil && err == err1 // retry on a few operation errors by default
+
+ for _, condition := range opts.retryConditions {
+ needsRetry = condition(resp, err1)
+ if needsRetry {
+ break
+ }
+ }
+
+ if !needsRetry {
+ return err
+ }
+
+ if opts.resetReaders {
+ if err := resetFileReaders(resp.Request.multipartFiles); err != nil {
+ return err
+ }
+ }
+
+ for _, hook := range opts.retryHooks {
+ hook(resp, err)
+ }
+
+ // Don't need to wait when no retries left.
+ // Still run retry hooks even on last retry to keep compatibility.
+ if attempt == opts.maxRetries {
+ return err
+ }
+
+ waitTime, err2 := sleepDuration(resp, opts.waitTime, opts.maxWaitTime, attempt)
+ if err2 != nil {
+ if err == nil {
+ err = err2
+ }
+ return err
+ }
+
+ select {
+ case <-time.After(waitTime):
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+ }
+
+ return err
+}
+
+func sleepDuration(resp *Response, min, max time.Duration, attempt int) (time.Duration, error) {
+ const maxInt = 1<<31 - 1 // max int for arch 386
+ if max < 0 {
+ max = maxInt
+ }
+ if resp == nil {
+ return jitterBackoff(min, max, attempt), nil
+ }
+
+ retryAfterFunc := resp.Request.client.RetryAfter
+
+ // Check for custom callback
+ if retryAfterFunc == nil {
+ return jitterBackoff(min, max, attempt), nil
+ }
+
+ result, err := retryAfterFunc(resp.Request.client, resp)
+ if err != nil {
+ return 0, err // i.e. 'API quota exceeded'
+ }
+ if result == 0 {
+ return jitterBackoff(min, max, attempt), nil
+ }
+ if result < 0 || max < result {
+ result = max
+ }
+ if result < min {
+ result = min
+ }
+ return result, nil
+}
+
+// Return capped exponential backoff with jitter
+// http://www.awsarchitectureblog.com/2015/03/backoff.html
+func jitterBackoff(min, max time.Duration, attempt int) time.Duration {
+ base := float64(min)
+ capLevel := float64(max)
+
+ temp := math.Min(capLevel, base*math.Exp2(float64(attempt)))
+ ri := time.Duration(temp / 2)
+ if ri == 0 {
+ ri = time.Nanosecond
+ }
+ result := randDuration(ri)
+
+ if result < min {
+ result = min
+ }
+
+ return result
+}
+
+var rnd = newRnd()
+var rndMu sync.Mutex
+
+func randDuration(center time.Duration) time.Duration {
+ rndMu.Lock()
+ defer rndMu.Unlock()
+
+ var ri = int64(center)
+ var jitter = rnd.Int63n(ri)
+ return time.Duration(math.Abs(float64(ri + jitter)))
+}
+
+func newRnd() *rand.Rand {
+ var seed = time.Now().UnixNano()
+ var src = rand.NewSource(seed)
+ return rand.New(src)
+}
+
+func resetFileReaders(files []*File) error {
+ for _, f := range files {
+ if rs, ok := f.Reader.(io.ReadSeeker); ok {
+ if _, err := rs.Seek(0, io.SeekStart); err != nil {
+ return err
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/go-resty/resty/v2/trace.go b/vendor/github.com/go-resty/resty/v2/trace.go
new file mode 100644
index 00000000..be7555c2
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/trace.go
@@ -0,0 +1,130 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "context"
+ "crypto/tls"
+ "net"
+ "net/http/httptrace"
+ "time"
+)
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// TraceInfo struct
+//_______________________________________________________________________
+
+// TraceInfo struct is used provide request trace info such as DNS lookup
+// duration, Connection obtain duration, Server processing duration, etc.
+//
+// Since v2.0.0
+type TraceInfo struct {
+ // DNSLookup is a duration that transport took to perform
+ // DNS lookup.
+ DNSLookup time.Duration
+
+ // ConnTime is a duration that took to obtain a successful connection.
+ ConnTime time.Duration
+
+ // TCPConnTime is a duration that took to obtain the TCP connection.
+ TCPConnTime time.Duration
+
+ // TLSHandshake is a duration that TLS handshake took place.
+ TLSHandshake time.Duration
+
+ // ServerTime is a duration that server took to respond first byte.
+ ServerTime time.Duration
+
+ // ResponseTime is a duration since first response byte from server to
+ // request completion.
+ ResponseTime time.Duration
+
+ // TotalTime is a duration that total request took end-to-end.
+ TotalTime time.Duration
+
+ // IsConnReused is whether this connection has been previously
+ // used for another HTTP request.
+ IsConnReused bool
+
+ // IsConnWasIdle is whether this connection was obtained from an
+ // idle pool.
+ IsConnWasIdle bool
+
+ // ConnIdleTime is a duration how long the connection was previously
+ // idle, if IsConnWasIdle is true.
+ ConnIdleTime time.Duration
+
+ // RequestAttempt is to represent the request attempt made during a Resty
+ // request execution flow, including retry count.
+ RequestAttempt int
+
+ // RemoteAddr returns the remote network address.
+ RemoteAddr net.Addr
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// ClientTrace struct and its methods
+//_______________________________________________________________________
+
+// tracer struct maps the `httptrace.ClientTrace` hooks into Fields
+// with same naming for easy understanding. Plus additional insights
+// Request.
+type clientTrace struct {
+ getConn time.Time
+ dnsStart time.Time
+ dnsDone time.Time
+ connectDone time.Time
+ tlsHandshakeStart time.Time
+ tlsHandshakeDone time.Time
+ gotConn time.Time
+ gotFirstResponseByte time.Time
+ endTime time.Time
+ gotConnInfo httptrace.GotConnInfo
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Trace unexported methods
+//_______________________________________________________________________
+
+func (t *clientTrace) createContext(ctx context.Context) context.Context {
+ return httptrace.WithClientTrace(
+ ctx,
+ &httptrace.ClientTrace{
+ DNSStart: func(_ httptrace.DNSStartInfo) {
+ t.dnsStart = time.Now()
+ },
+ DNSDone: func(_ httptrace.DNSDoneInfo) {
+ t.dnsDone = time.Now()
+ },
+ ConnectStart: func(_, _ string) {
+ if t.dnsDone.IsZero() {
+ t.dnsDone = time.Now()
+ }
+ if t.dnsStart.IsZero() {
+ t.dnsStart = t.dnsDone
+ }
+ },
+ ConnectDone: func(net, addr string, err error) {
+ t.connectDone = time.Now()
+ },
+ GetConn: func(_ string) {
+ t.getConn = time.Now()
+ },
+ GotConn: func(ci httptrace.GotConnInfo) {
+ t.gotConn = time.Now()
+ t.gotConnInfo = ci
+ },
+ GotFirstResponseByte: func() {
+ t.gotFirstResponseByte = time.Now()
+ },
+ TLSHandshakeStart: func() {
+ t.tlsHandshakeStart = time.Now()
+ },
+ TLSHandshakeDone: func(_ tls.ConnectionState, _ error) {
+ t.tlsHandshakeDone = time.Now()
+ },
+ },
+ )
+}
diff --git a/vendor/github.com/go-resty/resty/v2/transport.go b/vendor/github.com/go-resty/resty/v2/transport.go
new file mode 100644
index 00000000..191cd519
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/transport.go
@@ -0,0 +1,36 @@
+//go:build go1.13
+// +build go1.13
+
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "net"
+ "net/http"
+ "runtime"
+ "time"
+)
+
+func createTransport(localAddr net.Addr) *http.Transport {
+ dialer := &net.Dialer{
+ Timeout: 30 * time.Second,
+ KeepAlive: 30 * time.Second,
+ DualStack: true,
+ }
+ if localAddr != nil {
+ dialer.LocalAddr = localAddr
+ }
+ return &http.Transport{
+ Proxy: http.ProxyFromEnvironment,
+ DialContext: transportDialContext(dialer),
+ ForceAttemptHTTP2: true,
+ MaxIdleConns: 100,
+ IdleConnTimeout: 90 * time.Second,
+ TLSHandshakeTimeout: 10 * time.Second,
+ ExpectContinueTimeout: 1 * time.Second,
+ MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1,
+ }
+}
diff --git a/vendor/github.com/go-resty/resty/v2/transport112.go b/vendor/github.com/go-resty/resty/v2/transport112.go
new file mode 100644
index 00000000..d4aa4175
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/transport112.go
@@ -0,0 +1,35 @@
+//go:build !go1.13
+// +build !go1.13
+
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "net"
+ "net/http"
+ "runtime"
+ "time"
+)
+
+func createTransport(localAddr net.Addr) *http.Transport {
+ dialer := &net.Dialer{
+ Timeout: 30 * time.Second,
+ KeepAlive: 30 * time.Second,
+ DualStack: true,
+ }
+ if localAddr != nil {
+ dialer.LocalAddr = localAddr
+ }
+ return &http.Transport{
+ Proxy: http.ProxyFromEnvironment,
+ DialContext: dialer.DialContext,
+ MaxIdleConns: 100,
+ IdleConnTimeout: 90 * time.Second,
+ TLSHandshakeTimeout: 10 * time.Second,
+ ExpectContinueTimeout: 1 * time.Second,
+ MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1,
+ }
+}
diff --git a/vendor/github.com/go-resty/resty/v2/transport_js.go b/vendor/github.com/go-resty/resty/v2/transport_js.go
new file mode 100644
index 00000000..6227aa9c
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/transport_js.go
@@ -0,0 +1,17 @@
+// Copyright 2021 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.
+
+//go:build js && wasm
+// +build js,wasm
+
+package resty
+
+import (
+ "context"
+ "net"
+)
+
+func transportDialContext(dialer *net.Dialer) func(context.Context, string, string) (net.Conn, error) {
+ return nil
+}
diff --git a/vendor/github.com/go-resty/resty/v2/transport_other.go b/vendor/github.com/go-resty/resty/v2/transport_other.go
new file mode 100644
index 00000000..73553c36
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/transport_other.go
@@ -0,0 +1,17 @@
+// Copyright 2021 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.
+
+//go:build !(js && wasm)
+// +build !js !wasm
+
+package resty
+
+import (
+ "context"
+ "net"
+)
+
+func transportDialContext(dialer *net.Dialer) func(context.Context, string, string) (net.Conn, error) {
+ return dialer.DialContext
+}
diff --git a/vendor/github.com/go-resty/resty/v2/util.go b/vendor/github.com/go-resty/resty/v2/util.go
new file mode 100644
index 00000000..5a69e4fc
--- /dev/null
+++ b/vendor/github.com/go-resty/resty/v2/util.go
@@ -0,0 +1,384 @@
+// Copyright (c) 2015-2023 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
+// resty source code and usage is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+package resty
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "io"
+ "log"
+ "mime/multipart"
+ "net/http"
+ "net/textproto"
+ "os"
+ "path/filepath"
+ "reflect"
+ "runtime"
+ "sort"
+ "strings"
+ "sync"
+)
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Logger interface
+//_______________________________________________________________________
+
+// Logger interface is to abstract the logging from Resty. Gives control to
+// the Resty users, choice of the logger.
+type Logger interface {
+ Errorf(format string, v ...interface{})
+ Warnf(format string, v ...interface{})
+ Debugf(format string, v ...interface{})
+}
+
+func createLogger() *logger {
+ l := &logger{l: log.New(os.Stderr, "", log.Ldate|log.Lmicroseconds)}
+ return l
+}
+
+var _ Logger = (*logger)(nil)
+
+type logger struct {
+ l *log.Logger
+}
+
+func (l *logger) Errorf(format string, v ...interface{}) {
+ l.output("ERROR RESTY "+format, v...)
+}
+
+func (l *logger) Warnf(format string, v ...interface{}) {
+ l.output("WARN RESTY "+format, v...)
+}
+
+func (l *logger) Debugf(format string, v ...interface{}) {
+ l.output("DEBUG RESTY "+format, v...)
+}
+
+func (l *logger) output(format string, v ...interface{}) {
+ if len(v) == 0 {
+ l.l.Print(format)
+ return
+ }
+ l.l.Printf(format, v...)
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Rate Limiter interface
+//_______________________________________________________________________
+
+type RateLimiter interface {
+ Allow() bool
+}
+
+var ErrRateLimitExceeded = errors.New("rate limit exceeded")
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Package Helper methods
+//_______________________________________________________________________
+
+// IsStringEmpty method tells whether given string is empty or not
+func IsStringEmpty(str string) bool {
+ return len(strings.TrimSpace(str)) == 0
+}
+
+// DetectContentType method is used to figure out `Request.Body` content type for request header
+func DetectContentType(body interface{}) string {
+ contentType := plainTextType
+ kind := kindOf(body)
+ switch kind {
+ case reflect.Struct, reflect.Map:
+ contentType = jsonContentType
+ case reflect.String:
+ contentType = plainTextType
+ default:
+ if b, ok := body.([]byte); ok {
+ contentType = http.DetectContentType(b)
+ } else if kind == reflect.Slice {
+ contentType = jsonContentType
+ }
+ }
+
+ return contentType
+}
+
+// IsJSONType method is to check JSON content type or not
+func IsJSONType(ct string) bool {
+ return jsonCheck.MatchString(ct)
+}
+
+// IsXMLType method is to check XML content type or not
+func IsXMLType(ct string) bool {
+ return xmlCheck.MatchString(ct)
+}
+
+// Unmarshalc content into object from JSON or XML
+func Unmarshalc(c *Client, ct string, b []byte, d interface{}) (err error) {
+ if IsJSONType(ct) {
+ err = c.JSONUnmarshal(b, d)
+ } else if IsXMLType(ct) {
+ err = c.XMLUnmarshal(b, d)
+ }
+
+ return
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// RequestLog and ResponseLog type
+//_______________________________________________________________________
+
+// RequestLog struct is used to collected information from resty request
+// instance for debug logging. It sent to request log callback before resty
+// actually logs the information.
+type RequestLog struct {
+ Header http.Header
+ Body string
+}
+
+// ResponseLog struct is used to collected information from resty response
+// instance for debug logging. It sent to response log callback before resty
+// actually logs the information.
+type ResponseLog struct {
+ Header http.Header
+ Body string
+}
+
+//βΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎβΎ
+// Package Unexported methods
+//_______________________________________________________________________
+
+// way to disable the HTML escape as opt-in
+func jsonMarshal(c *Client, r *Request, d interface{}) (*bytes.Buffer, error) {
+ if !r.jsonEscapeHTML || !c.jsonEscapeHTML {
+ return noescapeJSONMarshal(d)
+ }
+
+ data, err := c.JSONMarshal(d)
+ if err != nil {
+ return nil, err
+ }
+
+ buf := acquireBuffer()
+ _, _ = buf.Write(data)
+ return buf, nil
+}
+
+func firstNonEmpty(v ...string) string {
+ for _, s := range v {
+ if !IsStringEmpty(s) {
+ return s
+ }
+ }
+ return ""
+}
+
+var quoteEscaper = strings.NewReplacer("\\", "\\\\", `"`, "\\\"")
+
+func escapeQuotes(s string) string {
+ return quoteEscaper.Replace(s)
+}
+
+func createMultipartHeader(param, fileName, contentType string) textproto.MIMEHeader {
+ hdr := make(textproto.MIMEHeader)
+
+ var contentDispositionValue string
+ if IsStringEmpty(fileName) {
+ contentDispositionValue = fmt.Sprintf(`form-data; name="%s"`, param)
+ } else {
+ contentDispositionValue = fmt.Sprintf(`form-data; name="%s"; filename="%s"`,
+ param, escapeQuotes(fileName))
+ }
+ hdr.Set("Content-Disposition", contentDispositionValue)
+
+ if !IsStringEmpty(contentType) {
+ hdr.Set(hdrContentTypeKey, contentType)
+ }
+ return hdr
+}
+
+func addMultipartFormField(w *multipart.Writer, mf *MultipartField) error {
+ partWriter, err := w.CreatePart(createMultipartHeader(mf.Param, mf.FileName, mf.ContentType))
+ if err != nil {
+ return err
+ }
+
+ _, err = io.Copy(partWriter, mf.Reader)
+ return err
+}
+
+func writeMultipartFormFile(w *multipart.Writer, fieldName, fileName string, r io.Reader) error {
+ // Auto detect actual multipart content type
+ cbuf := make([]byte, 512)
+ size, err := r.Read(cbuf)
+ if err != nil && err != io.EOF {
+ return err
+ }
+
+ partWriter, err := w.CreatePart(createMultipartHeader(fieldName, fileName, http.DetectContentType(cbuf[:size])))
+ if err != nil {
+ return err
+ }
+
+ if _, err = partWriter.Write(cbuf[:size]); err != nil {
+ return err
+ }
+
+ _, err = io.Copy(partWriter, r)
+ return err
+}
+
+func addFile(w *multipart.Writer, fieldName, path string) error {
+ file, err := os.Open(path)
+ if err != nil {
+ return err
+ }
+ defer closeq(file)
+ return writeMultipartFormFile(w, fieldName, filepath.Base(path), file)
+}
+
+func addFileReader(w *multipart.Writer, f *File) error {
+ return writeMultipartFormFile(w, f.ParamName, f.Name, f.Reader)
+}
+
+func getPointer(v interface{}) interface{} {
+ vv := valueOf(v)
+ if vv.Kind() == reflect.Ptr {
+ return v
+ }
+ return reflect.New(vv.Type()).Interface()
+}
+
+func isPayloadSupported(m string, allowMethodGet bool) bool {
+ return !(m == MethodHead || m == MethodOptions || (m == MethodGet && !allowMethodGet))
+}
+
+func typeOf(i interface{}) reflect.Type {
+ return indirect(valueOf(i)).Type()
+}
+
+func valueOf(i interface{}) reflect.Value {
+ return reflect.ValueOf(i)
+}
+
+func indirect(v reflect.Value) reflect.Value {
+ return reflect.Indirect(v)
+}
+
+func kindOf(v interface{}) reflect.Kind {
+ return typeOf(v).Kind()
+}
+
+func createDirectory(dir string) (err error) {
+ if _, err = os.Stat(dir); err != nil {
+ if os.IsNotExist(err) {
+ if err = os.MkdirAll(dir, 0755); err != nil {
+ return
+ }
+ }
+ }
+ return
+}
+
+func canJSONMarshal(contentType string, kind reflect.Kind) bool {
+ return IsJSONType(contentType) && (kind == reflect.Struct || kind == reflect.Map || kind == reflect.Slice)
+}
+
+func functionName(i interface{}) string {
+ return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
+}
+
+func acquireBuffer() *bytes.Buffer {
+ return bufPool.Get().(*bytes.Buffer)
+}
+
+func releaseBuffer(buf *bytes.Buffer) {
+ if buf != nil {
+ buf.Reset()
+ bufPool.Put(buf)
+ }
+}
+
+// requestBodyReleaser wraps requests's body and implements custom Close for it.
+// The Close method closes original body and releases request body back to sync.Pool.
+type requestBodyReleaser struct {
+ releaseOnce sync.Once
+ reqBuf *bytes.Buffer
+ io.ReadCloser
+}
+
+func newRequestBodyReleaser(respBody io.ReadCloser, reqBuf *bytes.Buffer) io.ReadCloser {
+ if reqBuf == nil {
+ return respBody
+ }
+
+ return &requestBodyReleaser{
+ reqBuf: reqBuf,
+ ReadCloser: respBody,
+ }
+}
+
+func (rr *requestBodyReleaser) Close() error {
+ err := rr.ReadCloser.Close()
+ rr.releaseOnce.Do(func() {
+ releaseBuffer(rr.reqBuf)
+ })
+
+ return err
+}
+
+func closeq(v interface{}) {
+ if c, ok := v.(io.Closer); ok {
+ silently(c.Close())
+ }
+}
+
+func silently(_ ...interface{}) {}
+
+func composeHeaders(c *Client, r *Request, hdrs http.Header) string {
+ str := make([]string, 0, len(hdrs))
+ for _, k := range sortHeaderKeys(hdrs) {
+ str = append(str, "\t"+strings.TrimSpace(fmt.Sprintf("%25s: %s", k, strings.Join(hdrs[k], ", "))))
+ }
+ return strings.Join(str, "\n")
+}
+
+func sortHeaderKeys(hdrs http.Header) []string {
+ keys := make([]string, 0, len(hdrs))
+ for key := range hdrs {
+ keys = append(keys, key)
+ }
+ sort.Strings(keys)
+ return keys
+}
+
+func copyHeaders(hdrs http.Header) http.Header {
+ nh := http.Header{}
+ for k, v := range hdrs {
+ nh[k] = v
+ }
+ return nh
+}
+
+type noRetryErr struct {
+ err error
+}
+
+func (e *noRetryErr) Error() string {
+ return e.err.Error()
+}
+
+func wrapNoRetryErr(err error) error {
+ if err != nil {
+ err = &noRetryErr{err: err}
+ }
+ return err
+}
+
+func unwrapNoRetryErr(err error) error {
+ if e, ok := err.(*noRetryErr); ok {
+ err = e.err
+ }
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/.gitignore b/vendor/github.com/linode/linodego/.gitignore
new file mode 100644
index 00000000..a076b73c
--- /dev/null
+++ b/vendor/github.com/linode/linodego/.gitignore
@@ -0,0 +1,24 @@
+# Binaries for programs and plugins
+*.exe
+*.dll
+*.so
+*.dylib
+
+# Test binary, build with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+
+# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
+.glide/
+
+
+# Common IDE paths
+.vscode/
+.idea/
+
+vendor/**/
+.env
+coverage.txt
+go.work.sum
diff --git a/vendor/github.com/linode/linodego/.gitmodules b/vendor/github.com/linode/linodego/.gitmodules
new file mode 100644
index 00000000..1a19a1c1
--- /dev/null
+++ b/vendor/github.com/linode/linodego/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "e2e_scripts"]
+ path = e2e_scripts
+ url = https://github.com/linode/dx-e2e-test-scripts
diff --git a/vendor/github.com/linode/linodego/.golangci.yml b/vendor/github.com/linode/linodego/.golangci.yml
new file mode 100644
index 00000000..063292f3
--- /dev/null
+++ b/vendor/github.com/linode/linodego/.golangci.yml
@@ -0,0 +1,84 @@
+run:
+ tests: false
+
+linters-settings:
+ errcheck:
+ check-type-assertions: true
+ check-blank: true
+
+ govet:
+ enable:
+ - atomicalign
+ - shadow
+ enable-all: false
+ disable-all: false
+ gocyclo:
+ min-complexity: 30
+ gocognit:
+ min-complexity: 30
+ dupl:
+ threshold: 100
+
+linters:
+ enable-all: true
+ disable:
+ # deprecated linters
+ - deadcode
+ - ifshort
+ - varcheck
+ - nosnakecase
+ ####################
+
+ # conflicted with go fmt
+ - nolintlint
+
+ # workaround to avoid linter failures of getting malformed json
+ - musttag
+
+ - bodyclose
+ - contextcheck
+ - nilerr
+ - noctx
+ - rowserrcheck
+ - sqlclosecheck
+ - structcheck
+ - tparallel
+ - vetshadow
+ - errname
+ - forcetypeassert
+ - gocyclo
+ - unparam
+ - nakedret
+ - lll
+ - golint
+ - maligned
+ - scopelint
+ - dupl
+ - gosec
+ - gochecknoinits
+ - gochecknoglobals
+ - exhaustruct
+ - nonamedreturns
+ - errcheck
+ - staticcheck
+ - stylecheck
+ - wsl
+ - interfacer
+ - varnamelen
+ - tagliatelle
+ - gomnd
+ - nlreturn
+ - wrapcheck
+ - wastedassign
+ - goerr113
+ - exhaustivestruct
+ - durationcheck
+ - errorlint
+ - cyclop
+ - godot
+ - exhaustive
+ - depguard
+ - tagalign
+ - inamedparam
+ - perfsprint
+ fast: false
diff --git a/vendor/github.com/linode/linodego/CODEOWNERS b/vendor/github.com/linode/linodego/CODEOWNERS
new file mode 100644
index 00000000..34864d6f
--- /dev/null
+++ b/vendor/github.com/linode/linodego/CODEOWNERS
@@ -0,0 +1 @@
+* @linode/dx
diff --git a/vendor/github.com/linode/linodego/LICENSE b/vendor/github.com/linode/linodego/LICENSE
new file mode 100644
index 00000000..6b0e6bac
--- /dev/null
+++ b/vendor/github.com/linode/linodego/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Christopher "Chief" Najewicz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/linode/linodego/Makefile b/vendor/github.com/linode/linodego/Makefile
new file mode 100644
index 00000000..1296b577
--- /dev/null
+++ b/vendor/github.com/linode/linodego/Makefile
@@ -0,0 +1,100 @@
+-include .env
+BIN_DIR := $(GOPATH)/bin
+
+INTEGRATION_DIR := ./test/integration
+FIXTURES_DIR := $(INTEGRATION_DIR)/fixtures
+
+TEST_TIMEOUT := 5h
+
+SKIP_DOCKER ?= 0
+GOLANGCILINT := golangci-lint
+GOLANGCILINT_IMG := golangci/golangci-lint:latest
+GOLANGCILINT_ARGS := run
+
+LINODE_URL ?= https://api.linode.com/
+
+PACKAGES := $(shell go list ./... | grep -v integration)
+
+SKIP_LINT ?= 0
+
+.PHONY: build vet test refresh-fixtures clean clean-cov clean-fixtures lint run_fixtures sanitize fixtures godoc testint testunit testcov tidy
+
+test: build lint testunit testint
+
+citest: lint test
+
+testunit:
+ go test -v $(PACKAGES) $(ARGS)
+ cd test && make testunit
+
+testint:
+ cd test && make testint
+
+testcov-func:
+ @go test -v -coverprofile="coverage.txt" . > /dev/null 2>&1
+ @go tool cover -func coverage.txt
+
+# Note for WSL Users, set BROWSER=wslview
+testcov-html:
+ @go test -v -coverprofile="coverage.txt" . > /dev/null 2>&1
+ @go tool cover -html coverage.txt
+
+smoketest:
+ cd test && make smoketest
+
+build: vet lint
+ go build ./...
+ cd k8s && go build ./...
+
+vet:
+ go vet ./...
+ cd k8s && go vet ./...
+
+lint:
+ifeq ($(SKIP_LINT), 1)
+ @echo Skipping lint stage
+else ifeq ($(SKIP_DOCKER), 1)
+ $(GOLANGCILINT) $(GOLANGCILINT_ARGS)
+else
+ docker run --rm -v $(shell pwd):/app -w /app $(GOLANGCILINT_IMG) $(GOLANGCILINT) $(GOLANGCILINT_ARGS)
+endif
+
+clean: clean-cov
+
+clean-cov:
+ @-rm -f coverage.txt
+
+clean-fixtures:
+ @-rm -f fixtures/*.yaml
+
+refresh-fixtures: clean-fixtures fixtures
+
+run_fixtures:
+ @echo "* Running fixtures"
+ cd $(INTEGRATION_DIR) && \
+ LINODE_FIXTURE_MODE="record" \
+ LINODE_TOKEN=$(LINODE_TOKEN) \
+ LINODE_API_VERSION="v4beta" \
+ LINODE_URL="$(LINODE_URL)" \
+ GO111MODULE="on" \
+ go test --tags $(TEST_TAGS) -timeout=$(TEST_TIMEOUT) -v $(ARGS)
+
+sanitize:
+ @echo "* Sanitizing fixtures"
+ @for yaml in $(FIXTURES_DIR)/*yaml; do \
+ sed -E -i.bak \
+ -e 's_stats/20[0-9]{2}/[1-9][0-2]?_stats/2018/1_g' \
+ -e 's/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/1234::5678/g' \
+ $$yaml; \
+ done
+ @find $(FIXTURES_DIR) -name *yaml.bak -exec rm {} \;
+
+fixtures: run_fixtures sanitize
+
+godoc:
+ @godoc -http=:6060
+
+tidy:
+ go mod tidy
+ cd k8s && go mod tidy
+ cd test && go mod tidy
diff --git a/vendor/github.com/linode/linodego/README.md b/vendor/github.com/linode/linodego/README.md
new file mode 100644
index 00000000..4eb779a0
--- /dev/null
+++ b/vendor/github.com/linode/linodego/README.md
@@ -0,0 +1,187 @@
+# linodego
+
+![Tests](https://img.shields.io/github/actions/workflow/status/linode/linodego/ci.yml?branch=main)
+[![Release](https://img.shields.io/github/v/release/linode/linodego)](https://github.com/linode/linodego/releases/latest)
+[![GoDoc](https://godoc.org/github.com/linode/linodego?status.svg)](https://godoc.org/github.com/linode/linodego)
+[![Go Report Card](https://goreportcard.com/badge/github.com/linode/linodego)](https://goreportcard.com/report/github.com/linode/linodego)
+
+Go client for [Linode REST v4 API](https://techdocs.akamai.com/linode-api/reference/api)
+
+## Installation
+
+```sh
+go get -u github.com/linode/linodego
+```
+
+## Documentation
+
+See [godoc](https://godoc.org/github.com/linode/linodego) for a complete reference.
+
+The API generally follows the naming patterns prescribed in the [OpenAPIv3 document for Linode APIv4](https://techdocs.akamai.com/linode-api/reference/api).
+
+Deviations in naming have been made to avoid using "Linode" and "Instance" redundantly or inconsistently.
+
+A brief summary of the features offered in this API client are shown here.
+
+## Examples
+
+### General Usage
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "net/http"
+ "os"
+
+ "github.com/linode/linodego"
+ "golang.org/x/oauth2"
+)
+
+func main() {
+ apiKey, ok := os.LookupEnv("LINODE_TOKEN")
+ if !ok {
+ log.Fatal("Could not find LINODE_TOKEN, please assert it is set.")
+ }
+ tokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: apiKey})
+
+ oauth2Client := &http.Client{
+ Transport: &oauth2.Transport{
+ Source: tokenSource,
+ },
+ }
+
+ linodeClient := linodego.NewClient(oauth2Client)
+ linodeClient.SetDebug(true)
+
+ res, err := linodeClient.GetInstance(context.Background(), 4090913)
+ if err != nil {
+ log.Fatal(err)
+ }
+ fmt.Printf("%v", res)
+}
+```
+
+### Pagination
+
+#### Auto-Pagination Requests
+
+```go
+kernels, err := linodego.ListKernels(context.Background(), nil)
+// len(kernels) == 218
+```
+
+Or, use a page value of "0":
+
+```go
+opts := linodego.NewListOptions(0,"")
+kernels, err := linodego.ListKernels(context.Background(), opts)
+// len(kernels) == 218
+```
+
+#### Single Page
+
+```go
+opts := linodego.NewListOptions(2,"")
+// or opts := linodego.ListOptions{PageOptions: &linodego.PageOptions{Page: 2}, PageSize: 500}
+kernels, err := linodego.ListKernels(context.Background(), opts)
+// len(kernels) == 100
+```
+
+ListOptions are supplied as a pointer because the Pages and Results
+values are set in the supplied ListOptions.
+
+```go
+// opts.Results == 218
+```
+
+> **_NOTES:_**
+> - The ListOptions will be mutated by list endpoint functions.
+> - Instances of ListOptions should NOT be shared across multiple list endpoint functions.
+> - The resulting number of results and pages can be accessed through the user-supplied ListOptions instance.
+
+#### Filtering
+
+```go
+f := linodego.Filter{}
+f.AddField(linodego.Eq, "mine", true)
+fStr, err := f.MarshalJSON()
+if err != nil {
+ log.Fatal(err)
+}
+opts := linodego.NewListOptions(0, string(fStr))
+stackscripts, err := linodego.ListStackscripts(context.Background(), opts)
+```
+
+### Error Handling
+
+#### Getting Single Entities
+
+```go
+linode, err := linodego.GetInstance(context.Background(), 555) // any Linode ID that does not exist or is not yours
+// linode == nil: true
+// err.Error() == "[404] Not Found"
+// err.Code == "404"
+// err.Message == "Not Found"
+```
+
+#### Lists
+
+For lists, the list is still returned as `[]`, but `err` works the same way as on the `Get` request.
+
+```go
+linodes, err := linodego.ListInstances(context.Background(), linodego.NewListOptions(0, "{\"foo\":bar}"))
+// linodes == []
+// err.Error() == "[400] [X-Filter] Cannot filter on foo"
+```
+
+Otherwise sane requests beyond the last page do not trigger an error, just an empty result:
+
+```go
+linodes, err := linodego.ListInstances(context.Background(), linodego.NewListOptions(9999, ""))
+// linodes == []
+// err = nil
+```
+
+### Response Caching
+
+By default, certain endpoints with static responses will be cached into memory.
+Endpoints with cached responses are identified in their [accompanying documentation](https://pkg.go.dev/github.com/linode/linodego?utm_source=godoc).
+
+The default cache entry expiry time is `15` minutes. Certain endpoints may override this value to allow for more frequent refreshes (e.g. `client.GetRegion(...)`).
+The global cache expiry time can be customized using the `client.SetGlobalCacheExpiration(...)` method.
+
+Response caching can be globally disabled or enabled for a client using the `client.UseCache(...)` method.
+
+The global cache can be cleared and refreshed using the `client.InvalidateCache()` method.
+
+### Writes
+
+When performing a `POST` or `PUT` request, multiple field related errors will be returned as a single error, currently like:
+
+```go
+// err.Error() == "[400] [field1] foo problem; [field2] bar problem; [field3] baz problem"
+```
+
+## Tests
+
+Run `make testunit` to run the unit tests.
+
+Run `make testint` to run the integration tests. The integration tests use fixtures.
+
+To update the test fixtures, run `make fixtures`. This will record the API responses into the `fixtures/` directory.
+Be careful about committing any sensitive account details. An attempt has been made to sanitize IP addresses and
+dates, but no automated sanitization will be performed against `fixtures/*Account*.yaml`, for example.
+
+To prevent disrupting unaffected fixtures, target fixture generation like so: `make ARGS="-run TestListVolumes" fixtures`.
+
+## Discussion / Help
+
+Join us at [#linodego](https://gophers.slack.com/messages/CAG93EB2S) on the [gophers slack](https://gophers.slack.com)
+
+## License
+
+[MIT License](LICENSE)
diff --git a/vendor/github.com/linode/linodego/account.go b/vendor/github.com/linode/linodego/account.go
new file mode 100644
index 00000000..ed022f47
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account.go
@@ -0,0 +1,69 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// Account associated with the token in use.
+type Account struct {
+ FirstName string `json:"first_name"`
+ LastName string `json:"last_name"`
+ Email string `json:"email"`
+ Company string `json:"company"`
+ Address1 string `json:"address_1"`
+ Address2 string `json:"address_2"`
+ Balance float32 `json:"balance"`
+ BalanceUninvoiced float32 `json:"balance_uninvoiced"`
+ City string `json:"city"`
+ State string `json:"state"`
+ Zip string `json:"zip"`
+ Country string `json:"country"`
+ TaxID string `json:"tax_id"`
+ Phone string `json:"phone"`
+ CreditCard *CreditCard `json:"credit_card"`
+ EUUID string `json:"euuid"`
+ BillingSource string `json:"billing_source"`
+ Capabilities []string `json:"capabilities"`
+ ActiveSince *time.Time `json:"-"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (account *Account) UnmarshalJSON(b []byte) error {
+ type Mask Account
+
+ p := struct {
+ *Mask
+ ActiveSince *parseabletime.ParseableTime `json:"active_since"`
+ }{
+ Mask: (*Mask)(account),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ account.ActiveSince = (*time.Time)(p.ActiveSince)
+
+ return nil
+}
+
+// CreditCard information associated with the Account.
+type CreditCard struct {
+ LastFour string `json:"last_four"`
+ Expiry string `json:"expiry"`
+}
+
+// GetAccount gets the contact and billing information related to the Account.
+func (c *Client) GetAccount(ctx context.Context) (*Account, error) {
+ e := "account"
+ response, err := doGETRequest[Account](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/account_availability.go b/vendor/github.com/linode/linodego/account_availability.go
new file mode 100644
index 00000000..3824f77b
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_availability.go
@@ -0,0 +1,38 @@
+package linodego
+
+import (
+ "context"
+)
+
+// AccountAvailability returns the resources availability in a region to an account.
+type AccountAvailability struct {
+ // region id
+ Region string `json:"region"`
+
+ // the unavailable resources in a region to the customer
+ Unavailable []string `json:"unavailable"`
+
+ // the available resources in a region to the customer
+ Available []string `json:"available"`
+}
+
+// ListAccountAvailabilities lists all regions and the resource availabilities to the account.
+func (c *Client) ListAccountAvailabilities(ctx context.Context, opts *ListOptions) ([]AccountAvailability, error) {
+ response, err := getPaginatedResults[AccountAvailability](ctx, c, "account/availability", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetAccountAvailability gets the resources availability in a region to the customer.
+func (c *Client) GetAccountAvailability(ctx context.Context, regionID string) (*AccountAvailability, error) {
+ b := formatAPIPath("account/availability/%s", regionID)
+ response, err := doGETRequest[AccountAvailability](ctx, c, b)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/account_betas.go b/vendor/github.com/linode/linodego/account_betas.go
new file mode 100644
index 00000000..830905a0
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_betas.go
@@ -0,0 +1,83 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// The details and enrollment information of a Beta program that an account is enrolled in.
+type AccountBetaProgram struct {
+ Label string `json:"label"`
+ ID string `json:"id"`
+ Description string `json:"description"`
+ Started *time.Time `json:"-"`
+ Ended *time.Time `json:"-"`
+
+ // Date the account was enrolled in the beta program
+ Enrolled *time.Time `json:"-"`
+}
+
+// AccountBetaProgramCreateOpts fields are those accepted by JoinBetaProgram
+type AccountBetaProgramCreateOpts struct {
+ ID string `json:"id"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (cBeta *AccountBetaProgram) UnmarshalJSON(b []byte) error {
+ type Mask AccountBetaProgram
+
+ p := struct {
+ *Mask
+ Started *parseabletime.ParseableTime `json:"started"`
+ Ended *parseabletime.ParseableTime `json:"ended"`
+ Enrolled *parseabletime.ParseableTime `json:"enrolled"`
+ }{
+ Mask: (*Mask)(cBeta),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ cBeta.Started = (*time.Time)(p.Started)
+ cBeta.Ended = (*time.Time)(p.Ended)
+ cBeta.Enrolled = (*time.Time)(p.Enrolled)
+
+ return nil
+}
+
+// ListAccountBetaPrograms lists all beta programs an account is enrolled in.
+func (c *Client) ListAccountBetaPrograms(ctx context.Context, opts *ListOptions) ([]AccountBetaProgram, error) {
+ response, err := getPaginatedResults[AccountBetaProgram](ctx, c, "/account/betas", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetAccountBetaProgram gets the details of a beta program an account is enrolled in.
+func (c *Client) GetAccountBetaProgram(ctx context.Context, betaID string) (*AccountBetaProgram, error) {
+ b := formatAPIPath("/account/betas/%s", betaID)
+
+ response, err := doGETRequest[AccountBetaProgram](ctx, c, b)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// JoinBetaProgram enrolls an account into a beta program.
+func (c *Client) JoinBetaProgram(ctx context.Context, opts AccountBetaProgramCreateOpts) (*AccountBetaProgram, error) {
+ e := "account/betas"
+ response, err := doPOSTRequest[AccountBetaProgram](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/account_child.go b/vendor/github.com/linode/linodego/account_child.go
new file mode 100644
index 00000000..c11a9d3e
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_child.go
@@ -0,0 +1,47 @@
+package linodego
+
+import (
+ "context"
+)
+
+// ChildAccount represents an account under the current account.
+// NOTE: This is an alias to prevent any future breaking changes.
+type ChildAccount = Account
+
+// ChildAccountToken represents a short-lived token created using
+// the CreateChildAccountToken(...) function.
+// NOTE: This is an alias to prevent any future breaking changes.
+type ChildAccountToken = Token
+
+// ListChildAccounts lists child accounts under the current account.
+// NOTE: Parent/Child related features may not be generally available.
+func (c *Client) ListChildAccounts(ctx context.Context, opts *ListOptions) ([]ChildAccount, error) {
+ return getPaginatedResults[ChildAccount](
+ ctx,
+ c,
+ "account/child-accounts",
+ opts,
+ )
+}
+
+// GetChildAccount gets a single child accounts under the current account.
+// NOTE: Parent/Child related features may not be generally available.
+func (c *Client) GetChildAccount(ctx context.Context, euuid string) (*ChildAccount, error) {
+ return doGETRequest[ChildAccount](
+ ctx,
+ c,
+ formatAPIPath("account/child-accounts/%s", euuid),
+ )
+}
+
+// CreateChildAccountToken creates a short-lived token that can be used to
+// access the Linode API under a child account.
+// The attributes of this token are not currently configurable.
+// NOTE: Parent/Child related features may not be generally available.
+func (c *Client) CreateChildAccountToken(ctx context.Context, euuid string) (*ChildAccountToken, error) {
+ return doPOSTRequest[ChildAccountToken, any](
+ ctx,
+ c,
+ formatAPIPath("account/child-accounts/%s/token", euuid),
+ )
+}
diff --git a/vendor/github.com/linode/linodego/account_events.go b/vendor/github.com/linode/linodego/account_events.go
new file mode 100644
index 00000000..678fc57a
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_events.go
@@ -0,0 +1,328 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/duration"
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// Event represents an action taken on the Account.
+type Event struct {
+ // The unique ID of this Event.
+ ID int `json:"id"`
+
+ // Current status of the Event, Enum: "failed" "finished" "notification" "scheduled" "started"
+ Status EventStatus `json:"status"`
+
+ // The action that caused this Event. New actions may be added in the future.
+ Action EventAction `json:"action"`
+
+ // A percentage estimating the amount of time remaining for an Event. Returns null for notification events.
+ PercentComplete int `json:"percent_complete"`
+
+ // The rate of completion of the Event. Only some Events will return rate; for example, migration and resize Events.
+ Rate *string `json:"rate"`
+
+ // If this Event has been read.
+ Read bool `json:"read"`
+
+ // If this Event has been seen.
+ Seen bool `json:"seen"`
+
+ // The estimated time remaining until the completion of this Event. This value is only returned for in-progress events.
+ TimeRemaining *int `json:"-"`
+
+ // The username of the User who caused the Event.
+ Username string `json:"username"`
+
+ // Detailed information about the Event's entity, including ID, type, label, and URL used to access it.
+ Entity *EventEntity `json:"entity"`
+
+ // Detailed information about the Event's secondary or related entity, including ID, type, label, and URL used to access it.
+ SecondaryEntity *EventEntity `json:"secondary_entity"`
+
+ // When this Event was created.
+ Created *time.Time `json:"-"`
+}
+
+// EventAction constants start with Action and include all known Linode API Event Actions.
+type EventAction string
+
+// EventAction constants represent the actions that cause an Event. New actions may be added in the future.
+const (
+ ActionAccountUpdate EventAction = "account_update"
+ ActionAccountSettingsUpdate EventAction = "account_settings_update"
+ ActionBackupsEnable EventAction = "backups_enable"
+ ActionBackupsCancel EventAction = "backups_cancel"
+ ActionBackupsRestore EventAction = "backups_restore"
+ ActionCommunityQuestionReply EventAction = "community_question_reply"
+ ActionCommunityLike EventAction = "community_like"
+ ActionCreditCardUpdated EventAction = "credit_card_updated"
+ ActionDatabaseCreate EventAction = "database_create"
+ ActionDatabaseDegraded EventAction = "database_degraded"
+ ActionDatabaseDelete EventAction = "database_delete"
+ ActionDatabaseFailed EventAction = "database_failed"
+ ActionDatabaseUpdate EventAction = "database_update"
+ ActionDatabaseCreateFailed EventAction = "database_create_failed"
+ ActionDatabaseUpdateFailed EventAction = "database_update_failed"
+ ActionDatabaseBackupCreate EventAction = "database_backup_create"
+ ActionDatabaseBackupRestore EventAction = "database_backup_restore"
+ ActionDatabaseCredentialsReset EventAction = "database_credentials_reset"
+ ActionDiskCreate EventAction = "disk_create"
+ ActionDiskDelete EventAction = "disk_delete"
+ ActionDiskUpdate EventAction = "disk_update"
+ ActionDiskDuplicate EventAction = "disk_duplicate"
+ ActionDiskImagize EventAction = "disk_imagize"
+ ActionDiskResize EventAction = "disk_resize"
+ ActionDNSRecordCreate EventAction = "dns_record_create"
+ ActionDNSRecordDelete EventAction = "dns_record_delete"
+ ActionDNSRecordUpdate EventAction = "dns_record_update"
+ ActionDNSZoneCreate EventAction = "dns_zone_create"
+ ActionDNSZoneDelete EventAction = "dns_zone_delete"
+ ActionDNSZoneUpdate EventAction = "dns_zone_update"
+ ActionDNSZoneImport EventAction = "dns_zone_import"
+ ActionEntityTransferAccept EventAction = "entity_transfer_accept"
+ ActionEntityTransferCancel EventAction = "entity_transfer_cancel"
+ ActionEntityTransferCreate EventAction = "entity_transfer_create"
+ ActionEntityTransferFail EventAction = "entity_transfer_fail"
+ ActionEntityTransferStale EventAction = "entity_transfer_stale"
+ ActionFirewallCreate EventAction = "firewall_create"
+ ActionFirewallDelete EventAction = "firewall_delete"
+ ActionFirewallDisable EventAction = "firewall_disable"
+ ActionFirewallEnable EventAction = "firewall_enable"
+ ActionFirewallUpdate EventAction = "firewall_update"
+ ActionFirewallDeviceAdd EventAction = "firewall_device_add"
+ ActionFirewallDeviceRemove EventAction = "firewall_device_remove"
+ ActionHostReboot EventAction = "host_reboot"
+ ActionImageDelete EventAction = "image_delete"
+ ActionImageUpdate EventAction = "image_update"
+ ActionImageUpload EventAction = "image_upload"
+ ActionIPAddressUpdate EventAction = "ipaddress_update"
+ ActionLassieReboot EventAction = "lassie_reboot"
+ ActionLinodeAddIP EventAction = "linode_addip"
+ ActionLinodeBoot EventAction = "linode_boot"
+ ActionLinodeClone EventAction = "linode_clone"
+ ActionLinodeCreate EventAction = "linode_create"
+ ActionLinodeDelete EventAction = "linode_delete"
+ ActionLinodeUpdate EventAction = "linode_update"
+ ActionLinodeDeleteIP EventAction = "linode_deleteip"
+ ActionLinodeMigrate EventAction = "linode_migrate"
+ ActionLinodeMigrateDatacenter EventAction = "linode_migrate_datacenter"
+ ActionLinodeMigrateDatacenterCreate EventAction = "linode_migrate_datacenter_create"
+ ActionLinodeMutate EventAction = "linode_mutate"
+ ActionLinodeMutateCreate EventAction = "linode_mutate_create"
+ ActionLinodeReboot EventAction = "linode_reboot"
+ ActionLinodeRebuild EventAction = "linode_rebuild"
+ ActionLinodeResize EventAction = "linode_resize"
+ ActionLinodeResizeCreate EventAction = "linode_resize_create"
+ ActionLinodeShutdown EventAction = "linode_shutdown"
+ ActionLinodeSnapshot EventAction = "linode_snapshot"
+ ActionLinodeConfigCreate EventAction = "linode_config_create"
+ ActionLinodeConfigDelete EventAction = "linode_config_delete"
+ ActionLinodeConfigUpdate EventAction = "linode_config_update"
+ ActionLishBoot EventAction = "lish_boot"
+ ActionLKENodeCreate EventAction = "lke_node_create"
+ ActionLKEControlPlaneACLCreate EventAction = "lke_control_plane_acl_create"
+ ActionLKEControlPlaneACLUpdate EventAction = "lke_control_plane_acl_update"
+ ActionLKEControlPlaneACLDelete EventAction = "lke_control_plane_acl_delete"
+ ActionLongviewClientCreate EventAction = "longviewclient_create"
+ ActionLongviewClientDelete EventAction = "longviewclient_delete"
+ ActionLongviewClientUpdate EventAction = "longviewclient_update"
+ ActionManagedDisabled EventAction = "managed_disabled"
+ ActionManagedEnabled EventAction = "managed_enabled"
+ ActionManagedServiceCreate EventAction = "managed_service_create"
+ ActionManagedServiceDelete EventAction = "managed_service_delete"
+ ActionNodebalancerCreate EventAction = "nodebalancer_create"
+ ActionNodebalancerDelete EventAction = "nodebalancer_delete"
+ ActionNodebalancerUpdate EventAction = "nodebalancer_update"
+ ActionNodebalancerConfigCreate EventAction = "nodebalancer_config_create"
+ ActionNodebalancerConfigDelete EventAction = "nodebalancer_config_delete"
+ ActionNodebalancerConfigUpdate EventAction = "nodebalancer_config_update"
+ ActionNodebalancerFirewallModificationSuccess EventAction = "nodebalancer_firewall_modification_success"
+ ActionNodebalancerFirewallModificationFailed EventAction = "nodebalancer_firewall_modification_failed"
+ ActionNodebalancerNodeCreate EventAction = "nodebalancer_node_create"
+ ActionNodebalancerNodeDelete EventAction = "nodebalancer_node_delete"
+ ActionNodebalancerNodeUpdate EventAction = "nodebalancer_node_update"
+ ActionOAuthClientCreate EventAction = "oauth_client_create"
+ ActionOAuthClientDelete EventAction = "oauth_client_delete"
+ ActionOAuthClientSecretReset EventAction = "oauth_client_secret_reset" //#nosec G101
+ ActionOAuthClientUpdate EventAction = "oauth_client_update"
+ ActionOBJAccessKeyCreate EventAction = "obj_access_key_create"
+ ActionOBJAccessKeyDelete EventAction = "obj_access_key_delete"
+ ActionOBJAccessKeyUpdate EventAction = "obj_access_key_update"
+ ActionPaymentMethodAdd EventAction = "payment_method_add"
+ ActionPaymentSubmitted EventAction = "payment_submitted"
+ ActionPasswordReset EventAction = "password_reset"
+ ActionPlacementGroupCreate EventAction = "placement_group_create"
+ ActionPlacementGroupUpdate EventAction = "placement_group_update"
+ ActionPlacementGroupDelete EventAction = "placement_group_delete"
+ ActionPlacementGroupAssign EventAction = "placement_group_assign"
+ ActionPlacementGroupUnassign EventAction = "placement_group_unassign"
+ ActionPlacementGroupBecameNonCompliant EventAction = "placement_group_became_non_compliant"
+ ActionPlacementGroupBecameCompliant EventAction = "placement_group_became_compliant"
+ ActionProfileUpdate EventAction = "profile_update"
+ ActionStackScriptCreate EventAction = "stackscript_create"
+ ActionStackScriptDelete EventAction = "stackscript_delete"
+ ActionStackScriptUpdate EventAction = "stackscript_update"
+ ActionStackScriptPublicize EventAction = "stackscript_publicize"
+ ActionStackScriptRevise EventAction = "stackscript_revise"
+ ActionTaxIDInvalid EventAction = "tax_id_invalid"
+ ActionTagCreate EventAction = "tag_create"
+ ActionTagDelete EventAction = "tag_delete"
+ ActionTFADisabled EventAction = "tfa_disabled"
+ ActionTFAEnabled EventAction = "tfa_enabled"
+ ActionTicketAttachmentUpload EventAction = "ticket_attachment_upload"
+ ActionTicketCreate EventAction = "ticket_create"
+ ActionTicketUpdate EventAction = "ticket_update"
+ ActionTokenCreate EventAction = "token_create"
+ ActionTokenDelete EventAction = "token_delete"
+ ActionTokenUpdate EventAction = "token_update"
+ ActionUserCreate EventAction = "user_create"
+ ActionUserDelete EventAction = "user_delete"
+ ActionUserUpdate EventAction = "user_update"
+ ActionUserSSHKeyAdd EventAction = "user_ssh_key_add"
+ ActionUserSSHKeyDelete EventAction = "user_ssh_key_delete"
+ ActionUserSSHKeyUpdate EventAction = "user_ssh_key_update"
+ ActionVLANAttach EventAction = "vlan_attach"
+ ActionVLANDetach EventAction = "vlan_detach"
+ ActionVolumeAttach EventAction = "volume_attach"
+ ActionVolumeClone EventAction = "volume_clone"
+ ActionVolumeCreate EventAction = "volume_create"
+ ActionVolumeDelete EventAction = "volume_delete"
+ ActionVolumeUpdate EventAction = "volume_update"
+ ActionVolumeDetach EventAction = "volume_detach"
+ ActionVolumeResize EventAction = "volume_resize"
+ ActionVPCCreate EventAction = "vpc_create"
+ ActionVPCDelete EventAction = "vpc_delete"
+ ActionVPCUpdate EventAction = "vpc_update"
+ ActionVPCSubnetCreate EventAction = "subnet_create"
+ ActionVPCSubnetDelete EventAction = "subnet_delete"
+ ActionVPCSubnetUpdate EventAction = "subnet_update"
+
+ // Deprecated: incorrect spelling,
+ // to be removed in the next major version release.
+ ActionVolumeDelte EventAction = "volume_delete"
+
+ // Deprecated: incorrect spelling,
+ // to be removed in the next major version
+ ActionCreateCardUpdated = ActionCreditCardUpdated
+)
+
+// EntityType constants start with Entity and include Linode API Event Entity Types
+type EntityType string
+
+// EntityType contants are the entities an Event can be related to.
+const (
+ EntityAccount EntityType = "account"
+ EntityBackups EntityType = "backups"
+ EntityCommunity EntityType = "community"
+ EntityDatabase EntityType = "database"
+ EntityDisk EntityType = "disk"
+ EntityDomain EntityType = "domain"
+ EntityTransfer EntityType = "entity_transfer"
+ EntityFirewall EntityType = "firewall"
+ EntityImage EntityType = "image"
+ EntityIPAddress EntityType = "ipaddress"
+ EntityLinode EntityType = "linode"
+ EntityLongview EntityType = "longview"
+ EntityManagedService EntityType = "managed_service"
+ EntityNodebalancer EntityType = "nodebalancer"
+ EntityOAuthClient EntityType = "oauth_client"
+ EntityPlacementGroup EntityType = "placement_group"
+ EntityProfile EntityType = "profile"
+ EntityStackscript EntityType = "stackscript"
+ EntityTag EntityType = "tag"
+ EntityTicket EntityType = "ticket"
+ EntityToken EntityType = "token"
+ EntityUser EntityType = "user"
+ EntityUserSSHKey EntityType = "user_ssh_key"
+ EntityVolume EntityType = "volume"
+ EntityVPC EntityType = "vpc"
+ EntityVPCSubnet EntityType = "subnet"
+)
+
+// EventStatus constants start with Event and include Linode API Event Status values
+type EventStatus string
+
+// EventStatus constants reflect the current status of an Event
+const (
+ EventFailed EventStatus = "failed"
+ EventFinished EventStatus = "finished"
+ EventNotification EventStatus = "notification"
+ EventScheduled EventStatus = "scheduled"
+ EventStarted EventStatus = "started"
+)
+
+// EventEntity provides detailed information about the Event's
+// associated entity, including ID, Type, Label, and a URL that
+// can be used to access it.
+type EventEntity struct {
+ // ID may be a string or int, it depends on the EntityType
+ ID any `json:"id"`
+ Label string `json:"label"`
+ Type EntityType `json:"type"`
+ Status string `json:"status"`
+ URL string `json:"url"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *Event) UnmarshalJSON(b []byte) error {
+ type Mask Event
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ TimeRemaining json.RawMessage `json:"time_remaining"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.TimeRemaining = duration.UnmarshalTimeRemaining(p.TimeRemaining)
+
+ return nil
+}
+
+// ListEvents gets a collection of Event objects representing actions taken
+// on the Account. The Events returned depend on the token grants and the grants
+// of the associated user.
+func (c *Client) ListEvents(ctx context.Context, opts *ListOptions) ([]Event, error) {
+ response, err := getPaginatedResults[Event](ctx, c, "account/events", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetEvent gets the Event with the Event ID
+func (c *Client) GetEvent(ctx context.Context, eventID int) (*Event, error) {
+ e := formatAPIPath("account/events/%d", eventID)
+ response, err := doGETRequest[Event](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// MarkEventRead marks a single Event as read.
+func (c *Client) MarkEventRead(ctx context.Context, event *Event) error {
+ e := formatAPIPath("account/events/%d/read", event.ID)
+ _, err := doPOSTRequest[Event](ctx, c, e, []any{})
+ return err
+}
+
+// MarkEventsSeen marks all Events up to and including this Event by ID as seen.
+func (c *Client) MarkEventsSeen(ctx context.Context, event *Event) error {
+ e := formatAPIPath("account/events/%d/seen", event.ID)
+ _, err := doPOSTRequest[Event](ctx, c, e, []any{})
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/account_invoices.go b/vendor/github.com/linode/linodego/account_invoices.go
new file mode 100644
index 00000000..afc88209
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_invoices.go
@@ -0,0 +1,103 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// Invoice structs reflect an invoice for billable activity on the account.
+type Invoice struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Total float32 `json:"total"`
+ Date *time.Time `json:"-"`
+}
+
+// InvoiceItem structs reflect a single billable activity associate with an Invoice
+type InvoiceItem struct {
+ Label string `json:"label"`
+ Type string `json:"type"`
+ UnitPrice int `json:"unitprice"`
+ Quantity int `json:"quantity"`
+ Amount float32 `json:"amount"`
+ Tax float32 `json:"tax"`
+ Region *string `json:"region"`
+ From *time.Time `json:"-"`
+ To *time.Time `json:"-"`
+}
+
+// ListInvoices gets a paginated list of Invoices against the Account
+func (c *Client) ListInvoices(ctx context.Context, opts *ListOptions) ([]Invoice, error) {
+ response, err := getPaginatedResults[Invoice](ctx, c, "account/invoices", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *Invoice) UnmarshalJSON(b []byte) error {
+ type Mask Invoice
+
+ p := struct {
+ *Mask
+ Date *parseabletime.ParseableTime `json:"date"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Date = (*time.Time)(p.Date)
+
+ return nil
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *InvoiceItem) UnmarshalJSON(b []byte) error {
+ type Mask InvoiceItem
+
+ p := struct {
+ *Mask
+ From *parseabletime.ParseableTime `json:"from"`
+ To *parseabletime.ParseableTime `json:"to"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.From = (*time.Time)(p.From)
+ i.To = (*time.Time)(p.To)
+
+ return nil
+}
+
+// GetInvoice gets a single Invoice matching the provided ID
+func (c *Client) GetInvoice(ctx context.Context, invoiceID int) (*Invoice, error) {
+ e := formatAPIPath("account/invoices/%d", invoiceID)
+ response, err := doGETRequest[Invoice](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// ListInvoiceItems gets the invoice items associated with a specific Invoice
+func (c *Client) ListInvoiceItems(ctx context.Context, invoiceID int, opts *ListOptions) ([]InvoiceItem, error) {
+ response, err := getPaginatedResults[InvoiceItem](ctx, c, formatAPIPath("account/invoices/%d/items", invoiceID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/account_logins.go b/vendor/github.com/linode/linodego/account_logins.go
new file mode 100644
index 00000000..45f2a5f2
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_logins.go
@@ -0,0 +1,58 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+type Login struct {
+ ID int `json:"id"`
+ Datetime *time.Time `json:"datetime"`
+ IP string `json:"ip"`
+ Restricted bool `json:"restricted"`
+ Username string `json:"username"`
+ Status string `json:"status"`
+}
+
+func (c *Client) ListLogins(ctx context.Context, opts *ListOptions) ([]Login, error) {
+ response, err := getPaginatedResults[Login](ctx, c, "account/logins", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *Login) UnmarshalJSON(b []byte) error {
+ type Mask Login
+
+ l := struct {
+ *Mask
+ Datetime *parseabletime.ParseableTime `json:"datetime"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &l); err != nil {
+ return err
+ }
+
+ i.Datetime = (*time.Time)(l.Datetime)
+
+ return nil
+}
+
+func (c *Client) GetLogin(ctx context.Context, loginID int) (*Login, error) {
+ e := formatAPIPath("account/logins/%d", loginID)
+
+ response, err := doGETRequest[Login](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/account_notifications.go b/vendor/github.com/linode/linodego/account_notifications.go
new file mode 100644
index 00000000..3820f090
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_notifications.go
@@ -0,0 +1,93 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// Notification represents a notification on an Account
+type Notification struct {
+ Label string `json:"label"`
+ Body *string `json:"body"`
+ Message string `json:"message"`
+ Type NotificationType `json:"type"`
+ Severity NotificationSeverity `json:"severity"`
+ Entity *NotificationEntity `json:"entity"`
+ Until *time.Time `json:"-"`
+ When *time.Time `json:"-"`
+}
+
+// NotificationEntity adds detailed information about the Notification.
+// This could refer to the ticket that triggered the notification, for example.
+type NotificationEntity struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Type string `json:"type"`
+ URL string `json:"url"`
+}
+
+// NotificationSeverity constants start with Notification and include all known Linode API Notification Severities.
+type NotificationSeverity string
+
+// NotificationSeverity constants represent the actions that cause a Notification. New severities may be added in the future.
+const (
+ NotificationMinor NotificationSeverity = "minor"
+ NotificationMajor NotificationSeverity = "major"
+ NotificationCritical NotificationSeverity = "critical"
+)
+
+// NotificationType constants start with Notification and include all known Linode API Notification Types.
+type NotificationType string
+
+// NotificationType constants represent the actions that cause a Notification. New types may be added in the future.
+const (
+ NotificationMigrationScheduled NotificationType = "migration_scheduled"
+ NotificationMigrationImminent NotificationType = "migration_imminent"
+ NotificationMigrationPending NotificationType = "migration_pending"
+ NotificationRebootScheduled NotificationType = "reboot_scheduled"
+ NotificationOutage NotificationType = "outage"
+ NotificationPaymentDue NotificationType = "payment_due"
+ NotificationTicketImportant NotificationType = "ticket_important"
+ NotificationTicketAbuse NotificationType = "ticket_abuse"
+ NotificationNotice NotificationType = "notice"
+ NotificationMaintenance NotificationType = "maintenance"
+)
+
+// ListNotifications gets a collection of Notification objects representing important,
+// often time-sensitive items related to the Account. An account cannot interact directly with
+// Notifications, and a Notification will disappear when the circumstances causing it
+// have been resolved. For example, if the account has an important Ticket open, a response
+// to the Ticket will dismiss the Notification.
+func (c *Client) ListNotifications(ctx context.Context, opts *ListOptions) ([]Notification, error) {
+ response, err := getPaginatedResults[Notification](ctx, c, "account/notifications", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *Notification) UnmarshalJSON(b []byte) error {
+ type Mask Notification
+
+ p := struct {
+ *Mask
+ Until *parseabletime.ParseableTime `json:"until"`
+ When *parseabletime.ParseableTime `json:"when"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Until = (*time.Time)(p.Until)
+ i.When = (*time.Time)(p.When)
+
+ return nil
+}
diff --git a/vendor/github.com/linode/linodego/account_oauth_client.go b/vendor/github.com/linode/linodego/account_oauth_client.go
new file mode 100644
index 00000000..6f2a57a1
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_oauth_client.go
@@ -0,0 +1,131 @@
+package linodego
+
+import (
+ "context"
+)
+
+// OAuthClientStatus constants start with OAuthClient and include Linode API Instance Status values
+type OAuthClientStatus string
+
+// OAuthClientStatus constants reflect the current status of an OAuth Client
+const (
+ OAuthClientActive OAuthClientStatus = "active"
+ OAuthClientDisabled OAuthClientStatus = "disabled"
+ OAuthClientSuspended OAuthClientStatus = "suspended"
+)
+
+// OAuthClient represents a OAuthClient object
+type OAuthClient struct {
+ // The unique ID of this OAuth Client.
+ ID string `json:"id"`
+
+ // The location a successful log in from https://login.linode.com should be redirected to for this client. The receiver of this redirect should be ready to accept an OAuth exchange code and finish the OAuth exchange.
+ RedirectURI string `json:"redirect_uri"`
+
+ // The name of this application. This will be presented to users when they are asked to grant it access to their Account.
+ Label string `json:"label"`
+
+ // Current status of the OAuth Client, Enum: "active" "disabled" "suspended"
+ Status OAuthClientStatus `json:"status"`
+
+ // The OAuth Client secret, used in the OAuth exchange. This is returned as except when an OAuth Client is created or its secret is reset. This is a secret, and should not be shared or disclosed publicly.
+ Secret string `json:"secret"`
+
+ // If this OAuth Client is public or private.
+ Public bool `json:"public"`
+
+ // The URL where this client's thumbnail may be viewed, or nil if this client does not have a thumbnail set.
+ ThumbnailURL *string `json:"thumbnail_url"`
+}
+
+// OAuthClientCreateOptions fields are those accepted by CreateOAuthClient
+type OAuthClientCreateOptions struct {
+ // The location a successful log in from https://login.linode.com should be redirected to for this client. The receiver of this redirect should be ready to accept an OAuth exchange code and finish the OAuth exchange.
+ RedirectURI string `json:"redirect_uri"`
+
+ // The name of this application. This will be presented to users when they are asked to grant it access to their Account.
+ Label string `json:"label"`
+
+ // If this OAuth Client is public or private.
+ Public bool `json:"public"`
+}
+
+// OAuthClientUpdateOptions fields are those accepted by UpdateOAuthClient
+type OAuthClientUpdateOptions struct {
+ // The location a successful log in from https://login.linode.com should be redirected to for this client. The receiver of this redirect should be ready to accept an OAuth exchange code and finish the OAuth exchange.
+ RedirectURI string `json:"redirect_uri"`
+
+ // The name of this application. This will be presented to users when they are asked to grant it access to their Account.
+ Label string `json:"label"`
+
+ // If this OAuth Client is public or private.
+ Public bool `json:"public"`
+}
+
+// GetCreateOptions converts a OAuthClient to OAuthClientCreateOptions for use in CreateOAuthClient
+func (i OAuthClient) GetCreateOptions() (o OAuthClientCreateOptions) {
+ o.RedirectURI = i.RedirectURI
+ o.Label = i.Label
+ o.Public = i.Public
+
+ return
+}
+
+// GetUpdateOptions converts a OAuthClient to OAuthClientUpdateOptions for use in UpdateOAuthClient
+func (i OAuthClient) GetUpdateOptions() (o OAuthClientUpdateOptions) {
+ o.RedirectURI = i.RedirectURI
+ o.Label = i.Label
+ o.Public = i.Public
+
+ return
+}
+
+// ListOAuthClients lists OAuthClients
+func (c *Client) ListOAuthClients(ctx context.Context, opts *ListOptions) ([]OAuthClient, error) {
+ response, err := getPaginatedResults[OAuthClient](ctx, c, "account/oauth-clients", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetOAuthClient gets the OAuthClient with the provided ID
+func (c *Client) GetOAuthClient(ctx context.Context, clientID string) (*OAuthClient, error) {
+ e := formatAPIPath("account/oauth-clients/%s", clientID)
+ response, err := doGETRequest[OAuthClient](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateOAuthClient creates an OAuthClient
+func (c *Client) CreateOAuthClient(ctx context.Context, opts OAuthClientCreateOptions) (*OAuthClient, error) {
+ e := "account/oauth-clients"
+ response, err := doPOSTRequest[OAuthClient](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateOAuthClient updates the OAuthClient with the specified id
+func (c *Client) UpdateOAuthClient(ctx context.Context, clientID string, opts OAuthClientUpdateOptions) (*OAuthClient, error) {
+ e := formatAPIPath("account/oauth-clients/%s", clientID)
+ response, err := doPUTRequest[OAuthClient](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteOAuthClient deletes the OAuthClient with the specified id
+func (c *Client) DeleteOAuthClient(ctx context.Context, clientID string) error {
+ e := formatAPIPath("account/oauth-clients/%s", clientID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/account_payments.go b/vendor/github.com/linode/linodego/account_payments.go
new file mode 100644
index 00000000..452f53f1
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_payments.go
@@ -0,0 +1,88 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// Payment represents a Payment object
+type Payment struct {
+ // The unique ID of the Payment
+ ID int `json:"id"`
+
+ // The amount, in US dollars, of the Payment.
+ USD json.Number `json:"usd"`
+
+ // When the Payment was made.
+ Date *time.Time `json:"-"`
+}
+
+// PaymentCreateOptions fields are those accepted by CreatePayment
+type PaymentCreateOptions struct {
+ // CVV (Card Verification Value) of the credit card to be used for the Payment
+ CVV string `json:"cvv,omitempty"`
+
+ // The amount, in US dollars, of the Payment
+ USD json.Number `json:"usd"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *Payment) UnmarshalJSON(b []byte) error {
+ type Mask Payment
+
+ p := struct {
+ *Mask
+ Date *parseabletime.ParseableTime `json:"date"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Date = (*time.Time)(p.Date)
+
+ return nil
+}
+
+// GetCreateOptions converts a Payment to PaymentCreateOptions for use in CreatePayment
+func (i Payment) GetCreateOptions() (o PaymentCreateOptions) {
+ o.USD = i.USD
+ return
+}
+
+// ListPayments lists Payments
+func (c *Client) ListPayments(ctx context.Context, opts *ListOptions) ([]Payment, error) {
+ response, err := getPaginatedResults[Payment](ctx, c, "account/payments", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetPayment gets the payment with the provided ID
+func (c *Client) GetPayment(ctx context.Context, paymentID int) (*Payment, error) {
+ e := formatAPIPath("account/payments/%d", paymentID)
+ response, err := doGETRequest[Payment](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreatePayment creates a Payment
+func (c *Client) CreatePayment(ctx context.Context, opts PaymentCreateOptions) (*Payment, error) {
+ e := "accounts/payments"
+ response, err := doPOSTRequest[Payment](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/account_settings.go b/vendor/github.com/linode/linodego/account_settings.go
new file mode 100644
index 00000000..5edef5be
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_settings.go
@@ -0,0 +1,60 @@
+package linodego
+
+import (
+ "context"
+)
+
+// AccountSettings are the account wide flags or plans that effect new resources
+type AccountSettings struct {
+ // The default backups enrollment status for all new Linodes for all users on the account. When enabled, backups are mandatory per instance.
+ BackupsEnabled bool `json:"backups_enabled"`
+
+ // Wether or not Linode Managed service is enabled for the account.
+ Managed bool `json:"managed"`
+
+ // Wether or not the Network Helper is enabled for all new Linode Instance Configs on the account.
+ NetworkHelper bool `json:"network_helper"`
+
+ // A plan name like "longview-3"..."longview-100", or a nil value for to cancel any existing subscription plan.
+ LongviewSubscription *string `json:"longview_subscription"`
+
+ // A string like "disabled", "suspended", or "active" describing the status of this accountβs Object Storage service enrollment.
+ ObjectStorage *string `json:"object_storage"`
+}
+
+// AccountSettingsUpdateOptions are the updateable account wide flags or plans that effect new resources.
+type AccountSettingsUpdateOptions struct {
+ // The default backups enrollment status for all new Linodes for all users on the account. When enabled, backups are mandatory per instance.
+ BackupsEnabled *bool `json:"backups_enabled,omitempty"`
+
+ // A plan name like "longview-3"..."longview-100", or a nil value for to cancel any existing subscription plan.
+ // Deprecated: Use PUT /longview/plan instead to update the LongviewSubscription
+ LongviewSubscription *string `json:"longview_subscription,omitempty"`
+
+ // The default network helper setting for all new Linodes and Linode Configs for all users on the account.
+ NetworkHelper *bool `json:"network_helper,omitempty"`
+}
+
+// GetAccountSettings gets the account wide flags or plans that effect new resources
+func (c *Client) GetAccountSettings(ctx context.Context) (*AccountSettings, error) {
+ e := "account/settings"
+
+ response, err := doGETRequest[AccountSettings](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateAccountSettings updates the settings associated with the account
+func (c *Client) UpdateAccountSettings(ctx context.Context, opts AccountSettingsUpdateOptions) (*AccountSettings, error) {
+ e := "account/settings"
+
+ response, err := doPUTRequest[AccountSettings](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/account_transfer.go b/vendor/github.com/linode/linodego/account_transfer.go
new file mode 100644
index 00000000..1420f278
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_transfer.go
@@ -0,0 +1,33 @@
+package linodego
+
+import "context"
+
+// AccountTransfer represents an Account's network utilization for the current month.
+type AccountTransfer struct {
+ Billable int `json:"billable"`
+ Quota int `json:"quota"`
+ Used int `json:"used"`
+
+ RegionTransfers []AccountTransferRegion `json:"region_transfers"`
+}
+
+// AccountTransferRegion represents an Account's network utilization for the current month
+// in a given region.
+type AccountTransferRegion struct {
+ ID string `json:"id"`
+ Billable int `json:"billable"`
+ Quota int `json:"quota"`
+ Used int `json:"used"`
+}
+
+// GetAccountTransfer gets current Account's network utilization for the current month.
+func (c *Client) GetAccountTransfer(ctx context.Context) (*AccountTransfer, error) {
+ e := "account/transfer"
+
+ response, err := doGETRequest[AccountTransfer](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/account_user_grants.go b/vendor/github.com/linode/linodego/account_user_grants.go
new file mode 100644
index 00000000..f0ca1dc7
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_user_grants.go
@@ -0,0 +1,86 @@
+package linodego
+
+import (
+ "context"
+)
+
+type GrantPermissionLevel string
+
+const (
+ AccessLevelReadOnly GrantPermissionLevel = "read_only"
+ AccessLevelReadWrite GrantPermissionLevel = "read_write"
+)
+
+type GlobalUserGrants struct {
+ AccountAccess *GrantPermissionLevel `json:"account_access"`
+ AddDatabases bool `json:"add_databases"`
+ AddDomains bool `json:"add_domains"`
+ AddFirewalls bool `json:"add_firewalls"`
+ AddImages bool `json:"add_images"`
+ AddLinodes bool `json:"add_linodes"`
+ AddLongview bool `json:"add_longview"`
+ AddNodeBalancers bool `json:"add_nodebalancers"`
+ AddStackScripts bool `json:"add_stackscripts"`
+ AddVolumes bool `json:"add_volumes"`
+ CancelAccount bool `json:"cancel_account"`
+ LongviewSubscription bool `json:"longview_subscription"`
+}
+
+type EntityUserGrant struct {
+ ID int `json:"id"`
+ Permissions *GrantPermissionLevel `json:"permissions"`
+}
+
+type GrantedEntity struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Permissions GrantPermissionLevel `json:"permissions"`
+}
+
+type UserGrants struct {
+ Database []GrantedEntity `json:"database"`
+ Domain []GrantedEntity `json:"domain"`
+ Firewall []GrantedEntity `json:"firewall"`
+ Image []GrantedEntity `json:"image"`
+ Linode []GrantedEntity `json:"linode"`
+ Longview []GrantedEntity `json:"longview"`
+ NodeBalancer []GrantedEntity `json:"nodebalancer"`
+ StackScript []GrantedEntity `json:"stackscript"`
+ Volume []GrantedEntity `json:"volume"`
+
+ Global GlobalUserGrants `json:"global"`
+}
+
+type UserGrantsUpdateOptions struct {
+ Database []GrantedEntity `json:"database,omitempty"`
+ Domain []EntityUserGrant `json:"domain,omitempty"`
+ Firewall []EntityUserGrant `json:"firewall,omitempty"`
+ Image []EntityUserGrant `json:"image,omitempty"`
+ Linode []EntityUserGrant `json:"linode,omitempty"`
+ Longview []EntityUserGrant `json:"longview,omitempty"`
+ NodeBalancer []EntityUserGrant `json:"nodebalancer,omitempty"`
+ StackScript []EntityUserGrant `json:"stackscript,omitempty"`
+ Volume []EntityUserGrant `json:"volume,omitempty"`
+
+ Global GlobalUserGrants `json:"global"`
+}
+
+func (c *Client) GetUserGrants(ctx context.Context, username string) (*UserGrants, error) {
+ e := formatAPIPath("account/users/%s/grants", username)
+ response, err := doGETRequest[UserGrants](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+func (c *Client) UpdateUserGrants(ctx context.Context, username string, opts UserGrantsUpdateOptions) (*UserGrants, error) {
+ e := formatAPIPath("account/users/%s/grants", username)
+ response, err := doPUTRequest[UserGrants](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/account_users.go b/vendor/github.com/linode/linodego/account_users.go
new file mode 100644
index 00000000..88615fa8
--- /dev/null
+++ b/vendor/github.com/linode/linodego/account_users.go
@@ -0,0 +1,158 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+type UserType string
+
+const (
+ UserTypeProxy UserType = "proxy"
+ UserTypeParent UserType = "parent"
+ UserTypeChild UserType = "child"
+ UserTypeDefault UserType = "default"
+)
+
+// LastLogin represents a LastLogin object
+type LastLogin struct {
+ LoginDatetime *time.Time `json:"-"`
+ Status string `json:"status"`
+}
+
+// User represents a User object
+type User struct {
+ Username string `json:"username"`
+ Email string `json:"email"`
+ LastLogin *LastLogin `json:"last_login"`
+ UserType UserType `json:"user_type"`
+ Restricted bool `json:"restricted"`
+ TFAEnabled bool `json:"tfa_enabled"`
+ SSHKeys []string `json:"ssh_keys"`
+ PasswordCreated *time.Time `json:"-"`
+ VerifiedPhoneNumber *string `json:"verified_phone_number"`
+}
+
+// UserCreateOptions fields are those accepted by CreateUser
+type UserCreateOptions struct {
+ Username string `json:"username"`
+ Email string `json:"email"`
+ Restricted bool `json:"restricted"`
+}
+
+// UserUpdateOptions fields are those accepted by UpdateUser
+type UserUpdateOptions struct {
+ Username string `json:"username,omitempty"`
+ Restricted *bool `json:"restricted,omitempty"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (ll *LastLogin) UnmarshalJSON(b []byte) error {
+ type Mask LastLogin
+
+ p := struct {
+ *Mask
+ LoginDatetime *parseabletime.ParseableTime `json:"login_datetime"`
+ }{
+ Mask: (*Mask)(ll),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ ll.LoginDatetime = (*time.Time)(p.LoginDatetime)
+
+ return nil
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *User) UnmarshalJSON(b []byte) error {
+ type Mask User
+
+ p := struct {
+ *Mask
+ PasswordCreated *parseabletime.ParseableTime `json:"password_created"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.PasswordCreated = (*time.Time)(p.PasswordCreated)
+
+ return nil
+}
+
+// GetCreateOptions converts a User to UserCreateOptions for use in CreateUser
+func (i User) GetCreateOptions() (o UserCreateOptions) {
+ o.Username = i.Username
+ o.Email = i.Email
+ o.Restricted = i.Restricted
+
+ return
+}
+
+// GetUpdateOptions converts a User to UserUpdateOptions for use in UpdateUser
+func (i User) GetUpdateOptions() (o UserUpdateOptions) {
+ o.Username = i.Username
+ o.Restricted = copyBool(&i.Restricted)
+
+ return
+}
+
+// ListUsers lists Users on the account
+func (c *Client) ListUsers(ctx context.Context, opts *ListOptions) ([]User, error) {
+ response, err := getPaginatedResults[User](ctx, c, "account/users", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetUser gets the user with the provided ID
+func (c *Client) GetUser(ctx context.Context, userID string) (*User, error) {
+ e := formatAPIPath("account/users/%s", userID)
+ response, err := doGETRequest[User](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateUser creates a User. The email address must be confirmed before the
+// User account can be accessed.
+func (c *Client) CreateUser(ctx context.Context, opts UserCreateOptions) (*User, error) {
+ e := "account/users"
+ response, err := doPOSTRequest[User](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateUser updates the User with the specified id
+func (c *Client) UpdateUser(ctx context.Context, userID string, opts UserUpdateOptions) (*User, error) {
+ e := formatAPIPath("account/users/%s", userID)
+ response, err := doPUTRequest[User](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteUser deletes the User with the specified id
+func (c *Client) DeleteUser(ctx context.Context, userID string) error {
+ e := formatAPIPath("account/users/%s", userID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/base_types.go b/vendor/github.com/linode/linodego/base_types.go
new file mode 100644
index 00000000..dbaafe31
--- /dev/null
+++ b/vendor/github.com/linode/linodego/base_types.go
@@ -0,0 +1,29 @@
+// This package contains various type-related base classes intended
+// to be used in composition across type structures in this project.
+
+package linodego
+
+// baseType is a base struct containing the core fields of a resource type
+// returned from the Linode API.
+type baseType[PriceType any, RegionPriceType any] struct {
+ ID string `json:"id"`
+ Label string `json:"label"`
+ Price PriceType `json:"price"`
+ RegionPrices []RegionPriceType `json:"region_prices"`
+ Transfer int `json:"transfer"`
+}
+
+// baseTypePrice is a base struct containing the core fields of a resource type's
+// base price.
+type baseTypePrice struct {
+ Hourly float64 `json:"hourly"`
+ Monthly float64 `json:"monthly"`
+}
+
+// baseTypeRegionPrice is a base struct containing the core fields of a resource type's
+// region-specific price.
+type baseTypeRegionPrice struct {
+ baseTypePrice
+
+ ID string `json:"id"`
+}
diff --git a/vendor/github.com/linode/linodego/betas.go b/vendor/github.com/linode/linodego/betas.go
new file mode 100644
index 00000000..8f90220d
--- /dev/null
+++ b/vendor/github.com/linode/linodego/betas.go
@@ -0,0 +1,73 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// Beta Program is a new product or service that is not generally available to all Akamai customers.
+// Users must enroll into a beta in order to access the functionality.
+type BetaProgram struct {
+ Label string `json:"label"`
+ ID string `json:"id"`
+ Description string `json:"description"`
+
+ // Start date of the beta program.
+ Started *time.Time `json:"-"`
+
+ // End date of the beta program.
+ Ended *time.Time `json:"-"`
+
+ // Greenlight is a program that allows customers to gain access to
+ // certain beta programs and to collect direct feedback from those customers.
+ GreenlightOnly bool `json:"greenlight_only"`
+
+ // Link to product marketing page for the beta program.
+ MoreInfo string `json:"more_info"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (beta *BetaProgram) UnmarshalJSON(b []byte) error {
+ type Mask BetaProgram
+
+ p := struct {
+ *Mask
+ Started *parseabletime.ParseableTime `json:"started"`
+ Ended *parseabletime.ParseableTime `json:"ended"`
+ }{
+ Mask: (*Mask)(beta),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ beta.Started = (*time.Time)(p.Started)
+ beta.Ended = (*time.Time)(p.Ended)
+
+ return nil
+}
+
+// ListBetaPrograms lists active beta programs
+func (c *Client) ListBetaPrograms(ctx context.Context, opts *ListOptions) ([]BetaProgram, error) {
+ response, err := getPaginatedResults[BetaProgram](ctx, c, "/betas", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetBetaProgram gets the beta program's detail with the ID
+func (c *Client) GetBetaProgram(ctx context.Context, betaID string) (*BetaProgram, error) {
+ e := formatAPIPath("betas/%s", betaID)
+ response, err := doGETRequest[BetaProgram](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/client.go b/vendor/github.com/linode/linodego/client.go
new file mode 100644
index 00000000..28433b76
--- /dev/null
+++ b/vendor/github.com/linode/linodego/client.go
@@ -0,0 +1,881 @@
+package linodego
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "log"
+ "net/http"
+ "net/url"
+ "os"
+ "path"
+ "path/filepath"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+ "sync"
+ "text/template"
+ "time"
+
+ "github.com/go-resty/resty/v2"
+)
+
+const (
+ // APIConfigEnvVar environment var to get path to Linode config
+ APIConfigEnvVar = "LINODE_CONFIG"
+ // APIConfigProfileEnvVar specifies the profile to use when loading from a Linode config
+ APIConfigProfileEnvVar = "LINODE_PROFILE"
+ // APIHost Linode API hostname
+ APIHost = "api.linode.com"
+ // APIHostVar environment var to check for alternate API URL
+ APIHostVar = "LINODE_URL"
+ // APIHostCert environment var containing path to CA cert to validate against
+ APIHostCert = "LINODE_CA"
+ // APIVersion Linode API version
+ APIVersion = "v4"
+ // APIVersionVar environment var to check for alternate API Version
+ APIVersionVar = "LINODE_API_VERSION"
+ // APIProto connect to API with http(s)
+ APIProto = "https"
+ // APIEnvVar environment var to check for API token
+ APIEnvVar = "LINODE_TOKEN"
+ // APISecondsPerPoll how frequently to poll for new Events or Status in WaitFor functions
+ APISecondsPerPoll = 3
+ // Maximum wait time for retries
+ APIRetryMaxWaitTime = time.Duration(30) * time.Second
+ APIDefaultCacheExpiration = time.Minute * 15
+)
+
+//nolint:unused
+var (
+ reqLogTemplate = template.Must(template.New("request").Parse(`Sending request:
+Method: {{.Method}}
+URL: {{.URL}}
+Headers: {{.Headers}}
+Body: {{.Body}}`))
+
+ respLogTemplate = template.Must(template.New("response").Parse(`Received response:
+Status: {{.Status}}
+Headers: {{.Headers}}
+Body: {{.Body}}`))
+)
+
+var envDebug = false
+
+// Client is a wrapper around the Resty client
+type Client struct {
+ resty *resty.Client
+ userAgent string
+ debug bool
+ retryConditionals []RetryConditional
+
+ pollInterval time.Duration
+
+ baseURL string
+ apiVersion string
+ apiProto string
+ selectedProfile string
+ loadedProfile string
+
+ configProfiles map[string]ConfigProfile
+
+ // Fields for caching endpoint responses
+ shouldCache bool
+ cacheExpiration time.Duration
+ cachedEntries map[string]clientCacheEntry
+ cachedEntryLock *sync.RWMutex
+}
+
+type EnvDefaults struct {
+ Token string
+ Profile string
+}
+
+type clientCacheEntry struct {
+ Created time.Time
+ Data any
+ // If != nil, use this instead of the
+ // global expiry
+ ExpiryOverride *time.Duration
+}
+
+type (
+ Request = resty.Request
+ Response = resty.Response
+ Logger = resty.Logger
+)
+
+func init() {
+ // Whether we will enable Resty debugging output
+ if apiDebug, ok := os.LookupEnv("LINODE_DEBUG"); ok {
+ if parsed, err := strconv.ParseBool(apiDebug); err == nil {
+ envDebug = parsed
+ log.Println("[INFO] LINODE_DEBUG being set to", envDebug)
+ } else {
+ log.Println("[WARN] LINODE_DEBUG should be an integer, 0 or 1")
+ }
+ }
+}
+
+// SetUserAgent sets a custom user-agent for HTTP requests
+func (c *Client) SetUserAgent(ua string) *Client {
+ c.userAgent = ua
+ c.resty.SetHeader("User-Agent", c.userAgent)
+
+ return c
+}
+
+type RequestParams struct {
+ Body any
+ Response any
+}
+
+// Generic helper to execute HTTP requests using the net/http package
+//
+// nolint:unused, funlen, gocognit
+func (c *httpClient) doRequest(ctx context.Context, method, url string, params RequestParams) error {
+ var (
+ req *http.Request
+ bodyBuffer *bytes.Buffer
+ resp *http.Response
+ err error
+ )
+
+ for range httpDefaultRetryCount {
+ req, bodyBuffer, err = c.createRequest(ctx, method, url, params)
+ if err != nil {
+ return err
+ }
+
+ if err = c.applyBeforeRequest(req); err != nil {
+ return err
+ }
+
+ if c.debug && c.logger != nil {
+ c.logRequest(req, method, url, bodyBuffer)
+ }
+
+ processResponse := func() error {
+ defer func() {
+ closeErr := resp.Body.Close()
+ if closeErr != nil && err == nil {
+ err = closeErr
+ }
+ }()
+ if err = c.checkHTTPError(resp); err != nil {
+ return err
+ }
+ if c.debug && c.logger != nil {
+ var logErr error
+ resp, logErr = c.logResponse(resp)
+ if logErr != nil {
+ return logErr
+ }
+ }
+ if params.Response != nil {
+ if err = c.decodeResponseBody(resp, params.Response); err != nil {
+ return err
+ }
+ }
+
+ // Apply after-response mutations
+ if err = c.applyAfterResponse(resp); err != nil {
+ return err
+ }
+
+ return nil
+ }
+
+ resp, err = c.sendRequest(req)
+ if err == nil {
+ if err = processResponse(); err == nil {
+ return nil
+ }
+ }
+
+ if !c.shouldRetry(resp, err) {
+ break
+ }
+
+ retryAfter, retryErr := c.retryAfter(resp)
+ if retryErr != nil {
+ return retryErr
+ }
+
+ // Sleep for the specified duration before retrying.
+ // If retryAfter is 0 (i.e., Retry-After header is not found),
+ // no delay is applied.
+ time.Sleep(retryAfter)
+ }
+
+ return err
+}
+
+// nolint:unused
+func (c *httpClient) shouldRetry(resp *http.Response, err error) bool {
+ for _, retryConditional := range c.retryConditionals {
+ if retryConditional(resp, err) {
+ return true
+ }
+ }
+ return false
+}
+
+// nolint:unused
+func (c *httpClient) createRequest(ctx context.Context, method, url string, params RequestParams) (*http.Request, *bytes.Buffer, error) {
+ var bodyReader io.Reader
+ var bodyBuffer *bytes.Buffer
+
+ if params.Body != nil {
+ bodyBuffer = new(bytes.Buffer)
+ if err := json.NewEncoder(bodyBuffer).Encode(params.Body); err != nil {
+ if c.debug && c.logger != nil {
+ c.logger.Errorf("failed to encode body: %v", err)
+ }
+ return nil, nil, fmt.Errorf("failed to encode body: %w", err)
+ }
+ bodyReader = bodyBuffer
+ }
+
+ req, err := http.NewRequestWithContext(ctx, method, url, bodyReader)
+ if err != nil {
+ if c.debug && c.logger != nil {
+ c.logger.Errorf("failed to create request: %v", err)
+ }
+ return nil, nil, fmt.Errorf("failed to create request: %w", err)
+ }
+
+ req.Header.Set("Content-Type", "application/json")
+ req.Header.Set("Accept", "application/json")
+ if c.userAgent != "" {
+ req.Header.Set("User-Agent", c.userAgent)
+ }
+
+ return req, bodyBuffer, nil
+}
+
+// nolint:unused
+func (c *httpClient) applyBeforeRequest(req *http.Request) error {
+ for _, mutate := range c.onBeforeRequest {
+ if err := mutate(req); err != nil {
+ if c.debug && c.logger != nil {
+ c.logger.Errorf("failed to mutate before request: %v", err)
+ }
+ return fmt.Errorf("failed to mutate before request: %w", err)
+ }
+ }
+ return nil
+}
+
+// nolint:unused
+func (c *httpClient) applyAfterResponse(resp *http.Response) error {
+ for _, mutate := range c.onAfterResponse {
+ if err := mutate(resp); err != nil {
+ if c.debug && c.logger != nil {
+ c.logger.Errorf("failed to mutate after response: %v", err)
+ }
+ return fmt.Errorf("failed to mutate after response: %w", err)
+ }
+ }
+ return nil
+}
+
+// nolint:unused
+func (c *httpClient) logRequest(req *http.Request, method, url string, bodyBuffer *bytes.Buffer) {
+ var reqBody string
+ if bodyBuffer != nil {
+ reqBody = bodyBuffer.String()
+ } else {
+ reqBody = "nil"
+ }
+
+ var logBuf bytes.Buffer
+ err := reqLogTemplate.Execute(&logBuf, map[string]interface{}{
+ "Method": method,
+ "URL": url,
+ "Headers": req.Header,
+ "Body": reqBody,
+ })
+ if err == nil {
+ c.logger.Debugf(logBuf.String())
+ }
+}
+
+// nolint:unused
+func (c *httpClient) sendRequest(req *http.Request) (*http.Response, error) {
+ resp, err := c.httpClient.Do(req)
+ if err != nil {
+ if c.debug && c.logger != nil {
+ c.logger.Errorf("failed to send request: %v", err)
+ }
+ return nil, fmt.Errorf("failed to send request: %w", err)
+ }
+ return resp, nil
+}
+
+// nolint:unused
+func (c *httpClient) checkHTTPError(resp *http.Response) error {
+ _, err := coupleAPIErrorsHTTP(resp, nil)
+ if err != nil {
+ if c.debug && c.logger != nil {
+ c.logger.Errorf("received HTTP error: %v", err)
+ }
+ return err
+ }
+ return nil
+}
+
+// nolint:unused
+func (c *httpClient) logResponse(resp *http.Response) (*http.Response, error) {
+ var respBody bytes.Buffer
+ if _, err := io.Copy(&respBody, resp.Body); err != nil {
+ c.logger.Errorf("failed to read response body: %v", err)
+ }
+
+ var logBuf bytes.Buffer
+ err := respLogTemplate.Execute(&logBuf, map[string]interface{}{
+ "Status": resp.Status,
+ "Headers": resp.Header,
+ "Body": respBody.String(),
+ })
+ if err == nil {
+ c.logger.Debugf(logBuf.String())
+ }
+
+ resp.Body = io.NopCloser(bytes.NewReader(respBody.Bytes()))
+ return resp, nil
+}
+
+// nolint:unused
+func (c *httpClient) decodeResponseBody(resp *http.Response, response interface{}) error {
+ if err := json.NewDecoder(resp.Body).Decode(response); err != nil {
+ if c.debug && c.logger != nil {
+ c.logger.Errorf("failed to decode response: %v", err)
+ }
+ return fmt.Errorf("failed to decode response: %w", err)
+ }
+ return nil
+}
+
+// R wraps resty's R method
+func (c *Client) R(ctx context.Context) *resty.Request {
+ return c.resty.R().
+ ExpectContentType("application/json").
+ SetHeader("Content-Type", "application/json").
+ SetContext(ctx).
+ SetError(APIError{})
+}
+
+// SetDebug sets the debug on resty's client
+func (c *Client) SetDebug(debug bool) *Client {
+ c.debug = debug
+ c.resty.SetDebug(debug)
+
+ return c
+}
+
+// SetLogger allows the user to override the output
+// logger for debug logs.
+func (c *Client) SetLogger(logger Logger) *Client {
+ c.resty.SetLogger(logger)
+
+ return c
+}
+
+//nolint:unused
+func (c *httpClient) httpSetDebug(debug bool) *httpClient {
+ c.debug = debug
+
+ return c
+}
+
+//nolint:unused
+func (c *httpClient) httpSetLogger(logger httpLogger) *httpClient {
+ c.logger = logger
+
+ return c
+}
+
+// OnBeforeRequest adds a handler to the request body to run before the request is sent
+func (c *Client) OnBeforeRequest(m func(request *Request) error) {
+ c.resty.OnBeforeRequest(func(_ *resty.Client, req *resty.Request) error {
+ return m(req)
+ })
+}
+
+// OnAfterResponse adds a handler to the request body to run before the request is sent
+func (c *Client) OnAfterResponse(m func(response *Response) error) {
+ c.resty.OnAfterResponse(func(_ *resty.Client, req *resty.Response) error {
+ return m(req)
+ })
+}
+
+// nolint:unused
+func (c *httpClient) httpOnBeforeRequest(m func(*http.Request) error) *httpClient {
+ c.onBeforeRequest = append(c.onBeforeRequest, m)
+
+ return c
+}
+
+// nolint:unused
+func (c *httpClient) httpOnAfterResponse(m func(*http.Response) error) *httpClient {
+ c.onAfterResponse = append(c.onAfterResponse, m)
+
+ return c
+}
+
+// UseURL parses the individual components of the given API URL and configures the client
+// accordingly. For example, a valid URL.
+// For example:
+//
+// client.UseURL("https://api.test.linode.com/v4beta")
+func (c *Client) UseURL(apiURL string) (*Client, error) {
+ parsedURL, err := url.Parse(apiURL)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse URL: %w", err)
+ }
+
+ // Create a new URL excluding the path to use as the base URL
+ baseURL := &url.URL{
+ Host: parsedURL.Host,
+ Scheme: parsedURL.Scheme,
+ }
+
+ c.SetBaseURL(baseURL.String())
+
+ versionMatches := regexp.MustCompile(`/v[a-zA-Z0-9]+`).FindAllString(parsedURL.Path, -1)
+
+ // Only set the version if a version is found in the URL, else use the default
+ if len(versionMatches) > 0 {
+ c.SetAPIVersion(
+ strings.Trim(versionMatches[len(versionMatches)-1], "/"),
+ )
+ }
+
+ return c, nil
+}
+
+// SetBaseURL sets the base URL of the Linode v4 API (https://api.linode.com/v4)
+func (c *Client) SetBaseURL(baseURL string) *Client {
+ baseURLPath, _ := url.Parse(baseURL)
+
+ c.baseURL = path.Join(baseURLPath.Host, baseURLPath.Path)
+ c.apiProto = baseURLPath.Scheme
+
+ c.updateHostURL()
+
+ return c
+}
+
+// SetAPIVersion sets the version of the API to interface with
+func (c *Client) SetAPIVersion(apiVersion string) *Client {
+ c.apiVersion = apiVersion
+
+ c.updateHostURL()
+
+ return c
+}
+
+func (c *Client) updateHostURL() {
+ apiProto := APIProto
+ baseURL := APIHost
+ apiVersion := APIVersion
+
+ if c.baseURL != "" {
+ baseURL = c.baseURL
+ }
+
+ if c.apiVersion != "" {
+ apiVersion = c.apiVersion
+ }
+
+ if c.apiProto != "" {
+ apiProto = c.apiProto
+ }
+
+ c.resty.SetBaseURL(
+ fmt.Sprintf(
+ "%s://%s/%s",
+ apiProto,
+ baseURL,
+ url.PathEscape(apiVersion),
+ ),
+ )
+}
+
+// SetRootCertificate adds a root certificate to the underlying TLS client config
+func (c *Client) SetRootCertificate(path string) *Client {
+ c.resty.SetRootCertificate(path)
+ return c
+}
+
+// SetToken sets the API token for all requests from this client
+// Only necessary if you haven't already provided the http client to NewClient() configured with the token.
+func (c *Client) SetToken(token string) *Client {
+ c.resty.SetHeader("Authorization", fmt.Sprintf("Bearer %s", token))
+ return c
+}
+
+// SetRetries adds retry conditions for "Linode Busy." errors and 429s.
+func (c *Client) SetRetries() *Client {
+ c.
+ addRetryConditional(linodeBusyRetryCondition).
+ addRetryConditional(tooManyRequestsRetryCondition).
+ addRetryConditional(serviceUnavailableRetryCondition).
+ addRetryConditional(requestTimeoutRetryCondition).
+ addRetryConditional(requestGOAWAYRetryCondition).
+ addRetryConditional(requestNGINXRetryCondition).
+ SetRetryMaxWaitTime(APIRetryMaxWaitTime)
+ configureRetries(c)
+ return c
+}
+
+// AddRetryCondition adds a RetryConditional function to the Client
+func (c *Client) AddRetryCondition(retryCondition RetryConditional) *Client {
+ c.resty.AddRetryCondition(resty.RetryConditionFunc(retryCondition))
+ return c
+}
+
+func (c *Client) addRetryConditional(retryConditional RetryConditional) *Client {
+ c.retryConditionals = append(c.retryConditionals, retryConditional)
+ return c
+}
+
+func (c *Client) addCachedResponse(endpoint string, response any, expiry *time.Duration) {
+ if !c.shouldCache {
+ return
+ }
+
+ responseValue := reflect.ValueOf(response)
+
+ entry := clientCacheEntry{
+ Created: time.Now(),
+ ExpiryOverride: expiry,
+ }
+
+ switch responseValue.Kind() {
+ case reflect.Ptr:
+ // We want to automatically deref pointers to
+ // avoid caching mutable data.
+ entry.Data = responseValue.Elem().Interface()
+ default:
+ entry.Data = response
+ }
+
+ c.cachedEntryLock.Lock()
+ defer c.cachedEntryLock.Unlock()
+
+ c.cachedEntries[endpoint] = entry
+}
+
+func (c *Client) getCachedResponse(endpoint string) any {
+ if !c.shouldCache {
+ return nil
+ }
+
+ c.cachedEntryLock.RLock()
+
+ // Hacky logic to dynamically RUnlock
+ // only if it is still locked by the
+ // end of the function.
+ // This is necessary as we take write
+ // access if the entry has expired.
+ rLocked := true
+ defer func() {
+ if rLocked {
+ c.cachedEntryLock.RUnlock()
+ }
+ }()
+
+ entry, ok := c.cachedEntries[endpoint]
+ if !ok {
+ return nil
+ }
+
+ // Handle expired entries
+ elapsedTime := time.Since(entry.Created)
+
+ hasExpired := elapsedTime > c.cacheExpiration
+ if entry.ExpiryOverride != nil {
+ hasExpired = elapsedTime > *entry.ExpiryOverride
+ }
+
+ if hasExpired {
+ // We need to give up our read access and request read-write access
+ c.cachedEntryLock.RUnlock()
+ rLocked = false
+
+ c.cachedEntryLock.Lock()
+ defer c.cachedEntryLock.Unlock()
+
+ delete(c.cachedEntries, endpoint)
+ return nil
+ }
+
+ return c.cachedEntries[endpoint].Data
+}
+
+// InvalidateCache clears all cached responses for all endpoints.
+func (c *Client) InvalidateCache() {
+ c.cachedEntryLock.Lock()
+ defer c.cachedEntryLock.Unlock()
+
+ // GC will handle the old map
+ c.cachedEntries = make(map[string]clientCacheEntry)
+}
+
+// InvalidateCacheEndpoint invalidates a single cached endpoint.
+func (c *Client) InvalidateCacheEndpoint(endpoint string) error {
+ u, err := url.Parse(endpoint)
+ if err != nil {
+ return fmt.Errorf("failed to parse URL for caching: %w", err)
+ }
+
+ c.cachedEntryLock.Lock()
+ defer c.cachedEntryLock.Unlock()
+
+ delete(c.cachedEntries, u.Path)
+
+ return nil
+}
+
+// SetGlobalCacheExpiration sets the desired time for any cached response
+// to be valid for.
+func (c *Client) SetGlobalCacheExpiration(expiryTime time.Duration) {
+ c.cacheExpiration = expiryTime
+}
+
+// UseCache sets whether response caching should be used
+func (c *Client) UseCache(value bool) {
+ c.shouldCache = value
+}
+
+// SetRetryMaxWaitTime sets the maximum delay before retrying a request.
+func (c *Client) SetRetryMaxWaitTime(maxWaitTime time.Duration) *Client {
+ c.resty.SetRetryMaxWaitTime(maxWaitTime)
+ return c
+}
+
+// SetRetryWaitTime sets the default (minimum) delay before retrying a request.
+func (c *Client) SetRetryWaitTime(minWaitTime time.Duration) *Client {
+ c.resty.SetRetryWaitTime(minWaitTime)
+ return c
+}
+
+// SetRetryAfter sets the callback function to be invoked with a failed request
+// to determine wben it should be retried.
+func (c *Client) SetRetryAfter(callback RetryAfter) *Client {
+ c.resty.SetRetryAfter(resty.RetryAfterFunc(callback))
+ return c
+}
+
+// SetRetryCount sets the maximum retry attempts before aborting.
+func (c *Client) SetRetryCount(count int) *Client {
+ c.resty.SetRetryCount(count)
+ return c
+}
+
+// SetPollDelay sets the number of milliseconds to wait between events or status polls.
+// Affects all WaitFor* functions and retries.
+func (c *Client) SetPollDelay(delay time.Duration) *Client {
+ c.pollInterval = delay
+ return c
+}
+
+// GetPollDelay gets the number of milliseconds to wait between events or status polls.
+// Affects all WaitFor* functions and retries.
+func (c *Client) GetPollDelay() time.Duration {
+ return c.pollInterval
+}
+
+// SetHeader sets a custom header to be used in all API requests made with the current
+// client.
+// NOTE: Some headers may be overridden by the individual request functions.
+func (c *Client) SetHeader(name, value string) {
+ c.resty.SetHeader(name, value)
+}
+
+func (c *Client) enableLogSanitization() *Client {
+ c.resty.OnRequestLog(func(r *resty.RequestLog) error {
+ // masking authorization header
+ r.Header.Set("Authorization", "Bearer *******************************")
+ return nil
+ })
+
+ return c
+}
+
+// NewClient factory to create new Client struct
+func NewClient(hc *http.Client) (client Client) {
+ if hc != nil {
+ client.resty = resty.NewWithClient(hc)
+ } else {
+ client.resty = resty.New()
+ }
+
+ client.shouldCache = true
+ client.cacheExpiration = APIDefaultCacheExpiration
+ client.cachedEntries = make(map[string]clientCacheEntry)
+ client.cachedEntryLock = &sync.RWMutex{}
+
+ client.SetUserAgent(DefaultUserAgent)
+
+ baseURL, baseURLExists := os.LookupEnv(APIHostVar)
+
+ if baseURLExists {
+ client.SetBaseURL(baseURL)
+ }
+ apiVersion, apiVersionExists := os.LookupEnv(APIVersionVar)
+ if apiVersionExists {
+ client.SetAPIVersion(apiVersion)
+ } else {
+ client.SetAPIVersion(APIVersion)
+ }
+
+ certPath, certPathExists := os.LookupEnv(APIHostCert)
+
+ if certPathExists {
+ cert, err := os.ReadFile(filepath.Clean(certPath))
+ if err != nil {
+ log.Fatalf("[ERROR] Error when reading cert at %s: %s\n", certPath, err.Error())
+ }
+
+ client.SetRootCertificate(certPath)
+
+ if envDebug {
+ log.Printf("[DEBUG] Set API root certificate to %s with contents %s\n", certPath, cert)
+ }
+ }
+
+ client.
+ SetRetryWaitTime(APISecondsPerPoll * time.Second).
+ SetPollDelay(APISecondsPerPoll * time.Second).
+ SetRetries().
+ SetDebug(envDebug).
+ enableLogSanitization()
+
+ return
+}
+
+// NewClientFromEnv creates a Client and initializes it with values
+// from the LINODE_CONFIG file and the LINODE_TOKEN environment variable.
+func NewClientFromEnv(hc *http.Client) (*Client, error) {
+ client := NewClient(hc)
+
+ // Users are expected to chain NewClient(...) and LoadConfig(...) to customize these options
+ configPath, err := resolveValidConfigPath()
+ if err != nil {
+ return nil, err
+ }
+
+ // Populate the token from the environment.
+ // Tokens should be first priority to maintain backwards compatibility
+ if token, ok := os.LookupEnv(APIEnvVar); ok && token != "" {
+ client.SetToken(token)
+ return &client, nil
+ }
+
+ if p, ok := os.LookupEnv(APIConfigEnvVar); ok {
+ configPath = p
+ } else if !ok && configPath == "" {
+ return nil, fmt.Errorf("no linode config file or token found")
+ }
+
+ configProfile := DefaultConfigProfile
+
+ if p, ok := os.LookupEnv(APIConfigProfileEnvVar); ok {
+ configProfile = p
+ }
+
+ client.selectedProfile = configProfile
+
+ // We should only load the config if the config file exists
+ if _, err := os.Stat(configPath); err != nil {
+ return nil, fmt.Errorf("error loading config file %s: %w", configPath, err)
+ }
+
+ err = client.preLoadConfig(configPath)
+ return &client, err
+}
+
+func (c *Client) preLoadConfig(configPath string) error {
+ if envDebug {
+ log.Printf("[INFO] Loading profile from %s\n", configPath)
+ }
+
+ if err := c.LoadConfig(&LoadConfigOptions{
+ Path: configPath,
+ SkipLoadProfile: true,
+ }); err != nil {
+ return err
+ }
+
+ // We don't want to load the profile until the user is actually making requests
+ c.OnBeforeRequest(func(_ *Request) error {
+ if c.loadedProfile != c.selectedProfile {
+ if err := c.UseProfile(c.selectedProfile); err != nil {
+ return err
+ }
+ }
+
+ return nil
+ })
+
+ return nil
+}
+
+func copyBool(bPtr *bool) *bool {
+ if bPtr == nil {
+ return nil
+ }
+
+ t := *bPtr
+
+ return &t
+}
+
+func copyInt(iPtr *int) *int {
+ if iPtr == nil {
+ return nil
+ }
+
+ t := *iPtr
+
+ return &t
+}
+
+func copyString(sPtr *string) *string {
+ if sPtr == nil {
+ return nil
+ }
+
+ t := *sPtr
+
+ return &t
+}
+
+func copyTime(tPtr *time.Time) *time.Time {
+ if tPtr == nil {
+ return nil
+ }
+
+ t := *tPtr
+
+ return &t
+}
+
+func generateListCacheURL(endpoint string, opts *ListOptions) (string, error) {
+ if opts == nil {
+ return endpoint, nil
+ }
+
+ hashedOpts, err := opts.Hash()
+ if err != nil {
+ return endpoint, err
+ }
+
+ return fmt.Sprintf("%s:%s", endpoint, hashedOpts), nil
+}
diff --git a/vendor/github.com/linode/linodego/client_http.go b/vendor/github.com/linode/linodego/client_http.go
new file mode 100644
index 00000000..7f16362c
--- /dev/null
+++ b/vendor/github.com/linode/linodego/client_http.go
@@ -0,0 +1,56 @@
+package linodego
+
+import (
+ "net/http"
+ "sync"
+ "time"
+)
+
+// Client is a wrapper around the Resty client
+//
+//nolint:unused
+type httpClient struct {
+ //nolint:unused
+ httpClient *http.Client
+ //nolint:unused
+ userAgent string
+ //nolint:unused
+ debug bool
+ //nolint:unused
+ retryConditionals []httpRetryConditional
+ //nolint:unused
+ retryAfter httpRetryAfter
+
+ //nolint:unused
+ pollInterval time.Duration
+
+ //nolint:unused
+ baseURL string
+ //nolint:unused
+ apiVersion string
+ //nolint:unused
+ apiProto string
+ //nolint:unused
+ selectedProfile string
+ //nolint:unused
+ loadedProfile string
+
+ //nolint:unused
+ configProfiles map[string]ConfigProfile
+
+ // Fields for caching endpoint responses
+ //nolint:unused
+ shouldCache bool
+ //nolint:unused
+ cacheExpiration time.Duration
+ //nolint:unused
+ cachedEntries map[string]clientCacheEntry
+ //nolint:unused
+ cachedEntryLock *sync.RWMutex
+ //nolint:unused
+ logger httpLogger
+ //nolint:unused
+ onBeforeRequest []func(*http.Request) error
+ //nolint:unused
+ onAfterResponse []func(*http.Response) error
+}
diff --git a/vendor/github.com/linode/linodego/config.go b/vendor/github.com/linode/linodego/config.go
new file mode 100644
index 00000000..6bccf83f
--- /dev/null
+++ b/vendor/github.com/linode/linodego/config.go
@@ -0,0 +1,152 @@
+package linodego
+
+import (
+ "fmt"
+ "os"
+ "strings"
+
+ "gopkg.in/ini.v1"
+)
+
+const (
+ DefaultConfigProfile = "default"
+)
+
+var DefaultConfigPaths = []string{
+ "%s/.config/linode",
+ "%s/.config/linode-cli",
+}
+
+type ConfigProfile struct {
+ APIToken string `ini:"token"`
+ APIVersion string `ini:"api_version"`
+ APIURL string `ini:"api_url"`
+}
+
+type LoadConfigOptions struct {
+ Path string
+ Profile string
+ SkipLoadProfile bool
+}
+
+// LoadConfig loads a Linode config according to the option's argument.
+// If no options are specified, the following defaults will be used:
+// Path: ~/.config/linode
+// Profile: default
+func (c *Client) LoadConfig(options *LoadConfigOptions) error {
+ path, err := resolveValidConfigPath()
+ if err != nil {
+ return err
+ }
+
+ profileOption := DefaultConfigProfile
+
+ if options != nil {
+ if options.Path != "" {
+ path = options.Path
+ }
+
+ if options.Profile != "" {
+ profileOption = options.Profile
+ }
+ }
+
+ cfg, err := ini.Load(path)
+ if err != nil {
+ return err
+ }
+
+ defaultConfig := ConfigProfile{
+ APIToken: "",
+ APIURL: APIHost,
+ APIVersion: APIVersion,
+ }
+
+ if cfg.HasSection("default") {
+ err := cfg.Section("default").MapTo(&defaultConfig)
+ if err != nil {
+ return fmt.Errorf("failed to map default profile: %w", err)
+ }
+ }
+
+ result := make(map[string]ConfigProfile)
+
+ for _, profile := range cfg.Sections() {
+ name := strings.ToLower(profile.Name())
+
+ f := defaultConfig
+ if err := profile.MapTo(&f); err != nil {
+ return fmt.Errorf("failed to map values: %w", err)
+ }
+
+ result[name] = f
+ }
+
+ c.configProfiles = result
+
+ if !options.SkipLoadProfile {
+ if err := c.UseProfile(profileOption); err != nil {
+ return fmt.Errorf("unable to use profile %s: %w", profileOption, err)
+ }
+ }
+
+ return nil
+}
+
+// UseProfile switches client to use the specified profile.
+// The specified profile must be already be loaded using client.LoadConfig(...)
+func (c *Client) UseProfile(name string) error {
+ name = strings.ToLower(name)
+
+ profile, ok := c.configProfiles[name]
+ if !ok {
+ return fmt.Errorf("profile %s does not exist", name)
+ }
+
+ if profile.APIToken == "" {
+ return fmt.Errorf("unable to resolve linode_token for profile %s", name)
+ }
+
+ if profile.APIURL == "" {
+ return fmt.Errorf("unable to resolve linode_api_url for profile %s", name)
+ }
+
+ if profile.APIVersion == "" {
+ return fmt.Errorf("unable to resolve linode_api_version for profile %s", name)
+ }
+
+ c.SetToken(profile.APIToken)
+ c.SetBaseURL(profile.APIURL)
+ c.SetAPIVersion(profile.APIVersion)
+ c.selectedProfile = name
+ c.loadedProfile = name
+
+ return nil
+}
+
+func FormatConfigPath(path string) (string, error) {
+ homeDir, err := os.UserHomeDir()
+ if err != nil {
+ return "", err
+ }
+
+ return fmt.Sprintf(path, homeDir), nil
+}
+
+func resolveValidConfigPath() (string, error) {
+ for _, cfg := range DefaultConfigPaths {
+ p, err := FormatConfigPath(cfg)
+ if err != nil {
+ return "", err
+ }
+
+ if _, err := os.Stat(p); err != nil {
+ continue
+ }
+
+ return p, err
+ }
+
+ // An empty result may not be an error
+ return "", nil
+}
diff --git a/vendor/github.com/linode/linodego/databases.go b/vendor/github.com/linode/linodego/databases.go
new file mode 100644
index 00000000..c665da77
--- /dev/null
+++ b/vendor/github.com/linode/linodego/databases.go
@@ -0,0 +1,193 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+type (
+ DatabaseEngineType string
+ DatabaseDayOfWeek int
+ DatabaseMaintenanceFrequency string
+ DatabaseStatus string
+)
+
+const (
+ DatabaseMaintenanceDayMonday DatabaseDayOfWeek = iota + 1
+ DatabaseMaintenanceDayTuesday
+ DatabaseMaintenanceDayWednesday
+ DatabaseMaintenanceDayThursday
+ DatabaseMaintenanceDayFriday
+ DatabaseMaintenanceDaySaturday
+ DatabaseMaintenanceDaySunday
+)
+
+const (
+ DatabaseMaintenanceFrequencyWeekly DatabaseMaintenanceFrequency = "weekly"
+ DatabaseMaintenanceFrequencyMonthly DatabaseMaintenanceFrequency = "monthly"
+)
+
+const (
+ DatabaseEngineTypeMySQL DatabaseEngineType = "mysql"
+ DatabaseEngineTypePostgres DatabaseEngineType = "postgresql"
+)
+
+const (
+ DatabaseStatusProvisioning DatabaseStatus = "provisioning"
+ DatabaseStatusActive DatabaseStatus = "active"
+ DatabaseStatusDeleting DatabaseStatus = "deleting"
+ DatabaseStatusDeleted DatabaseStatus = "deleted"
+ DatabaseStatusSuspending DatabaseStatus = "suspending"
+ DatabaseStatusSuspended DatabaseStatus = "suspended"
+ DatabaseStatusResuming DatabaseStatus = "resuming"
+ DatabaseStatusRestoring DatabaseStatus = "restoring"
+ DatabaseStatusFailed DatabaseStatus = "failed"
+ DatabaseStatusDegraded DatabaseStatus = "degraded"
+ DatabaseStatusUpdating DatabaseStatus = "updating"
+ DatabaseStatusBackingUp DatabaseStatus = "backing_up"
+)
+
+// A Database is a instance of Linode Managed Databases
+type Database struct {
+ ID int `json:"id"`
+ Status DatabaseStatus `json:"status"`
+ Label string `json:"label"`
+ Hosts DatabaseHost `json:"hosts"`
+ Region string `json:"region"`
+ Type string `json:"type"`
+ Engine string `json:"engine"`
+ Version string `json:"version"`
+ ClusterSize int `json:"cluster_size"`
+ ReplicationType string `json:"replication_type"`
+ SSLConnection bool `json:"ssl_connection"`
+ Encrypted bool `json:"encrypted"`
+ AllowList []string `json:"allow_list"`
+ InstanceURI string `json:"instance_uri"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+}
+
+// DatabaseHost for Primary/Secondary of Database
+type DatabaseHost struct {
+ Primary string `json:"primary"`
+ Secondary string `json:"secondary,omitempty"`
+}
+
+// DatabaseEngine is information about Engines supported by Linode Managed Databases
+type DatabaseEngine struct {
+ ID string `json:"id"`
+ Engine string `json:"engine"`
+ Version string `json:"version"`
+}
+
+// DatabaseMaintenanceWindow stores information about a MySQL cluster's maintenance window
+type DatabaseMaintenanceWindow struct {
+ DayOfWeek DatabaseDayOfWeek `json:"day_of_week"`
+ Duration int `json:"duration"`
+ Frequency DatabaseMaintenanceFrequency `json:"frequency"`
+ HourOfDay int `json:"hour_of_day"`
+ WeekOfMonth *int `json:"week_of_month"`
+}
+
+// DatabaseType is information about the supported Database Types by Linode Managed Databases
+type DatabaseType struct {
+ ID string `json:"id"`
+ Label string `json:"label"`
+ Class string `json:"class"`
+ VirtualCPUs int `json:"vcpus"`
+ Disk int `json:"disk"`
+ Memory int `json:"memory"`
+ Engines DatabaseTypeEngineMap `json:"engines"`
+}
+
+// DatabaseTypeEngineMap stores a list of Database Engine types by engine
+type DatabaseTypeEngineMap struct {
+ MySQL []DatabaseTypeEngine `json:"mysql"`
+}
+
+// DatabaseTypeEngine Sizes and Prices
+type DatabaseTypeEngine struct {
+ Quantity int `json:"quantity"`
+ Price ClusterPrice `json:"price"`
+}
+
+// ClusterPrice for Hourly and Monthly price models
+type ClusterPrice struct {
+ Hourly float32 `json:"hourly"`
+ Monthly float32 `json:"monthly"`
+}
+
+func (d *Database) UnmarshalJSON(b []byte) error {
+ type Mask Database
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(d),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ d.Created = (*time.Time)(p.Created)
+ d.Updated = (*time.Time)(p.Updated)
+ return nil
+}
+
+// ListDatabases lists all Database instances in Linode Managed Databases for the account
+func (c *Client) ListDatabases(ctx context.Context, opts *ListOptions) ([]Database, error) {
+ response, err := getPaginatedResults[Database](ctx, c, "databases/instances", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// ListDatabaseEngines lists all Database Engines. This endpoint is cached by default.
+func (c *Client) ListDatabaseEngines(ctx context.Context, opts *ListOptions) ([]DatabaseEngine, error) {
+ response, err := getPaginatedResults[DatabaseEngine](ctx, c, "databases/engines", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetDatabaseEngine returns a specific Database Engine. This endpoint is cached by default.
+func (c *Client) GetDatabaseEngine(ctx context.Context, _ *ListOptions, engineID string) (*DatabaseEngine, error) {
+ e := formatAPIPath("databases/engines/%s", engineID)
+ response, err := doGETRequest[DatabaseEngine](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// ListDatabaseTypes lists all Types of Database provided in Linode Managed Databases. This endpoint is cached by default.
+func (c *Client) ListDatabaseTypes(ctx context.Context, opts *ListOptions) ([]DatabaseType, error) {
+ response, err := getPaginatedResults[DatabaseType](ctx, c, "databases/types", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetDatabaseType returns a specific Database Type. This endpoint is cached by default.
+func (c *Client) GetDatabaseType(ctx context.Context, _ *ListOptions, typeID string) (*DatabaseType, error) {
+ e := formatAPIPath("databases/types/%s", typeID)
+ response, err := doGETRequest[DatabaseType](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/domain_records.go b/vendor/github.com/linode/linodego/domain_records.go
new file mode 100644
index 00000000..11e246d2
--- /dev/null
+++ b/vendor/github.com/linode/linodego/domain_records.go
@@ -0,0 +1,130 @@
+package linodego
+
+import (
+ "context"
+)
+
+// DomainRecord represents a DomainRecord object
+type DomainRecord struct {
+ ID int `json:"id"`
+ Type DomainRecordType `json:"type"`
+ Name string `json:"name"`
+ Target string `json:"target"`
+ Priority int `json:"priority"`
+ Weight int `json:"weight"`
+ Port int `json:"port"`
+ Service *string `json:"service"`
+ Protocol *string `json:"protocol"`
+ TTLSec int `json:"ttl_sec"`
+ Tag *string `json:"tag"`
+}
+
+// DomainRecordCreateOptions fields are those accepted by CreateDomainRecord
+type DomainRecordCreateOptions struct {
+ Type DomainRecordType `json:"type"`
+ Name string `json:"name"`
+ Target string `json:"target"`
+ Priority *int `json:"priority,omitempty"`
+ Weight *int `json:"weight,omitempty"`
+ Port *int `json:"port,omitempty"`
+ Service *string `json:"service,omitempty"`
+ Protocol *string `json:"protocol,omitempty"`
+ TTLSec int `json:"ttl_sec,omitempty"` // 0 is not accepted by Linode, so can be omitted
+ Tag *string `json:"tag,omitempty"`
+}
+
+// DomainRecordUpdateOptions fields are those accepted by UpdateDomainRecord
+type DomainRecordUpdateOptions struct {
+ Type DomainRecordType `json:"type,omitempty"`
+ Name string `json:"name,omitempty"`
+ Target string `json:"target,omitempty"`
+ Priority *int `json:"priority,omitempty"` // 0 is valid, so omit only nil values
+ Weight *int `json:"weight,omitempty"` // 0 is valid, so omit only nil values
+ Port *int `json:"port,omitempty"` // 0 is valid to spec, so omit only nil values
+ Service *string `json:"service,omitempty"`
+ Protocol *string `json:"protocol,omitempty"`
+ TTLSec int `json:"ttl_sec,omitempty"` // 0 is not accepted by Linode, so can be omitted
+ Tag *string `json:"tag,omitempty"`
+}
+
+// DomainRecordType constants start with RecordType and include Linode API Domain Record Types
+type DomainRecordType string
+
+// DomainRecordType contants are the DNS record types a DomainRecord can assign
+const (
+ RecordTypeA DomainRecordType = "A"
+ RecordTypeAAAA DomainRecordType = "AAAA"
+ RecordTypeNS DomainRecordType = "NS"
+ RecordTypeMX DomainRecordType = "MX"
+ RecordTypeCNAME DomainRecordType = "CNAME"
+ RecordTypeTXT DomainRecordType = "TXT"
+ RecordTypeSRV DomainRecordType = "SRV"
+ RecordTypePTR DomainRecordType = "PTR"
+ RecordTypeCAA DomainRecordType = "CAA"
+)
+
+// GetUpdateOptions converts a DomainRecord to DomainRecordUpdateOptions for use in UpdateDomainRecord
+func (d DomainRecord) GetUpdateOptions() (du DomainRecordUpdateOptions) {
+ du.Type = d.Type
+ du.Name = d.Name
+ du.Target = d.Target
+ du.Priority = copyInt(&d.Priority)
+ du.Weight = copyInt(&d.Weight)
+ du.Port = copyInt(&d.Port)
+ du.Service = copyString(d.Service)
+ du.Protocol = copyString(d.Protocol)
+ du.TTLSec = d.TTLSec
+ du.Tag = copyString(d.Tag)
+
+ return
+}
+
+// ListDomainRecords lists DomainRecords
+func (c *Client) ListDomainRecords(ctx context.Context, domainID int, opts *ListOptions) ([]DomainRecord, error) {
+ response, err := getPaginatedResults[DomainRecord](ctx, c, formatAPIPath("domains/%d/records", domainID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetDomainRecord gets the domainrecord with the provided ID
+func (c *Client) GetDomainRecord(ctx context.Context, domainID int, recordID int) (*DomainRecord, error) {
+ e := formatAPIPath("domains/%d/records/%d", domainID, recordID)
+ response, err := doGETRequest[DomainRecord](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateDomainRecord creates a DomainRecord
+func (c *Client) CreateDomainRecord(ctx context.Context, domainID int, opts DomainRecordCreateOptions) (*DomainRecord, error) {
+ e := formatAPIPath("domains/%d/records", domainID)
+ response, err := doPOSTRequest[DomainRecord](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateDomainRecord updates the DomainRecord with the specified id
+func (c *Client) UpdateDomainRecord(ctx context.Context, domainID int, recordID int, opts DomainRecordUpdateOptions) (*DomainRecord, error) {
+ e := formatAPIPath("domains/%d/records/%d", domainID, recordID)
+ response, err := doPUTRequest[DomainRecord](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteDomainRecord deletes the DomainRecord with the specified id
+func (c *Client) DeleteDomainRecord(ctx context.Context, domainID int, recordID int) error {
+ e := formatAPIPath("domains/%d/records/%d", domainID, recordID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/domains.go b/vendor/github.com/linode/linodego/domains.go
new file mode 100644
index 00000000..0bc05bdd
--- /dev/null
+++ b/vendor/github.com/linode/linodego/domains.go
@@ -0,0 +1,246 @@
+package linodego
+
+import (
+ "context"
+)
+
+// Domain represents a Domain object
+type Domain struct {
+ // This Domain's unique ID
+ ID int `json:"id"`
+
+ // The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.
+ Domain string `json:"domain"`
+
+ // If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).
+ Type DomainType `json:"type"` // Enum:"master" "slave"
+
+ // Deprecated: The group this Domain belongs to. This is for display purposes only.
+ Group string `json:"group"`
+
+ // Used to control whether this Domain is currently being rendered.
+ Status DomainStatus `json:"status"` // Enum:"disabled" "active" "edit_mode" "has_errors"
+
+ // A description for this Domain. This is for display purposes only.
+ Description string `json:"description"`
+
+ // Start of Authority email address. This is required for master Domains.
+ SOAEmail string `json:"soa_email"`
+
+ // The interval, in seconds, at which a failed refresh should be retried.
+ // Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ RetrySec int `json:"retry_sec"`
+
+ // The IP addresses representing the master DNS for this Domain.
+ MasterIPs []string `json:"master_ips"`
+
+ // The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.
+ AXfrIPs []string `json:"axfr_ips"`
+
+ // An array of tags applied to this object. Tags are for organizational purposes only.
+ Tags []string `json:"tags"`
+
+ // The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ ExpireSec int `json:"expire_sec"`
+
+ // The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ RefreshSec int `json:"refresh_sec"`
+
+ // "Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ TTLSec int `json:"ttl_sec"`
+}
+
+// DomainZoneFile represents the Zone File of a Domain
+type DomainZoneFile struct {
+ ZoneFile []string `json:"zone_file"`
+}
+
+// DomainCreateOptions fields are those accepted by CreateDomain
+type DomainCreateOptions struct {
+ // The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.
+ Domain string `json:"domain"`
+
+ // If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).
+ // Enum:"master" "slave"
+ Type DomainType `json:"type"`
+
+ // Deprecated: The group this Domain belongs to. This is for display purposes only.
+ Group string `json:"group,omitempty"`
+
+ // Used to control whether this Domain is currently being rendered.
+ // Enum:"disabled" "active" "edit_mode" "has_errors"
+ Status DomainStatus `json:"status,omitempty"`
+
+ // A description for this Domain. This is for display purposes only.
+ Description string `json:"description,omitempty"`
+
+ // Start of Authority email address. This is required for master Domains.
+ SOAEmail string `json:"soa_email,omitempty"`
+
+ // The interval, in seconds, at which a failed refresh should be retried.
+ // Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ RetrySec int `json:"retry_sec,omitempty"`
+
+ // The IP addresses representing the master DNS for this Domain.
+ MasterIPs []string `json:"master_ips"`
+
+ // The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.
+ AXfrIPs []string `json:"axfr_ips"`
+
+ // An array of tags applied to this object. Tags are for organizational purposes only.
+ Tags []string `json:"tags"`
+
+ // The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ ExpireSec int `json:"expire_sec,omitempty"`
+
+ // The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ RefreshSec int `json:"refresh_sec,omitempty"`
+
+ // "Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ TTLSec int `json:"ttl_sec,omitempty"`
+}
+
+// DomainUpdateOptions converts a Domain to DomainUpdateOptions for use in UpdateDomain
+type DomainUpdateOptions struct {
+ // The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.
+ Domain string `json:"domain,omitempty"`
+
+ // If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).
+ // Enum:"master" "slave"
+ Type DomainType `json:"type,omitempty"`
+
+ // Deprecated: The group this Domain belongs to. This is for display purposes only.
+ Group string `json:"group,omitempty"`
+
+ // Used to control whether this Domain is currently being rendered.
+ // Enum:"disabled" "active" "edit_mode" "has_errors"
+ Status DomainStatus `json:"status,omitempty"`
+
+ // A description for this Domain. This is for display purposes only.
+ Description string `json:"description,omitempty"`
+
+ // Start of Authority email address. This is required for master Domains.
+ SOAEmail string `json:"soa_email,omitempty"`
+
+ // The interval, in seconds, at which a failed refresh should be retried.
+ // Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ RetrySec int `json:"retry_sec,omitempty"`
+
+ // The IP addresses representing the master DNS for this Domain.
+ MasterIPs []string `json:"master_ips"`
+
+ // The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.
+ AXfrIPs []string `json:"axfr_ips"`
+
+ // An array of tags applied to this object. Tags are for organizational purposes only.
+ Tags []string `json:"tags"`
+
+ // The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ ExpireSec int `json:"expire_sec,omitempty"`
+
+ // The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ RefreshSec int `json:"refresh_sec,omitempty"`
+
+ // "Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
+ TTLSec int `json:"ttl_sec,omitempty"`
+}
+
+// DomainType constants start with DomainType and include Linode API Domain Type values
+type DomainType string
+
+// DomainType constants reflect the DNS zone type of a Domain
+const (
+ DomainTypeMaster DomainType = "master"
+ DomainTypeSlave DomainType = "slave"
+)
+
+// DomainStatus constants start with DomainStatus and include Linode API Domain Status values
+type DomainStatus string
+
+// DomainStatus constants reflect the current status of a Domain
+const (
+ DomainStatusDisabled DomainStatus = "disabled"
+ DomainStatusActive DomainStatus = "active"
+ DomainStatusEditMode DomainStatus = "edit_mode"
+ DomainStatusHasErrors DomainStatus = "has_errors"
+)
+
+// GetUpdateOptions converts a Domain to DomainUpdateOptions for use in UpdateDomain
+func (d Domain) GetUpdateOptions() (du DomainUpdateOptions) {
+ du.Domain = d.Domain
+ du.Type = d.Type
+ du.Group = d.Group
+ du.Status = d.Status
+ du.Description = d.Description
+ du.SOAEmail = d.SOAEmail
+ du.RetrySec = d.RetrySec
+ du.MasterIPs = d.MasterIPs
+ du.AXfrIPs = d.AXfrIPs
+ du.Tags = d.Tags
+ du.ExpireSec = d.ExpireSec
+ du.RefreshSec = d.RefreshSec
+ du.TTLSec = d.TTLSec
+
+ return
+}
+
+// ListDomains lists Domains
+func (c *Client) ListDomains(ctx context.Context, opts *ListOptions) ([]Domain, error) {
+ response, err := getPaginatedResults[Domain](ctx, c, "domains", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetDomain gets the domain with the provided ID
+func (c *Client) GetDomain(ctx context.Context, domainID int) (*Domain, error) {
+ e := formatAPIPath("domains/%d", domainID)
+ response, err := doGETRequest[Domain](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateDomain creates a Domain
+func (c *Client) CreateDomain(ctx context.Context, opts DomainCreateOptions) (*Domain, error) {
+ e := "domains"
+ response, err := doPOSTRequest[Domain](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateDomain updates the Domain with the specified id
+func (c *Client) UpdateDomain(ctx context.Context, domainID int, opts DomainUpdateOptions) (*Domain, error) {
+ e := formatAPIPath("domains/%d", domainID)
+ response, err := doPUTRequest[Domain](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteDomain deletes the Domain with the specified id
+func (c *Client) DeleteDomain(ctx context.Context, domainID int) error {
+ e := formatAPIPath("domains/%d", domainID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// GetDomainZoneFile gets the zone file for the last rendered zone for the specified domain.
+func (c *Client) GetDomainZoneFile(ctx context.Context, domainID int) (*DomainZoneFile, error) {
+ e := formatAPIPath("domains/%d/zone-file", domainID)
+ response, err := doGETRequest[DomainZoneFile](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/env.sample b/vendor/github.com/linode/linodego/env.sample
new file mode 100644
index 00000000..b1c9d180
--- /dev/null
+++ b/vendor/github.com/linode/linodego/env.sample
@@ -0,0 +1,2 @@
+LINODE_TOKEN=
+LINODE_DEBUG=0
diff --git a/vendor/github.com/linode/linodego/errors.go b/vendor/github.com/linode/linodego/errors.go
new file mode 100644
index 00000000..be15c014
--- /dev/null
+++ b/vendor/github.com/linode/linodego/errors.go
@@ -0,0 +1,235 @@
+package linodego
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "reflect"
+ "strings"
+
+ "github.com/go-resty/resty/v2"
+)
+
+const (
+ ErrorUnsupported = iota
+ // ErrorFromString is the Code identifying Errors created by string types
+ ErrorFromString
+ // ErrorFromError is the Code identifying Errors created by error types
+ ErrorFromError
+ // ErrorFromStringer is the Code identifying Errors created by fmt.Stringer types
+ ErrorFromStringer
+)
+
+// Error wraps the LinodeGo error with the relevant http.Response
+type Error struct {
+ Response *http.Response
+ Code int
+ Message string
+}
+
+// APIErrorReason is an individual invalid request message returned by the Linode API
+type APIErrorReason struct {
+ Reason string `json:"reason"`
+ Field string `json:"field"`
+}
+
+func (r APIErrorReason) Error() string {
+ if len(r.Field) == 0 {
+ return r.Reason
+ }
+
+ return fmt.Sprintf("[%s] %s", r.Field, r.Reason)
+}
+
+// APIError is the error-set returned by the Linode API when presented with an invalid request
+type APIError struct {
+ Errors []APIErrorReason `json:"errors"`
+}
+
+// String returns the error reason in a formatted string
+func (r APIErrorReason) String() string {
+ return fmt.Sprintf("[%s] %s", r.Field, r.Reason)
+}
+
+func coupleAPIErrors(r *resty.Response, err error) (*resty.Response, error) {
+ if err != nil {
+ // an error was raised in go code, no need to check the resty Response
+ return nil, NewError(err)
+ }
+
+ if r.Error() == nil {
+ // no error in the resty Response
+ return r, nil
+ }
+
+ // handle the resty Response errors
+
+ // Check that response is of the correct content-type before unmarshalling
+ expectedContentType := r.Request.Header.Get("Accept")
+ responseContentType := r.Header().Get("Content-Type")
+
+ // If the upstream Linode API server being fronted fails to respond to the request,
+ // the http server will respond with a default "Bad Gateway" page with Content-Type
+ // "text/html".
+ if r.StatusCode() == http.StatusBadGateway && responseContentType == "text/html" { //nolint:goconst
+ return nil, Error{Code: http.StatusBadGateway, Message: http.StatusText(http.StatusBadGateway)}
+ }
+
+ if responseContentType != expectedContentType {
+ msg := fmt.Sprintf(
+ "Unexpected Content-Type: Expected: %v, Received: %v\nResponse body: %s",
+ expectedContentType,
+ responseContentType,
+ string(r.Body()),
+ )
+
+ return nil, Error{Code: r.StatusCode(), Message: msg}
+ }
+
+ apiError, ok := r.Error().(*APIError)
+ if !ok || (ok && len(apiError.Errors) == 0) {
+ return r, nil
+ }
+
+ return nil, NewError(r)
+}
+
+//nolint:unused
+func coupleAPIErrorsHTTP(resp *http.Response, err error) (*http.Response, error) {
+ if err != nil {
+ // an error was raised in go code, no need to check the http.Response
+ return nil, NewError(err)
+ }
+
+ if resp == nil || resp.StatusCode < 200 || resp.StatusCode >= 300 {
+ // Check that response is of the correct content-type before unmarshalling
+ expectedContentType := resp.Request.Header.Get("Accept")
+ responseContentType := resp.Header.Get("Content-Type")
+
+ // If the upstream server fails to respond to the request,
+ // the http server will respond with a default error page with Content-Type "text/html".
+ if resp.StatusCode == http.StatusBadGateway && responseContentType == "text/html" { //nolint:goconst
+ return nil, Error{Code: http.StatusBadGateway, Message: http.StatusText(http.StatusBadGateway)}
+ }
+
+ if responseContentType != expectedContentType {
+ bodyBytes, _ := io.ReadAll(resp.Body)
+ msg := fmt.Sprintf(
+ "Unexpected Content-Type: Expected: %v, Received: %v\nResponse body: %s",
+ expectedContentType,
+ responseContentType,
+ string(bodyBytes),
+ )
+
+ return nil, Error{Code: resp.StatusCode, Message: msg}
+ }
+
+ var apiError APIError
+ if err := json.NewDecoder(resp.Body).Decode(&apiError); err != nil {
+ return nil, NewError(fmt.Errorf("failed to decode response body: %w", err))
+ }
+
+ if len(apiError.Errors) == 0 {
+ return resp, nil
+ }
+
+ return nil, Error{Code: resp.StatusCode, Message: apiError.Errors[0].String()}
+ }
+
+ // no error in the http.Response
+ return resp, nil
+}
+
+func (e APIError) Error() string {
+ x := []string{}
+ for _, msg := range e.Errors {
+ x = append(x, msg.Error())
+ }
+
+ return strings.Join(x, "; ")
+}
+
+func (err Error) Error() string {
+ return fmt.Sprintf("[%03d] %s", err.Code, err.Message)
+}
+
+func (err Error) StatusCode() int {
+ return err.Code
+}
+
+func (err Error) Is(target error) bool {
+ if x, ok := target.(interface{ StatusCode() int }); ok || errors.As(target, &x) {
+ return err.StatusCode() == x.StatusCode()
+ }
+
+ return false
+}
+
+// NewError creates a linodego.Error with a Code identifying the source err type,
+// - ErrorFromString (1) from a string
+// - ErrorFromError (2) for an error
+// - ErrorFromStringer (3) for a Stringer
+// - HTTP Status Codes (100-600) for a resty.Response object
+func NewError(err any) *Error {
+ if err == nil {
+ return nil
+ }
+
+ switch e := err.(type) {
+ case *Error:
+ return e
+ case *resty.Response:
+ apiError, ok := e.Error().(*APIError)
+
+ if !ok {
+ return &Error{Code: ErrorUnsupported, Message: "Unexpected Resty Error Response, no error"}
+ }
+
+ return &Error{
+ Code: e.RawResponse.StatusCode,
+ Message: apiError.Error(),
+ Response: e.RawResponse,
+ }
+ case error:
+ return &Error{Code: ErrorFromError, Message: e.Error()}
+ case string:
+ return &Error{Code: ErrorFromString, Message: e}
+ case fmt.Stringer:
+ return &Error{Code: ErrorFromStringer, Message: e.String()}
+ default:
+ return &Error{Code: ErrorUnsupported, Message: fmt.Sprintf("Unsupported type to linodego.NewError: %s", reflect.TypeOf(e))}
+ }
+}
+
+// IsNotFound indicates if err indicates a 404 Not Found error from the Linode API.
+func IsNotFound(err error) bool {
+ return ErrHasStatus(err, http.StatusNotFound)
+}
+
+// ErrHasStatus checks if err is an error from the Linode API, and whether it contains the given HTTP status code.
+// More than one status code may be given.
+// If len(code) == 0, err is nil or is not a [Error], ErrHasStatus will return false.
+func ErrHasStatus(err error, code ...int) bool {
+ if err == nil {
+ return false
+ }
+
+ // Short-circuit if the caller did not provide any status codes.
+ if len(code) == 0 {
+ return false
+ }
+
+ var e *Error
+ if !errors.As(err, &e) {
+ return false
+ }
+ ec := e.StatusCode()
+ for _, c := range code {
+ if ec == c {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/linode/linodego/filter.go b/vendor/github.com/linode/linodego/filter.go
new file mode 100644
index 00000000..2f2d4056
--- /dev/null
+++ b/vendor/github.com/linode/linodego/filter.go
@@ -0,0 +1,97 @@
+package linodego
+
+import (
+ "encoding/json"
+)
+
+type FilterOperator string
+
+const (
+ Eq FilterOperator = "+eq"
+ Neq FilterOperator = "+neq"
+ Gt FilterOperator = "+gt"
+ Gte FilterOperator = "+gte"
+ Lt FilterOperator = "+lt"
+ Lte FilterOperator = "+lte"
+ Contains FilterOperator = "+contains"
+ Ascending = "asc"
+ Descending = "desc"
+)
+
+type FilterNode interface {
+ Key() string
+ JSONValueSegment() any
+}
+
+type Filter struct {
+ // Operator is the logic for all Children nodes ("+and"/"+or")
+ Operator string
+ Children []FilterNode
+ // OrderBy is the field you want to order your results by (ex: "+order_by": "class")
+ OrderBy string
+ // Order is the direction in which to order the results ("+order": "asc"/"desc")
+ Order string
+}
+
+func (f *Filter) AddField(op FilterOperator, key string, value any) {
+ f.Children = append(f.Children, &Comp{key, op, value})
+}
+
+func (f *Filter) MarshalJSON() ([]byte, error) {
+ result := make(map[string]any)
+
+ if f.OrderBy != "" {
+ result["+order_by"] = f.OrderBy
+ }
+
+ if f.Order != "" {
+ result["+order"] = f.Order
+ }
+
+ if f.Operator == "" {
+ for _, c := range f.Children {
+ result[c.Key()] = c.JSONValueSegment()
+ }
+
+ return json.Marshal(result)
+ }
+
+ fields := make([]map[string]any, len(f.Children))
+ for i, c := range f.Children {
+ fields[i] = map[string]any{
+ c.Key(): c.JSONValueSegment(),
+ }
+ }
+
+ result[f.Operator] = fields
+
+ return json.Marshal(result)
+}
+
+type Comp struct {
+ Column string
+ Operator FilterOperator
+ Value any
+}
+
+func (c *Comp) Key() string {
+ return c.Column
+}
+
+func (c *Comp) JSONValueSegment() any {
+ if c.Operator == Eq {
+ return c.Value
+ }
+
+ return map[string]any{
+ string(c.Operator): c.Value,
+ }
+}
+
+func Or(order string, orderBy string, nodes ...FilterNode) *Filter {
+ return &Filter{"+or", nodes, orderBy, order}
+}
+
+func And(order string, orderBy string, nodes ...FilterNode) *Filter {
+ return &Filter{"+and", nodes, orderBy, order}
+}
diff --git a/vendor/github.com/linode/linodego/firewall_devices.go b/vendor/github.com/linode/linodego/firewall_devices.go
new file mode 100644
index 00000000..91896d28
--- /dev/null
+++ b/vendor/github.com/linode/linodego/firewall_devices.go
@@ -0,0 +1,100 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// FirewallDeviceType represents the different kinds of devices governable by a Firewall
+type FirewallDeviceType string
+
+// FirewallDeviceType constants start with FirewallDevice
+const (
+ FirewallDeviceLinode FirewallDeviceType = "linode"
+ FirewallDeviceNodeBalancer FirewallDeviceType = "nodebalancer"
+)
+
+// FirewallDevice represents a device governed by a Firewall
+type FirewallDevice struct {
+ ID int `json:"id"`
+ Entity FirewallDeviceEntity `json:"entity"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+}
+
+// FirewallDeviceCreateOptions fields are those accepted by CreateFirewallDevice
+type FirewallDeviceCreateOptions struct {
+ ID int `json:"id"`
+ Type FirewallDeviceType `json:"type"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (device *FirewallDevice) UnmarshalJSON(b []byte) error {
+ type Mask FirewallDevice
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(device),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ device.Created = (*time.Time)(p.Created)
+ device.Updated = (*time.Time)(p.Updated)
+ return nil
+}
+
+// FirewallDeviceEntity contains information about a device associated with a Firewall
+type FirewallDeviceEntity struct {
+ ID int `json:"id"`
+ Type FirewallDeviceType `json:"type"`
+ Label string `json:"label"`
+ URL string `json:"url"`
+}
+
+// ListFirewallDevices get devices associated with a given Firewall
+func (c *Client) ListFirewallDevices(ctx context.Context, firewallID int, opts *ListOptions) ([]FirewallDevice, error) {
+ response, err := getPaginatedResults[FirewallDevice](ctx, c, formatAPIPath("networking/firewalls/%d/devices", firewallID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetFirewallDevice gets a FirewallDevice given an ID
+func (c *Client) GetFirewallDevice(ctx context.Context, firewallID, deviceID int) (*FirewallDevice, error) {
+ e := formatAPIPath("networking/firewalls/%d/devices/%d", firewallID, deviceID)
+ response, err := doGETRequest[FirewallDevice](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// AddFirewallDevice associates a Device with a given Firewall
+func (c *Client) CreateFirewallDevice(ctx context.Context, firewallID int, opts FirewallDeviceCreateOptions) (*FirewallDevice, error) {
+ e := formatAPIPath("networking/firewalls/%d/devices", firewallID)
+ response, err := doPOSTRequest[FirewallDevice](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteFirewallDevice disassociates a Device with a given Firewall
+func (c *Client) DeleteFirewallDevice(ctx context.Context, firewallID, deviceID int) error {
+ e := formatAPIPath("networking/firewalls/%d/devices/%d", firewallID, deviceID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/firewall_rules.go b/vendor/github.com/linode/linodego/firewall_rules.go
new file mode 100644
index 00000000..2a6d3b2e
--- /dev/null
+++ b/vendor/github.com/linode/linodego/firewall_rules.go
@@ -0,0 +1,62 @@
+package linodego
+
+import (
+ "context"
+)
+
+// NetworkProtocol enum type
+type NetworkProtocol string
+
+// NetworkProtocol enum values
+const (
+ TCP NetworkProtocol = "TCP"
+ UDP NetworkProtocol = "UDP"
+ ICMP NetworkProtocol = "ICMP"
+ IPENCAP NetworkProtocol = "IPENCAP"
+)
+
+// NetworkAddresses are arrays of ipv4 and v6 addresses
+type NetworkAddresses struct {
+ IPv4 *[]string `json:"ipv4,omitempty"`
+ IPv6 *[]string `json:"ipv6,omitempty"`
+}
+
+// A FirewallRule is a whitelist of ports, protocols, and addresses for which traffic should be allowed.
+type FirewallRule struct {
+ Action string `json:"action"`
+ Label string `json:"label"`
+ Description string `json:"description,omitempty"`
+ Ports string `json:"ports,omitempty"`
+ Protocol NetworkProtocol `json:"protocol"`
+ Addresses NetworkAddresses `json:"addresses"`
+}
+
+// FirewallRuleSet is a pair of inbound and outbound rules that specify what network traffic should be allowed.
+type FirewallRuleSet struct {
+ Inbound []FirewallRule `json:"inbound"`
+ InboundPolicy string `json:"inbound_policy"`
+ Outbound []FirewallRule `json:"outbound"`
+ OutboundPolicy string `json:"outbound_policy"`
+}
+
+// GetFirewallRules gets the FirewallRuleSet for the given Firewall.
+func (c *Client) GetFirewallRules(ctx context.Context, firewallID int) (*FirewallRuleSet, error) {
+ e := formatAPIPath("networking/firewalls/%d/rules", firewallID)
+ response, err := doGETRequest[FirewallRuleSet](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateFirewallRules updates the FirewallRuleSet for the given Firewall
+func (c *Client) UpdateFirewallRules(ctx context.Context, firewallID int, rules FirewallRuleSet) (*FirewallRuleSet, error) {
+ e := formatAPIPath("networking/firewalls/%d/rules", firewallID)
+ response, err := doPUTRequest[FirewallRuleSet](ctx, c, e, rules)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/firewalls.go b/vendor/github.com/linode/linodego/firewalls.go
new file mode 100644
index 00000000..1474f3dc
--- /dev/null
+++ b/vendor/github.com/linode/linodego/firewalls.go
@@ -0,0 +1,131 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// FirewallStatus enum type
+type FirewallStatus string
+
+// FirewallStatus enums start with Firewall
+const (
+ FirewallEnabled FirewallStatus = "enabled"
+ FirewallDisabled FirewallStatus = "disabled"
+ FirewallDeleted FirewallStatus = "deleted"
+)
+
+// A Firewall is a set of networking rules (iptables) applied to Devices with which it is associated
+type Firewall struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Status FirewallStatus `json:"status"`
+ Tags []string `json:"tags,omitempty"`
+ Rules FirewallRuleSet `json:"rules"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+}
+
+// DevicesCreationOptions fields are used when adding devices during the Firewall creation process.
+type DevicesCreationOptions struct {
+ Linodes []int `json:"linodes,omitempty"`
+ NodeBalancers []int `json:"nodebalancers,omitempty"`
+}
+
+// FirewallCreateOptions fields are those accepted by CreateFirewall
+type FirewallCreateOptions struct {
+ Label string `json:"label,omitempty"`
+ Rules FirewallRuleSet `json:"rules"`
+ Tags []string `json:"tags,omitempty"`
+ Devices DevicesCreationOptions `json:"devices,omitempty"`
+}
+
+// FirewallUpdateOptions is an options struct used when Updating a Firewall
+type FirewallUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+ Status FirewallStatus `json:"status,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+}
+
+// GetUpdateOptions converts a Firewall to FirewallUpdateOptions for use in Client.UpdateFirewall.
+func (f *Firewall) GetUpdateOptions() FirewallUpdateOptions {
+ return FirewallUpdateOptions{
+ Label: f.Label,
+ Status: f.Status,
+ Tags: &f.Tags,
+ }
+}
+
+// UnmarshalJSON for Firewall responses
+func (f *Firewall) UnmarshalJSON(b []byte) error {
+ type Mask Firewall
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(f),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ f.Created = (*time.Time)(p.Created)
+ f.Updated = (*time.Time)(p.Updated)
+ return nil
+}
+
+// ListFirewalls returns a paginated list of Cloud Firewalls
+func (c *Client) ListFirewalls(ctx context.Context, opts *ListOptions) ([]Firewall, error) {
+ response, err := getPaginatedResults[Firewall](ctx, c, "networking/firewalls", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateFirewall creates a single Firewall with at least one set of inbound or outbound rules
+func (c *Client) CreateFirewall(ctx context.Context, opts FirewallCreateOptions) (*Firewall, error) {
+ e := "networking/firewalls"
+ response, err := doPOSTRequest[Firewall](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetFirewall gets a single Firewall with the provided ID
+func (c *Client) GetFirewall(ctx context.Context, firewallID int) (*Firewall, error) {
+ e := formatAPIPath("networking/firewalls/%d", firewallID)
+ response, err := doGETRequest[Firewall](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateFirewall updates a Firewall with the given ID
+func (c *Client) UpdateFirewall(ctx context.Context, firewallID int, opts FirewallUpdateOptions) (*Firewall, error) {
+ e := formatAPIPath("networking/firewalls/%d", firewallID)
+ response, err := doPUTRequest[Firewall](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteFirewall deletes a single Firewall with the provided ID
+func (c *Client) DeleteFirewall(ctx context.Context, firewallID int) error {
+ e := formatAPIPath("networking/firewalls/%d", firewallID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/go.work b/vendor/github.com/linode/linodego/go.work
new file mode 100644
index 00000000..9f6d7df5
--- /dev/null
+++ b/vendor/github.com/linode/linodego/go.work
@@ -0,0 +1,7 @@
+go 1.22
+
+use (
+ .
+ ./k8s
+ ./test
+)
diff --git a/vendor/github.com/linode/linodego/images.go b/vendor/github.com/linode/linodego/images.go
new file mode 100644
index 00000000..9bbb2075
--- /dev/null
+++ b/vendor/github.com/linode/linodego/images.go
@@ -0,0 +1,249 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "io"
+ "time"
+
+ "github.com/go-resty/resty/v2"
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// ImageStatus represents the status of an Image.
+type ImageStatus string
+
+// ImageStatus options start with ImageStatus and include all Image statuses
+const (
+ ImageStatusCreating ImageStatus = "creating"
+ ImageStatusPendingUpload ImageStatus = "pending_upload"
+ ImageStatusAvailable ImageStatus = "available"
+)
+
+// ImageRegionStatus represents the status of an Image's replica.
+type ImageRegionStatus string
+
+// ImageRegionStatus options start with ImageRegionStatus and
+// include all Image replica statuses
+const (
+ ImageRegionStatusAvailable ImageRegionStatus = "available"
+ ImageRegionStatusCreating ImageRegionStatus = "creating"
+ ImageRegionStatusPending ImageRegionStatus = "pending"
+ ImageRegionStatusPendingReplication ImageRegionStatus = "pending replication"
+ ImageRegionStatusPendingDeletion ImageRegionStatus = "pending deletion"
+ ImageRegionStatusReplicating ImageRegionStatus = "replicating"
+)
+
+// ImageRegion represents the status of an Image object in a given Region.
+type ImageRegion struct {
+ Region string `json:"region"`
+ Status ImageRegionStatus `json:"status"`
+}
+
+// Image represents a deployable Image object for use with Linode Instances
+type Image struct {
+ ID string `json:"id"`
+ CreatedBy string `json:"created_by"`
+ Capabilities []string `json:"capabilities"`
+ Label string `json:"label"`
+ Description string `json:"description"`
+ Type string `json:"type"`
+ Vendor string `json:"vendor"`
+ Status ImageStatus `json:"status"`
+ Size int `json:"size"`
+ TotalSize int `json:"total_size"`
+ IsPublic bool `json:"is_public"`
+ Deprecated bool `json:"deprecated"`
+ Regions []ImageRegion `json:"regions"`
+ Tags []string `json:"tags"`
+
+ Updated *time.Time `json:"-"`
+ Created *time.Time `json:"-"`
+ Expiry *time.Time `json:"-"`
+ EOL *time.Time `json:"-"`
+}
+
+// ImageCreateOptions fields are those accepted by CreateImage
+type ImageCreateOptions struct {
+ DiskID int `json:"disk_id"`
+ Label string `json:"label"`
+ Description string `json:"description,omitempty"`
+ CloudInit bool `json:"cloud_init,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+}
+
+// ImageUpdateOptions fields are those accepted by UpdateImage
+type ImageUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+ Description *string `json:"description,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+}
+
+// ImageReplicateOptions represents the options accepted by the
+// ReplicateImage(...) function.
+type ImageReplicateOptions struct {
+ Regions []string `json:"regions"`
+}
+
+// ImageCreateUploadResponse fields are those returned by CreateImageUpload
+type ImageCreateUploadResponse struct {
+ Image *Image `json:"image"`
+ UploadTo string `json:"upload_to"`
+}
+
+// ImageCreateUploadOptions fields are those accepted by CreateImageUpload
+type ImageCreateUploadOptions struct {
+ Region string `json:"region"`
+ Label string `json:"label"`
+ Description string `json:"description,omitempty"`
+ CloudInit bool `json:"cloud_init,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+}
+
+// ImageUploadOptions fields are those accepted by UploadImage
+type ImageUploadOptions struct {
+ Region string `json:"region"`
+ Label string `json:"label"`
+ Description string `json:"description,omitempty"`
+ CloudInit bool `json:"cloud_init"`
+ Tags *[]string `json:"tags,omitempty"`
+ Image io.Reader
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *Image) UnmarshalJSON(b []byte) error {
+ type Mask Image
+
+ p := struct {
+ *Mask
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ Created *parseabletime.ParseableTime `json:"created"`
+ Expiry *parseabletime.ParseableTime `json:"expiry"`
+ EOL *parseabletime.ParseableTime `json:"eol"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Updated = (*time.Time)(p.Updated)
+ i.Created = (*time.Time)(p.Created)
+ i.Expiry = (*time.Time)(p.Expiry)
+ i.EOL = (*time.Time)(p.EOL)
+
+ return nil
+}
+
+// GetUpdateOptions converts an Image to ImageUpdateOptions for use in UpdateImage
+func (i Image) GetUpdateOptions() (iu ImageUpdateOptions) {
+ iu.Label = i.Label
+ iu.Description = copyString(&i.Description)
+ return
+}
+
+// ListImages lists Images.
+func (c *Client) ListImages(ctx context.Context, opts *ListOptions) ([]Image, error) {
+ return getPaginatedResults[Image](
+ ctx,
+ c,
+ "images",
+ opts,
+ )
+}
+
+// GetImage gets the Image with the provided ID.
+func (c *Client) GetImage(ctx context.Context, imageID string) (*Image, error) {
+ return doGETRequest[Image](
+ ctx,
+ c,
+ formatAPIPath("images/%s", imageID),
+ )
+}
+
+// CreateImage creates an Image.
+func (c *Client) CreateImage(ctx context.Context, opts ImageCreateOptions) (*Image, error) {
+ return doPOSTRequest[Image](
+ ctx,
+ c,
+ "images",
+ opts,
+ )
+}
+
+// UpdateImage updates the Image with the specified id.
+func (c *Client) UpdateImage(ctx context.Context, imageID string, opts ImageUpdateOptions) (*Image, error) {
+ return doPUTRequest[Image](
+ ctx,
+ c,
+ formatAPIPath("images/%s", imageID),
+ opts,
+ )
+}
+
+// ReplicateImage replicates an image to a given set of regions.
+// NOTE: Image replication may not currently be available to all users.
+func (c *Client) ReplicateImage(ctx context.Context, imageID string, opts ImageReplicateOptions) (*Image, error) {
+ return doPOSTRequest[Image](
+ ctx,
+ c,
+ formatAPIPath("images/%s/regions", imageID),
+ opts,
+ )
+}
+
+// DeleteImage deletes the Image with the specified id.
+func (c *Client) DeleteImage(ctx context.Context, imageID string) error {
+ return doDELETERequest(
+ ctx,
+ c,
+ formatAPIPath("images/%s", imageID),
+ )
+}
+
+// CreateImageUpload creates an Image and an upload URL.
+func (c *Client) CreateImageUpload(ctx context.Context, opts ImageCreateUploadOptions) (*Image, string, error) {
+ result, err := doPOSTRequest[ImageCreateUploadResponse](
+ ctx,
+ c,
+ "images/upload",
+ opts,
+ )
+ if err != nil {
+ return nil, "", err
+ }
+
+ return result.Image, result.UploadTo, nil
+}
+
+// UploadImageToURL uploads the given image to the given upload URL.
+func (c *Client) UploadImageToURL(ctx context.Context, uploadURL string, image io.Reader) error {
+ // Linode-specific headers do not need to be sent to this endpoint
+ req := resty.New().SetDebug(c.resty.Debug).R().
+ SetContext(ctx).
+ SetContentLength(true).
+ SetHeader("Content-Type", "application/octet-stream").
+ SetBody(image)
+
+ _, err := coupleAPIErrors(req.
+ Put(uploadURL))
+
+ return err
+}
+
+// UploadImage creates and uploads an image.
+func (c *Client) UploadImage(ctx context.Context, opts ImageUploadOptions) (*Image, error) {
+ image, uploadURL, err := c.CreateImageUpload(ctx, ImageCreateUploadOptions{
+ Label: opts.Label,
+ Region: opts.Region,
+ Description: opts.Description,
+ CloudInit: opts.CloudInit,
+ Tags: opts.Tags,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return image, c.UploadImageToURL(ctx, uploadURL, opts.Image)
+}
diff --git a/vendor/github.com/linode/linodego/instance_config_interfaces.go b/vendor/github.com/linode/linodego/instance_config_interfaces.go
new file mode 100644
index 00000000..945bcf90
--- /dev/null
+++ b/vendor/github.com/linode/linodego/instance_config_interfaces.go
@@ -0,0 +1,208 @@
+package linodego
+
+import (
+ "context"
+)
+
+// InstanceConfigInterface contains information about a configuration's network interface
+type InstanceConfigInterface struct {
+ ID int `json:"id"`
+ IPAMAddress string `json:"ipam_address"`
+ Label string `json:"label"`
+ Purpose ConfigInterfacePurpose `json:"purpose"`
+ Primary bool `json:"primary"`
+ Active bool `json:"active"`
+ VPCID *int `json:"vpc_id"`
+ SubnetID *int `json:"subnet_id"`
+ IPv4 *VPCIPv4 `json:"ipv4"`
+ IPRanges []string `json:"ip_ranges"`
+}
+
+type VPCIPv4 struct {
+ VPC string `json:"vpc,omitempty"`
+ NAT1To1 *string `json:"nat_1_1,omitempty"`
+}
+
+type InstanceConfigInterfaceCreateOptions struct {
+ IPAMAddress string `json:"ipam_address,omitempty"`
+ Label string `json:"label,omitempty"`
+ Purpose ConfigInterfacePurpose `json:"purpose,omitempty"`
+ Primary bool `json:"primary,omitempty"`
+ SubnetID *int `json:"subnet_id,omitempty"`
+ IPv4 *VPCIPv4 `json:"ipv4,omitempty"`
+ IPRanges []string `json:"ip_ranges,omitempty"`
+}
+
+type InstanceConfigInterfaceUpdateOptions struct {
+ Primary bool `json:"primary,omitempty"`
+ IPv4 *VPCIPv4 `json:"ipv4,omitempty"`
+ IPRanges *[]string `json:"ip_ranges,omitempty"`
+}
+
+type InstanceConfigInterfacesReorderOptions struct {
+ IDs []int `json:"ids"`
+}
+
+func getInstanceConfigInterfacesCreateOptionsList(
+ interfaces []InstanceConfigInterface,
+) []InstanceConfigInterfaceCreateOptions {
+ interfaceOptsList := make([]InstanceConfigInterfaceCreateOptions, len(interfaces))
+ for index, configInterface := range interfaces {
+ interfaceOptsList[index] = configInterface.GetCreateOptions()
+ }
+ return interfaceOptsList
+}
+
+func (i InstanceConfigInterface) GetCreateOptions() InstanceConfigInterfaceCreateOptions {
+ opts := InstanceConfigInterfaceCreateOptions{
+ Label: i.Label,
+ Purpose: i.Purpose,
+ Primary: i.Primary,
+ SubnetID: i.SubnetID,
+ }
+
+ if len(i.IPRanges) > 0 {
+ opts.IPRanges = i.IPRanges
+ }
+
+ if i.Purpose == InterfacePurposeVPC && i.IPv4 != nil {
+ opts.IPv4 = &VPCIPv4{
+ VPC: i.IPv4.VPC,
+ NAT1To1: i.IPv4.NAT1To1,
+ }
+ }
+
+ opts.IPAMAddress = i.IPAMAddress
+
+ return opts
+}
+
+func (i InstanceConfigInterface) GetUpdateOptions() InstanceConfigInterfaceUpdateOptions {
+ opts := InstanceConfigInterfaceUpdateOptions{
+ Primary: i.Primary,
+ }
+
+ if i.Purpose == InterfacePurposeVPC && i.IPv4 != nil {
+ opts.IPv4 = &VPCIPv4{
+ VPC: i.IPv4.VPC,
+ NAT1To1: i.IPv4.NAT1To1,
+ }
+ }
+
+ if i.IPRanges != nil {
+ // Copy the slice to prevent accidental
+ // mutations
+ copiedIPRanges := make([]string, len(i.IPRanges))
+ copy(copiedIPRanges, i.IPRanges)
+
+ opts.IPRanges = &copiedIPRanges
+ }
+
+ return opts
+}
+
+func (c *Client) AppendInstanceConfigInterface(
+ ctx context.Context,
+ linodeID int,
+ configID int,
+ opts InstanceConfigInterfaceCreateOptions,
+) (*InstanceConfigInterface, error) {
+ e := formatAPIPath("/linode/instances/%d/configs/%d/interfaces", linodeID, configID)
+ response, err := doPOSTRequest[InstanceConfigInterface](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+func (c *Client) GetInstanceConfigInterface(
+ ctx context.Context,
+ linodeID int,
+ configID int,
+ interfaceID int,
+) (*InstanceConfigInterface, error) {
+ e := formatAPIPath(
+ "linode/instances/%d/configs/%d/interfaces/%d",
+ linodeID,
+ configID,
+ interfaceID,
+ )
+ response, err := doGETRequest[InstanceConfigInterface](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+func (c *Client) ListInstanceConfigInterfaces(
+ ctx context.Context,
+ linodeID int,
+ configID int,
+) ([]InstanceConfigInterface, error) {
+ e := formatAPIPath(
+ "linode/instances/%d/configs/%d/interfaces",
+ linodeID,
+ configID,
+ )
+ response, err := doGETRequest[[]InstanceConfigInterface](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return *response, nil
+}
+
+func (c *Client) UpdateInstanceConfigInterface(
+ ctx context.Context,
+ linodeID int,
+ configID int,
+ interfaceID int,
+ opts InstanceConfigInterfaceUpdateOptions,
+) (*InstanceConfigInterface, error) {
+ e := formatAPIPath(
+ "linode/instances/%d/configs/%d/interfaces/%d",
+ linodeID,
+ configID,
+ interfaceID,
+ )
+ response, err := doPUTRequest[InstanceConfigInterface](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+func (c *Client) DeleteInstanceConfigInterface(
+ ctx context.Context,
+ linodeID int,
+ configID int,
+ interfaceID int,
+) error {
+ e := formatAPIPath(
+ "linode/instances/%d/configs/%d/interfaces/%d",
+ linodeID,
+ configID,
+ interfaceID,
+ )
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+func (c *Client) ReorderInstanceConfigInterfaces(
+ ctx context.Context,
+ linodeID int,
+ configID int,
+ opts InstanceConfigInterfacesReorderOptions,
+) error {
+ e := formatAPIPath(
+ "linode/instances/%d/configs/%d/interfaces/order",
+ linodeID,
+ configID,
+ )
+ _, err := doPOSTRequest[OAuthClient](ctx, c, e, opts)
+
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/instance_configs.go b/vendor/github.com/linode/linodego/instance_configs.go
new file mode 100644
index 00000000..020fce7f
--- /dev/null
+++ b/vendor/github.com/linode/linodego/instance_configs.go
@@ -0,0 +1,210 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// InstanceConfig represents all of the settings that control the boot and run configuration of a Linode Instance
+type InstanceConfig struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Comments string `json:"comments"`
+ Devices *InstanceConfigDeviceMap `json:"devices"`
+ Helpers *InstanceConfigHelpers `json:"helpers"`
+ Interfaces []InstanceConfigInterface `json:"interfaces"`
+ MemoryLimit int `json:"memory_limit"`
+ Kernel string `json:"kernel"`
+ InitRD *int `json:"init_rd"`
+ RootDevice string `json:"root_device"`
+ RunLevel string `json:"run_level"`
+ VirtMode string `json:"virt_mode"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+}
+
+// InstanceConfigDevice contains either the DiskID or VolumeID assigned to a Config Device
+type InstanceConfigDevice struct {
+ DiskID int `json:"disk_id,omitempty"`
+ VolumeID int `json:"volume_id,omitempty"`
+}
+
+// InstanceConfigDeviceMap contains SDA-SDH InstanceConfigDevice settings
+type InstanceConfigDeviceMap struct {
+ SDA *InstanceConfigDevice `json:"sda,omitempty"`
+ SDB *InstanceConfigDevice `json:"sdb,omitempty"`
+ SDC *InstanceConfigDevice `json:"sdc,omitempty"`
+ SDD *InstanceConfigDevice `json:"sdd,omitempty"`
+ SDE *InstanceConfigDevice `json:"sde,omitempty"`
+ SDF *InstanceConfigDevice `json:"sdf,omitempty"`
+ SDG *InstanceConfigDevice `json:"sdg,omitempty"`
+ SDH *InstanceConfigDevice `json:"sdh,omitempty"`
+}
+
+// InstanceConfigHelpers are Instance Config options that control Linux distribution specific tweaks
+type InstanceConfigHelpers struct {
+ UpdateDBDisabled bool `json:"updatedb_disabled"`
+ Distro bool `json:"distro"`
+ ModulesDep bool `json:"modules_dep"`
+ Network bool `json:"network"`
+ DevTmpFsAutomount bool `json:"devtmpfs_automount"`
+}
+
+// ConfigInterfacePurpose options start with InterfacePurpose and include all known interface purpose types
+type ConfigInterfacePurpose string
+
+const (
+ InterfacePurposePublic ConfigInterfacePurpose = "public"
+ InterfacePurposeVLAN ConfigInterfacePurpose = "vlan"
+ InterfacePurposeVPC ConfigInterfacePurpose = "vpc"
+)
+
+// InstanceConfigCreateOptions are InstanceConfig settings that can be used at creation
+type InstanceConfigCreateOptions struct {
+ Label string `json:"label,omitempty"`
+ Comments string `json:"comments,omitempty"`
+ Devices InstanceConfigDeviceMap `json:"devices"`
+ Helpers *InstanceConfigHelpers `json:"helpers,omitempty"`
+ Interfaces []InstanceConfigInterfaceCreateOptions `json:"interfaces"`
+ MemoryLimit int `json:"memory_limit,omitempty"`
+ Kernel string `json:"kernel,omitempty"`
+ InitRD int `json:"init_rd,omitempty"`
+ RootDevice *string `json:"root_device,omitempty"`
+ RunLevel string `json:"run_level,omitempty"`
+ VirtMode string `json:"virt_mode,omitempty"`
+}
+
+// InstanceConfigUpdateOptions are InstanceConfig settings that can be used in updates
+type InstanceConfigUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+ Comments string `json:"comments"`
+ Devices *InstanceConfigDeviceMap `json:"devices,omitempty"`
+ Helpers *InstanceConfigHelpers `json:"helpers,omitempty"`
+ Interfaces []InstanceConfigInterfaceCreateOptions `json:"interfaces"`
+ // MemoryLimit 0 means unlimitted, this is not omitted
+ MemoryLimit int `json:"memory_limit"`
+ Kernel string `json:"kernel,omitempty"`
+ // InitRD is nullable, permit the sending of null
+ InitRD *int `json:"init_rd"`
+ RootDevice string `json:"root_device,omitempty"`
+ RunLevel string `json:"run_level,omitempty"`
+ VirtMode string `json:"virt_mode,omitempty"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *InstanceConfig) UnmarshalJSON(b []byte) error {
+ type Mask InstanceConfig
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
+
+// GetCreateOptions converts a InstanceConfig to InstanceConfigCreateOptions for use in CreateInstanceConfig
+func (i InstanceConfig) GetCreateOptions() InstanceConfigCreateOptions {
+ initrd := 0
+ if i.InitRD != nil {
+ initrd = *i.InitRD
+ }
+ return InstanceConfigCreateOptions{
+ Label: i.Label,
+ Comments: i.Comments,
+ Devices: *i.Devices,
+ Helpers: i.Helpers,
+ Interfaces: getInstanceConfigInterfacesCreateOptionsList(i.Interfaces),
+ MemoryLimit: i.MemoryLimit,
+ Kernel: i.Kernel,
+ InitRD: initrd,
+ RootDevice: copyString(&i.RootDevice),
+ RunLevel: i.RunLevel,
+ VirtMode: i.VirtMode,
+ }
+}
+
+// GetUpdateOptions converts a InstanceConfig to InstanceConfigUpdateOptions for use in UpdateInstanceConfig
+func (i InstanceConfig) GetUpdateOptions() InstanceConfigUpdateOptions {
+ return InstanceConfigUpdateOptions{
+ Label: i.Label,
+ Comments: i.Comments,
+ Devices: i.Devices,
+ Helpers: i.Helpers,
+ Interfaces: getInstanceConfigInterfacesCreateOptionsList(i.Interfaces),
+ MemoryLimit: i.MemoryLimit,
+ Kernel: i.Kernel,
+ InitRD: copyInt(i.InitRD),
+ RootDevice: i.RootDevice,
+ RunLevel: i.RunLevel,
+ VirtMode: i.VirtMode,
+ }
+}
+
+// ListInstanceConfigs lists InstanceConfigs
+func (c *Client) ListInstanceConfigs(ctx context.Context, linodeID int, opts *ListOptions) ([]InstanceConfig, error) {
+ response, err := getPaginatedResults[InstanceConfig](ctx, c, formatAPIPath("linode/instances/%d/configs", linodeID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetInstanceConfig gets the template with the provided ID
+func (c *Client) GetInstanceConfig(ctx context.Context, linodeID int, configID int) (*InstanceConfig, error) {
+ e := formatAPIPath("linode/instances/%d/configs/%d", linodeID, configID)
+ response, err := doGETRequest[InstanceConfig](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateInstanceConfig creates a new InstanceConfig for the given Instance
+func (c *Client) CreateInstanceConfig(ctx context.Context, linodeID int, opts InstanceConfigCreateOptions) (*InstanceConfig, error) {
+ e := formatAPIPath("linode/instances/%d/configs", linodeID)
+ response, err := doPOSTRequest[InstanceConfig](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateInstanceConfig update an InstanceConfig for the given Instance
+func (c *Client) UpdateInstanceConfig(ctx context.Context, linodeID int, configID int, opts InstanceConfigUpdateOptions) (*InstanceConfig, error) {
+ e := formatAPIPath("linode/instances/%d/configs/%d", linodeID, configID)
+ response, err := doPUTRequest[InstanceConfig](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// RenameInstanceConfig renames an InstanceConfig
+func (c *Client) RenameInstanceConfig(ctx context.Context, linodeID int, configID int, label string) (*InstanceConfig, error) {
+ return c.UpdateInstanceConfig(ctx, linodeID, configID, InstanceConfigUpdateOptions{Label: label})
+}
+
+// DeleteInstanceConfig deletes a Linode InstanceConfig
+func (c *Client) DeleteInstanceConfig(ctx context.Context, linodeID int, configID int) error {
+ e := formatAPIPath("linode/instances/%d/configs/%d", linodeID, configID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/instance_disks.go b/vendor/github.com/linode/linodego/instance_disks.go
new file mode 100644
index 00000000..22f3c28f
--- /dev/null
+++ b/vendor/github.com/linode/linodego/instance_disks.go
@@ -0,0 +1,167 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// InstanceDisk represents an Instance Disk object
+type InstanceDisk struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Status DiskStatus `json:"status"`
+ Size int `json:"size"`
+ Filesystem DiskFilesystem `json:"filesystem"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+
+ // NOTE: Disk encryption may not currently be available to all users.
+ DiskEncryption InstanceDiskEncryption `json:"disk_encryption"`
+}
+
+// DiskFilesystem constants start with Filesystem and include Linode API Filesystems
+type DiskFilesystem string
+
+// DiskFilesystem constants represent the filesystems types an Instance Disk may use
+const (
+ FilesystemRaw DiskFilesystem = "raw"
+ FilesystemSwap DiskFilesystem = "swap"
+ FilesystemExt3 DiskFilesystem = "ext3"
+ FilesystemExt4 DiskFilesystem = "ext4"
+ FilesystemInitrd DiskFilesystem = "initrd"
+)
+
+// DiskStatus constants have the prefix "Disk" and include Linode API Instance Disk Status
+type DiskStatus string
+
+// DiskStatus constants represent the status values an Instance Disk may have
+const (
+ DiskReady DiskStatus = "ready"
+ DiskNotReady DiskStatus = "not ready"
+ DiskDeleting DiskStatus = "deleting"
+)
+
+// InstanceDiskCreateOptions are InstanceDisk settings that can be used at creation
+type InstanceDiskCreateOptions struct {
+ Label string `json:"label"`
+ Size int `json:"size"`
+
+ // Image is optional, but requires RootPass if provided
+ Image string `json:"image,omitempty"`
+ RootPass string `json:"root_pass,omitempty"`
+
+ Filesystem string `json:"filesystem,omitempty"`
+ AuthorizedKeys []string `json:"authorized_keys,omitempty"`
+ AuthorizedUsers []string `json:"authorized_users,omitempty"`
+ StackscriptID int `json:"stackscript_id,omitempty"`
+ StackscriptData map[string]string `json:"stackscript_data,omitempty"`
+}
+
+// InstanceDiskUpdateOptions are InstanceDisk settings that can be used in updates
+type InstanceDiskUpdateOptions struct {
+ Label string `json:"label"`
+}
+
+// ListInstanceDisks lists InstanceDisks
+func (c *Client) ListInstanceDisks(ctx context.Context, linodeID int, opts *ListOptions) ([]InstanceDisk, error) {
+ response, err := getPaginatedResults[InstanceDisk](ctx, c, formatAPIPath("linode/instances/%d/disks", linodeID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *InstanceDisk) UnmarshalJSON(b []byte) error {
+ type Mask InstanceDisk
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
+
+// GetInstanceDisk gets the template with the provided ID
+func (c *Client) GetInstanceDisk(ctx context.Context, linodeID int, diskID int) (*InstanceDisk, error) {
+ e := formatAPIPath("linode/instances/%d/disks/%d", linodeID, diskID)
+ response, err := doGETRequest[InstanceDisk](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateInstanceDisk creates a new InstanceDisk for the given Instance
+func (c *Client) CreateInstanceDisk(ctx context.Context, linodeID int, opts InstanceDiskCreateOptions) (*InstanceDisk, error) {
+ e := formatAPIPath("linode/instances/%d/disks", linodeID)
+ response, err := doPOSTRequest[InstanceDisk](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateInstanceDisk creates a new InstanceDisk for the given Instance
+func (c *Client) UpdateInstanceDisk(ctx context.Context, linodeID int, diskID int, opts InstanceDiskUpdateOptions) (*InstanceDisk, error) {
+ e := formatAPIPath("linode/instances/%d/disks/%d", linodeID, diskID)
+ response, err := doPUTRequest[InstanceDisk](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// RenameInstanceDisk renames an InstanceDisk
+func (c *Client) RenameInstanceDisk(ctx context.Context, linodeID int, diskID int, label string) (*InstanceDisk, error) {
+ return c.UpdateInstanceDisk(ctx, linodeID, diskID, InstanceDiskUpdateOptions{Label: label})
+}
+
+// ResizeInstanceDisk resizes the size of the Instance disk
+func (c *Client) ResizeInstanceDisk(ctx context.Context, linodeID int, diskID int, size int) error {
+ opts := map[string]any{
+ "size": size,
+ }
+
+ e := formatAPIPath("linode/instances/%d/disks/%d/resize", linodeID, diskID)
+ _, err := doPOSTRequest[InstanceDisk](ctx, c, e, opts)
+
+ return err
+}
+
+// PasswordResetInstanceDisk resets the "root" account password on the Instance disk
+func (c *Client) PasswordResetInstanceDisk(ctx context.Context, linodeID int, diskID int, password string) error {
+ opts := map[string]any{
+ "password": password,
+ }
+
+ e := formatAPIPath("linode/instances/%d/disks/%d/password", linodeID, diskID)
+ _, err := doPOSTRequest[InstanceDisk](ctx, c, e, opts)
+
+ return err
+}
+
+// DeleteInstanceDisk deletes a Linode Instance Disk
+func (c *Client) DeleteInstanceDisk(ctx context.Context, linodeID int, diskID int) error {
+ e := formatAPIPath("linode/instances/%d/disks/%d", linodeID, diskID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/instance_firewalls.go b/vendor/github.com/linode/linodego/instance_firewalls.go
new file mode 100644
index 00000000..2ab254df
--- /dev/null
+++ b/vendor/github.com/linode/linodego/instance_firewalls.go
@@ -0,0 +1,15 @@
+package linodego
+
+import (
+ "context"
+)
+
+// ListInstanceFirewalls returns a paginated list of Cloud Firewalls for linodeID
+func (c *Client) ListInstanceFirewalls(ctx context.Context, linodeID int, opts *ListOptions) ([]Firewall, error) {
+ response, err := getPaginatedResults[Firewall](ctx, c, formatAPIPath("linode/instances/%d/firewalls", linodeID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/instance_ips.go b/vendor/github.com/linode/linodego/instance_ips.go
new file mode 100644
index 00000000..7a5ad62c
--- /dev/null
+++ b/vendor/github.com/linode/linodego/instance_ips.go
@@ -0,0 +1,162 @@
+package linodego
+
+import (
+ "context"
+)
+
+// InstanceIPAddressResponse contains the IPv4 and IPv6 details for an Instance
+type InstanceIPAddressResponse struct {
+ IPv4 *InstanceIPv4Response `json:"ipv4"`
+ IPv6 *InstanceIPv6Response `json:"ipv6"`
+}
+
+// InstanceIPv4Response contains the details of all IPv4 addresses associated with an Instance
+type InstanceIPv4Response struct {
+ Public []*InstanceIP `json:"public"`
+ Private []*InstanceIP `json:"private"`
+ Shared []*InstanceIP `json:"shared"`
+ Reserved []*InstanceIP `json:"reserved"`
+ VPC []*VPCIP `json:"vpc"`
+}
+
+// InstanceIP represents an Instance IP with additional DNS and networking details
+type InstanceIP struct {
+ Address string `json:"address"`
+ Gateway string `json:"gateway"`
+ SubnetMask string `json:"subnet_mask"`
+ Prefix int `json:"prefix"`
+ Type InstanceIPType `json:"type"`
+ Public bool `json:"public"`
+ RDNS string `json:"rdns"`
+ LinodeID int `json:"linode_id"`
+ Region string `json:"region"`
+ VPCNAT1To1 *InstanceIPNAT1To1 `json:"vpc_nat_1_1"`
+ Reserved bool `json:"reserved"`
+}
+
+// VPCIP represents a private IP address in a VPC subnet with additional networking details
+type VPCIP struct {
+ Address *string `json:"address"`
+ AddressRange *string `json:"address_range"`
+ Gateway string `json:"gateway"`
+ SubnetMask string `json:"subnet_mask"`
+ Prefix int `json:"prefix"`
+ LinodeID int `json:"linode_id"`
+ Region string `json:"region"`
+ Active bool `json:"active"`
+ NAT1To1 *string `json:"nat_1_1"`
+ VPCID int `json:"vpc_id"`
+ SubnetID int `json:"subnet_id"`
+ ConfigID int `json:"config_id"`
+ InterfaceID int `json:"interface_id"`
+}
+
+// InstanceIPv6Response contains the IPv6 addresses and ranges for an Instance
+type InstanceIPv6Response struct {
+ LinkLocal *InstanceIP `json:"link_local"`
+ SLAAC *InstanceIP `json:"slaac"`
+ Global []IPv6Range `json:"global"`
+}
+
+// InstanceIPNAT1To1 contains information about the NAT 1:1 mapping
+// of a public IP address to a VPC subnet.
+type InstanceIPNAT1To1 struct {
+ Address string `json:"address"`
+ SubnetID int `json:"subnet_id"`
+ VPCID int `json:"vpc_id"`
+}
+
+// IPv6Range represents a range of IPv6 addresses routed to a single Linode in a given Region
+type IPv6Range struct {
+ Range string `json:"range"`
+ Region string `json:"region"`
+ Prefix int `json:"prefix"`
+
+ RouteTarget string `json:"route_target"`
+
+ // These fields are only returned by GetIPv6Range(...)
+ IsBGP bool `json:"is_bgp"`
+ Linodes []int `json:"linodes"`
+}
+
+type InstanceReserveIPOptions struct {
+ Type string `json:"type"`
+ Public bool `json:"public"`
+ Address string `json:"address"`
+}
+
+// InstanceIPType constants start with IPType and include Linode Instance IP Types
+type InstanceIPType string
+
+// InstanceIPType constants represent the IP types an Instance IP may be
+const (
+ IPTypeIPv4 InstanceIPType = "ipv4"
+ IPTypeIPv6 InstanceIPType = "ipv6"
+ IPTypeIPv6Pool InstanceIPType = "ipv6/pool"
+ IPTypeIPv6Range InstanceIPType = "ipv6/range"
+)
+
+// GetInstanceIPAddresses gets the IPAddresses for a Linode instance
+func (c *Client) GetInstanceIPAddresses(ctx context.Context, linodeID int) (*InstanceIPAddressResponse, error) {
+ e := formatAPIPath("linode/instances/%d/ips", linodeID)
+ response, err := doGETRequest[InstanceIPAddressResponse](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetInstanceIPAddress gets the IPAddress for a Linode instance matching a supplied IP address
+func (c *Client) GetInstanceIPAddress(ctx context.Context, linodeID int, ipaddress string) (*InstanceIP, error) {
+ e := formatAPIPath("linode/instances/%d/ips/%s", linodeID, ipaddress)
+ response, err := doGETRequest[InstanceIP](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// AddInstanceIPAddress adds a public or private IP to a Linode instance
+func (c *Client) AddInstanceIPAddress(ctx context.Context, linodeID int, public bool) (*InstanceIP, error) {
+ instanceipRequest := struct {
+ Type string `json:"type"`
+ Public bool `json:"public"`
+ }{"ipv4", public}
+
+ e := formatAPIPath("linode/instances/%d/ips", linodeID)
+ response, err := doPOSTRequest[InstanceIP](ctx, c, e, instanceipRequest)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateInstanceIPAddress updates the IPAddress with the specified instance id and IP address
+func (c *Client) UpdateInstanceIPAddress(ctx context.Context, linodeID int, ipAddress string, opts IPAddressUpdateOptions) (*InstanceIP, error) {
+ e := formatAPIPath("linode/instances/%d/ips/%s", linodeID, ipAddress)
+ response, err := doPUTRequest[InstanceIP](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+func (c *Client) DeleteInstanceIPAddress(ctx context.Context, linodeID int, ipAddress string) error {
+ e := formatAPIPath("linode/instances/%d/ips/%s", linodeID, ipAddress)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// Function to add additional reserved IPV4 addresses to an existing linode
+func (c *Client) AssignInstanceReservedIP(ctx context.Context, linodeID int, opts InstanceReserveIPOptions) (*InstanceIP, error) {
+ endpoint := formatAPIPath("linode/instances/%d/ips", linodeID)
+ response, err := doPOSTRequest[InstanceIP](ctx, c, endpoint, opts)
+ if err != nil {
+ return nil, err
+ }
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/instance_snapshots.go b/vendor/github.com/linode/linodego/instance_snapshots.go
new file mode 100644
index 00000000..6a58dced
--- /dev/null
+++ b/vendor/github.com/linode/linodego/instance_snapshots.go
@@ -0,0 +1,143 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// InstanceBackupsResponse response struct for backup snapshot
+type InstanceBackupsResponse struct {
+ Automatic []*InstanceSnapshot `json:"automatic"`
+ Snapshot *InstanceBackupSnapshotResponse `json:"snapshot"`
+}
+
+// InstanceBackupSnapshotResponse fields are those representing Instance Backup Snapshots
+type InstanceBackupSnapshotResponse struct {
+ Current *InstanceSnapshot `json:"current"`
+ InProgress *InstanceSnapshot `json:"in_progress"`
+}
+
+// RestoreInstanceOptions fields are those accepted by InstanceRestore
+type RestoreInstanceOptions struct {
+ LinodeID int `json:"linode_id"`
+ Overwrite bool `json:"overwrite"`
+}
+
+// InstanceSnapshot represents a linode backup snapshot
+type InstanceSnapshot struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Status InstanceSnapshotStatus `json:"status"`
+ Type string `json:"type"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+ Finished *time.Time `json:"-"`
+ Configs []string `json:"configs"`
+ Disks []*InstanceSnapshotDisk `json:"disks"`
+ Available bool `json:"available"`
+}
+
+// InstanceSnapshotDisk fields represent the source disk of a Snapshot
+type InstanceSnapshotDisk struct {
+ Label string `json:"label"`
+ Size int `json:"size"`
+ Filesystem string `json:"filesystem"`
+}
+
+// InstanceSnapshotStatus constants start with Snapshot and include Linode API Instance Backup Snapshot status values
+type InstanceSnapshotStatus string
+
+// InstanceSnapshotStatus constants reflect the current status of an Instance Snapshot
+var (
+ SnapshotPaused InstanceSnapshotStatus = "paused"
+ SnapshotPending InstanceSnapshotStatus = "pending"
+ SnapshotRunning InstanceSnapshotStatus = "running"
+ SnapshotNeedsPostProcessing InstanceSnapshotStatus = "needsPostProcessing"
+ SnapshotSuccessful InstanceSnapshotStatus = "successful"
+ SnapshotFailed InstanceSnapshotStatus = "failed"
+ SnapshotUserAborted InstanceSnapshotStatus = "userAborted"
+)
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *InstanceSnapshot) UnmarshalJSON(b []byte) error {
+ type Mask InstanceSnapshot
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ Finished *parseabletime.ParseableTime `json:"finished"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.Updated = (*time.Time)(p.Updated)
+ i.Finished = (*time.Time)(p.Finished)
+
+ return nil
+}
+
+// GetInstanceSnapshot gets the snapshot with the provided ID
+func (c *Client) GetInstanceSnapshot(ctx context.Context, linodeID int, snapshotID int) (*InstanceSnapshot, error) {
+ e := formatAPIPath("linode/instances/%d/backups/%d", linodeID, snapshotID)
+ response, err := doGETRequest[InstanceSnapshot](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateInstanceSnapshot Creates or Replaces the snapshot Backup of a Linode. If a previous snapshot exists for this Linode, it will be deleted.
+func (c *Client) CreateInstanceSnapshot(ctx context.Context, linodeID int, label string) (*InstanceSnapshot, error) {
+ opts := map[string]string{"label": label}
+
+ e := formatAPIPath("linode/instances/%d/backups", linodeID)
+ response, err := doPOSTRequest[InstanceSnapshot](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetInstanceBackups gets the Instance's available Backups.
+// This is not called ListInstanceBackups because a single object is returned, matching the API response.
+func (c *Client) GetInstanceBackups(ctx context.Context, linodeID int) (*InstanceBackupsResponse, error) {
+ e := formatAPIPath("linode/instances/%d/backups", linodeID)
+ response, err := doGETRequest[InstanceBackupsResponse](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// EnableInstanceBackups Enables backups for the specified Linode.
+func (c *Client) EnableInstanceBackups(ctx context.Context, linodeID int) error {
+ e := formatAPIPath("linode/instances/%d/backups/enable", linodeID)
+ _, err := doPOSTRequest[InstanceBackup, any](ctx, c, e)
+ return err
+}
+
+// CancelInstanceBackups Cancels backups for the specified Linode.
+func (c *Client) CancelInstanceBackups(ctx context.Context, linodeID int) error {
+ e := formatAPIPath("linode/instances/%d/backups/cancel", linodeID)
+ _, err := doPOSTRequest[InstanceBackup, any](ctx, c, e)
+ return err
+}
+
+// RestoreInstanceBackup Restores a Linode's Backup to the specified Linode.
+func (c *Client) RestoreInstanceBackup(ctx context.Context, linodeID int, backupID int, opts RestoreInstanceOptions) error {
+ e := formatAPIPath("linode/instances/%d/backups/%d/restore", linodeID, backupID)
+ _, err := doPOSTRequest[InstanceBackup](ctx, c, e, opts)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/instance_stats.go b/vendor/github.com/linode/linodego/instance_stats.go
new file mode 100644
index 00000000..ad5190e4
--- /dev/null
+++ b/vendor/github.com/linode/linodego/instance_stats.go
@@ -0,0 +1,55 @@
+package linodego
+
+import (
+ "context"
+)
+
+// StatsNet represents a network stats object
+type StatsNet struct {
+ In [][]float64 `json:"in"`
+ Out [][]float64 `json:"out"`
+ PrivateIn [][]float64 `json:"private_in"`
+ PrivateOut [][]float64 `json:"private_out"`
+}
+
+// StatsIO represents an IO stats object
+type StatsIO struct {
+ IO [][]float64 `json:"io"`
+ Swap [][]float64 `json:"swap"`
+}
+
+// InstanceStatsData represents an instance stats data object
+type InstanceStatsData struct {
+ CPU [][]float64 `json:"cpu"`
+ IO StatsIO `json:"io"`
+ NetV4 StatsNet `json:"netv4"`
+ NetV6 StatsNet `json:"netv6"`
+}
+
+// InstanceStats represents an instance stats object
+type InstanceStats struct {
+ Title string `json:"title"`
+ Data InstanceStatsData `json:"data"`
+}
+
+// GetInstanceStats gets the template with the provided ID
+func (c *Client) GetInstanceStats(ctx context.Context, linodeID int) (*InstanceStats, error) {
+ e := formatAPIPath("linode/instances/%d/stats", linodeID)
+ response, err := doGETRequest[InstanceStats](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetInstanceStatsByDate gets the template with the provided ID, year, and month
+func (c *Client) GetInstanceStatsByDate(ctx context.Context, linodeID int, year int, month int) (*InstanceStats, error) {
+ e := formatAPIPath("linode/instances/%d/stats/%d/%d", linodeID, year, month)
+ response, err := doGETRequest[InstanceStats](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/instance_volumes.go b/vendor/github.com/linode/linodego/instance_volumes.go
new file mode 100644
index 00000000..6a67edf4
--- /dev/null
+++ b/vendor/github.com/linode/linodego/instance_volumes.go
@@ -0,0 +1,15 @@
+package linodego
+
+import (
+ "context"
+)
+
+// ListInstanceVolumes lists InstanceVolumes
+func (c *Client) ListInstanceVolumes(ctx context.Context, linodeID int, opts *ListOptions) ([]Volume, error) {
+ response, err := getPaginatedResults[Volume](ctx, c, formatAPIPath("linode/instances/%d/volumes", linodeID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/instances.go b/vendor/github.com/linode/linodego/instances.go
new file mode 100644
index 00000000..4b4e44ac
--- /dev/null
+++ b/vendor/github.com/linode/linodego/instances.go
@@ -0,0 +1,442 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "net"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+/*
+ * https://techdocs.akamai.com/linode-api/reference/post-linode-instance
+ */
+
+// InstanceStatus constants start with Instance and include Linode API Instance Status values
+type InstanceStatus string
+
+// InstanceStatus constants reflect the current status of an Instance
+const (
+ InstanceBooting InstanceStatus = "booting"
+ InstanceRunning InstanceStatus = "running"
+ InstanceOffline InstanceStatus = "offline"
+ InstanceShuttingDown InstanceStatus = "shutting_down"
+ InstanceRebooting InstanceStatus = "rebooting"
+ InstanceProvisioning InstanceStatus = "provisioning"
+ InstanceDeleting InstanceStatus = "deleting"
+ InstanceMigrating InstanceStatus = "migrating"
+ InstanceRebuilding InstanceStatus = "rebuilding"
+ InstanceCloning InstanceStatus = "cloning"
+ InstanceRestoring InstanceStatus = "restoring"
+ InstanceResizing InstanceStatus = "resizing"
+)
+
+type InstanceMigrationType string
+
+const (
+ WarmMigration InstanceMigrationType = "warm"
+ ColdMigration InstanceMigrationType = "cold"
+)
+
+// Instance represents a linode object
+type Instance struct {
+ ID int `json:"id"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+ Region string `json:"region"`
+ Alerts *InstanceAlert `json:"alerts"`
+ Backups *InstanceBackup `json:"backups"`
+ Image string `json:"image"`
+ Group string `json:"group"`
+ IPv4 []*net.IP `json:"ipv4"`
+ IPv6 string `json:"ipv6"`
+ Label string `json:"label"`
+ Type string `json:"type"`
+ Status InstanceStatus `json:"status"`
+ HasUserData bool `json:"has_user_data"`
+ Hypervisor string `json:"hypervisor"`
+ HostUUID string `json:"host_uuid"`
+ Specs *InstanceSpec `json:"specs"`
+ WatchdogEnabled bool `json:"watchdog_enabled"`
+ Tags []string `json:"tags"`
+
+ // NOTE: Placement Groups may not currently be available to all users.
+ PlacementGroup *InstancePlacementGroup `json:"placement_group"`
+
+ // NOTE: Disk encryption may not currently be available to all users.
+ DiskEncryption InstanceDiskEncryption `json:"disk_encryption"`
+
+ LKEClusterID int `json:"lke_cluster_id"`
+ Capabilities []string `json:"capabilities"`
+}
+
+// InstanceSpec represents a linode spec
+type InstanceSpec struct {
+ Disk int `json:"disk"`
+ Memory int `json:"memory"`
+ VCPUs int `json:"vcpus"`
+ Transfer int `json:"transfer"`
+ GPUs int `json:"gpus"`
+}
+
+// InstanceAlert represents a metric alert
+type InstanceAlert struct {
+ CPU int `json:"cpu"`
+ IO int `json:"io"`
+ NetworkIn int `json:"network_in"`
+ NetworkOut int `json:"network_out"`
+ TransferQuota int `json:"transfer_quota"`
+}
+
+// InstanceBackup represents backup settings for an instance
+type InstanceBackup struct {
+ Available bool `json:"available,omitempty"` // read-only
+ Enabled bool `json:"enabled,omitempty"` // read-only
+ Schedule struct {
+ Day string `json:"day,omitempty"`
+ Window string `json:"window,omitempty"`
+ } `json:"schedule,omitempty"`
+}
+
+type InstanceDiskEncryption string
+
+const (
+ InstanceDiskEncryptionEnabled InstanceDiskEncryption = "enabled"
+ InstanceDiskEncryptionDisabled InstanceDiskEncryption = "disabled"
+)
+
+// InstanceTransfer pool stats for a Linode Instance during the current billing month
+type InstanceTransfer struct {
+ // Bytes of transfer this instance has consumed
+ Used int `json:"used"`
+
+ // GB of billable transfer this instance has consumed
+ Billable int `json:"billable"`
+
+ // GB of transfer this instance adds to the Transfer pool
+ Quota int `json:"quota"`
+}
+
+// InstancePlacementGroup represents information about the placement group
+// this Linode is a part of.
+type InstancePlacementGroup struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ PlacementGroupType PlacementGroupType `json:"placement_group_type"`
+ PlacementGroupPolicy PlacementGroupPolicy `json:"placement_group_policy"`
+}
+
+// InstanceMetadataOptions specifies various Instance creation fields
+// that relate to the Linode Metadata service.
+type InstanceMetadataOptions struct {
+ // UserData expects a Base64-encoded string
+ UserData string `json:"user_data,omitempty"`
+}
+
+// InstanceCreateOptions require only Region and Type
+type InstanceCreateOptions struct {
+ Region string `json:"region"`
+ Type string `json:"type"`
+ Label string `json:"label,omitempty"`
+ RootPass string `json:"root_pass,omitempty"`
+ AuthorizedKeys []string `json:"authorized_keys,omitempty"`
+ AuthorizedUsers []string `json:"authorized_users,omitempty"`
+ StackScriptID int `json:"stackscript_id,omitempty"`
+ StackScriptData map[string]string `json:"stackscript_data,omitempty"`
+ BackupID int `json:"backup_id,omitempty"`
+ Image string `json:"image,omitempty"`
+ Interfaces []InstanceConfigInterfaceCreateOptions `json:"interfaces,omitempty"`
+ BackupsEnabled bool `json:"backups_enabled,omitempty"`
+ PrivateIP bool `json:"private_ip,omitempty"`
+ Tags []string `json:"tags,omitempty"`
+ Metadata *InstanceMetadataOptions `json:"metadata,omitempty"`
+ FirewallID int `json:"firewall_id,omitempty"`
+
+ // NOTE: Disk encryption may not currently be available to all users.
+ DiskEncryption InstanceDiskEncryption `json:"disk_encryption,omitempty"`
+
+ // NOTE: Placement Groups may not currently be available to all users.
+ PlacementGroup *InstanceCreatePlacementGroupOptions `json:"placement_group,omitempty"`
+
+ // Creation fields that need to be set explicitly false, "", or 0 use pointers
+ SwapSize *int `json:"swap_size,omitempty"`
+ Booted *bool `json:"booted,omitempty"`
+
+ // Deprecated: group is a deprecated property denoting a group label for the Linode.
+ Group string `json:"group,omitempty"`
+
+ IPv4 []string `json:"ipv4,omitempty"`
+}
+
+// InstanceCreatePlacementGroupOptions represents the placement group
+// to create this Linode under.
+type InstanceCreatePlacementGroupOptions struct {
+ ID int `json:"id"`
+ CompliantOnly *bool `json:"compliant_only,omitempty"`
+}
+
+// InstanceUpdateOptions is an options struct used when Updating an Instance
+type InstanceUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+ Backups *InstanceBackup `json:"backups,omitempty"`
+ Alerts *InstanceAlert `json:"alerts,omitempty"`
+ WatchdogEnabled *bool `json:"watchdog_enabled,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+
+ // Deprecated: group is a deprecated property denoting a group label for the Linode.
+ Group *string `json:"group,omitempty"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *Instance) UnmarshalJSON(b []byte) error {
+ type Mask Instance
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
+
+// GetUpdateOptions converts an Instance to InstanceUpdateOptions for use in UpdateInstance
+func (i *Instance) GetUpdateOptions() InstanceUpdateOptions {
+ return InstanceUpdateOptions{
+ Label: i.Label,
+ Group: &i.Group,
+ Backups: i.Backups,
+ Alerts: i.Alerts,
+ WatchdogEnabled: &i.WatchdogEnabled,
+ Tags: &i.Tags,
+ }
+}
+
+// InstanceCloneOptions is an options struct sent when Cloning an Instance
+type InstanceCloneOptions struct {
+ Region string `json:"region,omitempty"`
+ Type string `json:"type,omitempty"`
+
+ // LinodeID is an optional existing instance to use as the target of the clone
+ LinodeID int `json:"linode_id,omitempty"`
+ Label string `json:"label,omitempty"`
+ BackupsEnabled bool `json:"backups_enabled"`
+ Disks []int `json:"disks,omitempty"`
+ Configs []int `json:"configs,omitempty"`
+ PrivateIP bool `json:"private_ip,omitempty"`
+ Metadata *InstanceMetadataOptions `json:"metadata,omitempty"`
+ PlacementGroup *InstanceCreatePlacementGroupOptions `json:"placement_group,omitempty"`
+
+ // Deprecated: group is a deprecated property denoting a group label for the Linode.
+ Group string `json:"group,omitempty"`
+}
+
+// InstanceResizeOptions is an options struct used when resizing an instance
+type InstanceResizeOptions struct {
+ Type string `json:"type"`
+ MigrationType InstanceMigrationType `json:"migration_type,omitempty"`
+
+ // When enabled, an instance resize will also resize a data disk if the instance has no more than one data disk and one swap disk
+ AllowAutoDiskResize *bool `json:"allow_auto_disk_resize,omitempty"`
+}
+
+// InstanceMigrateOptions is an options struct used when migrating an instance
+type InstanceMigrateOptions struct {
+ Type InstanceMigrationType `json:"type,omitempty"`
+ Region string `json:"region,omitempty"`
+
+ PlacementGroup *InstanceCreatePlacementGroupOptions `json:"placement_group,omitempty"`
+}
+
+// ListInstances lists linode instances
+func (c *Client) ListInstances(ctx context.Context, opts *ListOptions) ([]Instance, error) {
+ response, err := getPaginatedResults[Instance](ctx, c, "linode/instances", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetInstance gets the instance with the provided ID
+func (c *Client) GetInstance(ctx context.Context, linodeID int) (*Instance, error) {
+ e := formatAPIPath("linode/instances/%d", linodeID)
+ response, err := doGETRequest[Instance](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetInstanceTransfer gets the instance with the provided ID
+func (c *Client) GetInstanceTransfer(ctx context.Context, linodeID int) (*InstanceTransfer, error) {
+ e := formatAPIPath("linode/instances/%d/transfer", linodeID)
+ response, err := doGETRequest[InstanceTransfer](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateInstance creates a Linode instance
+func (c *Client) CreateInstance(ctx context.Context, opts InstanceCreateOptions) (*Instance, error) {
+ e := "linode/instances"
+ response, err := doPOSTRequest[Instance](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateInstance creates a Linode instance
+func (c *Client) UpdateInstance(ctx context.Context, linodeID int, opts InstanceUpdateOptions) (*Instance, error) {
+ e := formatAPIPath("linode/instances/%d", linodeID)
+ response, err := doPUTRequest[Instance](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// RenameInstance renames an Instance
+func (c *Client) RenameInstance(ctx context.Context, linodeID int, label string) (*Instance, error) {
+ return c.UpdateInstance(ctx, linodeID, InstanceUpdateOptions{Label: label})
+}
+
+// DeleteInstance deletes a Linode instance
+func (c *Client) DeleteInstance(ctx context.Context, linodeID int) error {
+ e := formatAPIPath("linode/instances/%d", linodeID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// BootInstance will boot a Linode instance
+// A configID of 0 will cause Linode to choose the last/best config
+func (c *Client) BootInstance(ctx context.Context, linodeID int, configID int) error {
+ opts := make(map[string]int)
+
+ if configID != 0 {
+ opts = map[string]int{"config_id": configID}
+ }
+
+ e := formatAPIPath("linode/instances/%d/boot", linodeID)
+ _, err := doPOSTRequest[Instance](ctx, c, e, opts)
+ return err
+}
+
+// CloneInstance clone an existing Instances Disks and Configuration profiles to another Linode Instance
+func (c *Client) CloneInstance(ctx context.Context, linodeID int, opts InstanceCloneOptions) (*Instance, error) {
+ e := formatAPIPath("linode/instances/%d/clone", linodeID)
+ response, err := doPOSTRequest[Instance](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// RebootInstance reboots a Linode instance
+// A configID of 0 will cause Linode to choose the last/best config
+func (c *Client) RebootInstance(ctx context.Context, linodeID int, configID int) error {
+ opts := make(map[string]int)
+
+ if configID != 0 {
+ opts = map[string]int{"config_id": configID}
+ }
+
+ e := formatAPIPath("linode/instances/%d/reboot", linodeID)
+ _, err := doPOSTRequest[Instance](ctx, c, e, opts)
+ return err
+}
+
+// InstanceRebuildOptions is a struct representing the options to send to the rebuild linode endpoint
+type InstanceRebuildOptions struct {
+ Image string `json:"image,omitempty"`
+ RootPass string `json:"root_pass,omitempty"`
+ AuthorizedKeys []string `json:"authorized_keys,omitempty"`
+ AuthorizedUsers []string `json:"authorized_users,omitempty"`
+ StackScriptID int `json:"stackscript_id,omitempty"`
+ StackScriptData map[string]string `json:"stackscript_data,omitempty"`
+ Booted *bool `json:"booted,omitempty"`
+ Metadata *InstanceMetadataOptions `json:"metadata,omitempty"`
+ Type string `json:"type,omitempty"`
+
+ // NOTE: Disk encryption may not currently be available to all users.
+ DiskEncryption InstanceDiskEncryption `json:"disk_encryption,omitempty"`
+}
+
+// RebuildInstance Deletes all Disks and Configs on this Linode,
+// then deploys a new Image to this Linode with the given attributes.
+func (c *Client) RebuildInstance(ctx context.Context, linodeID int, opts InstanceRebuildOptions) (*Instance, error) {
+ e := formatAPIPath("linode/instances/%d/rebuild", linodeID)
+ response, err := doPOSTRequest[Instance](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// InstanceRescueOptions fields are those accepted by RescueInstance
+type InstanceRescueOptions struct {
+ Devices InstanceConfigDeviceMap `json:"devices"`
+}
+
+// RescueInstance reboots an instance into a safe environment for performing many system recovery and disk management tasks.
+// Rescue Mode is based on the Finnix recovery distribution, a self-contained and bootable Linux distribution.
+// You can also use Rescue Mode for tasks other than disaster recovery, such as formatting disks to use different filesystems,
+// copying data between disks, and downloading files from a disk via SSH and SFTP.
+func (c *Client) RescueInstance(ctx context.Context, linodeID int, opts InstanceRescueOptions) error {
+ e := formatAPIPath("linode/instances/%d/rescue", linodeID)
+ _, err := doPOSTRequest[Instance](ctx, c, e, opts)
+ return err
+}
+
+// ResizeInstance resizes an instance to new Linode type
+func (c *Client) ResizeInstance(ctx context.Context, linodeID int, opts InstanceResizeOptions) error {
+ e := formatAPIPath("linode/instances/%d/resize", linodeID)
+ _, err := doPOSTRequest[Instance](ctx, c, e, opts)
+ return err
+}
+
+// ShutdownInstance - Shutdown an instance
+func (c *Client) ShutdownInstance(ctx context.Context, id int) error {
+ return c.simpleInstanceAction(ctx, "shutdown", id)
+}
+
+// MutateInstance Upgrades a Linode to its next generation.
+func (c *Client) MutateInstance(ctx context.Context, id int) error {
+ return c.simpleInstanceAction(ctx, "mutate", id)
+}
+
+// MigrateInstance - Migrate an instance
+func (c *Client) MigrateInstance(ctx context.Context, linodeID int, opts InstanceMigrateOptions) error {
+ e := formatAPIPath("linode/instances/%d/migrate", linodeID)
+ _, err := doPOSTRequest[Instance](ctx, c, e, opts)
+ return err
+}
+
+// simpleInstanceAction is a helper for Instance actions that take no parameters
+// and return empty responses `{}` unless they return a standard error
+func (c *Client) simpleInstanceAction(ctx context.Context, action string, linodeID int) error {
+ _, err := doPOSTRequest[any, any](
+ ctx,
+ c,
+ formatAPIPath("linode/instances/%d/%s", linodeID, action),
+ )
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/internal/duration/duration.go b/vendor/github.com/linode/linodego/internal/duration/duration.go
new file mode 100644
index 00000000..a63a11a9
--- /dev/null
+++ b/vendor/github.com/linode/linodego/internal/duration/duration.go
@@ -0,0 +1,64 @@
+package duration
+
+import (
+ "encoding/json"
+ "fmt"
+ "log"
+ "strconv"
+ "strings"
+)
+
+func UnmarshalTimeRemaining(m json.RawMessage) *int {
+ jsonBytes, err := m.MarshalJSON()
+ if err != nil {
+ panic(jsonBytes)
+ }
+
+ if len(jsonBytes) == 4 && string(jsonBytes) == "null" {
+ return nil
+ }
+
+ var timeStr string
+ if err := json.Unmarshal(jsonBytes, &timeStr); err == nil && len(timeStr) > 0 {
+ dur, err := durationToSeconds(timeStr)
+ if err != nil {
+ panic(err)
+ }
+
+ return &dur
+ }
+
+ var intPtr int
+ if err := json.Unmarshal(jsonBytes, &intPtr); err == nil {
+ return &intPtr
+ }
+
+ log.Println("[WARN] Unexpected unmarshalTimeRemaining value: ", jsonBytes)
+
+ return nil
+}
+
+// durationToSeconds takes a hh:mm:ss string and returns the number of seconds.
+func durationToSeconds(s string) (int, error) {
+ multipliers := [3]int{60 * 60, 60, 1}
+ segs := strings.Split(s, ":")
+
+ if len(segs) > len(multipliers) {
+ return 0, fmt.Errorf("too many ':' separators in time duration: %s", s)
+ }
+
+ var d int
+
+ l := len(segs)
+
+ for i := range l {
+ m, err := strconv.Atoi(segs[i])
+ if err != nil {
+ return 0, err
+ }
+
+ d += m * multipliers[i+len(multipliers)-l]
+ }
+
+ return d, nil
+}
diff --git a/vendor/github.com/linode/linodego/internal/parseabletime/parseable_time.go b/vendor/github.com/linode/linodego/internal/parseabletime/parseable_time.go
new file mode 100644
index 00000000..c471442d
--- /dev/null
+++ b/vendor/github.com/linode/linodego/internal/parseabletime/parseable_time.go
@@ -0,0 +1,22 @@
+package parseabletime
+
+import (
+ "time"
+)
+
+const (
+ dateLayout = "2006-01-02T15:04:05"
+)
+
+type ParseableTime time.Time
+
+func (p *ParseableTime) UnmarshalJSON(b []byte) error {
+ t, err := time.Parse(`"`+dateLayout+`"`, string(b))
+ if err != nil {
+ return err
+ }
+
+ *p = ParseableTime(t)
+
+ return nil
+}
diff --git a/vendor/github.com/linode/linodego/kernels.go b/vendor/github.com/linode/linodego/kernels.go
new file mode 100644
index 00000000..5f3f12e0
--- /dev/null
+++ b/vendor/github.com/linode/linodego/kernels.go
@@ -0,0 +1,82 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// LinodeKernel represents a Linode Instance kernel object
+type LinodeKernel struct {
+ ID string `json:"id"`
+ Label string `json:"label"`
+ Version string `json:"version"`
+ Architecture string `json:"architecture"`
+ Deprecated bool `json:"deprecated"`
+ KVM bool `json:"kvm"`
+ XEN bool `json:"xen"`
+ PVOPS bool `json:"pvops"`
+ Built *time.Time `json:"-"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *LinodeKernel) UnmarshalJSON(b []byte) error {
+ type Mask LinodeKernel
+
+ p := struct {
+ *Mask
+ Built *parseabletime.ParseableTime `json:"built"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Built = (*time.Time)(p.Built)
+
+ return nil
+}
+
+// ListKernels lists linode kernels. This endpoint is cached by default.
+func (c *Client) ListKernels(ctx context.Context, opts *ListOptions) ([]LinodeKernel, error) {
+ endpoint, err := generateListCacheURL("linode/kernels", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ if result := c.getCachedResponse(endpoint); result != nil {
+ return result.([]LinodeKernel), nil
+ }
+
+ response, err := getPaginatedResults[LinodeKernel](ctx, c, "linode/kernels", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(endpoint, response, nil)
+
+ return response, nil
+}
+
+// GetKernel gets the kernel with the provided ID. This endpoint is cached by default.
+func (c *Client) GetKernel(ctx context.Context, kernelID string) (*LinodeKernel, error) {
+ e := formatAPIPath("linode/kernels/%s", kernelID)
+
+ if result := c.getCachedResponse(e); result != nil {
+ result := result.(LinodeKernel)
+ return &result, nil
+ }
+
+ response, err := doGETRequest[LinodeKernel](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(e, response, nil)
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/lke_cluster_pools.go b/vendor/github.com/linode/linodego/lke_cluster_pools.go
new file mode 100644
index 00000000..5f520765
--- /dev/null
+++ b/vendor/github.com/linode/linodego/lke_cluster_pools.go
@@ -0,0 +1,53 @@
+package linodego
+
+import (
+ "context"
+)
+
+// Deprecated: LKEClusterPoolDisk represents a Node disk in an LKEClusterPool object
+type LKEClusterPoolDisk = LKENodePoolDisk
+
+// Deprecated: LKEClusterPoolAutoscaler represents an AutoScaler configuration
+type LKEClusterPoolAutoscaler = LKENodePoolAutoscaler
+
+// Deprecated: LKEClusterPoolLinode represents a LKEClusterPoolLinode object
+type LKEClusterPoolLinode = LKENodePoolLinode
+
+// Deprecated: LKEClusterPool represents a LKEClusterPool object
+type LKEClusterPool = LKENodePool
+
+// Deprecated: LKEClusterPoolCreateOptions fields are those accepted by CreateLKEClusterPool
+type LKEClusterPoolCreateOptions = LKENodePoolCreateOptions
+
+// Deprecated: LKEClusterPoolUpdateOptions fields are those accepted by UpdateLKEClusterPool
+type LKEClusterPoolUpdateOptions = LKENodePoolUpdateOptions
+
+// Deprecated: ListLKEClusterPools lists LKEClusterPools
+func (c *Client) ListLKEClusterPools(ctx context.Context, clusterID int, opts *ListOptions) ([]LKEClusterPool, error) {
+ return c.ListLKENodePools(ctx, clusterID, opts)
+}
+
+// Deprecated: GetLKEClusterPool gets the lkeClusterPool with the provided ID
+func (c *Client) GetLKEClusterPool(ctx context.Context, clusterID, id int) (*LKEClusterPool, error) {
+ return c.GetLKENodePool(ctx, clusterID, id)
+}
+
+// Deprecated: CreateLKEClusterPool creates a LKEClusterPool
+func (c *Client) CreateLKEClusterPool(ctx context.Context, clusterID int, createOpts LKEClusterPoolCreateOptions) (*LKEClusterPool, error) {
+ return c.CreateLKENodePool(ctx, clusterID, createOpts)
+}
+
+// Deprecated: UpdateLKEClusterPool updates the LKEClusterPool with the specified id
+func (c *Client) UpdateLKEClusterPool(ctx context.Context, clusterID, id int, updateOpts LKEClusterPoolUpdateOptions) (*LKEClusterPool, error) {
+ return c.UpdateLKENodePool(ctx, clusterID, id, updateOpts)
+}
+
+// Deprecated: DeleteLKEClusterPool deletes the LKEClusterPool with the specified id
+func (c *Client) DeleteLKEClusterPool(ctx context.Context, clusterID, id int) error {
+ return c.DeleteLKENodePool(ctx, clusterID, id)
+}
+
+// Deprecated: DeleteLKEClusterPoolNode deletes a given node from a cluster pool
+func (c *Client) DeleteLKEClusterPoolNode(ctx context.Context, clusterID int, id string) error {
+ return c.DeleteLKENodePoolNode(ctx, clusterID, id)
+}
diff --git a/vendor/github.com/linode/linodego/lke_clusters.go b/vendor/github.com/linode/linodego/lke_clusters.go
new file mode 100644
index 00000000..35880155
--- /dev/null
+++ b/vendor/github.com/linode/linodego/lke_clusters.go
@@ -0,0 +1,276 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// LKEClusterStatus represents the status of an LKECluster
+type LKEClusterStatus string
+
+// LKEClusterStatus enums start with LKECluster
+const (
+ LKEClusterReady LKEClusterStatus = "ready"
+ LKEClusterNotReady LKEClusterStatus = "not_ready"
+)
+
+// LKECluster represents a LKECluster object
+type LKECluster struct {
+ ID int `json:"id"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+ Label string `json:"label"`
+ Region string `json:"region"`
+ Status LKEClusterStatus `json:"status"`
+ K8sVersion string `json:"k8s_version"`
+ Tags []string `json:"tags"`
+ ControlPlane LKEClusterControlPlane `json:"control_plane"`
+}
+
+// LKEClusterCreateOptions fields are those accepted by CreateLKECluster
+type LKEClusterCreateOptions struct {
+ NodePools []LKENodePoolCreateOptions `json:"node_pools"`
+ Label string `json:"label"`
+ Region string `json:"region"`
+ K8sVersion string `json:"k8s_version"`
+ Tags []string `json:"tags,omitempty"`
+ ControlPlane *LKEClusterControlPlaneOptions `json:"control_plane,omitempty"`
+}
+
+// LKEClusterUpdateOptions fields are those accepted by UpdateLKECluster
+type LKEClusterUpdateOptions struct {
+ K8sVersion string `json:"k8s_version,omitempty"`
+ Label string `json:"label,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+ ControlPlane *LKEClusterControlPlaneOptions `json:"control_plane,omitempty"`
+}
+
+// LKEClusterAPIEndpoint fields are those returned by ListLKEClusterAPIEndpoints
+type LKEClusterAPIEndpoint struct {
+ Endpoint string `json:"endpoint"`
+}
+
+// LKEClusterKubeconfig fields are those returned by GetLKEClusterKubeconfig
+type LKEClusterKubeconfig struct {
+ KubeConfig string `json:"kubeconfig"`
+}
+
+// LKEClusterDashboard fields are those returned by GetLKEClusterDashboard
+type LKEClusterDashboard struct {
+ URL string `json:"url"`
+}
+
+// LKEVersion fields are those returned by GetLKEVersion
+type LKEVersion struct {
+ ID string `json:"id"`
+}
+
+// LKEClusterRegenerateOptions fields are those accepted by RegenerateLKECluster
+type LKEClusterRegenerateOptions struct {
+ KubeConfig bool `json:"kubeconfig"`
+ ServiceToken bool `json:"servicetoken"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *LKECluster) UnmarshalJSON(b []byte) error {
+ type Mask LKECluster
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
+
+// GetCreateOptions converts a LKECluster to LKEClusterCreateOptions for use in CreateLKECluster
+func (i LKECluster) GetCreateOptions() (o LKEClusterCreateOptions) {
+ o.Label = i.Label
+ o.Region = i.Region
+ o.K8sVersion = i.K8sVersion
+ o.Tags = i.Tags
+
+ isHA := i.ControlPlane.HighAvailability
+
+ o.ControlPlane = &LKEClusterControlPlaneOptions{
+ HighAvailability: &isHA,
+ // ACL will not be populated in the control plane response
+ }
+
+ // @TODO copy NodePools?
+ return
+}
+
+// GetUpdateOptions converts a LKECluster to LKEClusterUpdateOptions for use in UpdateLKECluster
+func (i LKECluster) GetUpdateOptions() (o LKEClusterUpdateOptions) {
+ o.K8sVersion = i.K8sVersion
+ o.Label = i.Label
+ o.Tags = &i.Tags
+
+ isHA := i.ControlPlane.HighAvailability
+
+ o.ControlPlane = &LKEClusterControlPlaneOptions{
+ HighAvailability: &isHA,
+ // ACL will not be populated in the control plane response
+ }
+
+ return
+}
+
+// ListLKEVersions lists the Kubernetes versions available through LKE. This endpoint is cached by default.
+func (c *Client) ListLKEVersions(ctx context.Context, opts *ListOptions) ([]LKEVersion, error) {
+ e := "lke/versions"
+
+ endpoint, err := generateListCacheURL(e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ if result := c.getCachedResponse(endpoint); result != nil {
+ return result.([]LKEVersion), nil
+ }
+
+ response, err := getPaginatedResults[LKEVersion](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(endpoint, response, &cacheExpiryTime)
+
+ return response, nil
+}
+
+// GetLKEVersion gets details about a specific LKE Version. This endpoint is cached by default.
+func (c *Client) GetLKEVersion(ctx context.Context, version string) (*LKEVersion, error) {
+ e := formatAPIPath("lke/versions/%s", version)
+
+ if result := c.getCachedResponse(e); result != nil {
+ result := result.(LKEVersion)
+ return &result, nil
+ }
+
+ response, err := doGETRequest[LKEVersion](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(e, response, &cacheExpiryTime)
+
+ return response, nil
+}
+
+// ListLKEClusterAPIEndpoints gets the API Endpoint for the LKE Cluster specified
+func (c *Client) ListLKEClusterAPIEndpoints(ctx context.Context, clusterID int, opts *ListOptions) ([]LKEClusterAPIEndpoint, error) {
+ response, err := getPaginatedResults[LKEClusterAPIEndpoint](ctx, c, formatAPIPath("lke/clusters/%d/api-endpoints", clusterID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// ListLKEClusters lists LKEClusters
+func (c *Client) ListLKEClusters(ctx context.Context, opts *ListOptions) ([]LKECluster, error) {
+ response, err := getPaginatedResults[LKECluster](ctx, c, "lke/clusters", opts)
+ return response, err
+}
+
+// GetLKECluster gets the lkeCluster with the provided ID
+func (c *Client) GetLKECluster(ctx context.Context, clusterID int) (*LKECluster, error) {
+ e := formatAPIPath("lke/clusters/%d", clusterID)
+ response, err := doGETRequest[LKECluster](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateLKECluster creates a LKECluster
+func (c *Client) CreateLKECluster(ctx context.Context, opts LKEClusterCreateOptions) (*LKECluster, error) {
+ e := "lke/clusters"
+ response, err := doPOSTRequest[LKECluster](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateLKECluster updates the LKECluster with the specified id
+func (c *Client) UpdateLKECluster(ctx context.Context, clusterID int, opts LKEClusterUpdateOptions) (*LKECluster, error) {
+ e := formatAPIPath("lke/clusters/%d", clusterID)
+ response, err := doPUTRequest[LKECluster](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteLKECluster deletes the LKECluster with the specified id
+func (c *Client) DeleteLKECluster(ctx context.Context, clusterID int) error {
+ e := formatAPIPath("lke/clusters/%d", clusterID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// GetLKEClusterKubeconfig gets the Kubeconfig for the LKE Cluster specified
+func (c *Client) GetLKEClusterKubeconfig(ctx context.Context, clusterID int) (*LKEClusterKubeconfig, error) {
+ e := formatAPIPath("lke/clusters/%d/kubeconfig", clusterID)
+ response, err := doGETRequest[LKEClusterKubeconfig](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetLKEClusterDashboard gets information about the dashboard for an LKE cluster
+func (c *Client) GetLKEClusterDashboard(ctx context.Context, clusterID int) (*LKEClusterDashboard, error) {
+ e := formatAPIPath("lke/clusters/%d/dashboard", clusterID)
+ response, err := doGETRequest[LKEClusterDashboard](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// RecycleLKEClusterNodes recycles all nodes in all pools of the specified LKE Cluster.
+func (c *Client) RecycleLKEClusterNodes(ctx context.Context, clusterID int) error {
+ e := formatAPIPath("lke/clusters/%d/recycle", clusterID)
+ _, err := doPOSTRequest[LKECluster, any](ctx, c, e)
+ return err
+}
+
+// RegenerateLKECluster regenerates the Kubeconfig file and/or the service account token for the specified LKE Cluster.
+func (c *Client) RegenerateLKECluster(ctx context.Context, clusterID int, opts LKEClusterRegenerateOptions) (*LKECluster, error) {
+ e := formatAPIPath("lke/clusters/%d/regenerate", clusterID)
+ response, err := doPOSTRequest[LKECluster](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteLKEClusterServiceToken deletes and regenerate the service account token for a Cluster.
+func (c *Client) DeleteLKEClusterServiceToken(ctx context.Context, clusterID int) error {
+ e := formatAPIPath("lke/clusters/%d/servicetoken", clusterID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/lke_clusters_control_plane.go b/vendor/github.com/linode/linodego/lke_clusters_control_plane.go
new file mode 100644
index 00000000..fc648bf8
--- /dev/null
+++ b/vendor/github.com/linode/linodego/lke_clusters_control_plane.go
@@ -0,0 +1,99 @@
+package linodego
+
+import "context"
+
+// LKEClusterControlPlane fields contained within the `control_plane` attribute of an LKE cluster.
+type LKEClusterControlPlane struct {
+ HighAvailability bool `json:"high_availability"`
+}
+
+// LKEClusterControlPlaneACLAddresses describes the
+// allowed IP ranges for an LKE cluster's control plane.
+type LKEClusterControlPlaneACLAddresses struct {
+ IPv4 []string `json:"ipv4"`
+ IPv6 []string `json:"ipv6"`
+}
+
+// LKEClusterControlPlaneACL describes the ACL configuration
+// for an LKE cluster's control plane.
+// NOTE: Control Plane ACLs may not currently be available to all users.
+type LKEClusterControlPlaneACL struct {
+ Enabled bool `json:"enabled"`
+ Addresses *LKEClusterControlPlaneACLAddresses `json:"addresses"`
+}
+
+// LKEClusterControlPlaneACLAddressesOptions are the options used to
+// specify the allowed IP ranges for an LKE cluster's control plane.
+type LKEClusterControlPlaneACLAddressesOptions struct {
+ IPv4 *[]string `json:"ipv4,omitempty"`
+ IPv6 *[]string `json:"ipv6,omitempty"`
+}
+
+// LKEClusterControlPlaneACLOptions represents the options used when
+// configuring an LKE cluster's control plane ACL policy.
+// NOTE: Control Plane ACLs may not currently be available to all users.
+type LKEClusterControlPlaneACLOptions struct {
+ Enabled *bool `json:"enabled,omitempty"`
+ Addresses *LKEClusterControlPlaneACLAddressesOptions `json:"addresses,omitempty"`
+}
+
+// LKEClusterControlPlaneOptions represents the options used when
+// configuring an LKE cluster's control plane.
+type LKEClusterControlPlaneOptions struct {
+ HighAvailability *bool `json:"high_availability,omitempty"`
+ ACL *LKEClusterControlPlaneACLOptions `json:"acl,omitempty"`
+}
+
+// LKEClusterControlPlaneACLUpdateOptions represents the options
+// available when updating the ACL configuration of an LKE cluster's
+// control plane.
+// NOTE: Control Plane ACLs may not currently be available to all users.
+type LKEClusterControlPlaneACLUpdateOptions struct {
+ ACL LKEClusterControlPlaneACLOptions `json:"acl"`
+}
+
+// LKEClusterControlPlaneACLResponse represents the response structure
+// for the Client.GetLKEClusterControlPlaneACL(...) method.
+type LKEClusterControlPlaneACLResponse struct {
+ ACL LKEClusterControlPlaneACL `json:"acl"`
+}
+
+// GetLKEClusterControlPlaneACL gets the ACL configuration for the
+// given cluster's control plane.
+// NOTE: Control Plane ACLs may not currently be available to all users.
+func (c *Client) GetLKEClusterControlPlaneACL(ctx context.Context, clusterID int) (*LKEClusterControlPlaneACLResponse, error) {
+ return doGETRequest[LKEClusterControlPlaneACLResponse](
+ ctx,
+ c,
+ formatAPIPath("lke/clusters/%d/control_plane_acl", clusterID),
+ )
+}
+
+// UpdateLKEClusterControlPlaneACL updates the ACL configuration for the
+// given cluster's control plane.
+// NOTE: Control Plane ACLs may not currently be available to all users.
+func (c *Client) UpdateLKEClusterControlPlaneACL(
+ ctx context.Context,
+ clusterID int,
+ opts LKEClusterControlPlaneACLUpdateOptions,
+) (*LKEClusterControlPlaneACLResponse, error) {
+ return doPUTRequest[LKEClusterControlPlaneACLResponse](
+ ctx,
+ c,
+ formatAPIPath("lke/clusters/%d/control_plane_acl", clusterID),
+ opts,
+ )
+}
+
+// DeleteLKEClusterControlPlaneACL deletes the ACL configuration for the
+// given cluster's control plane.
+func (c *Client) DeleteLKEClusterControlPlaneACL(
+ ctx context.Context,
+ clusterID int,
+) error {
+ return doDELETERequest(
+ ctx,
+ c,
+ formatAPIPath("lke/clusters/%d/control_plane_acl", clusterID),
+ )
+}
diff --git a/vendor/github.com/linode/linodego/lke_node_pools.go b/vendor/github.com/linode/linodego/lke_node_pools.go
new file mode 100644
index 00000000..68c430f6
--- /dev/null
+++ b/vendor/github.com/linode/linodego/lke_node_pools.go
@@ -0,0 +1,171 @@
+package linodego
+
+import (
+ "context"
+)
+
+// LKELinodeStatus constants start with LKELinode and include
+// Linode API LKENodePool Linode Status values
+type LKELinodeStatus string
+
+// LKENodePoolStatus constants reflect the current status of an LKENodePool
+const (
+ LKELinodeReady LKELinodeStatus = "ready"
+ LKELinodeNotReady LKELinodeStatus = "not_ready"
+)
+
+// LKENodePoolDisk represents a Node disk in an LKENodePool object
+type LKENodePoolDisk struct {
+ Size int `json:"size"`
+ Type string `json:"type"`
+}
+
+type LKENodePoolAutoscaler struct {
+ Enabled bool `json:"enabled"`
+ Min int `json:"min"`
+ Max int `json:"max"`
+}
+
+// LKENodePoolLinode represents a LKENodePoolLinode object
+type LKENodePoolLinode struct {
+ ID string `json:"id"`
+ InstanceID int `json:"instance_id"`
+ Status LKELinodeStatus `json:"status"`
+}
+
+// LKENodePoolTaintEffect represents the effect value of a taint
+type LKENodePoolTaintEffect string
+
+const (
+ LKENodePoolTaintEffectNoSchedule LKENodePoolTaintEffect = "NoSchedule"
+ LKENodePoolTaintEffectPreferNoSchedule LKENodePoolTaintEffect = "PreferNoSchedule"
+ LKENodePoolTaintEffectNoExecute LKENodePoolTaintEffect = "NoExecute"
+)
+
+// LKENodePoolTaint represents a corev1.Taint to add to an LKENodePool
+type LKENodePoolTaint struct {
+ Key string `json:"key"`
+ Value string `json:"value,omitempty"`
+ Effect LKENodePoolTaintEffect `json:"effect"`
+}
+
+// LKENodePoolLabels represents Kubernetes labels to add to an LKENodePool
+type LKENodePoolLabels map[string]string
+
+// LKENodePool represents a LKENodePool object
+type LKENodePool struct {
+ ID int `json:"id"`
+ Count int `json:"count"`
+ Type string `json:"type"`
+ Disks []LKENodePoolDisk `json:"disks"`
+ Linodes []LKENodePoolLinode `json:"nodes"`
+ Tags []string `json:"tags"`
+ Labels LKENodePoolLabels `json:"labels"`
+ Taints []LKENodePoolTaint `json:"taints"`
+
+ Autoscaler LKENodePoolAutoscaler `json:"autoscaler"`
+
+ // NOTE: Disk encryption may not currently be available to all users.
+ DiskEncryption InstanceDiskEncryption `json:"disk_encryption,omitempty"`
+}
+
+// LKENodePoolCreateOptions fields are those accepted by CreateLKENodePool
+type LKENodePoolCreateOptions struct {
+ Count int `json:"count"`
+ Type string `json:"type"`
+ Disks []LKENodePoolDisk `json:"disks"`
+ Tags []string `json:"tags"`
+ Labels LKENodePoolLabels `json:"labels"`
+ Taints []LKENodePoolTaint `json:"taints"`
+
+ Autoscaler *LKENodePoolAutoscaler `json:"autoscaler,omitempty"`
+}
+
+// LKENodePoolUpdateOptions fields are those accepted by UpdateLKENodePoolUpdate
+type LKENodePoolUpdateOptions struct {
+ Count int `json:"count,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+ Labels *LKENodePoolLabels `json:"labels,omitempty"`
+ Taints *[]LKENodePoolTaint `json:"taints,omitempty"`
+
+ Autoscaler *LKENodePoolAutoscaler `json:"autoscaler,omitempty"`
+}
+
+// GetCreateOptions converts a LKENodePool to LKENodePoolCreateOptions for
+// use in CreateLKENodePool
+func (l LKENodePool) GetCreateOptions() (o LKENodePoolCreateOptions) {
+ o.Count = l.Count
+ o.Disks = l.Disks
+ o.Tags = l.Tags
+ o.Labels = l.Labels
+ o.Taints = l.Taints
+ o.Autoscaler = &l.Autoscaler
+ return
+}
+
+// GetUpdateOptions converts a LKENodePool to LKENodePoolUpdateOptions for use in UpdateLKENodePoolUpdate
+func (l LKENodePool) GetUpdateOptions() (o LKENodePoolUpdateOptions) {
+ o.Count = l.Count
+ o.Tags = &l.Tags
+ o.Labels = &l.Labels
+ o.Taints = &l.Taints
+ o.Autoscaler = &l.Autoscaler
+ return
+}
+
+// ListLKENodePools lists LKENodePools
+func (c *Client) ListLKENodePools(ctx context.Context, clusterID int, opts *ListOptions) ([]LKENodePool, error) {
+ response, err := getPaginatedResults[LKENodePool](ctx, c, formatAPIPath("lke/clusters/%d/pools", clusterID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetLKENodePool gets the LKENodePool with the provided ID
+func (c *Client) GetLKENodePool(ctx context.Context, clusterID, poolID int) (*LKENodePool, error) {
+ e := formatAPIPath("lke/clusters/%d/pools/%d", clusterID, poolID)
+ response, err := doGETRequest[LKENodePool](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateLKENodePool creates a LKENodePool
+func (c *Client) CreateLKENodePool(ctx context.Context, clusterID int, opts LKENodePoolCreateOptions) (*LKENodePool, error) {
+ e := formatAPIPath("lke/clusters/%d/pools", clusterID)
+ response, err := doPOSTRequest[LKENodePool](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateLKENodePool updates the LKENodePool with the specified id
+func (c *Client) UpdateLKENodePool(ctx context.Context, clusterID, poolID int, opts LKENodePoolUpdateOptions) (*LKENodePool, error) {
+ e := formatAPIPath("lke/clusters/%d/pools/%d", clusterID, poolID)
+ response, err := doPUTRequest[LKENodePool](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteLKENodePool deletes the LKENodePool with the specified id
+func (c *Client) DeleteLKENodePool(ctx context.Context, clusterID, poolID int) error {
+ e := formatAPIPath("lke/clusters/%d/pools/%d", clusterID, poolID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// DeleteLKENodePoolNode deletes a given node from a node pool
+func (c *Client) DeleteLKENodePoolNode(ctx context.Context, clusterID int, nodeID string) error {
+ e := formatAPIPath("lke/clusters/%d/nodes/%s", clusterID, nodeID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/lke_types.go b/vendor/github.com/linode/linodego/lke_types.go
new file mode 100644
index 00000000..14273bbd
--- /dev/null
+++ b/vendor/github.com/linode/linodego/lke_types.go
@@ -0,0 +1,47 @@
+package linodego
+
+import (
+ "context"
+)
+
+// LKEType represents a single valid LKE type.
+// NOTE: This typically corresponds to the availability of a cluster's
+// control plane.
+type LKEType struct {
+ baseType[LKETypePrice, LKETypeRegionPrice]
+}
+
+// LKETypePrice represents the base hourly and monthly prices
+// for an LKE type entry.
+type LKETypePrice struct {
+ baseTypePrice
+}
+
+// LKETypeRegionPrice represents the regional hourly and monthly prices
+// for an LKE type entry.
+type LKETypeRegionPrice struct {
+ baseTypeRegionPrice
+}
+
+// ListLKETypes lists LKE types. This endpoint is cached by default.
+func (c *Client) ListLKETypes(ctx context.Context, opts *ListOptions) ([]LKEType, error) {
+ e := "lke/types"
+
+ endpoint, err := generateListCacheURL(e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ if result := c.getCachedResponse(endpoint); result != nil {
+ return result.([]LKEType), nil
+ }
+
+ response, err := getPaginatedResults[LKEType](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(endpoint, response, &cacheExpiryTime)
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/logger.go b/vendor/github.com/linode/linodego/logger.go
new file mode 100644
index 00000000..5de75859
--- /dev/null
+++ b/vendor/github.com/linode/linodego/logger.go
@@ -0,0 +1,51 @@
+package linodego
+
+import (
+ "log"
+ "os"
+)
+
+//nolint:unused
+type httpLogger interface {
+ Errorf(format string, v ...interface{})
+ Warnf(format string, v ...interface{})
+ Debugf(format string, v ...interface{})
+}
+
+//nolint:unused
+type logger struct {
+ l *log.Logger
+}
+
+//nolint:unused
+func createLogger() *logger {
+ l := &logger{l: log.New(os.Stderr, "", log.Ldate|log.Lmicroseconds)}
+ return l
+}
+
+//nolint:unused
+var _ httpLogger = (*logger)(nil)
+
+//nolint:unused
+func (l *logger) Errorf(format string, v ...interface{}) {
+ l.output("ERROR RESTY "+format, v...)
+}
+
+//nolint:unused
+func (l *logger) Warnf(format string, v ...interface{}) {
+ l.output("WARN RESTY "+format, v...)
+}
+
+//nolint:unused
+func (l *logger) Debugf(format string, v ...interface{}) {
+ l.output("DEBUG RESTY "+format, v...)
+}
+
+//nolint:unused
+func (l *logger) output(format string, v ...interface{}) { //nolint:goprintffuncname
+ if len(v) == 0 {
+ l.l.Print(format)
+ return
+ }
+ l.l.Printf(format, v...)
+}
diff --git a/vendor/github.com/linode/linodego/longview.go b/vendor/github.com/linode/linodego/longview.go
new file mode 100644
index 00000000..ec76fc8d
--- /dev/null
+++ b/vendor/github.com/linode/linodego/longview.go
@@ -0,0 +1,144 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// LongviewClient represents a LongviewClient object
+type LongviewClient struct {
+ ID int `json:"id"`
+ APIKey string `json:"api_key"`
+ Created *time.Time `json:"-"`
+ InstallCode string `json:"install_code"`
+ Label string `json:"label"`
+ Updated *time.Time `json:"-"`
+ Apps struct {
+ Apache any `json:"apache"`
+ MySQL any `json:"mysql"`
+ NginX any `json:"nginx"`
+ } `json:"apps"`
+}
+
+// LongviewClientCreateOptions is an options struct used when Creating a Longview Client
+type LongviewClientCreateOptions struct {
+ Label string `json:"label"`
+}
+
+// LongviewClientCreateOptions is an options struct used when Updating a Longview Client
+type LongviewClientUpdateOptions struct {
+ Label string `json:"label"`
+}
+
+// LongviewPlan represents a Longview Plan object
+type LongviewPlan struct {
+ ID string `json:"id"`
+ Label string `json:"label"`
+ ClientsIncluded int `json:"clients_included"`
+ Price struct {
+ Hourly float64 `json:"hourly"`
+ Monthly float64 `json:"monthly"`
+ } `json:"price"`
+}
+
+// LongviewPlanUpdateOptions is an options struct used when Updating a Longview Plan
+type LongviewPlanUpdateOptions struct {
+ LongviewSubscription string `json:"longview_subscription"`
+}
+
+// ListLongviewClients lists LongviewClients
+func (c *Client) ListLongviewClients(ctx context.Context, opts *ListOptions) ([]LongviewClient, error) {
+ response, err := getPaginatedResults[LongviewClient](ctx, c, "longview/clients", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetLongviewClient gets the template with the provided ID
+func (c *Client) GetLongviewClient(ctx context.Context, clientID int) (*LongviewClient, error) {
+ e := formatAPIPath("longview/clients/%d", clientID)
+ response, err := doGETRequest[LongviewClient](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateLongviewClient creates a Longview Client
+func (c *Client) CreateLongviewClient(ctx context.Context, opts LongviewClientCreateOptions) (*LongviewClient, error) {
+ e := "longview/clients"
+ response, err := doPOSTRequest[LongviewClient](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteLongviewClient deletes a Longview Client
+func (c *Client) DeleteLongviewClient(ctx context.Context, clientID int) error {
+ e := formatAPIPath("longview/clients/%d", clientID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// UpdateLongviewClient updates a Longview Client
+func (c *Client) UpdateLongviewClient(ctx context.Context, clientID int, opts LongviewClientUpdateOptions) (*LongviewClient, error) {
+ e := formatAPIPath("longview/clients/%d", clientID)
+ response, err := doPUTRequest[LongviewClient](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetLongviewPlan gets the template with the provided ID
+func (c *Client) GetLongviewPlan(ctx context.Context) (*LongviewPlan, error) {
+ e := "longview/plan"
+ response, err := doGETRequest[LongviewPlan](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateLongviewPlan updates a Longview Plan
+func (c *Client) UpdateLongviewPlan(ctx context.Context, opts LongviewPlanUpdateOptions) (*LongviewPlan, error) {
+ e := "longview/plan"
+ response, err := doPUTRequest[LongviewPlan](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *LongviewClient) UnmarshalJSON(b []byte) error {
+ type Mask LongviewClient
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
diff --git a/vendor/github.com/linode/linodego/longview_subscriptions.go b/vendor/github.com/linode/linodego/longview_subscriptions.go
new file mode 100644
index 00000000..586785be
--- /dev/null
+++ b/vendor/github.com/linode/linodego/longview_subscriptions.go
@@ -0,0 +1,36 @@
+package linodego
+
+import (
+ "context"
+)
+
+// LongviewSubscription represents a LongviewSubscription object
+type LongviewSubscription struct {
+ ID string `json:"id"`
+ Label string `json:"label"`
+ ClientsIncluded int `json:"clients_included"`
+ Price *LinodePrice `json:"price"`
+ // UpdatedStr string `json:"updated"`
+ // Updated *time.Time `json:"-"`
+}
+
+// ListLongviewSubscriptions lists LongviewSubscriptions
+func (c *Client) ListLongviewSubscriptions(ctx context.Context, opts *ListOptions) ([]LongviewSubscription, error) {
+ response, err := getPaginatedResults[LongviewSubscription](ctx, c, "longview/subscriptions", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetLongviewSubscription gets the template with the provided ID
+func (c *Client) GetLongviewSubscription(ctx context.Context, templateID string) (*LongviewSubscription, error) {
+ e := formatAPIPath("longview/subscriptions/%s", templateID)
+ response, err := doGETRequest[LongviewSubscription](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/mysql.go b/vendor/github.com/linode/linodego/mysql.go
new file mode 100644
index 00000000..f69f32f2
--- /dev/null
+++ b/vendor/github.com/linode/linodego/mysql.go
@@ -0,0 +1,243 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+type MySQLDatabaseTarget string
+
+type MySQLDatabaseMaintenanceWindow = DatabaseMaintenanceWindow
+
+const (
+ MySQLDatabaseTargetPrimary MySQLDatabaseTarget = "primary"
+ MySQLDatabaseTargetSecondary MySQLDatabaseTarget = "secondary"
+)
+
+// A MySQLDatabase is an instance of Linode MySQL Managed Databases
+type MySQLDatabase struct {
+ ID int `json:"id"`
+ Status DatabaseStatus `json:"status"`
+ Label string `json:"label"`
+ Hosts DatabaseHost `json:"hosts"`
+ Region string `json:"region"`
+ Type string `json:"type"`
+ Engine string `json:"engine"`
+ Version string `json:"version"`
+ ClusterSize int `json:"cluster_size"`
+ ReplicationType string `json:"replication_type"`
+ SSLConnection bool `json:"ssl_connection"`
+ Encrypted bool `json:"encrypted"`
+ AllowList []string `json:"allow_list"`
+ InstanceURI string `json:"instance_uri"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+ Updates DatabaseMaintenanceWindow `json:"updates"`
+}
+
+func (d *MySQLDatabase) UnmarshalJSON(b []byte) error {
+ type Mask MySQLDatabase
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(d),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ d.Created = (*time.Time)(p.Created)
+ d.Updated = (*time.Time)(p.Updated)
+ return nil
+}
+
+// MySQLCreateOptions fields are used when creating a new MySQL Database
+type MySQLCreateOptions struct {
+ Label string `json:"label"`
+ Region string `json:"region"`
+ Type string `json:"type"`
+ Engine string `json:"engine"`
+ AllowList []string `json:"allow_list,omitempty"`
+ ReplicationType string `json:"replication_type,omitempty"`
+ ClusterSize int `json:"cluster_size,omitempty"`
+ Encrypted bool `json:"encrypted,omitempty"`
+ SSLConnection bool `json:"ssl_connection,omitempty"`
+}
+
+// MySQLUpdateOptions fields are used when altering the existing MySQL Database
+type MySQLUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+ AllowList *[]string `json:"allow_list,omitempty"`
+ Updates *DatabaseMaintenanceWindow `json:"updates,omitempty"`
+}
+
+// MySQLDatabaseBackup is information for interacting with a backup for the existing MySQL Database
+type MySQLDatabaseBackup struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Type string `json:"type"`
+ Created *time.Time `json:"-"`
+}
+
+// MySQLBackupCreateOptions are options used for CreateMySQLDatabaseBackup(...)
+type MySQLBackupCreateOptions struct {
+ Label string `json:"label"`
+ Target MySQLDatabaseTarget `json:"target"`
+}
+
+func (d *MySQLDatabaseBackup) UnmarshalJSON(b []byte) error {
+ type Mask MySQLDatabaseBackup
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ }{
+ Mask: (*Mask)(d),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ d.Created = (*time.Time)(p.Created)
+ return nil
+}
+
+// MySQLDatabaseCredential is the Root Credentials to access the Linode Managed Database
+type MySQLDatabaseCredential struct {
+ Username string `json:"username"`
+ Password string `json:"password"`
+}
+
+// MySQLDatabaseSSL is the SSL Certificate to access the Linode Managed MySQL Database
+type MySQLDatabaseSSL struct {
+ CACertificate []byte `json:"ca_certificate"`
+}
+
+// ListMySQLDatabases lists all MySQL Databases associated with the account
+func (c *Client) ListMySQLDatabases(ctx context.Context, opts *ListOptions) ([]MySQLDatabase, error) {
+ response, err := getPaginatedResults[MySQLDatabase](ctx, c, "databases/mysql/instances", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// ListMySQLDatabaseBackups lists all MySQL Database Backups associated with the given MySQL Database
+func (c *Client) ListMySQLDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]MySQLDatabaseBackup, error) {
+ response, err := getPaginatedResults[MySQLDatabaseBackup](ctx, c, formatAPIPath("databases/mysql/instances/%d/backups", databaseID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetMySQLDatabase returns a single MySQL Database matching the id
+func (c *Client) GetMySQLDatabase(ctx context.Context, databaseID int) (*MySQLDatabase, error) {
+ e := formatAPIPath("databases/mysql/instances/%d", databaseID)
+ response, err := doGETRequest[MySQLDatabase](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateMySQLDatabase creates a new MySQL Database using the createOpts as configuration, returns the new MySQL Database
+func (c *Client) CreateMySQLDatabase(ctx context.Context, opts MySQLCreateOptions) (*MySQLDatabase, error) {
+ e := "databases/mysql/instances"
+ response, err := doPOSTRequest[MySQLDatabase](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteMySQLDatabase deletes an existing MySQL Database with the given id
+func (c *Client) DeleteMySQLDatabase(ctx context.Context, databaseID int) error {
+ e := formatAPIPath("databases/mysql/instances/%d", databaseID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// UpdateMySQLDatabase updates the given MySQL Database with the provided opts, returns the MySQLDatabase with the new settings
+func (c *Client) UpdateMySQLDatabase(ctx context.Context, databaseID int, opts MySQLUpdateOptions) (*MySQLDatabase, error) {
+ e := formatAPIPath("databases/mysql/instances/%d", databaseID)
+ response, err := doPUTRequest[MySQLDatabase](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetMySQLDatabaseSSL returns the SSL Certificate for the given MySQL Database
+func (c *Client) GetMySQLDatabaseSSL(ctx context.Context, databaseID int) (*MySQLDatabaseSSL, error) {
+ e := formatAPIPath("databases/mysql/instances/%d/ssl", databaseID)
+ response, err := doGETRequest[MySQLDatabaseSSL](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetMySQLDatabaseCredentials returns the Root Credentials for the given MySQL Database
+func (c *Client) GetMySQLDatabaseCredentials(ctx context.Context, databaseID int) (*MySQLDatabaseCredential, error) {
+ e := formatAPIPath("databases/mysql/instances/%d/credentials", databaseID)
+ response, err := doGETRequest[MySQLDatabaseCredential](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// ResetMySQLDatabaseCredentials returns the Root Credentials for the given MySQL Database (may take a few seconds to work)
+func (c *Client) ResetMySQLDatabaseCredentials(ctx context.Context, databaseID int) error {
+ e := formatAPIPath("databases/mysql/instances/%d/credentials/reset", databaseID)
+ _, err := doPOSTRequest[MySQLDatabaseCredential, any](ctx, c, e)
+ return err
+}
+
+// GetMySQLDatabaseBackup returns a specific MySQL Database Backup with the given ids
+func (c *Client) GetMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*MySQLDatabaseBackup, error) {
+ e := formatAPIPath("databases/mysql/instances/%d/backups/%d", databaseID, backupID)
+ response, err := doGETRequest[MySQLDatabaseBackup](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// RestoreMySQLDatabaseBackup returns the given MySQL Database with the given Backup
+func (c *Client) RestoreMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) error {
+ e := formatAPIPath("databases/mysql/instances/%d/backups/%d/restore", databaseID, backupID)
+ _, err := doPOSTRequest[MySQLDatabaseBackup, any](ctx, c, e)
+ return err
+}
+
+// CreateMySQLDatabaseBackup creates a snapshot for the given MySQL database
+func (c *Client) CreateMySQLDatabaseBackup(ctx context.Context, databaseID int, opts MySQLBackupCreateOptions) error {
+ e := formatAPIPath("databases/mysql/instances/%d/backups", databaseID)
+ _, err := doPOSTRequest[MySQLDatabaseBackup](ctx, c, e, opts)
+ return err
+}
+
+// PatchMySQLDatabase applies security patches and updates to the underlying operating system of the Managed MySQL Database
+func (c *Client) PatchMySQLDatabase(ctx context.Context, databaseID int) error {
+ e := formatAPIPath("databases/mysql/instances/%d/patch", databaseID)
+ _, err := doPOSTRequest[MySQLDatabase, any](ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/network_ips.go b/vendor/github.com/linode/linodego/network_ips.go
new file mode 100644
index 00000000..f872cdb0
--- /dev/null
+++ b/vendor/github.com/linode/linodego/network_ips.go
@@ -0,0 +1,90 @@
+package linodego
+
+import (
+ "context"
+)
+
+// IPAddressUpdateOptions fields are those accepted by UpdateToken
+type IPAddressUpdateOptions struct {
+ // The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if set to nil.
+ RDNS *string `json:"rdns"`
+}
+
+// LinodeIPAssignment stores an assignment between an IP address and a Linode instance.
+type LinodeIPAssignment struct {
+ Address string `json:"address"`
+ LinodeID int `json:"linode_id"`
+}
+
+// LinodesAssignIPsOptions fields are those accepted by InstancesAssignIPs.
+type LinodesAssignIPsOptions struct {
+ Region string `json:"region"`
+
+ Assignments []LinodeIPAssignment `json:"assignments"`
+}
+
+// IPAddressesShareOptions fields are those accepted by ShareIPAddresses.
+type IPAddressesShareOptions struct {
+ IPs []string `json:"ips"`
+ LinodeID int `json:"linode_id"`
+}
+
+// ListIPAddressesQuery fields are those accepted as query params for the
+// ListIPAddresses function.
+type ListIPAddressesQuery struct {
+ SkipIPv6RDNS bool `query:"skip_ipv6_rdns"`
+}
+
+// GetUpdateOptions converts a IPAddress to IPAddressUpdateOptions for use in UpdateIPAddress
+func (i InstanceIP) GetUpdateOptions() (o IPAddressUpdateOptions) {
+ o.RDNS = copyString(&i.RDNS)
+ return
+}
+
+// ListIPAddresses lists IPAddresses
+func (c *Client) ListIPAddresses(ctx context.Context, opts *ListOptions) ([]InstanceIP, error) {
+ response, err := getPaginatedResults[InstanceIP](ctx, c, "networking/ips", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetIPAddress gets the template with the provided ID
+func (c *Client) GetIPAddress(ctx context.Context, id string) (*InstanceIP, error) {
+ e := formatAPIPath("networking/ips/%s", id)
+ response, err := doGETRequest[InstanceIP](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateIPAddress updates the IPAddress with the specified id
+func (c *Client) UpdateIPAddress(ctx context.Context, id string, opts IPAddressUpdateOptions) (*InstanceIP, error) {
+ e := formatAPIPath("networking/ips/%s", id)
+ response, err := doPUTRequest[InstanceIP](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// InstancesAssignIPs assigns multiple IPv4 addresses and/or IPv6 ranges to multiple Linodes in one Region.
+// This allows swapping, shuffling, or otherwise reorganizing IPs to your Linodes.
+func (c *Client) InstancesAssignIPs(ctx context.Context, opts LinodesAssignIPsOptions) error {
+ e := "networking/ips/assign"
+ _, err := doPOSTRequest[InstanceIP](ctx, c, e, opts)
+ return err
+}
+
+// ShareIPAddresses allows IP address reassignment (also referred to as IP failover)
+// from one Linode to another if the primary Linode becomes unresponsive.
+func (c *Client) ShareIPAddresses(ctx context.Context, opts IPAddressesShareOptions) error {
+ e := "networking/ips/share"
+ _, err := doPOSTRequest[InstanceIP](ctx, c, e, opts)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/network_pools.go b/vendor/github.com/linode/linodego/network_pools.go
new file mode 100644
index 00000000..d5031a75
--- /dev/null
+++ b/vendor/github.com/linode/linodego/network_pools.go
@@ -0,0 +1,26 @@
+package linodego
+
+import (
+ "context"
+)
+
+// ListIPv6Pools lists IPv6Pools
+func (c *Client) ListIPv6Pools(ctx context.Context, opts *ListOptions) ([]IPv6Range, error) {
+ response, err := getPaginatedResults[IPv6Range](ctx, c, "networking/ipv6/pools", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetIPv6Pool gets the template with the provided ID
+func (c *Client) GetIPv6Pool(ctx context.Context, id string) (*IPv6Range, error) {
+ e := formatAPIPath("networking/ipv6/pools/%s", id)
+ response, err := doGETRequest[IPv6Range](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/network_ranges.go b/vendor/github.com/linode/linodego/network_ranges.go
new file mode 100644
index 00000000..554803d7
--- /dev/null
+++ b/vendor/github.com/linode/linodego/network_ranges.go
@@ -0,0 +1,51 @@
+package linodego
+
+import (
+ "context"
+)
+
+// IPv6RangeCreateOptions fields are those accepted by CreateIPv6Range
+type IPv6RangeCreateOptions struct {
+ LinodeID int `json:"linode_id,omitempty"`
+ PrefixLength int `json:"prefix_length"`
+ RouteTarget string `json:"route_target,omitempty"`
+}
+
+// ListIPv6Ranges lists IPv6Ranges
+func (c *Client) ListIPv6Ranges(ctx context.Context, opts *ListOptions) ([]IPv6Range, error) {
+ response, err := getPaginatedResults[IPv6Range](ctx, c, "networking/ipv6/ranges", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetIPv6Range gets details about an IPv6 range
+func (c *Client) GetIPv6Range(ctx context.Context, ipRange string) (*IPv6Range, error) {
+ e := formatAPIPath("networking/ipv6/ranges/%s", ipRange)
+ response, err := doGETRequest[IPv6Range](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateIPv6Range creates an IPv6 Range and assigns it based on the provided Linode or route target IPv6 SLAAC address.
+func (c *Client) CreateIPv6Range(ctx context.Context, opts IPv6RangeCreateOptions) (*IPv6Range, error) {
+ e := "networking/ipv6/ranges"
+ response, err := doPOSTRequest[IPv6Range](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteIPv6Range deletes an IPv6 Range.
+func (c *Client) DeleteIPv6Range(ctx context.Context, ipRange string) error {
+ e := formatAPIPath("networking/ipv6/ranges/%s", ipRange)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/network_reserved_ips.go b/vendor/github.com/linode/linodego/network_reserved_ips.go
new file mode 100644
index 00000000..56f343f8
--- /dev/null
+++ b/vendor/github.com/linode/linodego/network_reserved_ips.go
@@ -0,0 +1,54 @@
+package linodego
+
+import (
+ "context"
+)
+
+// ReserveIPOptions represents the options for reserving an IP address
+// NOTE: Reserved IP feature may not currently be available to all users.
+type ReserveIPOptions struct {
+ Region string `json:"region"`
+}
+
+// ListReservedIPAddresses retrieves a list of reserved IP addresses
+// NOTE: Reserved IP feature may not currently be available to all users.
+func (c *Client) ListReservedIPAddresses(ctx context.Context, opts *ListOptions) ([]InstanceIP, error) {
+ e := formatAPIPath("networking/reserved/ips")
+ response, err := getPaginatedResults[InstanceIP](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetReservedIPAddress retrieves details of a specific reserved IP address
+// NOTE: Reserved IP feature may not currently be available to all users.
+func (c *Client) GetReservedIPAddress(ctx context.Context, ipAddress string) (*InstanceIP, error) {
+ e := formatAPIPath("networking/reserved/ips/%s", ipAddress)
+ response, err := doGETRequest[InstanceIP](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// ReserveIPAddress reserves a new IP address
+// NOTE: Reserved IP feature may not currently be available to all users.
+func (c *Client) ReserveIPAddress(ctx context.Context, opts ReserveIPOptions) (*InstanceIP, error) {
+ e := "networking/reserved/ips"
+ response, err := doPOSTRequest[InstanceIP](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteReservedIPAddress deletes a reserved IP address
+// NOTE: Reserved IP feature may not currently be available to all users.
+func (c *Client) DeleteReservedIPAddress(ctx context.Context, ipAddress string) error {
+ e := formatAPIPath("networking/reserved/ips/%s", ipAddress)
+ return doDELETERequest(ctx, c, e)
+}
diff --git a/vendor/github.com/linode/linodego/network_transfer_prices.go b/vendor/github.com/linode/linodego/network_transfer_prices.go
new file mode 100644
index 00000000..daa25e88
--- /dev/null
+++ b/vendor/github.com/linode/linodego/network_transfer_prices.go
@@ -0,0 +1,45 @@
+package linodego
+
+import (
+ "context"
+)
+
+// NetworkTransferPrice represents a single valid network transfer price.
+type NetworkTransferPrice struct {
+ baseType[NetworkTransferTypePrice, NetworkTransferTypeRegionPrice]
+}
+
+// NetworkTransferTypePrice represents the base hourly and monthly prices
+// for a network transfer price entry.
+type NetworkTransferTypePrice struct {
+ baseTypePrice
+}
+
+// NetworkTransferTypeRegionPrice represents the regional hourly and monthly prices
+// for a network transfer price entry.
+type NetworkTransferTypeRegionPrice struct {
+ baseTypeRegionPrice
+}
+
+// ListNetworkTransferPrices lists network transfer prices. This endpoint is cached by default.
+func (c *Client) ListNetworkTransferPrices(ctx context.Context, opts *ListOptions) ([]NetworkTransferPrice, error) {
+ e := "network-transfer/prices"
+
+ endpoint, err := generateListCacheURL(e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ if result := c.getCachedResponse(endpoint); result != nil {
+ return result.([]NetworkTransferPrice), nil
+ }
+
+ response, err := getPaginatedResults[NetworkTransferPrice](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(endpoint, response, &cacheExpiryTime)
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/nodebalancer.go b/vendor/github.com/linode/linodego/nodebalancer.go
new file mode 100644
index 00000000..068eda49
--- /dev/null
+++ b/vendor/github.com/linode/linodego/nodebalancer.go
@@ -0,0 +1,153 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// NodeBalancer represents a NodeBalancer object
+type NodeBalancer struct {
+ // This NodeBalancer's unique ID.
+ ID int `json:"id"`
+ // This NodeBalancer's label. These must be unique on your Account.
+ Label *string `json:"label"`
+ // The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region.
+ Region string `json:"region"`
+ // This NodeBalancer's hostname, ending with .nodebalancer.linode.com
+ Hostname *string `json:"hostname"`
+ // This NodeBalancer's public IPv4 address.
+ IPv4 *string `json:"ipv4"`
+ // This NodeBalancer's public IPv6 address.
+ IPv6 *string `json:"ipv6"`
+ // Throttle connections per second (0-20). Set to 0 (zero) to disable throttling.
+ ClientConnThrottle int `json:"client_conn_throttle"`
+ // Information about the amount of transfer this NodeBalancer has had so far this month.
+ Transfer NodeBalancerTransfer `json:"transfer"`
+
+ // An array of tags applied to this object. Tags are for organizational purposes only.
+ Tags []string `json:"tags"`
+
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+}
+
+// NodeBalancerTransfer contains information about the amount of transfer a NodeBalancer has had in the current month
+type NodeBalancerTransfer struct {
+ // The total transfer, in MB, used by this NodeBalancer this month.
+ Total *float64 `json:"total"`
+ // The total inbound transfer, in MB, used for this NodeBalancer this month.
+ Out *float64 `json:"out"`
+ // The total outbound transfer, in MB, used for this NodeBalancer this month.
+ In *float64 `json:"in"`
+}
+
+// NodeBalancerCreateOptions are the options permitted for CreateNodeBalancer
+type NodeBalancerCreateOptions struct {
+ Label *string `json:"label,omitempty"`
+ Region string `json:"region,omitempty"`
+ ClientConnThrottle *int `json:"client_conn_throttle,omitempty"`
+ Configs []*NodeBalancerConfigCreateOptions `json:"configs,omitempty"`
+ Tags []string `json:"tags"`
+ FirewallID int `json:"firewall_id,omitempty"`
+}
+
+// NodeBalancerUpdateOptions are the options permitted for UpdateNodeBalancer
+type NodeBalancerUpdateOptions struct {
+ Label *string `json:"label,omitempty"`
+ ClientConnThrottle *int `json:"client_conn_throttle,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *NodeBalancer) UnmarshalJSON(b []byte) error {
+ type Mask NodeBalancer
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
+
+// GetCreateOptions converts a NodeBalancer to NodeBalancerCreateOptions for use in CreateNodeBalancer
+func (i NodeBalancer) GetCreateOptions() NodeBalancerCreateOptions {
+ return NodeBalancerCreateOptions{
+ Label: i.Label,
+ Region: i.Region,
+ ClientConnThrottle: &i.ClientConnThrottle,
+ Tags: i.Tags,
+ }
+}
+
+// GetUpdateOptions converts a NodeBalancer to NodeBalancerUpdateOptions for use in UpdateNodeBalancer
+func (i NodeBalancer) GetUpdateOptions() NodeBalancerUpdateOptions {
+ return NodeBalancerUpdateOptions{
+ Label: i.Label,
+ ClientConnThrottle: &i.ClientConnThrottle,
+ Tags: &i.Tags,
+ }
+}
+
+// ListNodeBalancers lists NodeBalancers
+func (c *Client) ListNodeBalancers(ctx context.Context, opts *ListOptions) ([]NodeBalancer, error) {
+ response, err := getPaginatedResults[NodeBalancer](ctx, c, "nodebalancers", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetNodeBalancer gets the NodeBalancer with the provided ID
+func (c *Client) GetNodeBalancer(ctx context.Context, nodebalancerID int) (*NodeBalancer, error) {
+ e := formatAPIPath("nodebalancers/%d", nodebalancerID)
+ response, err := doGETRequest[NodeBalancer](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateNodeBalancer creates a NodeBalancer
+func (c *Client) CreateNodeBalancer(ctx context.Context, opts NodeBalancerCreateOptions) (*NodeBalancer, error) {
+ e := "nodebalancers"
+ response, err := doPOSTRequest[NodeBalancer](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateNodeBalancer updates the NodeBalancer with the specified id
+func (c *Client) UpdateNodeBalancer(ctx context.Context, nodebalancerID int, opts NodeBalancerUpdateOptions) (*NodeBalancer, error) {
+ e := formatAPIPath("nodebalancers/%d", nodebalancerID)
+ response, err := doPUTRequest[NodeBalancer](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteNodeBalancer deletes the NodeBalancer with the specified id
+func (c *Client) DeleteNodeBalancer(ctx context.Context, nodebalancerID int) error {
+ e := formatAPIPath("nodebalancers/%d", nodebalancerID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/nodebalancer_config_nodes.go b/vendor/github.com/linode/linodego/nodebalancer_config_nodes.go
new file mode 100644
index 00000000..b69e135c
--- /dev/null
+++ b/vendor/github.com/linode/linodego/nodebalancer_config_nodes.go
@@ -0,0 +1,120 @@
+package linodego
+
+import (
+ "context"
+)
+
+// NodeBalancerNode objects represent a backend that can accept traffic for a NodeBalancer Config
+type NodeBalancerNode struct {
+ ID int `json:"id"`
+ Address string `json:"address"`
+ Label string `json:"label"`
+ Status string `json:"status"`
+ Weight int `json:"weight"`
+ Mode NodeMode `json:"mode"`
+ ConfigID int `json:"config_id"`
+ NodeBalancerID int `json:"nodebalancer_id"`
+}
+
+// NodeMode is the mode a NodeBalancer should use when sending traffic to a NodeBalancer Node
+type NodeMode string
+
+var (
+ // ModeAccept is the NodeMode indicating a NodeBalancer Node is accepting traffic
+ ModeAccept NodeMode = "accept"
+
+ // ModeReject is the NodeMode indicating a NodeBalancer Node is not receiving traffic
+ ModeReject NodeMode = "reject"
+
+ // ModeDrain is the NodeMode indicating a NodeBalancer Node is not receiving new traffic, but may continue receiving traffic from pinned connections
+ ModeDrain NodeMode = "drain"
+
+ // ModeBackup is the NodeMode indicating a NodeBalancer Node will only receive traffic if all "accept" Nodes are down
+ ModeBackup NodeMode = "backup"
+)
+
+// NodeBalancerNodeCreateOptions fields are those accepted by CreateNodeBalancerNode
+type NodeBalancerNodeCreateOptions struct {
+ Address string `json:"address"`
+ Label string `json:"label"`
+ Weight int `json:"weight,omitempty"`
+ Mode NodeMode `json:"mode,omitempty"`
+}
+
+// NodeBalancerNodeUpdateOptions fields are those accepted by UpdateNodeBalancerNode
+type NodeBalancerNodeUpdateOptions struct {
+ Address string `json:"address,omitempty"`
+ Label string `json:"label,omitempty"`
+ Weight int `json:"weight,omitempty"`
+ Mode NodeMode `json:"mode,omitempty"`
+}
+
+// GetCreateOptions converts a NodeBalancerNode to NodeBalancerNodeCreateOptions for use in CreateNodeBalancerNode
+func (i NodeBalancerNode) GetCreateOptions() NodeBalancerNodeCreateOptions {
+ return NodeBalancerNodeCreateOptions{
+ Address: i.Address,
+ Label: i.Label,
+ Weight: i.Weight,
+ Mode: i.Mode,
+ }
+}
+
+// GetUpdateOptions converts a NodeBalancerNode to NodeBalancerNodeUpdateOptions for use in UpdateNodeBalancerNode
+func (i NodeBalancerNode) GetUpdateOptions() NodeBalancerNodeUpdateOptions {
+ return NodeBalancerNodeUpdateOptions{
+ Address: i.Address,
+ Label: i.Label,
+ Weight: i.Weight,
+ Mode: i.Mode,
+ }
+}
+
+// ListNodeBalancerNodes lists NodeBalancerNodes
+func (c *Client) ListNodeBalancerNodes(ctx context.Context, nodebalancerID int, configID int, opts *ListOptions) ([]NodeBalancerNode, error) {
+ response, err := getPaginatedResults[NodeBalancerNode](ctx, c, formatAPIPath("nodebalancers/%d/configs/%d/nodes", nodebalancerID, configID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetNodeBalancerNode gets the template with the provided ID
+func (c *Client) GetNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int) (*NodeBalancerNode, error) {
+ e := formatAPIPath("nodebalancers/%d/configs/%d/nodes/%d", nodebalancerID, configID, nodeID)
+ response, err := doGETRequest[NodeBalancerNode](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateNodeBalancerNode creates a NodeBalancerNode
+func (c *Client) CreateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, opts NodeBalancerNodeCreateOptions) (*NodeBalancerNode, error) {
+ e := formatAPIPath("nodebalancers/%d/configs/%d/nodes", nodebalancerID, configID)
+ response, err := doPOSTRequest[NodeBalancerNode](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateNodeBalancerNode updates the NodeBalancerNode with the specified id
+func (c *Client) UpdateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int, opts NodeBalancerNodeUpdateOptions) (*NodeBalancerNode, error) {
+ e := formatAPIPath("nodebalancers/%d/configs/%d/nodes/%d", nodebalancerID, configID, nodeID)
+ response, err := doPUTRequest[NodeBalancerNode](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteNodeBalancerNode deletes the NodeBalancerNode with the specified id
+func (c *Client) DeleteNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int) error {
+ e := formatAPIPath("nodebalancers/%d/configs/%d/nodes/%d", nodebalancerID, configID, nodeID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/nodebalancer_configs.go b/vendor/github.com/linode/linodego/nodebalancer_configs.go
new file mode 100644
index 00000000..28caac70
--- /dev/null
+++ b/vendor/github.com/linode/linodego/nodebalancer_configs.go
@@ -0,0 +1,271 @@
+package linodego
+
+import (
+ "context"
+)
+
+// NodeBalancerConfig objects allow a NodeBalancer to accept traffic on a new port
+type NodeBalancerConfig struct {
+ ID int `json:"id"`
+ Port int `json:"port"`
+ Protocol ConfigProtocol `json:"protocol"`
+ ProxyProtocol ConfigProxyProtocol `json:"proxy_protocol"`
+ Algorithm ConfigAlgorithm `json:"algorithm"`
+ Stickiness ConfigStickiness `json:"stickiness"`
+ Check ConfigCheck `json:"check"`
+ CheckInterval int `json:"check_interval"`
+ CheckAttempts int `json:"check_attempts"`
+ CheckPath string `json:"check_path"`
+ CheckBody string `json:"check_body"`
+ CheckPassive bool `json:"check_passive"`
+ CheckTimeout int `json:"check_timeout"`
+ CipherSuite ConfigCipher `json:"cipher_suite"`
+ NodeBalancerID int `json:"nodebalancer_id"`
+ SSLCommonName string `json:"ssl_commonname"`
+ SSLFingerprint string `json:"ssl_fingerprint"`
+ SSLCert string `json:"ssl_cert"`
+ SSLKey string `json:"ssl_key"`
+ NodesStatus *NodeBalancerNodeStatus `json:"nodes_status"`
+}
+
+// ConfigAlgorithm constants start with Algorithm and include Linode API NodeBalancer Config Algorithms
+type ConfigAlgorithm string
+
+// ConfigAlgorithm constants reflect the NodeBalancer Config Algorithm
+const (
+ AlgorithmRoundRobin ConfigAlgorithm = "roundrobin"
+ AlgorithmLeastConn ConfigAlgorithm = "leastconn"
+ AlgorithmSource ConfigAlgorithm = "source"
+)
+
+// ConfigStickiness constants start with Stickiness and include Linode API NodeBalancer Config Stickiness
+type ConfigStickiness string
+
+// ConfigStickiness constants reflect the node stickiness method for a NodeBalancer Config
+const (
+ StickinessNone ConfigStickiness = "none"
+ StickinessTable ConfigStickiness = "table"
+ StickinessHTTPCookie ConfigStickiness = "http_cookie"
+)
+
+// ConfigCheck constants start with Check and include Linode API NodeBalancer Config Check methods
+type ConfigCheck string
+
+// ConfigCheck constants reflect the node health status checking method for a NodeBalancer Config
+const (
+ CheckNone ConfigCheck = "none"
+ CheckConnection ConfigCheck = "connection"
+ CheckHTTP ConfigCheck = "http"
+ CheckHTTPBody ConfigCheck = "http_body"
+)
+
+// ConfigProtocol constants start with Protocol and include Linode API Nodebalancer Config protocols
+type ConfigProtocol string
+
+// ConfigProtocol constants reflect the protocol used by a NodeBalancer Config
+const (
+ ProtocolHTTP ConfigProtocol = "http"
+ ProtocolHTTPS ConfigProtocol = "https"
+ ProtocolTCP ConfigProtocol = "tcp"
+)
+
+// ConfigProxyProtocol constants start with ProxyProtocol and include Linode API NodeBalancer Config proxy protocol versions
+type ConfigProxyProtocol string
+
+// ConfigProxyProtocol constatns reflect the proxy protocol version used by a NodeBalancer Config
+const (
+ ProxyProtocolNone ConfigProxyProtocol = "none"
+ ProxyProtocolV1 ConfigProxyProtocol = "v1"
+ ProxyProtocolV2 ConfigProxyProtocol = "v2"
+)
+
+// ConfigCipher constants start with Cipher and include Linode API NodeBalancer Config Cipher values
+type ConfigCipher string
+
+// ConfigCipher constants reflect the preferred cipher set for a NodeBalancer Config
+const (
+ CipherRecommended ConfigCipher = "recommended"
+ CipherLegacy ConfigCipher = "legacy"
+)
+
+// NodeBalancerNodeStatus represents the total number of nodes whose status is Up or Down
+type NodeBalancerNodeStatus struct {
+ Up int `json:"up"`
+ Down int `json:"down"`
+}
+
+// NodeBalancerConfigCreateOptions are permitted by CreateNodeBalancerConfig
+type NodeBalancerConfigCreateOptions struct {
+ Port int `json:"port"`
+ Protocol ConfigProtocol `json:"protocol,omitempty"`
+ ProxyProtocol ConfigProxyProtocol `json:"proxy_protocol,omitempty"`
+ Algorithm ConfigAlgorithm `json:"algorithm,omitempty"`
+ Stickiness ConfigStickiness `json:"stickiness,omitempty"`
+ Check ConfigCheck `json:"check,omitempty"`
+ CheckInterval int `json:"check_interval,omitempty"`
+ CheckAttempts int `json:"check_attempts,omitempty"`
+ CheckPath string `json:"check_path,omitempty"`
+ CheckBody string `json:"check_body,omitempty"`
+ CheckPassive *bool `json:"check_passive,omitempty"`
+ CheckTimeout int `json:"check_timeout,omitempty"`
+ CipherSuite ConfigCipher `json:"cipher_suite,omitempty"`
+ SSLCert string `json:"ssl_cert,omitempty"`
+ SSLKey string `json:"ssl_key,omitempty"`
+ Nodes []NodeBalancerNodeCreateOptions `json:"nodes,omitempty"`
+}
+
+// NodeBalancerConfigRebuildOptions used by RebuildNodeBalancerConfig
+type NodeBalancerConfigRebuildOptions struct {
+ Port int `json:"port"`
+ Protocol ConfigProtocol `json:"protocol,omitempty"`
+ ProxyProtocol ConfigProxyProtocol `json:"proxy_protocol,omitempty"`
+ Algorithm ConfigAlgorithm `json:"algorithm,omitempty"`
+ Stickiness ConfigStickiness `json:"stickiness,omitempty"`
+ Check ConfigCheck `json:"check,omitempty"`
+ CheckInterval int `json:"check_interval,omitempty"`
+ CheckAttempts int `json:"check_attempts,omitempty"`
+ CheckPath string `json:"check_path,omitempty"`
+ CheckBody string `json:"check_body,omitempty"`
+ CheckPassive *bool `json:"check_passive,omitempty"`
+ CheckTimeout int `json:"check_timeout,omitempty"`
+ CipherSuite ConfigCipher `json:"cipher_suite,omitempty"`
+ SSLCert string `json:"ssl_cert,omitempty"`
+ SSLKey string `json:"ssl_key,omitempty"`
+ Nodes []NodeBalancerConfigRebuildNodeOptions `json:"nodes"`
+}
+
+// NodeBalancerConfigRebuildNodeOptions represents a node defined when rebuilding a
+// NodeBalancer config.
+type NodeBalancerConfigRebuildNodeOptions struct {
+ NodeBalancerNodeCreateOptions
+
+ ID int `json:"id,omitempty"`
+}
+
+// NodeBalancerConfigUpdateOptions are permitted by UpdateNodeBalancerConfig
+type NodeBalancerConfigUpdateOptions NodeBalancerConfigCreateOptions
+
+// GetCreateOptions converts a NodeBalancerConfig to NodeBalancerConfigCreateOptions for use in CreateNodeBalancerConfig
+func (i NodeBalancerConfig) GetCreateOptions() NodeBalancerConfigCreateOptions {
+ return NodeBalancerConfigCreateOptions{
+ Port: i.Port,
+ Protocol: i.Protocol,
+ ProxyProtocol: i.ProxyProtocol,
+ Algorithm: i.Algorithm,
+ Stickiness: i.Stickiness,
+ Check: i.Check,
+ CheckInterval: i.CheckInterval,
+ CheckAttempts: i.CheckAttempts,
+ CheckTimeout: i.CheckTimeout,
+ CheckPath: i.CheckPath,
+ CheckBody: i.CheckBody,
+ CheckPassive: copyBool(&i.CheckPassive),
+ CipherSuite: i.CipherSuite,
+ SSLCert: i.SSLCert,
+ SSLKey: i.SSLKey,
+ }
+}
+
+// GetUpdateOptions converts a NodeBalancerConfig to NodeBalancerConfigUpdateOptions for use in UpdateNodeBalancerConfig
+func (i NodeBalancerConfig) GetUpdateOptions() NodeBalancerConfigUpdateOptions {
+ return NodeBalancerConfigUpdateOptions{
+ Port: i.Port,
+ Protocol: i.Protocol,
+ ProxyProtocol: i.ProxyProtocol,
+ Algorithm: i.Algorithm,
+ Stickiness: i.Stickiness,
+ Check: i.Check,
+ CheckInterval: i.CheckInterval,
+ CheckAttempts: i.CheckAttempts,
+ CheckPath: i.CheckPath,
+ CheckBody: i.CheckBody,
+ CheckPassive: copyBool(&i.CheckPassive),
+ CheckTimeout: i.CheckTimeout,
+ CipherSuite: i.CipherSuite,
+ SSLCert: i.SSLCert,
+ SSLKey: i.SSLKey,
+ }
+}
+
+// GetRebuildOptions converts a NodeBalancerConfig to NodeBalancerConfigRebuildOptions for use in RebuildNodeBalancerConfig
+func (i NodeBalancerConfig) GetRebuildOptions() NodeBalancerConfigRebuildOptions {
+ return NodeBalancerConfigRebuildOptions{
+ Port: i.Port,
+ Protocol: i.Protocol,
+ ProxyProtocol: i.ProxyProtocol,
+ Algorithm: i.Algorithm,
+ Stickiness: i.Stickiness,
+ Check: i.Check,
+ CheckInterval: i.CheckInterval,
+ CheckAttempts: i.CheckAttempts,
+ CheckTimeout: i.CheckTimeout,
+ CheckPath: i.CheckPath,
+ CheckBody: i.CheckBody,
+ CheckPassive: copyBool(&i.CheckPassive),
+ CipherSuite: i.CipherSuite,
+ SSLCert: i.SSLCert,
+ SSLKey: i.SSLKey,
+ Nodes: make([]NodeBalancerConfigRebuildNodeOptions, 0),
+ }
+}
+
+// ListNodeBalancerConfigs lists NodeBalancerConfigs
+func (c *Client) ListNodeBalancerConfigs(ctx context.Context, nodebalancerID int, opts *ListOptions) ([]NodeBalancerConfig, error) {
+ response, err := getPaginatedResults[NodeBalancerConfig](ctx, c, formatAPIPath("nodebalancers/%d/configs", nodebalancerID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetNodeBalancerConfig gets the template with the provided ID
+func (c *Client) GetNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int) (*NodeBalancerConfig, error) {
+ e := formatAPIPath("nodebalancers/%d/configs/%d", nodebalancerID, configID)
+ response, err := doGETRequest[NodeBalancerConfig](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateNodeBalancerConfig creates a NodeBalancerConfig
+func (c *Client) CreateNodeBalancerConfig(ctx context.Context, nodebalancerID int, opts NodeBalancerConfigCreateOptions) (*NodeBalancerConfig, error) {
+ e := formatAPIPath("nodebalancers/%d/configs", nodebalancerID)
+ response, err := doPOSTRequest[NodeBalancerConfig](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateNodeBalancerConfig updates the NodeBalancerConfig with the specified id
+func (c *Client) UpdateNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int, opts NodeBalancerConfigUpdateOptions) (*NodeBalancerConfig, error) {
+ e := formatAPIPath("nodebalancers/%d/configs/%d", nodebalancerID, configID)
+ response, err := doPUTRequest[NodeBalancerConfig](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteNodeBalancerConfig deletes the NodeBalancerConfig with the specified id
+func (c *Client) DeleteNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int) error {
+ e := formatAPIPath("nodebalancers/%d/configs/%d", nodebalancerID, configID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// RebuildNodeBalancerConfig updates the NodeBalancer with the specified id
+func (c *Client) RebuildNodeBalancerConfig(ctx context.Context, nodeBalancerID int, configID int, opts NodeBalancerConfigRebuildOptions) (*NodeBalancerConfig, error) {
+ e := formatAPIPath("nodebalancers/%d/configs/%d/rebuild", nodeBalancerID, configID)
+ response, err := doPOSTRequest[NodeBalancerConfig](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/nodebalancer_firewalls.go b/vendor/github.com/linode/linodego/nodebalancer_firewalls.go
new file mode 100644
index 00000000..2e033784
--- /dev/null
+++ b/vendor/github.com/linode/linodego/nodebalancer_firewalls.go
@@ -0,0 +1,15 @@
+package linodego
+
+import (
+ "context"
+)
+
+// ListNodeBalancerFirewalls returns a paginated list of Cloud Firewalls for nodebalancerID
+func (c *Client) ListNodeBalancerFirewalls(ctx context.Context, nodebalancerID int, opts *ListOptions) ([]Firewall, error) {
+ response, err := getPaginatedResults[Firewall](ctx, c, formatAPIPath("nodebalancers/%d/firewalls", nodebalancerID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/nodebalancer_stats.go b/vendor/github.com/linode/linodego/nodebalancer_stats.go
new file mode 100644
index 00000000..e1ae39b3
--- /dev/null
+++ b/vendor/github.com/linode/linodego/nodebalancer_stats.go
@@ -0,0 +1,34 @@
+package linodego
+
+import (
+ "context"
+)
+
+// NodeBalancerStats represents a nodebalancer stats object
+type NodeBalancerStats struct {
+ Title string `json:"title"`
+ Data NodeBalancerStatsData `json:"data"`
+}
+
+// NodeBalancerStatsData represents a nodebalancer stats data object
+type NodeBalancerStatsData struct {
+ Connections [][]float64 `json:"connections"`
+ Traffic StatsTraffic `json:"traffic"`
+}
+
+// StatsTraffic represents a Traffic stats object
+type StatsTraffic struct {
+ In [][]float64 `json:"in"`
+ Out [][]float64 `json:"out"`
+}
+
+// GetNodeBalancerStats gets the template with the provided ID
+func (c *Client) GetNodeBalancerStats(ctx context.Context, nodebalancerID int) (*NodeBalancerStats, error) {
+ e := formatAPIPath("nodebalancers/%d/stats", nodebalancerID)
+ response, err := doGETRequest[NodeBalancerStats](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/nodebalancer_types.go b/vendor/github.com/linode/linodego/nodebalancer_types.go
new file mode 100644
index 00000000..879665d4
--- /dev/null
+++ b/vendor/github.com/linode/linodego/nodebalancer_types.go
@@ -0,0 +1,45 @@
+package linodego
+
+import (
+ "context"
+)
+
+// NodeBalancerType represents a single valid NodeBalancer type.
+type NodeBalancerType struct {
+ baseType[NodeBalancerTypePrice, NodeBalancerTypeRegionPrice]
+}
+
+// NodeBalancerTypePrice represents the base hourly and monthly prices
+// for a NodeBalancer type entry.
+type NodeBalancerTypePrice struct {
+ baseTypePrice
+}
+
+// NodeBalancerTypeRegionPrice represents the regional hourly and monthly prices
+// for a NodeBalancer type entry.
+type NodeBalancerTypeRegionPrice struct {
+ baseTypeRegionPrice
+}
+
+// ListNodeBalancerTypes lists NodeBalancer types. This endpoint is cached by default.
+func (c *Client) ListNodeBalancerTypes(ctx context.Context, opts *ListOptions) ([]NodeBalancerType, error) {
+ e := "nodebalancers/types"
+
+ endpoint, err := generateListCacheURL(e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ if result := c.getCachedResponse(endpoint); result != nil {
+ return result.([]NodeBalancerType), nil
+ }
+
+ response, err := getPaginatedResults[NodeBalancerType](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(endpoint, response, &cacheExpiryTime)
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/object_storage.go b/vendor/github.com/linode/linodego/object_storage.go
new file mode 100644
index 00000000..7e9c5179
--- /dev/null
+++ b/vendor/github.com/linode/linodego/object_storage.go
@@ -0,0 +1,28 @@
+package linodego
+
+import (
+ "context"
+)
+
+// ObjectStorageTransfer is an object matching the response of object-storage/transfer
+type ObjectStorageTransfer struct {
+ AmmountUsed int `json:"used"`
+}
+
+// CancelObjectStorage cancels and removes all object storage from the Account
+func (c *Client) CancelObjectStorage(ctx context.Context) error {
+ e := "object-storage/cancel"
+ _, err := doPOSTRequest[any, any](ctx, c, e)
+ return err
+}
+
+// GetObjectStorageTransfer returns the amount of outbound data transferred used by the Account
+func (c *Client) GetObjectStorageTransfer(ctx context.Context) (*ObjectStorageTransfer, error) {
+ e := "object-storage/transfer"
+ response, err := doGETRequest[ObjectStorageTransfer](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/object_storage_bucket_certs.go b/vendor/github.com/linode/linodego/object_storage_bucket_certs.go
new file mode 100644
index 00000000..e09d2337
--- /dev/null
+++ b/vendor/github.com/linode/linodego/object_storage_bucket_certs.go
@@ -0,0 +1,43 @@
+package linodego
+
+import (
+ "context"
+)
+
+type ObjectStorageBucketCert struct {
+ SSL bool `json:"ssl"`
+}
+
+type ObjectStorageBucketCertUploadOptions struct {
+ Certificate string `json:"certificate"`
+ PrivateKey string `json:"private_key"`
+}
+
+// UploadObjectStorageBucketCert uploads a TLS/SSL Cert to be used with an Object Storage Bucket.
+func (c *Client) UploadObjectStorageBucketCert(ctx context.Context, clusterOrRegionID, bucket string, opts ObjectStorageBucketCertUploadOptions) (*ObjectStorageBucketCert, error) {
+ e := formatAPIPath("object-storage/buckets/%s/%s/ssl", clusterOrRegionID, bucket)
+ response, err := doPOSTRequest[ObjectStorageBucketCert](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetObjectStorageBucketCert gets an ObjectStorageBucketCert
+func (c *Client) GetObjectStorageBucketCert(ctx context.Context, clusterOrRegionID, bucket string) (*ObjectStorageBucketCert, error) {
+ e := formatAPIPath("object-storage/buckets/%s/%s/ssl", clusterOrRegionID, bucket)
+ response, err := doGETRequest[ObjectStorageBucketCert](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteObjectStorageBucketCert deletes an ObjectStorageBucketCert
+func (c *Client) DeleteObjectStorageBucketCert(ctx context.Context, clusterOrRegionID, bucket string) error {
+ e := formatAPIPath("object-storage/buckets/%s/%s/ssl", clusterOrRegionID, bucket)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/object_storage_buckets.go b/vendor/github.com/linode/linodego/object_storage_buckets.go
new file mode 100644
index 00000000..f5e5cd08
--- /dev/null
+++ b/vendor/github.com/linode/linodego/object_storage_buckets.go
@@ -0,0 +1,156 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// ObjectStorageBucket represents a ObjectStorage object
+type ObjectStorageBucket struct {
+ Label string `json:"label"`
+
+ // Deprecated: The 'Cluster' field has been deprecated in favor of the 'Region' field.
+ // For example, a Cluster value of `us-mia-1` will translate to a Region value of `us-mia`.
+ //
+ // This is necessary because there are now multiple Object Storage clusters to a region.
+ //
+ // NOTE: The 'Cluster' field will always return a value similar to `-1` (e.g., `us-mia-1`)
+ // for backward compatibility purposes.
+ Cluster string `json:"cluster"`
+ Region string `json:"region"`
+
+ Created *time.Time `json:"-"`
+ Hostname string `json:"hostname"`
+ Objects int `json:"objects"`
+ Size int `json:"size"`
+}
+
+// ObjectStorageBucketAccess holds Object Storage access info
+type ObjectStorageBucketAccess struct {
+ ACL ObjectStorageACL `json:"acl"`
+ CorsEnabled bool `json:"cors_enabled"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *ObjectStorageBucket) UnmarshalJSON(b []byte) error {
+ type Mask ObjectStorageBucket
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+
+ return nil
+}
+
+// ObjectStorageBucketCreateOptions fields are those accepted by CreateObjectStorageBucket
+type ObjectStorageBucketCreateOptions struct {
+ // Deprecated: The 'Cluster' field has been deprecated.
+ //
+ // Going forward, the 'Region' field will be the supported way to designate where an
+ // Object Storage Bucket should be created. For example, a 'Cluster' value of `us-mia-1`
+ // will translate to a Region value of `us-mia`.
+ Cluster string `json:"cluster,omitempty"`
+ Region string `json:"region,omitempty"`
+
+ Label string `json:"label"`
+
+ ACL ObjectStorageACL `json:"acl,omitempty"`
+ CorsEnabled *bool `json:"cors_enabled,omitempty"`
+}
+
+// ObjectStorageBucketUpdateAccessOptions fields are those accepted by UpdateObjectStorageBucketAccess
+type ObjectStorageBucketUpdateAccessOptions struct {
+ ACL ObjectStorageACL `json:"acl,omitempty"`
+ CorsEnabled *bool `json:"cors_enabled,omitempty"`
+}
+
+// ObjectStorageACL options start with ACL and include all known ACL types
+type ObjectStorageACL string
+
+// ObjectStorageACL options represent the access control level of a bucket.
+const (
+ ACLPrivate ObjectStorageACL = "private"
+ ACLPublicRead ObjectStorageACL = "public-read"
+ ACLAuthenticatedRead ObjectStorageACL = "authenticated-read"
+ ACLPublicReadWrite ObjectStorageACL = "public-read-write"
+)
+
+// ListObjectStorageBuckets lists ObjectStorageBuckets
+func (c *Client) ListObjectStorageBuckets(ctx context.Context, opts *ListOptions) ([]ObjectStorageBucket, error) {
+ response, err := getPaginatedResults[ObjectStorageBucket](ctx, c, "object-storage/buckets", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// ListObjectStorageBucketsInCluster lists all ObjectStorageBuckets of a cluster
+func (c *Client) ListObjectStorageBucketsInCluster(ctx context.Context, opts *ListOptions, clusterOrRegionID string) ([]ObjectStorageBucket, error) {
+ response, err := getPaginatedResults[ObjectStorageBucket](ctx, c, formatAPIPath("object-storage/buckets/%s", clusterOrRegionID), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetObjectStorageBucket gets the ObjectStorageBucket with the provided label
+func (c *Client) GetObjectStorageBucket(ctx context.Context, clusterOrRegionID, label string) (*ObjectStorageBucket, error) {
+ e := formatAPIPath("object-storage/buckets/%s/%s", clusterOrRegionID, label)
+ response, err := doGETRequest[ObjectStorageBucket](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateObjectStorageBucket creates an ObjectStorageBucket
+func (c *Client) CreateObjectStorageBucket(ctx context.Context, opts ObjectStorageBucketCreateOptions) (*ObjectStorageBucket, error) {
+ e := "object-storage/buckets"
+ response, err := doPOSTRequest[ObjectStorageBucket](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetObjectStorageBucketAccess gets the current access config for a bucket
+func (c *Client) GetObjectStorageBucketAccess(ctx context.Context, clusterOrRegionID, label string) (*ObjectStorageBucketAccess, error) {
+ e := formatAPIPath("object-storage/buckets/%s/%s/access", clusterOrRegionID, label)
+ response, err := doGETRequest[ObjectStorageBucketAccess](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateObjectStorageBucketAccess updates the access configuration for an ObjectStorageBucket
+func (c *Client) UpdateObjectStorageBucketAccess(ctx context.Context, clusterOrRegionID, label string, opts ObjectStorageBucketUpdateAccessOptions) error {
+ e := formatAPIPath("object-storage/buckets/%s/%s/access", clusterOrRegionID, label)
+ _, err := doPOSTRequest[ObjectStorageBucketAccess](ctx, c, e, opts)
+
+ return err
+}
+
+// DeleteObjectStorageBucket deletes the ObjectStorageBucket with the specified label
+func (c *Client) DeleteObjectStorageBucket(ctx context.Context, clusterOrRegionID, label string) error {
+ e := formatAPIPath("object-storage/buckets/%s/%s", clusterOrRegionID, label)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/object_storage_clusters.go b/vendor/github.com/linode/linodego/object_storage_clusters.go
new file mode 100644
index 00000000..f1d2c498
--- /dev/null
+++ b/vendor/github.com/linode/linodego/object_storage_clusters.go
@@ -0,0 +1,36 @@
+package linodego
+
+import (
+ "context"
+)
+
+// ObjectStorageCluster represents a linode object storage cluster object
+type ObjectStorageCluster struct {
+ ID string `json:"id"`
+ Domain string `json:"domain"`
+ Status string `json:"status"`
+ Region string `json:"region"`
+ StaticSiteDomain string `json:"static_site_domain"`
+}
+
+// ListObjectStorageClusters lists ObjectStorageClusters
+func (c *Client) ListObjectStorageClusters(ctx context.Context, opts *ListOptions) ([]ObjectStorageCluster, error) {
+ response, err := getPaginatedResults[ObjectStorageCluster](ctx, c, "object-storage/clusters", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// Deprecated: GetObjectStorageCluster uses a deprecated API endpoint.
+// GetObjectStorageCluster gets the template with the provided ID
+func (c *Client) GetObjectStorageCluster(ctx context.Context, clusterID string) (*ObjectStorageCluster, error) {
+ e := formatAPIPath("object-storage/clusters/%s", clusterID)
+ response, err := doGETRequest[ObjectStorageCluster](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/object_storage_keys.go b/vendor/github.com/linode/linodego/object_storage_keys.go
new file mode 100644
index 00000000..d6127db3
--- /dev/null
+++ b/vendor/github.com/linode/linodego/object_storage_keys.go
@@ -0,0 +1,80 @@
+package linodego
+
+import (
+ "context"
+)
+
+type ObjectStorageKeyRegion struct {
+ ID string `json:"id"`
+ S3Endpoint string `json:"s3_endpoint"`
+}
+
+// ObjectStorageKey represents a linode object storage key object
+type ObjectStorageKey struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ AccessKey string `json:"access_key"`
+ SecretKey string `json:"secret_key"`
+ Limited bool `json:"limited"`
+ BucketAccess *[]ObjectStorageKeyBucketAccess `json:"bucket_access"`
+ Regions []ObjectStorageKeyRegion `json:"regions"`
+}
+
+// ObjectStorageKeyBucketAccess represents a linode limited object storage key's bucket access
+type ObjectStorageKeyBucketAccess struct {
+ // Deprecated: Cluster field has been deprecated.
+ // Please consider switching to use the 'Region' field.
+ // If your Cluster is `us-mia-1`, then the region would be `us-mia`.
+ Cluster string `json:"cluster,omitempty"`
+ Region string `json:"region,omitempty"`
+
+ BucketName string `json:"bucket_name"`
+ Permissions string `json:"permissions"`
+}
+
+// ObjectStorageKeyCreateOptions fields are those accepted by CreateObjectStorageKey
+type ObjectStorageKeyCreateOptions struct {
+ Label string `json:"label"`
+ BucketAccess *[]ObjectStorageKeyBucketAccess `json:"bucket_access,omitempty"`
+ Regions []string `json:"regions,omitempty"`
+}
+
+// ObjectStorageKeyUpdateOptions fields are those accepted by UpdateObjectStorageKey
+type ObjectStorageKeyUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+ Regions []string `json:"regions,omitempty"`
+}
+
+// ListObjectStorageKeys lists ObjectStorageKeys
+func (c *Client) ListObjectStorageKeys(ctx context.Context, opts *ListOptions) ([]ObjectStorageKey, error) {
+ response, err := getPaginatedResults[ObjectStorageKey](ctx, c, "object-storage/keys", opts)
+ return response, err
+}
+
+// CreateObjectStorageKey creates a ObjectStorageKey
+func (c *Client) CreateObjectStorageKey(ctx context.Context, opts ObjectStorageKeyCreateOptions) (*ObjectStorageKey, error) {
+ e := "object-storage/keys"
+ response, err := doPOSTRequest[ObjectStorageKey](ctx, c, e, opts)
+ return response, err
+}
+
+// GetObjectStorageKey gets the object storage key with the provided ID
+func (c *Client) GetObjectStorageKey(ctx context.Context, keyID int) (*ObjectStorageKey, error) {
+ e := formatAPIPath("object-storage/keys/%d", keyID)
+ response, err := doGETRequest[ObjectStorageKey](ctx, c, e)
+ return response, err
+}
+
+// UpdateObjectStorageKey updates the object storage key with the specified id
+func (c *Client) UpdateObjectStorageKey(ctx context.Context, keyID int, opts ObjectStorageKeyUpdateOptions) (*ObjectStorageKey, error) {
+ e := formatAPIPath("object-storage/keys/%d", keyID)
+ response, err := doPUTRequest[ObjectStorageKey](ctx, c, e, opts)
+ return response, err
+}
+
+// DeleteObjectStorageKey deletes the ObjectStorageKey with the specified id
+func (c *Client) DeleteObjectStorageKey(ctx context.Context, keyID int) error {
+ e := formatAPIPath("object-storage/keys/%d", keyID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/object_storage_object.go b/vendor/github.com/linode/linodego/object_storage_object.go
new file mode 100644
index 00000000..ac289f3f
--- /dev/null
+++ b/vendor/github.com/linode/linodego/object_storage_object.go
@@ -0,0 +1,46 @@
+package linodego
+
+import (
+ "context"
+)
+
+type ObjectStorageObjectURLCreateOptions struct {
+ Name string `json:"name"`
+ Method string `json:"method"`
+ ContentType string `json:"content_type,omitempty"`
+ ContentDisposition string `json:"content_disposition,omitempty"`
+ ExpiresIn *int `json:"expires_in,omitempty"`
+}
+
+type ObjectStorageObjectURL struct {
+ URL string `json:"url"`
+ Exists bool `json:"exists"`
+}
+
+type ObjectStorageObjectACLConfig struct {
+ ACL string `json:"acl"`
+ ACLXML string `json:"acl_xml"`
+}
+
+type ObjectStorageObjectACLConfigUpdateOptions struct {
+ Name string `json:"name"`
+ ACL string `json:"acl"`
+}
+
+func (c *Client) CreateObjectStorageObjectURL(ctx context.Context, objectID, label string, opts ObjectStorageObjectURLCreateOptions) (*ObjectStorageObjectURL, error) {
+ e := formatAPIPath("object-storage/buckets/%s/%s/object-url", objectID, label)
+ response, err := doPOSTRequest[ObjectStorageObjectURL](ctx, c, e, opts)
+ return response, err
+}
+
+func (c *Client) GetObjectStorageObjectACLConfig(ctx context.Context, objectID, label, object string) (*ObjectStorageObjectACLConfig, error) {
+ e := formatAPIPath("object-storage/buckets/%s/%s/object-acl?name=%s", objectID, label, object)
+ response, err := doGETRequest[ObjectStorageObjectACLConfig](ctx, c, e)
+ return response, err
+}
+
+func (c *Client) UpdateObjectStorageObjectACLConfig(ctx context.Context, objectID, label string, opts ObjectStorageObjectACLConfigUpdateOptions) (*ObjectStorageObjectACLConfig, error) {
+ e := formatAPIPath("object-storage/buckets/%s/%s/object-acl", objectID, label)
+ response, err := doPUTRequest[ObjectStorageObjectACLConfig](ctx, c, e, opts)
+ return response, err
+}
diff --git a/vendor/github.com/linode/linodego/paged_response_structs.go b/vendor/github.com/linode/linodego/paged_response_structs.go
new file mode 100644
index 00000000..5c20ed26
--- /dev/null
+++ b/vendor/github.com/linode/linodego/paged_response_structs.go
@@ -0,0 +1,180 @@
+package linodego
+
+// Deprecated: AccountAvailabilityPagedResponse exists for historical compatibility and should not be used.
+type AccountAvailabilityPagedResponse legacyPagedResponse[AccountAvailability]
+
+// Deprecated: AccountBetasPagedResponse exists for historical compatibility and should not be used.
+type AccountBetasPagedResponse legacyPagedResponse[AccountBetaProgram]
+
+// Deprecated: BetaProgramPagedResponse exists for historical compatibility and should not be used.
+type BetaProgramPagedResponse legacyPagedResponse[BetaProgram]
+
+// Deprecated: DatabaseEnginesPagedResponse exists for historical compatibility and should not be used.
+type DatabaseEnginesPagedResponse legacyPagedResponse[DatabaseEngine]
+
+// Deprecated: DatabaseTypesPagedResponse exists for historical compatibility and should not be used.
+type DatabaseTypesPagedResponse legacyPagedResponse[DatabaseType]
+
+// Deprecated: DatabasesPagedResponse exists for historical compatibility and should not be used.
+type DatabasesPagedResponse legacyPagedResponse[Database]
+
+// Deprecated: DomainRecordsPagedResponse exists for historical compatibility and should not be used.
+type DomainRecordsPagedResponse legacyPagedResponse[DomainRecord]
+
+// Deprecated: DomainsPagedResponse exists for historical compatibility and should not be used.
+type DomainsPagedResponse legacyPagedResponse[Domain]
+
+// Deprecated: EventsPagedResponse exists for historical compatibility and should not be used.
+type EventsPagedResponse legacyPagedResponse[Event]
+
+// Deprecated: FirewallDevicesPagedResponse exists for historical compatibility and should not be used.
+type FirewallDevicesPagedResponse legacyPagedResponse[FirewallDevice]
+
+// Deprecated: FirewallsPagedResponse exists for historical compatibility and should not be used.
+type FirewallsPagedResponse legacyPagedResponse[Firewall]
+
+// Deprecated: ImagesPagedResponse exists for historical compatibility and should not be used.
+type ImagesPagedResponse legacyPagedResponse[Image]
+
+// Deprecated: InstanceConfigsPagedResponse exists for historical compatibility and should not be used.
+type InstanceConfigsPagedResponse legacyPagedResponse[InstanceConfig]
+
+// Deprecated: InstanceDisksPagedResponse exists for historical compatibility and should not be used.
+type InstanceDisksPagedResponse legacyPagedResponse[InstanceDisk]
+
+// Deprecated: InstanceFirewallsPagedResponse exists for historical compatibility and should not be used.
+type InstanceFirewallsPagedResponse legacyPagedResponse[Firewall]
+
+// Deprecated: InstanceVolumesPagedResponse exists for historical compatibility and should not be used.
+type InstanceVolumesPagedResponse legacyPagedResponse[Volume]
+
+// Deprecated: InstancesPagedResponse exists for historical compatibility and should not be used.
+type InstancesPagedResponse legacyPagedResponse[Instance]
+
+// Deprecated: InvoiceItemsPagedResponse exists for historical compatibility and should not be used.
+type InvoiceItemsPagedResponse legacyPagedResponse[InvoiceItem]
+
+// Deprecated: InvoicesPagedResponse exists for historical compatibility and should not be used.
+type InvoicesPagedResponse legacyPagedResponse[Invoice]
+
+// Deprecated: LKEClusterPoolsPagedResponse exists for historical compatibility and should not be used.
+// LKEClusterPoolsPagedResponse represents a paginated LKEClusterPool API response.
+type LKEClusterPoolsPagedResponse LKENodePoolsPagedResponse
+
+// Deprecated: LKEVersionsPagedResponse exists for historical compatibility and should not be used.
+type LKEVersionsPagedResponse legacyPagedResponse[LKEVersion]
+
+// Deprecated: LKEClusterAPIEndpointsPagedResponse exists for historical compatibility and should not be used.
+type LKEClusterAPIEndpointsPagedResponse legacyPagedResponse[LKEClusterAPIEndpoint]
+
+// Deprecated: LKEClustersPagedResponse exists for historical compatibility and should not be used.
+type LKEClustersPagedResponse legacyPagedResponse[LKECluster]
+
+// Deprecated: LKENodePoolsPagedResponse exists for historical compatibility and should not be used.
+type LKENodePoolsPagedResponse legacyPagedResponse[LKENodePool]
+
+// Deprecated: IPAddressesPagedResponse exists for historical compatibility and should not be used.
+type IPAddressesPagedResponse legacyPagedResponse[InstanceIP]
+
+// Deprecated: IPv6PoolsPagedResponse exists for historical compatibility and should not be used.
+type IPv6PoolsPagedResponse legacyPagedResponse[IPv6Range]
+
+// Deprecated: IPv6RangesPagedResponse exists for historical compatibility and should not be used.
+type IPv6RangesPagedResponse legacyPagedResponse[IPv6Range]
+
+// Deprecated: LinodeKernelsPagedResponse exists for historical compatibility and should not be used.
+type LinodeKernelsPagedResponse legacyPagedResponse[LinodeKernel]
+
+// Deprecated: LinodeTypesPagedResponse exists for historical compatibility and should not be used.
+type LinodeTypesPagedResponse legacyPagedResponse[LinodeType]
+
+// Deprecated: LoginsPagedResponse exists for historical compatibility and should not be used.
+type LoginsPagedResponse legacyPagedResponse[Login]
+
+// Deprecated: LongviewClientsPagedResponse exists for historical compatibility and should not be used.
+type LongviewClientsPagedResponse legacyPagedResponse[LongviewClient]
+
+// Deprecated: LongviewSubscriptionsPagedResponse exists for historical compatibility and should not be used.
+type LongviewSubscriptionsPagedResponse legacyPagedResponse[LongviewSubscription]
+
+// Deprecated: MySQLDatabasesPagedResponse exists for historical compatibility and should not be used.
+type MySQLDatabasesPagedResponse legacyPagedResponse[MySQLDatabase]
+
+// Deprecated: MySQLDatabaseBackupsPagedResponse exists for historical compatibility and should not be used.
+type MySQLDatabaseBackupsPagedResponse legacyPagedResponse[MySQLDatabaseBackup]
+
+// Deprecated: NodeBalancersPagedResponse exists for historical compatibility and should not be used.
+type NodeBalancersPagedResponse legacyPagedResponse[NodeBalancer]
+
+// Deprecated: NodeBalancerConfigsPagedResponse exists for historical compatibility and should not be used.
+type NodeBalancerConfigsPagedResponse legacyPagedResponse[NodeBalancerConfig]
+
+// Deprecated: NodeBalancerNodesPagedResponse exists for historical compatibility and should not be used.
+type NodeBalancerNodesPagedResponse legacyPagedResponse[NodeBalancerNode]
+
+// Deprecated: NodeBalancerFirewallsPagedResponse exists for historical compatibility and should not be used.
+type NodeBalancerFirewallsPagedResponse legacyPagedResponse[Firewall]
+
+// Deprecated: NotificationsPagedResponse exists for historical compatibility and should not be used.
+type NotificationsPagedResponse legacyPagedResponse[Notification]
+
+// Deprecated: OAuthClientsPagedResponse exists for historical compatibility and should not be used.
+type OAuthClientsPagedResponse legacyPagedResponse[OAuthClient]
+
+// Deprecated: ObjectStorageKeysPagedResponse exists for historical compatibility and should not be used.
+type ObjectStorageKeysPagedResponse legacyPagedResponse[ObjectStorageKey]
+
+// Deprecated: ObjectStorageBucketsPagedResponse exists for historical compatibility and should not be used.
+type ObjectStorageBucketsPagedResponse legacyPagedResponse[ObjectStorageBucket]
+
+// Deprecated: ObjectStorageClustersPagedResponse exists for historical compatibility and should not be used.
+type ObjectStorageClustersPagedResponse legacyPagedResponse[ObjectStorageCluster]
+
+// Deprecated: PaymentsPagedResponse exists for historical compatibility and should not be used.
+type PaymentsPagedResponse legacyPagedResponse[Payment]
+
+// Deprecated: RegionsPagedResponse exists for historical compatibility and should not be used.
+type RegionsPagedResponse legacyPagedResponse[Region]
+
+// Deprecated: SSHKeysPagedResponse exists for historical compatibility and should not be used.
+type SSHKeysPagedResponse legacyPagedResponse[SSHKey]
+
+// Deprecated: TokensPagedResponse exists for historical compatibility and should not be used.
+type (
+ TokensPagedResponse legacyPagedResponse[Token]
+ // Deprecated: RegionsAvailabilityPagedResponse exists for historical compatibility and should not be used.
+ RegionsAvailabilityPagedResponse legacyPagedResponse[RegionAvailability]
+)
+
+// Deprecated: StackscriptsPagedResponse exists for historical compatibility and should not be used.
+type StackscriptsPagedResponse legacyPagedResponse[Stackscript]
+
+// Deprecated: TagsPagedResponse exists for historical compatibility and should not be used.
+type TagsPagedResponse legacyPagedResponse[Tag]
+
+// Deprecated: TaggedObjectsPagedResponse exists for historical compatibility and should not be used.
+type TaggedObjectsPagedResponse legacyPagedResponse[TaggedObject]
+
+// Deprecated: TicketsPagedResponse exists for historical compatibility and should not be used.
+type TicketsPagedResponse legacyPagedResponse[Ticket]
+
+// Deprecated: PostgresDatabasesPagedResponse exists for historical compatibility and should not be used.
+type PostgresDatabasesPagedResponse legacyPagedResponse[PostgresDatabase]
+
+// Deprecated: PostgresDatabaseBackupsPagedResponse exists for historical compatibility and should not be used.
+type PostgresDatabaseBackupsPagedResponse legacyPagedResponse[PostgresDatabaseBackup]
+
+// Deprecated: ProfileLoginsPagedResponse exists for historical compatibility and should not be used.
+type ProfileLoginsPagedResponse legacyPagedResponse[ProfileLogin]
+
+// Deprecated: UsersPagedResponse exists for historical compatibility and should not be used.
+type UsersPagedResponse legacyPagedResponse[User]
+
+// Deprecated: VolumesPagedResponse exists for historical compatibility and should not be used.
+type VolumesPagedResponse legacyPagedResponse[Volume]
+
+// Deprecated: VPCsPagedResponse exists for historical compatibility and should not be used.
+type VPCsPagedResponse legacyPagedResponse[VPC]
+
+// Deprecated: VPCSubnetsPagedResponse exists for historical compatibility and should not be used.
+type VPCSubnetsPagedResponse legacyPagedResponse[VPCSubnet]
diff --git a/vendor/github.com/linode/linodego/pagination.go b/vendor/github.com/linode/linodego/pagination.go
new file mode 100644
index 00000000..3b3f50ac
--- /dev/null
+++ b/vendor/github.com/linode/linodego/pagination.go
@@ -0,0 +1,168 @@
+package linodego
+
+/**
+ * Pagination and Filtering types and helpers
+ */
+
+import (
+ "crypto/sha256"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
+ "reflect"
+ "strconv"
+
+ "github.com/go-resty/resty/v2"
+)
+
+// PageOptions are the pagination parameters for List endpoints
+type PageOptions struct {
+ Page int `json:"page" url:"page,omitempty"`
+ Pages int `json:"pages" url:"pages,omitempty"`
+ Results int `json:"results" url:"results,omitempty"`
+}
+
+// ListOptions are the pagination and filtering (TODO) parameters for endpoints
+// nolint
+type ListOptions struct {
+ *PageOptions
+ PageSize int `json:"page_size"`
+ Filter string `json:"filter"`
+
+ // QueryParams allows for specifying custom query parameters on list endpoint
+ // calls. QueryParams should be an instance of a struct containing fields with
+ // the `query` tag.
+ QueryParams any
+}
+
+// NewListOptions simplified construction of ListOptions using only
+// the two writable properties, Page and Filter
+func NewListOptions(page int, filter string) *ListOptions {
+ return &ListOptions{PageOptions: &PageOptions{Page: page}, Filter: filter}
+}
+
+// Hash returns the sha256 hash of the provided ListOptions.
+// This is necessary for caching purposes.
+func (l ListOptions) Hash() (string, error) {
+ data, err := json.Marshal(l)
+ if err != nil {
+ return "", fmt.Errorf("failed to cache ListOptions: %w", err)
+ }
+
+ h := sha256.New()
+
+ h.Write(data)
+
+ return hex.EncodeToString(h.Sum(nil)), nil
+}
+
+func applyListOptionsToRequest(opts *ListOptions, req *resty.Request) error {
+ if opts == nil {
+ return nil
+ }
+
+ if opts.QueryParams != nil {
+ params, err := flattenQueryStruct(opts.QueryParams)
+ if err != nil {
+ return fmt.Errorf("failed to apply list options: %w", err)
+ }
+
+ req.SetQueryParams(params)
+ }
+
+ if opts.PageOptions != nil && opts.Page > 0 {
+ req.SetQueryParam("page", strconv.Itoa(opts.Page))
+ }
+
+ if opts.PageSize > 0 {
+ req.SetQueryParam("page_size", strconv.Itoa(opts.PageSize))
+ }
+
+ if len(opts.Filter) > 0 {
+ req.SetHeader("X-Filter", opts.Filter)
+ }
+
+ return nil
+}
+
+type PagedResponse interface {
+ endpoint(...any) string
+ castResult(*resty.Request, string) (int, int, error)
+}
+
+// flattenQueryStruct flattens a structure into a Resty-compatible query param map.
+// Fields are mapped using the `query` struct tag.
+func flattenQueryStruct(val any) (map[string]string, error) {
+ result := make(map[string]string)
+
+ reflectVal := reflect.ValueOf(val)
+
+ // Deref pointer if necessary
+ if reflectVal.Kind() == reflect.Pointer {
+ if reflectVal.IsNil() {
+ return nil, fmt.Errorf("QueryParams is a nil pointer")
+ }
+ reflectVal = reflect.Indirect(reflectVal)
+ }
+
+ if reflectVal.Kind() != reflect.Struct {
+ return nil, fmt.Errorf(
+ "expected struct type for the QueryParams but got: %s",
+ reflectVal.Kind().String(),
+ )
+ }
+
+ valType := reflectVal.Type()
+
+ for i := range valType.NumField() {
+ currentField := valType.Field(i)
+
+ queryTag, ok := currentField.Tag.Lookup("query")
+ // Skip untagged fields
+ if !ok {
+ continue
+ }
+
+ valField := reflectVal.FieldByName(currentField.Name)
+ if !valField.IsValid() {
+ return nil, fmt.Errorf("invalid query param tag: %s", currentField.Name)
+ }
+
+ // Skip if it's a zero value
+ if valField.IsZero() {
+ continue
+ }
+
+ // Deref the pointer is necessary
+ if valField.Kind() == reflect.Pointer {
+ valField = reflect.Indirect(valField)
+ }
+
+ fieldString, err := queryFieldToString(valField)
+ if err != nil {
+ return nil, err
+ }
+
+ result[queryTag] = fieldString
+ }
+
+ return result, nil
+}
+
+func queryFieldToString(value reflect.Value) (string, error) {
+ switch value.Kind() {
+ case reflect.String:
+ return value.String(), nil
+ case reflect.Int64, reflect.Int32, reflect.Int:
+ return strconv.FormatInt(value.Int(), 10), nil
+ case reflect.Bool:
+ return strconv.FormatBool(value.Bool()), nil
+ default:
+ return "", fmt.Errorf("unsupported query param type: %s", value.Type().Name())
+ }
+}
+
+type legacyPagedResponse[T any] struct {
+ *PageOptions
+ Data []T `json:"data"`
+}
diff --git a/vendor/github.com/linode/linodego/placement_groups.go b/vendor/github.com/linode/linodego/placement_groups.go
new file mode 100644
index 00000000..49e92584
--- /dev/null
+++ b/vendor/github.com/linode/linodego/placement_groups.go
@@ -0,0 +1,169 @@
+package linodego
+
+import "context"
+
+// PlacementGroupType is an enum that determines the affinity policy
+// for Linodes in a placement group.
+type PlacementGroupType string
+
+const (
+ PlacementGroupTypeAntiAffinityLocal PlacementGroupType = "anti_affinity:local"
+)
+
+// PlacementGroupPolicy is an enum for the policy that determines whether a
+// Linode can be assigned to a Placement Group.
+type PlacementGroupPolicy string
+
+const (
+ PlacementGroupPolicyStrict PlacementGroupPolicy = "strict"
+ PlacementGroupPolicyFlexible PlacementGroupPolicy = "flexible"
+)
+
+// PlacementGroupMember represents a single Linode assigned to a
+// placement group.
+type PlacementGroupMember struct {
+ LinodeID int `json:"linode_id"`
+ IsCompliant bool `json:"is_compliant"`
+}
+
+// PlacementGroup represents a Linode placement group.
+// NOTE: Placement Groups may not currently be available to all users.
+type PlacementGroup struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Region string `json:"region"`
+ PlacementGroupType PlacementGroupType `json:"placement_group_type"`
+ PlacementGroupPolicy PlacementGroupPolicy `json:"placement_group_policy"`
+ IsCompliant bool `json:"is_compliant"`
+ Members []PlacementGroupMember `json:"members"`
+}
+
+// PlacementGroupCreateOptions represents the options to use
+// when creating a placement group.
+type PlacementGroupCreateOptions struct {
+ Label string `json:"label"`
+ Region string `json:"region"`
+ PlacementGroupType PlacementGroupType `json:"placement_group_type"`
+ PlacementGroupPolicy PlacementGroupPolicy `json:"placement_group_policy"`
+}
+
+// PlacementGroupUpdateOptions represents the options to use
+// when updating a placement group.
+type PlacementGroupUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+}
+
+// PlacementGroupAssignOptions represents options used when
+// assigning Linodes to a placement group.
+type PlacementGroupAssignOptions struct {
+ Linodes []int `json:"linodes"`
+ CompliantOnly *bool `json:"compliant_only,omitempty"`
+}
+
+// PlacementGroupUnAssignOptions represents options used when
+// unassigning Linodes from a placement group.
+type PlacementGroupUnAssignOptions struct {
+ Linodes []int `json:"linodes"`
+}
+
+// ListPlacementGroups lists placement groups under the current account
+// matching the given list options.
+// NOTE: Placement Groups may not currently be available to all users.
+func (c *Client) ListPlacementGroups(
+ ctx context.Context,
+ options *ListOptions,
+) ([]PlacementGroup, error) {
+ return getPaginatedResults[PlacementGroup](
+ ctx,
+ c,
+ "placement/groups",
+ options,
+ )
+}
+
+// GetPlacementGroup gets a placement group with the specified ID.
+// NOTE: Placement Groups may not currently be available to all users.
+func (c *Client) GetPlacementGroup(
+ ctx context.Context,
+ id int,
+) (*PlacementGroup, error) {
+ return doGETRequest[PlacementGroup](
+ ctx,
+ c,
+ formatAPIPath("placement/groups/%d", id),
+ )
+}
+
+// CreatePlacementGroup creates a placement group with the specified options.
+// NOTE: Placement Groups may not currently be available to all users.
+func (c *Client) CreatePlacementGroup(
+ ctx context.Context,
+ options PlacementGroupCreateOptions,
+) (*PlacementGroup, error) {
+ return doPOSTRequest[PlacementGroup](
+ ctx,
+ c,
+ "placement/groups",
+ options,
+ )
+}
+
+// UpdatePlacementGroup updates a placement group with the specified ID using the provided options.
+// NOTE: Placement Groups may not currently be available to all users.
+func (c *Client) UpdatePlacementGroup(
+ ctx context.Context,
+ id int,
+ options PlacementGroupUpdateOptions,
+) (*PlacementGroup, error) {
+ return doPUTRequest[PlacementGroup](
+ ctx,
+ c,
+ formatAPIPath("placement/groups/%d", id),
+ options,
+ )
+}
+
+// AssignPlacementGroupLinodes assigns the specified Linodes to the given
+// placement group.
+// NOTE: Placement Groups may not currently be available to all users.
+func (c *Client) AssignPlacementGroupLinodes(
+ ctx context.Context,
+ id int,
+ options PlacementGroupAssignOptions,
+) (*PlacementGroup, error) {
+ return doPOSTRequest[PlacementGroup](
+ ctx,
+ c,
+ formatAPIPath("placement/groups/%d/assign", id),
+ options,
+ )
+}
+
+// UnassignPlacementGroupLinodes un-assigns the specified Linodes from the given
+// placement group.
+// NOTE: Placement Groups may not currently be available to all users.
+func (c *Client) UnassignPlacementGroupLinodes(
+ ctx context.Context,
+ id int,
+ options PlacementGroupUnAssignOptions,
+) (*PlacementGroup, error) {
+ return doPOSTRequest[PlacementGroup](
+ ctx,
+ c,
+ formatAPIPath("placement/groups/%d/unassign", id),
+ options,
+ )
+}
+
+// DeletePlacementGroup deletes a placement group with the specified ID.
+// NOTE: Placement Groups may not currently be available to all users.
+func (c *Client) DeletePlacementGroup(
+ ctx context.Context,
+ id int,
+) error {
+ return doDELETERequest(
+ ctx,
+ c,
+ formatAPIPath("placement/groups/%d", id),
+ )
+}
diff --git a/vendor/github.com/linode/linodego/pointer_helpers.go b/vendor/github.com/linode/linodego/pointer_helpers.go
new file mode 100644
index 00000000..a6045fdf
--- /dev/null
+++ b/vendor/github.com/linode/linodego/pointer_helpers.go
@@ -0,0 +1,25 @@
+package linodego
+
+/*
+Pointer takes a value of any type T and returns a pointer to that value.
+Go does not allow directly creating pointers to literals, so Pointer enables
+abstraction away the pointer logic.
+
+Example:
+
+ booted := true
+
+ createOpts := linodego.InstanceCreateOptions{
+ Booted: &booted,
+ }
+
+ can be replaced with
+
+ createOpts := linodego.InstanceCreateOptions{
+ Booted: linodego.Pointer(true),
+ }
+*/
+
+func Pointer[T any](value T) *T {
+ return &value
+}
diff --git a/vendor/github.com/linode/linodego/postgres.go b/vendor/github.com/linode/linodego/postgres.go
new file mode 100644
index 00000000..19c32f79
--- /dev/null
+++ b/vendor/github.com/linode/linodego/postgres.go
@@ -0,0 +1,229 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+type PostgresDatabaseTarget string
+
+const (
+ PostgresDatabaseTargetPrimary PostgresDatabaseTarget = "primary"
+ PostgresDatabaseTargetSecondary PostgresDatabaseTarget = "secondary"
+)
+
+type PostgresCommitType string
+
+const (
+ PostgresCommitTrue PostgresCommitType = "true"
+ PostgresCommitFalse PostgresCommitType = "false"
+ PostgresCommitLocal PostgresCommitType = "local"
+ PostgresCommitRemoteWrite PostgresCommitType = "remote_write"
+ PostgresCommitRemoteApply PostgresCommitType = "remote_apply"
+)
+
+type PostgresReplicationType string
+
+const (
+ PostgresReplicationNone PostgresReplicationType = "none"
+ PostgresReplicationAsynch PostgresReplicationType = "asynch"
+ PostgresReplicationSemiSynch PostgresReplicationType = "semi_synch"
+)
+
+// A PostgresDatabase is an instance of Linode Postgres Managed Databases
+type PostgresDatabase struct {
+ ID int `json:"id"`
+ Status DatabaseStatus `json:"status"`
+ Label string `json:"label"`
+ Region string `json:"region"`
+ Type string `json:"type"`
+ Engine string `json:"engine"`
+ Version string `json:"version"`
+ Encrypted bool `json:"encrypted"`
+ AllowList []string `json:"allow_list"`
+ Port int `json:"port"`
+ SSLConnection bool `json:"ssl_connection"`
+ ClusterSize int `json:"cluster_size"`
+ ReplicationCommitType PostgresCommitType `json:"replication_commit_type"`
+ ReplicationType PostgresReplicationType `json:"replication_type"`
+ Hosts DatabaseHost `json:"hosts"`
+ Updates DatabaseMaintenanceWindow `json:"updates"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+}
+
+func (d *PostgresDatabase) UnmarshalJSON(b []byte) error {
+ type Mask PostgresDatabase
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(d),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ d.Created = (*time.Time)(p.Created)
+ d.Updated = (*time.Time)(p.Updated)
+ return nil
+}
+
+// PostgresCreateOptions fields are used when creating a new Postgres Database
+type PostgresCreateOptions struct {
+ Label string `json:"label"`
+ Region string `json:"region"`
+ Type string `json:"type"`
+ Engine string `json:"engine"`
+ AllowList []string `json:"allow_list,omitempty"`
+ ClusterSize int `json:"cluster_size,omitempty"`
+ Encrypted bool `json:"encrypted,omitempty"`
+ SSLConnection bool `json:"ssl_connection,omitempty"`
+ ReplicationType PostgresReplicationType `json:"replication_type,omitempty"`
+ ReplicationCommitType PostgresCommitType `json:"replication_commit_type,omitempty"`
+}
+
+// PostgresUpdateOptions fields are used when altering the existing Postgres Database
+type PostgresUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+ AllowList *[]string `json:"allow_list,omitempty"`
+ Updates *DatabaseMaintenanceWindow `json:"updates,omitempty"`
+}
+
+// PostgresDatabaseSSL is the SSL Certificate to access the Linode Managed Postgres Database
+type PostgresDatabaseSSL struct {
+ CACertificate []byte `json:"ca_certificate"`
+}
+
+// PostgresDatabaseCredential is the Root Credentials to access the Linode Managed Database
+type PostgresDatabaseCredential struct {
+ Username string `json:"username"`
+ Password string `json:"password"`
+}
+
+// ListPostgresDatabases lists all Postgres Databases associated with the account
+func (c *Client) ListPostgresDatabases(ctx context.Context, opts *ListOptions) ([]PostgresDatabase, error) {
+ response, err := getPaginatedResults[PostgresDatabase](ctx, c, "databases/postgresql/instances", opts)
+ return response, err
+}
+
+// PostgresDatabaseBackup is information for interacting with a backup for the existing Postgres Database
+type PostgresDatabaseBackup struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Type string `json:"type"`
+ Created *time.Time `json:"-"`
+}
+
+func (d *PostgresDatabaseBackup) UnmarshalJSON(b []byte) error {
+ type Mask PostgresDatabaseBackup
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ }{
+ Mask: (*Mask)(d),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ d.Created = (*time.Time)(p.Created)
+ return nil
+}
+
+// PostgresBackupCreateOptions are options used for CreatePostgresDatabaseBackup(...)
+type PostgresBackupCreateOptions struct {
+ Label string `json:"label"`
+ Target PostgresDatabaseTarget `json:"target"`
+}
+
+// ListPostgresDatabaseBackups lists all Postgres Database Backups associated with the given Postgres Database
+func (c *Client) ListPostgresDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]PostgresDatabaseBackup, error) {
+ response, err := getPaginatedResults[PostgresDatabaseBackup](ctx, c, formatAPIPath("databases/postgresql/instances/%d/backups", databaseID), opts)
+ return response, err
+}
+
+// GetPostgresDatabase returns a single Postgres Database matching the id
+func (c *Client) GetPostgresDatabase(ctx context.Context, databaseID int) (*PostgresDatabase, error) {
+ e := formatAPIPath("databases/postgresql/instances/%d", databaseID)
+ response, err := doGETRequest[PostgresDatabase](ctx, c, e)
+ return response, err
+}
+
+// CreatePostgresDatabase creates a new Postgres Database using the createOpts as configuration, returns the new Postgres Database
+func (c *Client) CreatePostgresDatabase(ctx context.Context, opts PostgresCreateOptions) (*PostgresDatabase, error) {
+ e := "databases/postgresql/instances"
+ response, err := doPOSTRequest[PostgresDatabase](ctx, c, e, opts)
+ return response, err
+}
+
+// DeletePostgresDatabase deletes an existing Postgres Database with the given id
+func (c *Client) DeletePostgresDatabase(ctx context.Context, databaseID int) error {
+ e := formatAPIPath("databases/postgresql/instances/%d", databaseID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// UpdatePostgresDatabase updates the given Postgres Database with the provided opts, returns the PostgresDatabase with the new settings
+func (c *Client) UpdatePostgresDatabase(ctx context.Context, databaseID int, opts PostgresUpdateOptions) (*PostgresDatabase, error) {
+ e := formatAPIPath("databases/postgresql/instances/%d", databaseID)
+ response, err := doPUTRequest[PostgresDatabase](ctx, c, e, opts)
+ return response, err
+}
+
+// PatchPostgresDatabase applies security patches and updates to the underlying operating system of the Managed Postgres Database
+func (c *Client) PatchPostgresDatabase(ctx context.Context, databaseID int) error {
+ e := formatAPIPath("databases/postgresql/instances/%d/patch", databaseID)
+ _, err := doPOSTRequest[PostgresDatabase, any](ctx, c, e)
+ return err
+}
+
+// GetPostgresDatabaseCredentials returns the Root Credentials for the given Postgres Database
+func (c *Client) GetPostgresDatabaseCredentials(ctx context.Context, databaseID int) (*PostgresDatabaseCredential, error) {
+ e := formatAPIPath("databases/postgresql/instances/%d/credentials", databaseID)
+ response, err := doGETRequest[PostgresDatabaseCredential](ctx, c, e)
+ return response, err
+}
+
+// ResetPostgresDatabaseCredentials returns the Root Credentials for the given Postgres Database (may take a few seconds to work)
+func (c *Client) ResetPostgresDatabaseCredentials(ctx context.Context, databaseID int) error {
+ e := formatAPIPath("databases/postgresql/instances/%d/credentials/reset", databaseID)
+ _, err := doPOSTRequest[PostgresDatabaseCredential, any](ctx, c, e)
+ return err
+}
+
+// GetPostgresDatabaseSSL returns the SSL Certificate for the given Postgres Database
+func (c *Client) GetPostgresDatabaseSSL(ctx context.Context, databaseID int) (*PostgresDatabaseSSL, error) {
+ e := formatAPIPath("databases/postgresql/instances/%d/ssl", databaseID)
+ response, err := doGETRequest[PostgresDatabaseSSL](ctx, c, e)
+ return response, err
+}
+
+// GetPostgresDatabaseBackup returns a specific Postgres Database Backup with the given ids
+func (c *Client) GetPostgresDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*PostgresDatabaseBackup, error) {
+ e := formatAPIPath("databases/postgresql/instances/%d/backups/%d", databaseID, backupID)
+ response, err := doGETRequest[PostgresDatabaseBackup](ctx, c, e)
+ return response, err
+}
+
+// RestorePostgresDatabaseBackup returns the given Postgres Database with the given Backup
+func (c *Client) RestorePostgresDatabaseBackup(ctx context.Context, databaseID int, backupID int) error {
+ e := formatAPIPath("databases/postgresql/instances/%d/backups/%d/restore", databaseID, backupID)
+ _, err := doPOSTRequest[PostgresDatabaseBackup, any](ctx, c, e)
+ return err
+}
+
+// CreatePostgresDatabaseBackup creates a snapshot for the given Postgres database
+func (c *Client) CreatePostgresDatabaseBackup(ctx context.Context, databaseID int, opts PostgresBackupCreateOptions) error {
+ e := formatAPIPath("databases/postgresql/instances/%d/backups", databaseID)
+ _, err := doPOSTRequest[PostgresDatabaseBackup](ctx, c, e, opts)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/profile.go b/vendor/github.com/linode/linodego/profile.go
new file mode 100644
index 00000000..b07e842a
--- /dev/null
+++ b/vendor/github.com/linode/linodego/profile.go
@@ -0,0 +1,82 @@
+package linodego
+
+import (
+ "context"
+)
+
+// LishAuthMethod constants start with AuthMethod and include Linode API Lish Authentication Methods
+type LishAuthMethod string
+
+// LishAuthMethod constants are the methods of authentication allowed when connecting via Lish
+const (
+ AuthMethodPasswordKeys LishAuthMethod = "password_keys"
+ AuthMethodKeysOnly LishAuthMethod = "keys_only"
+ AuthMethodDisabled LishAuthMethod = "disabled"
+)
+
+// ProfileReferrals represent a User's status in the Referral Program
+type ProfileReferrals struct {
+ Total int `json:"total"`
+ Completed int `json:"completed"`
+ Pending int `json:"pending"`
+ Credit float64 `json:"credit"`
+ Code string `json:"code"`
+ URL string `json:"url"`
+}
+
+// Profile represents a Profile object
+type Profile struct {
+ UID int `json:"uid"`
+ Username string `json:"username"`
+ Email string `json:"email"`
+ Timezone string `json:"timezone"`
+ EmailNotifications bool `json:"email_notifications"`
+ IPWhitelistEnabled bool `json:"ip_whitelist_enabled"`
+ TwoFactorAuth bool `json:"two_factor_auth"`
+ Restricted bool `json:"restricted"`
+ LishAuthMethod LishAuthMethod `json:"lish_auth_method"`
+ Referrals ProfileReferrals `json:"referrals"`
+ AuthorizedKeys []string `json:"authorized_keys"`
+}
+
+// ProfileUpdateOptions fields are those accepted by UpdateProfile
+type ProfileUpdateOptions struct {
+ Email string `json:"email,omitempty"`
+ Timezone string `json:"timezone,omitempty"`
+ EmailNotifications *bool `json:"email_notifications,omitempty"`
+ IPWhitelistEnabled *bool `json:"ip_whitelist_enabled,omitempty"`
+ LishAuthMethod LishAuthMethod `json:"lish_auth_method,omitempty"`
+ AuthorizedKeys *[]string `json:"authorized_keys,omitempty"`
+ TwoFactorAuth *bool `json:"two_factor_auth,omitempty"`
+ Restricted *bool `json:"restricted,omitempty"`
+}
+
+// GetUpdateOptions converts a Profile to ProfileUpdateOptions for use in UpdateProfile
+func (i Profile) GetUpdateOptions() (o ProfileUpdateOptions) {
+ o.Email = i.Email
+ o.Timezone = i.Timezone
+ o.EmailNotifications = copyBool(&i.EmailNotifications)
+ o.IPWhitelistEnabled = copyBool(&i.IPWhitelistEnabled)
+ o.LishAuthMethod = i.LishAuthMethod
+ authorizedKeys := make([]string, len(i.AuthorizedKeys))
+ copy(authorizedKeys, i.AuthorizedKeys)
+ o.AuthorizedKeys = &authorizedKeys
+ o.TwoFactorAuth = copyBool(&i.TwoFactorAuth)
+ o.Restricted = copyBool(&i.Restricted)
+
+ return
+}
+
+// GetProfile returns the Profile of the authenticated user
+func (c *Client) GetProfile(ctx context.Context) (*Profile, error) {
+ e := "profile"
+ response, err := doGETRequest[Profile](ctx, c, e)
+ return response, err
+}
+
+// UpdateProfile updates the Profile with the specified id
+func (c *Client) UpdateProfile(ctx context.Context, opts ProfileUpdateOptions) (*Profile, error) {
+ e := "profile"
+ response, err := doPUTRequest[Profile](ctx, c, e, opts)
+ return response, err
+}
diff --git a/vendor/github.com/linode/linodego/profile_grants_list.go b/vendor/github.com/linode/linodego/profile_grants_list.go
new file mode 100644
index 00000000..9dafd928
--- /dev/null
+++ b/vendor/github.com/linode/linodego/profile_grants_list.go
@@ -0,0 +1,13 @@
+package linodego
+
+import (
+ "context"
+)
+
+type GrantsListResponse = UserGrants
+
+func (c *Client) GrantsList(ctx context.Context) (*GrantsListResponse, error) {
+ e := "profile/grants"
+ response, err := doGETRequest[GrantsListResponse](ctx, c, e)
+ return response, err
+}
diff --git a/vendor/github.com/linode/linodego/profile_logins.go b/vendor/github.com/linode/linodego/profile_logins.go
new file mode 100644
index 00000000..bb5b8521
--- /dev/null
+++ b/vendor/github.com/linode/linodego/profile_logins.go
@@ -0,0 +1,52 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// Profile represents a Profile object
+type ProfileLogin struct {
+ Datetime *time.Time `json:"datetime"`
+ ID int `json:"id"`
+ IP string `json:"ip"`
+ Restricted bool `json:"restricted"`
+ Status string `json:"status"`
+ Username string `json:"username"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *ProfileLogin) UnmarshalJSON(b []byte) error {
+ type Mask ProfileLogin
+
+ l := struct {
+ *Mask
+ Datetime *parseabletime.ParseableTime `json:"datetime"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &l); err != nil {
+ return err
+ }
+
+ i.Datetime = (*time.Time)(l.Datetime)
+
+ return nil
+}
+
+// GetProfileLogin returns the Profile Login of the authenticated user
+func (c *Client) GetProfileLogin(ctx context.Context, id int) (*ProfileLogin, error) {
+ e := formatAPIPath("profile/logins/%d", id)
+ response, err := doGETRequest[ProfileLogin](ctx, c, e)
+ return response, err
+}
+
+// ListProfileLogins lists Profile Logins of the authenticated user
+func (c *Client) ListProfileLogins(ctx context.Context, opts *ListOptions) ([]ProfileLogin, error) {
+ response, err := getPaginatedResults[ProfileLogin](ctx, c, "profile/logins", opts)
+ return response, err
+}
diff --git a/vendor/github.com/linode/linodego/profile_phone_number.go b/vendor/github.com/linode/linodego/profile_phone_number.go
new file mode 100644
index 00000000..c71d12fe
--- /dev/null
+++ b/vendor/github.com/linode/linodego/profile_phone_number.go
@@ -0,0 +1,39 @@
+package linodego
+
+import (
+ "context"
+)
+
+// SendPhoneNumberVerificationCodeOptions fields are those accepted by SendPhoneNumberVerificationCode
+type SendPhoneNumberVerificationCodeOptions struct {
+ ISOCode string `json:"iso_code"`
+ PhoneNumber string `json:"phone_number"`
+}
+
+// VerifyPhoneNumberOptions fields are those accepted by VerifyPhoneNumber
+type VerifyPhoneNumberOptions struct {
+ OTPCode string `json:"otp_code"`
+}
+
+// SendPhoneNumberVerificationCode sends a one-time verification code via SMS message to the submitted phone number.
+func (c *Client) SendPhoneNumberVerificationCode(ctx context.Context, opts SendPhoneNumberVerificationCodeOptions) error {
+ e := "profile/phone-number"
+ _, err := doPOSTRequest[any](ctx, c, e, opts)
+
+ return err
+}
+
+// DeletePhoneNumber deletes the verified phone number for the User making this request.
+func (c *Client) DeletePhoneNumber(ctx context.Context) error {
+ e := "profile/phone-number"
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
+
+// VerifyPhoneNumber verifies a phone number by confirming the one-time code received via SMS message after accessing the Phone Verification Code Send command.
+func (c *Client) VerifyPhoneNumber(ctx context.Context, opts VerifyPhoneNumberOptions) error {
+ e := "profile/phone-number/verify"
+ _, err := doPOSTRequest[any](ctx, c, e, opts)
+
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/profile_security_questions.go b/vendor/github.com/linode/linodego/profile_security_questions.go
new file mode 100644
index 00000000..c827cd79
--- /dev/null
+++ b/vendor/github.com/linode/linodego/profile_security_questions.go
@@ -0,0 +1,43 @@
+package linodego
+
+import (
+ "context"
+)
+
+type SecurityQuestion struct {
+ ID int `json:"id"`
+ Question string `json:"question"`
+ Response string `json:"response"`
+}
+
+type SecurityQuestionsListResponse struct {
+ SecurityQuestions []SecurityQuestion `json:"security_questions"`
+}
+
+type SecurityQuestionsAnswerQuestion struct {
+ QuestionID int `json:"question_id"`
+ Response string `json:"response"`
+}
+
+type SecurityQuestionsAnswerOptions struct {
+ SecurityQuestions []SecurityQuestionsAnswerQuestion `json:"security_questions"`
+}
+
+// SecurityQuestionsList returns a collection of security questions and their responses, if any, for your User Profile.
+func (c *Client) SecurityQuestionsList(ctx context.Context) (*SecurityQuestionsListResponse, error) {
+ e := "profile/security-questions"
+ response, err := doGETRequest[SecurityQuestionsListResponse](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// SecurityQuestionsAnswer adds security question responses for your User.
+func (c *Client) SecurityQuestionsAnswer(ctx context.Context, opts SecurityQuestionsAnswerOptions) error {
+ e := "profile/security-questions"
+
+ _, err := doPOSTRequest[any](ctx, c, e, opts)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/profile_sshkeys.go b/vendor/github.com/linode/linodego/profile_sshkeys.go
new file mode 100644
index 00000000..b67e616c
--- /dev/null
+++ b/vendor/github.com/linode/linodego/profile_sshkeys.go
@@ -0,0 +1,111 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// SSHKey represents a SSHKey object
+type SSHKey struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ SSHKey string `json:"ssh_key"`
+ Created *time.Time `json:"-"`
+}
+
+// SSHKeyCreateOptions fields are those accepted by CreateSSHKey
+type SSHKeyCreateOptions struct {
+ Label string `json:"label"`
+ SSHKey string `json:"ssh_key"`
+}
+
+// SSHKeyUpdateOptions fields are those accepted by UpdateSSHKey
+type SSHKeyUpdateOptions struct {
+ Label string `json:"label"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *SSHKey) UnmarshalJSON(b []byte) error {
+ type Mask SSHKey
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+
+ return nil
+}
+
+// GetCreateOptions converts a SSHKey to SSHKeyCreateOptions for use in CreateSSHKey
+func (i SSHKey) GetCreateOptions() (o SSHKeyCreateOptions) {
+ o.Label = i.Label
+ o.SSHKey = i.SSHKey
+ return
+}
+
+// GetUpdateOptions converts a SSHKey to SSHKeyCreateOptions for use in UpdateSSHKey
+func (i SSHKey) GetUpdateOptions() (o SSHKeyUpdateOptions) {
+ o.Label = i.Label
+ return
+}
+
+// ListSSHKeys lists SSHKeys
+func (c *Client) ListSSHKeys(ctx context.Context, opts *ListOptions) ([]SSHKey, error) {
+ response, err := getPaginatedResults[SSHKey](ctx, c, "profile/sshkeys", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetSSHKey gets the sshkey with the provided ID
+func (c *Client) GetSSHKey(ctx context.Context, keyID int) (*SSHKey, error) {
+ e := formatAPIPath("profile/sshkeys/%d", keyID)
+ response, err := doGETRequest[SSHKey](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateSSHKey creates a SSHKey
+func (c *Client) CreateSSHKey(ctx context.Context, opts SSHKeyCreateOptions) (*SSHKey, error) {
+ e := "profile/sshkeys"
+ response, err := doPOSTRequest[SSHKey](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateSSHKey updates the SSHKey with the specified id
+func (c *Client) UpdateSSHKey(ctx context.Context, keyID int, opts SSHKeyUpdateOptions) (*SSHKey, error) {
+ e := formatAPIPath("profile/sshkeys/%d", keyID)
+ response, err := doPUTRequest[SSHKey](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteSSHKey deletes the SSHKey with the specified id
+func (c *Client) DeleteSSHKey(ctx context.Context, keyID int) error {
+ e := formatAPIPath("profile/sshkeys/%d", keyID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/profile_tfa.go b/vendor/github.com/linode/linodego/profile_tfa.go
new file mode 100644
index 00000000..a187a046
--- /dev/null
+++ b/vendor/github.com/linode/linodego/profile_tfa.go
@@ -0,0 +1,73 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// TwoFactorSecret contains fields returned by CreateTwoFactorSecret
+type TwoFactorSecret struct {
+ Expiry *time.Time `json:"expiry"`
+ Secret string `json:"secret"`
+}
+
+// ConfirmTwoFactorOptions contains fields used by ConfirmTwoFactor
+type ConfirmTwoFactorOptions struct {
+ TFACode string `json:"tfa_code"`
+}
+
+// ConfirmTwoFactorResponse contains fields returned by ConfirmTwoFactor
+type ConfirmTwoFactorResponse struct {
+ Scratch string `json:"scratch"`
+}
+
+func (s *TwoFactorSecret) UnmarshalJSON(b []byte) error {
+ type Mask TwoFactorSecret
+
+ p := struct {
+ *Mask
+ Expiry *parseabletime.ParseableTime `json:"expiry"`
+ }{
+ Mask: (*Mask)(s),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ s.Expiry = (*time.Time)(p.Expiry)
+
+ return nil
+}
+
+// CreateTwoFactorSecret generates a Two Factor secret for your User.
+func (c *Client) CreateTwoFactorSecret(ctx context.Context) (*TwoFactorSecret, error) {
+ e := "profile/tfa-enable"
+ response, err := doPOSTRequest[TwoFactorSecret, any](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DisableTwoFactor disables Two Factor Authentication for your User.
+func (c *Client) DisableTwoFactor(ctx context.Context) error {
+ e := "profile/tfa-disable"
+ _, err := doPOSTRequest[TwoFactorSecret, any](ctx, c, e)
+ return err
+}
+
+// ConfirmTwoFactor confirms that you can successfully generate Two Factor codes and enables TFA on your Account.
+func (c *Client) ConfirmTwoFactor(ctx context.Context, opts ConfirmTwoFactorOptions) (*ConfirmTwoFactorResponse, error) {
+ e := "profile/tfa-enable-confirm"
+ response, err := doPOSTRequest[ConfirmTwoFactorResponse](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/profile_tokens.go b/vendor/github.com/linode/linodego/profile_tokens.go
new file mode 100644
index 00000000..ce8acd18
--- /dev/null
+++ b/vendor/github.com/linode/linodego/profile_tokens.go
@@ -0,0 +1,148 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// Token represents a Token object
+type Token struct {
+ // This token's unique ID, which can be used to revoke it.
+ ID int `json:"id"`
+
+ // The scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with access to *. Tokens with more restrictive scopes are generally more secure.
+ // Valid values are "*" or a comma separated list of scopes https://techdocs.akamai.com/linode-api/reference/get-started#oauth-reference
+ Scopes string `json:"scopes"`
+
+ // This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for. (1-100 Characters)
+ Label string `json:"label"`
+
+ // The token used to access the API. When the token is created, the full token is returned here. Otherwise, only the first 16 characters are returned.
+ Token string `json:"token"`
+
+ // The date and time this token was created.
+ Created *time.Time `json:"-"`
+
+ // When this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with "null" as their expiry and will never expire unless revoked.
+ Expiry *time.Time `json:"-"`
+}
+
+// TokenCreateOptions fields are those accepted by CreateToken
+type TokenCreateOptions struct {
+ // The scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with access to *. Tokens with more restrictive scopes are generally more secure.
+ Scopes string `json:"scopes"`
+
+ // This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for. (1-100 Characters)
+ Label string `json:"label"`
+
+ // When this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with "null" as their expiry and will never expire unless revoked.
+ Expiry *time.Time `json:"expiry"`
+}
+
+// TokenUpdateOptions fields are those accepted by UpdateToken
+type TokenUpdateOptions struct {
+ // This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for. (1-100 Characters)
+ Label string `json:"label"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *Token) UnmarshalJSON(b []byte) error {
+ type Mask Token
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Expiry *parseabletime.ParseableTime `json:"expiry"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.Expiry = (*time.Time)(p.Expiry)
+
+ return nil
+}
+
+// GetCreateOptions converts a Token to TokenCreateOptions for use in CreateToken
+func (i Token) GetCreateOptions() (o TokenCreateOptions) {
+ o.Label = i.Label
+ o.Expiry = copyTime(i.Expiry)
+ o.Scopes = i.Scopes
+ return
+}
+
+// GetUpdateOptions converts a Token to TokenUpdateOptions for use in UpdateToken
+func (i Token) GetUpdateOptions() (o TokenUpdateOptions) {
+ o.Label = i.Label
+ return
+}
+
+// ListTokens lists Tokens
+func (c *Client) ListTokens(ctx context.Context, opts *ListOptions) ([]Token, error) {
+ response, err := getPaginatedResults[Token](ctx, c, "profile/tokens", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// GetToken gets the token with the provided ID
+func (c *Client) GetToken(ctx context.Context, tokenID int) (*Token, error) {
+ e := formatAPIPath("profile/tokens/%d", tokenID)
+ response, err := doGETRequest[Token](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// CreateToken creates a Token
+func (c *Client) CreateToken(ctx context.Context, opts TokenCreateOptions) (*Token, error) {
+ // Format the Time as a string to meet the ISO8601 requirement
+ createOptsFixed := struct {
+ Label string `json:"label"`
+ Scopes string `json:"scopes"`
+ Expiry *string `json:"expiry"`
+ }{}
+ createOptsFixed.Label = opts.Label
+ createOptsFixed.Scopes = opts.Scopes
+ if opts.Expiry != nil {
+ iso8601Expiry := opts.Expiry.UTC().Format("2006-01-02T15:04:05")
+ createOptsFixed.Expiry = &iso8601Expiry
+ }
+
+ e := "profile/tokens"
+ response, err := doPOSTRequest[Token](ctx, c, e, createOptsFixed)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// UpdateToken updates the Token with the specified id
+func (c *Client) UpdateToken(ctx context.Context, tokenID int, opts TokenUpdateOptions) (*Token, error) {
+ e := formatAPIPath("profile/tokens/%d", tokenID)
+ response, err := doPUTRequest[Token](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
+// DeleteToken deletes the Token with the specified id
+func (c *Client) DeleteToken(ctx context.Context, tokenID int) error {
+ e := formatAPIPath("profile/tokens/%d", tokenID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/regions.go b/vendor/github.com/linode/linodego/regions.go
new file mode 100644
index 00000000..908a4fa8
--- /dev/null
+++ b/vendor/github.com/linode/linodego/regions.go
@@ -0,0 +1,112 @@
+package linodego
+
+import (
+ "context"
+ "time"
+)
+
+// This is an enumeration of Capabilities Linode offers that can be referenced
+// through the user-facing parts of the application.
+// Defined as strings rather than a custom type to avoid breaking change.
+// Can be changed in the potential v2 version.
+const (
+ CapabilityLinodes string = "Linodes"
+ CapabilityNodeBalancers string = "NodeBalancers"
+ CapabilityBlockStorage string = "Block Storage"
+ CapabilityObjectStorage string = "Object Storage"
+ CapabilityObjectStorageRegions string = "Object Storage Access Key Regions"
+ CapabilityLKE string = "Kubernetes"
+ CapabilityLkeHaControlPlanes string = "LKE HA Control Planes"
+ CapabilityCloudFirewall string = "Cloud Firewall"
+ CapabilityGPU string = "GPU Linodes"
+ CapabilityVlans string = "Vlans"
+ CapabilityVPCs string = "VPCs"
+ CapabilityVPCsExtra string = "VPCs Extra"
+ CapabilityMachineImages string = "Machine Images"
+ CapabilityBareMetal string = "Bare Metal"
+ CapabilityDBAAS string = "Managed Databases"
+ CapabilityBlockStorageMigrations string = "Block Storage Migrations"
+ CapabilityMetadata string = "Metadata"
+ CapabilityPremiumPlans string = "Premium Plans"
+ CapabilityEdgePlans string = "Edge Plans"
+ CapabilityLKEControlPlaneACL string = "LKE Network Access Control List (IP ACL)"
+ CapabilityACLB string = "Akamai Cloud Load Balancer"
+ CapabilitySupportTicketSeverity string = "Support Ticket Severity"
+ CapabilityBackups string = "Backups"
+ CapabilityPlacementGroup string = "Placement Group"
+ CapabilityDiskEncryption string = "Disk Encryption"
+ CapabilityBlockStorageEncryption string = "Block Storage Encryption"
+)
+
+// Region-related endpoints have a custom expiry time as the
+// `status` field may update for database outages.
+var cacheExpiryTime = time.Minute
+
+// Region represents a linode region object
+type Region struct {
+ ID string `json:"id"`
+ Country string `json:"country"`
+
+ // A List of enums from the above constants
+ Capabilities []string `json:"capabilities"`
+
+ Status string `json:"status"`
+ Label string `json:"label"`
+ SiteType string `json:"site_type"`
+
+ Resolvers RegionResolvers `json:"resolvers"`
+ PlacementGroupLimits *RegionPlacementGroupLimits `json:"placement_group_limits"`
+}
+
+// RegionResolvers contains the DNS resolvers of a region
+type RegionResolvers struct {
+ IPv4 string `json:"ipv4"`
+ IPv6 string `json:"ipv6"`
+}
+
+// RegionPlacementGroupLimits contains information about the
+// placement group limits for the current user in the current region.
+type RegionPlacementGroupLimits struct {
+ MaximumPGsPerCustomer int `json:"maximum_pgs_per_customer"`
+ MaximumLinodesPerPG int `json:"maximum_linodes_per_pg"`
+}
+
+// ListRegions lists Regions. This endpoint is cached by default.
+func (c *Client) ListRegions(ctx context.Context, opts *ListOptions) ([]Region, error) {
+ endpoint, err := generateListCacheURL("regions", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ if result := c.getCachedResponse(endpoint); result != nil {
+ return result.([]Region), nil
+ }
+
+ response, err := getPaginatedResults[Region](ctx, c, "regions", opts)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(endpoint, response, &cacheExpiryTime)
+
+ return response, nil
+}
+
+// GetRegion gets the template with the provided ID. This endpoint is cached by default.
+func (c *Client) GetRegion(ctx context.Context, regionID string) (*Region, error) {
+ e := formatAPIPath("regions/%s", regionID)
+
+ if result := c.getCachedResponse(e); result != nil {
+ result := result.(Region)
+ return &result, nil
+ }
+
+ response, err := doGETRequest[Region](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(e, response, &cacheExpiryTime)
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/regions_availability.go b/vendor/github.com/linode/linodego/regions_availability.go
new file mode 100644
index 00000000..4caefeb7
--- /dev/null
+++ b/vendor/github.com/linode/linodego/regions_availability.go
@@ -0,0 +1,54 @@
+package linodego
+
+import (
+ "context"
+)
+
+// Region represents a linode region object
+type RegionAvailability struct {
+ Region string `json:"region"`
+ Plan string `json:"plan"`
+ Available bool `json:"available"`
+}
+
+// ListRegionsAvailability lists Regions. This endpoint is cached by default.
+func (c *Client) ListRegionsAvailability(ctx context.Context, opts *ListOptions) ([]RegionAvailability, error) {
+ e := "regions/availability"
+
+ endpoint, err := generateListCacheURL(e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ if result := c.getCachedResponse(endpoint); result != nil {
+ return result.([]RegionAvailability), nil
+ }
+
+ response, err := getPaginatedResults[RegionAvailability](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(endpoint, response, &cacheExpiryTime)
+
+ return response, nil
+}
+
+// GetRegionAvailability gets the template with the provided ID. This endpoint is cached by default.
+func (c *Client) GetRegionAvailability(ctx context.Context, regionID string) (*RegionAvailability, error) {
+ e := formatAPIPath("regions/%s/availability", regionID)
+
+ if result := c.getCachedResponse(e); result != nil {
+ result := result.(RegionAvailability)
+ return &result, nil
+ }
+
+ response, err := doGETRequest[RegionAvailability](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(e, response, &cacheExpiryTime)
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/request_helpers.go b/vendor/github.com/linode/linodego/request_helpers.go
new file mode 100644
index 00000000..152a2643
--- /dev/null
+++ b/vendor/github.com/linode/linodego/request_helpers.go
@@ -0,0 +1,220 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "net/url"
+ "reflect"
+)
+
+// paginatedResponse represents a single response from a paginated
+// endpoint.
+type paginatedResponse[T any] struct {
+ Page int `json:"page" url:"page,omitempty"`
+ Pages int `json:"pages" url:"pages,omitempty"`
+ Results int `json:"results" url:"results,omitempty"`
+ Data []T `json:"data"`
+}
+
+// getPaginatedResults aggregates results from the given
+// paginated endpoint using the provided ListOptions.
+// nolint:funlen
+func getPaginatedResults[T any](
+ ctx context.Context,
+ client *Client,
+ endpoint string,
+ opts *ListOptions,
+) ([]T, error) {
+ var resultType paginatedResponse[T]
+
+ result := make([]T, 0)
+
+ if opts == nil {
+ opts = &ListOptions{PageOptions: &PageOptions{Page: 0}}
+ }
+
+ if opts.PageOptions == nil {
+ opts.PageOptions = &PageOptions{Page: 0}
+ }
+
+ // Makes a request to a particular page and
+ // appends the response to the result
+ handlePage := func(page int) error {
+ // Override the page to be applied in applyListOptionsToRequest(...)
+ opts.Page = page
+
+ // This request object cannot be reused for each page request
+ // because it can lead to possible data corruption
+ req := client.R(ctx).SetResult(resultType)
+
+ // Apply all user-provided list options to the request
+ if err := applyListOptionsToRequest(opts, req); err != nil {
+ return err
+ }
+
+ res, err := coupleAPIErrors(req.Get(endpoint))
+ if err != nil {
+ return err
+ }
+
+ response := res.Result().(*paginatedResponse[T])
+
+ opts.Page = page
+ opts.Pages = response.Pages
+ opts.Results = response.Results
+
+ result = append(result, response.Data...)
+ return nil
+ }
+
+ // This helps simplify the logic below
+ startingPage := 1
+ pageDefined := opts.Page > 0
+
+ if pageDefined {
+ startingPage = opts.Page
+ }
+
+ // Get the first page
+ if err := handlePage(startingPage); err != nil {
+ return nil, err
+ }
+
+ // If the user has explicitly specified a page, we don't
+ // need to get any other pages.
+ if pageDefined {
+ return result, nil
+ }
+
+ // Get the rest of the pages
+ for page := 2; page <= opts.Pages; page++ {
+ if err := handlePage(page); err != nil {
+ return nil, err
+ }
+ }
+
+ return result, nil
+}
+
+// doGETRequest runs a GET request using the given client and API endpoint,
+// and returns the result
+func doGETRequest[T any](
+ ctx context.Context,
+ client *Client,
+ endpoint string,
+) (*T, error) {
+ var resultType T
+
+ req := client.R(ctx).SetResult(&resultType)
+ r, err := coupleAPIErrors(req.Get(endpoint))
+ if err != nil {
+ return nil, err
+ }
+
+ return r.Result().(*T), nil
+}
+
+// doPOSTRequest runs a PUT request using the given client, API endpoint,
+// and options/body.
+func doPOSTRequest[T, O any](
+ ctx context.Context,
+ client *Client,
+ endpoint string,
+ options ...O,
+) (*T, error) {
+ var resultType T
+
+ numOpts := len(options)
+
+ if numOpts > 1 {
+ return nil, fmt.Errorf("invalid number of options: %d", len(options))
+ }
+
+ req := client.R(ctx).SetResult(&resultType)
+
+ if numOpts > 0 && !isNil(options[0]) {
+ body, err := json.Marshal(options[0])
+ if err != nil {
+ return nil, err
+ }
+ req.SetBody(string(body))
+ }
+
+ r, err := coupleAPIErrors(req.Post(endpoint))
+ if err != nil {
+ return nil, err
+ }
+
+ return r.Result().(*T), nil
+}
+
+// doPUTRequest runs a PUT request using the given client, API endpoint,
+// and options/body.
+func doPUTRequest[T, O any](
+ ctx context.Context,
+ client *Client,
+ endpoint string,
+ options ...O,
+) (*T, error) {
+ var resultType T
+
+ numOpts := len(options)
+
+ if numOpts > 1 {
+ return nil, fmt.Errorf("invalid number of options: %d", len(options))
+ }
+
+ req := client.R(ctx).SetResult(&resultType)
+
+ if numOpts > 0 && !isNil(options[0]) {
+ body, err := json.Marshal(options[0])
+ if err != nil {
+ return nil, err
+ }
+ req.SetBody(string(body))
+ }
+
+ r, err := coupleAPIErrors(req.Put(endpoint))
+ if err != nil {
+ return nil, err
+ }
+
+ return r.Result().(*T), nil
+}
+
+// doDELETERequest runs a DELETE request using the given client
+// and API endpoint.
+func doDELETERequest(
+ ctx context.Context,
+ client *Client,
+ endpoint string,
+) error {
+ req := client.R(ctx)
+ _, err := coupleAPIErrors(req.Delete(endpoint))
+ return err
+}
+
+// formatAPIPath allows us to safely build an API request with path escaping
+func formatAPIPath(format string, args ...any) string {
+ escapedArgs := make([]any, len(args))
+ for i, arg := range args {
+ if typeStr, ok := arg.(string); ok {
+ arg = url.PathEscape(typeStr)
+ }
+
+ escapedArgs[i] = arg
+ }
+
+ return fmt.Sprintf(format, escapedArgs...)
+}
+
+func isNil(i interface{}) bool {
+ if i == nil {
+ return true
+ }
+
+ // Check for nil pointers
+ v := reflect.ValueOf(i)
+ return v.Kind() == reflect.Ptr && v.IsNil()
+}
diff --git a/vendor/github.com/linode/linodego/retries.go b/vendor/github.com/linode/linodego/retries.go
new file mode 100644
index 00000000..14886442
--- /dev/null
+++ b/vendor/github.com/linode/linodego/retries.go
@@ -0,0 +1,105 @@
+package linodego
+
+import (
+ "errors"
+ "log"
+ "net/http"
+ "strconv"
+ "time"
+
+ "github.com/go-resty/resty/v2"
+ "golang.org/x/net/http2"
+)
+
+const (
+ retryAfterHeaderName = "Retry-After"
+ maintenanceModeHeaderName = "X-Maintenance-Mode"
+
+ defaultRetryCount = 1000
+)
+
+// type RetryConditional func(r *resty.Response) (shouldRetry bool)
+type RetryConditional resty.RetryConditionFunc
+
+// type RetryAfter func(c *resty.Client, r *resty.Response) (time.Duration, error)
+type RetryAfter resty.RetryAfterFunc
+
+// Configures resty to
+// lock until enough time has passed to retry the request as determined by the Retry-After response header.
+// If the Retry-After header is not set, we fall back to value of SetPollDelay.
+func configureRetries(c *Client) {
+ c.resty.
+ SetRetryCount(defaultRetryCount).
+ AddRetryCondition(checkRetryConditionals(c)).
+ SetRetryAfter(respectRetryAfter)
+}
+
+func checkRetryConditionals(c *Client) func(*resty.Response, error) bool {
+ return func(r *resty.Response, err error) bool {
+ for _, retryConditional := range c.retryConditionals {
+ retry := retryConditional(r, err)
+ if retry {
+ log.Printf("[INFO] Received error %s - Retrying", r.Error())
+ return true
+ }
+ }
+ return false
+ }
+}
+
+// SetLinodeBusyRetry configures resty to retry specifically on "Linode busy." errors
+// The retry wait time is configured in SetPollDelay
+func linodeBusyRetryCondition(r *resty.Response, _ error) bool {
+ apiError, ok := r.Error().(*APIError)
+ linodeBusy := ok && apiError.Error() == "Linode busy."
+ retry := r.StatusCode() == http.StatusBadRequest && linodeBusy
+ return retry
+}
+
+func tooManyRequestsRetryCondition(r *resty.Response, _ error) bool {
+ return r.StatusCode() == http.StatusTooManyRequests
+}
+
+func serviceUnavailableRetryCondition(r *resty.Response, _ error) bool {
+ serviceUnavailable := r.StatusCode() == http.StatusServiceUnavailable
+
+ // During maintenance events, the API will return a 503 and add
+ // an `X-MAINTENANCE-MODE` header. Don't retry during maintenance
+ // events, only for legitimate 503s.
+ if serviceUnavailable && r.Header().Get(maintenanceModeHeaderName) != "" {
+ log.Printf("[INFO] Linode API is under maintenance, request will not be retried - please see status.linode.com for more information")
+ return false
+ }
+
+ return serviceUnavailable
+}
+
+func requestTimeoutRetryCondition(r *resty.Response, _ error) bool {
+ return r.StatusCode() == http.StatusRequestTimeout
+}
+
+func requestGOAWAYRetryCondition(_ *resty.Response, e error) bool {
+ return errors.As(e, &http2.GoAwayError{})
+}
+
+func requestNGINXRetryCondition(r *resty.Response, _ error) bool {
+ return r.StatusCode() == http.StatusBadRequest &&
+ r.Header().Get("Server") == "nginx" &&
+ r.Header().Get("Content-Type") == "text/html"
+}
+
+func respectRetryAfter(client *resty.Client, resp *resty.Response) (time.Duration, error) {
+ retryAfterStr := resp.Header().Get(retryAfterHeaderName)
+ if retryAfterStr == "" {
+ return 0, nil
+ }
+
+ retryAfter, err := strconv.Atoi(retryAfterStr)
+ if err != nil {
+ return 0, err
+ }
+
+ duration := time.Duration(retryAfter) * time.Second
+ log.Printf("[INFO] Respecting Retry-After Header of %d (%s) (max %s)", retryAfter, duration, client.RetryMaxWaitTime)
+ return duration, nil
+}
diff --git a/vendor/github.com/linode/linodego/retries_http.go b/vendor/github.com/linode/linodego/retries_http.go
new file mode 100644
index 00000000..0439af48
--- /dev/null
+++ b/vendor/github.com/linode/linodego/retries_http.go
@@ -0,0 +1,127 @@
+package linodego
+
+import (
+ "encoding/json"
+ "errors"
+ "log"
+ "net/http"
+ "strconv"
+ "time"
+
+ "golang.org/x/net/http2"
+)
+
+const (
+ // nolint:unused
+ httpRetryAfterHeaderName = "Retry-After"
+ // nolint:unused
+ httpMaintenanceModeHeaderName = "X-Maintenance-Mode"
+
+ // nolint:unused
+ httpDefaultRetryCount = 1000
+)
+
+// RetryConditional is a type alias for a function that determines if a request should be retried based on the response and error.
+// nolint:unused
+type httpRetryConditional func(*http.Response, error) bool
+
+// RetryAfter is a type alias for a function that determines the duration to wait before retrying based on the response.
+// nolint:unused
+type httpRetryAfter func(*http.Response) (time.Duration, error)
+
+// Configures http.Client to lock until enough time has passed to retry the request as determined by the Retry-After response header.
+// If the Retry-After header is not set, we fall back to the value of SetPollDelay.
+// nolint:unused
+func httpConfigureRetries(c *httpClient) {
+ c.retryConditionals = append(c.retryConditionals, httpcheckRetryConditionals(c))
+ c.retryAfter = httpRespectRetryAfter
+}
+
+// nolint:unused
+func httpcheckRetryConditionals(c *httpClient) httpRetryConditional {
+ return func(resp *http.Response, err error) bool {
+ for _, retryConditional := range c.retryConditionals {
+ retry := retryConditional(resp, err)
+ if retry {
+ log.Printf("[INFO] Received error %v - Retrying", err)
+ return true
+ }
+ }
+ return false
+ }
+}
+
+// nolint:unused
+func httpRespectRetryAfter(resp *http.Response) (time.Duration, error) {
+ retryAfterStr := resp.Header.Get(retryAfterHeaderName)
+ if retryAfterStr == "" {
+ return 0, nil
+ }
+
+ retryAfter, err := strconv.Atoi(retryAfterStr)
+ if err != nil {
+ return 0, err
+ }
+
+ duration := time.Duration(retryAfter) * time.Second
+ log.Printf("[INFO] Respecting Retry-After Header of %d (%s)", retryAfter, duration)
+ return duration, nil
+}
+
+// Retry conditions
+
+// nolint:unused
+func httpLinodeBusyRetryCondition(resp *http.Response, _ error) bool {
+ apiError, ok := getAPIError(resp)
+ linodeBusy := ok && apiError.Error() == "Linode busy."
+ retry := resp.StatusCode == http.StatusBadRequest && linodeBusy
+ return retry
+}
+
+// nolint:unused
+func httpTooManyRequestsRetryCondition(resp *http.Response, _ error) bool {
+ return resp.StatusCode == http.StatusTooManyRequests
+}
+
+// nolint:unused
+func httpServiceUnavailableRetryCondition(resp *http.Response, _ error) bool {
+ serviceUnavailable := resp.StatusCode == http.StatusServiceUnavailable
+
+ // During maintenance events, the API will return a 503 and add
+ // an `X-MAINTENANCE-MODE` header. Don't retry during maintenance
+ // events, only for legitimate 503s.
+ if serviceUnavailable && resp.Header.Get(maintenanceModeHeaderName) != "" {
+ log.Printf("[INFO] Linode API is under maintenance, request will not be retried - please see status.linode.com for more information")
+ return false
+ }
+
+ return serviceUnavailable
+}
+
+// nolint:unused
+func httpRequestTimeoutRetryCondition(resp *http.Response, _ error) bool {
+ return resp.StatusCode == http.StatusRequestTimeout
+}
+
+// nolint:unused
+func httpRequestGOAWAYRetryCondition(_ *http.Response, err error) bool {
+ return errors.As(err, &http2.GoAwayError{})
+}
+
+// nolint:unused
+func httpRequestNGINXRetryCondition(resp *http.Response, _ error) bool {
+ return resp.StatusCode == http.StatusBadRequest &&
+ resp.Header.Get("Server") == "nginx" &&
+ resp.Header.Get("Content-Type") == "text/html"
+}
+
+// Helper function to extract APIError from response
+// nolint:unused
+func getAPIError(resp *http.Response) (*APIError, bool) {
+ var apiError APIError
+ err := json.NewDecoder(resp.Body).Decode(&apiError)
+ if err != nil {
+ return nil, false
+ }
+ return &apiError, true
+}
diff --git a/vendor/github.com/linode/linodego/stackscripts.go b/vendor/github.com/linode/linodego/stackscripts.go
new file mode 100644
index 00000000..3f290b07
--- /dev/null
+++ b/vendor/github.com/linode/linodego/stackscripts.go
@@ -0,0 +1,144 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// Stackscript represents a Linode StackScript
+type Stackscript struct {
+ ID int `json:"id"`
+ Username string `json:"username"`
+ Label string `json:"label"`
+ Description string `json:"description"`
+ Ordinal int `json:"ordinal"`
+ LogoURL string `json:"logo_url"`
+ Images []string `json:"images"`
+ DeploymentsTotal int `json:"deployments_total"`
+ DeploymentsActive int `json:"deployments_active"`
+ IsPublic bool `json:"is_public"`
+ Mine bool `json:"mine"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+ RevNote string `json:"rev_note"`
+ Script string `json:"script"`
+ UserDefinedFields *[]StackscriptUDF `json:"user_defined_fields"`
+ UserGravatarID string `json:"user_gravatar_id"`
+}
+
+// StackscriptUDF define a single variable that is accepted by a Stackscript
+type StackscriptUDF struct {
+ // A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
+ Label string `json:"label"`
+
+ // The name of the field.
+ Name string `json:"name"`
+
+ // An example value for the field.
+ Example string `json:"example"`
+
+ // A list of acceptable single values for the field.
+ OneOf string `json:"oneOf,omitempty"`
+
+ // A list of acceptable values for the field in any quantity, combination or order.
+ ManyOf string `json:"manyOf,omitempty"`
+
+ // The default value. If not specified, this value will be used.
+ Default string `json:"default,omitempty"`
+}
+
+// StackscriptCreateOptions fields are those accepted by CreateStackscript
+type StackscriptCreateOptions struct {
+ Label string `json:"label"`
+ Description string `json:"description"`
+ Images []string `json:"images"`
+ IsPublic bool `json:"is_public"`
+ RevNote string `json:"rev_note"`
+ Script string `json:"script"`
+}
+
+// StackscriptUpdateOptions fields are those accepted by UpdateStackscript
+type StackscriptUpdateOptions StackscriptCreateOptions
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (i *Stackscript) UnmarshalJSON(b []byte) error {
+ type Mask Stackscript
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(i),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ i.Created = (*time.Time)(p.Created)
+ i.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
+
+// GetCreateOptions converts a Stackscript to StackscriptCreateOptions for use in CreateStackscript
+func (i Stackscript) GetCreateOptions() StackscriptCreateOptions {
+ return StackscriptCreateOptions{
+ Label: i.Label,
+ Description: i.Description,
+ Images: i.Images,
+ IsPublic: i.IsPublic,
+ RevNote: i.RevNote,
+ Script: i.Script,
+ }
+}
+
+// GetUpdateOptions converts a Stackscript to StackscriptUpdateOptions for use in UpdateStackscript
+func (i Stackscript) GetUpdateOptions() StackscriptUpdateOptions {
+ return StackscriptUpdateOptions{
+ Label: i.Label,
+ Description: i.Description,
+ Images: i.Images,
+ IsPublic: i.IsPublic,
+ RevNote: i.RevNote,
+ Script: i.Script,
+ }
+}
+
+// ListStackscripts lists Stackscripts
+func (c *Client) ListStackscripts(ctx context.Context, opts *ListOptions) ([]Stackscript, error) {
+ response, err := getPaginatedResults[Stackscript](ctx, c, "linode/stackscripts", opts)
+ return response, err
+}
+
+// GetStackscript gets the Stackscript with the provided ID
+func (c *Client) GetStackscript(ctx context.Context, scriptID int) (*Stackscript, error) {
+ e := formatAPIPath("linode/stackscripts/%d", scriptID)
+ response, err := doGETRequest[Stackscript](ctx, c, e)
+ return response, err
+}
+
+// CreateStackscript creates a StackScript
+func (c *Client) CreateStackscript(ctx context.Context, opts StackscriptCreateOptions) (*Stackscript, error) {
+ e := "linode/stackscripts"
+ response, err := doPOSTRequest[Stackscript](ctx, c, e, opts)
+ return response, err
+}
+
+// UpdateStackscript updates the StackScript with the specified id
+func (c *Client) UpdateStackscript(ctx context.Context, scriptID int, opts StackscriptUpdateOptions) (*Stackscript, error) {
+ e := formatAPIPath("linode/stackscripts/%d", scriptID)
+ response, err := doPUTRequest[Stackscript](ctx, c, e, opts)
+ return response, err
+}
+
+// DeleteStackscript deletes the StackScript with the specified id
+func (c *Client) DeleteStackscript(ctx context.Context, scriptID int) error {
+ e := formatAPIPath("linode/stackscripts/%d", scriptID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/support.go b/vendor/github.com/linode/linodego/support.go
new file mode 100644
index 00000000..4af871ec
--- /dev/null
+++ b/vendor/github.com/linode/linodego/support.go
@@ -0,0 +1,56 @@
+package linodego
+
+import (
+ "context"
+ "time"
+)
+
+// Ticket represents a support ticket object
+type Ticket struct {
+ ID int `json:"id"`
+ Attachments []string `json:"attachments"`
+ Closed *time.Time `json:"-"`
+ Description string `json:"description"`
+ Entity *TicketEntity `json:"entity"`
+ GravatarID string `json:"gravatar_id"`
+ Opened *time.Time `json:"-"`
+ OpenedBy string `json:"opened_by"`
+ Status TicketStatus `json:"status"`
+ Summary string `json:"summary"`
+ Updated *time.Time `json:"-"`
+ UpdatedBy string `json:"updated_by"`
+}
+
+// TicketEntity refers a ticket to a specific entity
+type TicketEntity struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Type string `json:"type"`
+ URL string `json:"url"`
+}
+
+// TicketStatus constants start with Ticket and include Linode API Ticket Status values
+type TicketStatus string
+
+// TicketStatus constants reflect the current status of a Ticket
+const (
+ TicketNew TicketStatus = "new"
+ TicketClosed TicketStatus = "closed"
+ TicketOpen TicketStatus = "open"
+)
+
+// ListTickets returns a collection of Support Tickets on the Account. Support Tickets
+// can be both tickets opened with Linode for support, as well as tickets generated by
+// Linode regarding the Account. This collection includes all Support Tickets generated
+// on the Account, with open tickets returned first.
+func (c *Client) ListTickets(ctx context.Context, opts *ListOptions) ([]Ticket, error) {
+ response, err := getPaginatedResults[Ticket](ctx, c, "support/tickets", opts)
+ return response, err
+}
+
+// GetTicket gets a Support Ticket on the Account with the specified ID
+func (c *Client) GetTicket(ctx context.Context, ticketID int) (*Ticket, error) {
+ e := formatAPIPath("support/tickets/%d", ticketID)
+ response, err := doGETRequest[Ticket](ctx, c, e)
+ return response, err
+}
diff --git a/vendor/github.com/linode/linodego/tags.go b/vendor/github.com/linode/linodego/tags.go
new file mode 100644
index 00000000..9d8d9eb6
--- /dev/null
+++ b/vendor/github.com/linode/linodego/tags.go
@@ -0,0 +1,165 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+)
+
+// Tag represents a Tag object
+type Tag struct {
+ Label string `json:"label"`
+}
+
+// TaggedObject represents a Tagged Object object
+type TaggedObject struct {
+ Type string `json:"type"`
+ RawData json.RawMessage `json:"data"`
+ Data any `json:"-"`
+}
+
+// SortedObjects currently only includes Instances
+type SortedObjects struct {
+ Instances []Instance
+ LKEClusters []LKECluster
+ Domains []Domain
+ Volumes []Volume
+ NodeBalancers []NodeBalancer
+ /*
+ StackScripts []Stackscript
+ */
+}
+
+// TaggedObjectList are a list of TaggedObjects, as returning by ListTaggedObjects
+type TaggedObjectList []TaggedObject
+
+// TagCreateOptions fields are those accepted by CreateTag
+type TagCreateOptions struct {
+ Label string `json:"label"`
+ Linodes []int `json:"linodes,omitempty"`
+ // @TODO is this implemented?
+ LKEClusters []int `json:"lke_clusters,omitempty"`
+ Domains []int `json:"domains,omitempty"`
+ Volumes []int `json:"volumes,omitempty"`
+ NodeBalancers []int `json:"nodebalancers,omitempty"`
+}
+
+// GetCreateOptions converts a Tag to TagCreateOptions for use in CreateTag
+func (i Tag) GetCreateOptions() (o TagCreateOptions) {
+ o.Label = i.Label
+ return
+}
+
+// ListTags lists Tags
+func (c *Client) ListTags(ctx context.Context, opts *ListOptions) ([]Tag, error) {
+ response, err := getPaginatedResults[Tag](ctx, c, "tags", opts)
+ return response, err
+}
+
+// fixData stores an object of the type defined by Type in Data using RawData
+func (i *TaggedObject) fixData() (*TaggedObject, error) {
+ switch i.Type {
+ case "linode":
+ obj := Instance{}
+ if err := json.Unmarshal(i.RawData, &obj); err != nil {
+ return nil, err
+ }
+ i.Data = obj
+ case "lke_cluster":
+ obj := LKECluster{}
+ if err := json.Unmarshal(i.RawData, &obj); err != nil {
+ return nil, err
+ }
+ i.Data = obj
+ case "nodebalancer":
+ obj := NodeBalancer{}
+ if err := json.Unmarshal(i.RawData, &obj); err != nil {
+ return nil, err
+ }
+ i.Data = obj
+ case "domain":
+ obj := Domain{}
+ if err := json.Unmarshal(i.RawData, &obj); err != nil {
+ return nil, err
+ }
+ i.Data = obj
+ case "volume":
+ obj := Volume{}
+ if err := json.Unmarshal(i.RawData, &obj); err != nil {
+ return nil, err
+ }
+ i.Data = obj
+ }
+
+ return i, nil
+}
+
+// ListTaggedObjects lists Tagged Objects
+func (c *Client) ListTaggedObjects(ctx context.Context, label string, opts *ListOptions) (TaggedObjectList, error) {
+ response, err := getPaginatedResults[TaggedObject](ctx, c, formatAPIPath("tags/%s", label), opts)
+ if err != nil {
+ return nil, err
+ }
+
+ for i := range response {
+ if _, err := response[i].fixData(); err != nil {
+ return nil, err
+ }
+ }
+ return response, nil
+}
+
+// SortedObjects converts a list of TaggedObjects into a Sorted Objects struct, for easier access
+func (t TaggedObjectList) SortedObjects() (SortedObjects, error) {
+ so := SortedObjects{}
+
+ for _, o := range t {
+ switch o.Type {
+ case "linode":
+ if instance, ok := o.Data.(Instance); ok {
+ so.Instances = append(so.Instances, instance)
+ } else {
+ return so, errors.New("expected an Instance when Type was \"linode\"")
+ }
+ case "lke_cluster":
+ if lkeCluster, ok := o.Data.(LKECluster); ok {
+ so.LKEClusters = append(so.LKEClusters, lkeCluster)
+ } else {
+ return so, errors.New("expected an LKECluster when Type was \"lke_cluster\"")
+ }
+ case "domain":
+ if domain, ok := o.Data.(Domain); ok {
+ so.Domains = append(so.Domains, domain)
+ } else {
+ return so, errors.New("expected a Domain when Type was \"domain\"")
+ }
+ case "volume":
+ if volume, ok := o.Data.(Volume); ok {
+ so.Volumes = append(so.Volumes, volume)
+ } else {
+ return so, errors.New("expected an Volume when Type was \"volume\"")
+ }
+ case "nodebalancer":
+ if nodebalancer, ok := o.Data.(NodeBalancer); ok {
+ so.NodeBalancers = append(so.NodeBalancers, nodebalancer)
+ } else {
+ return so, errors.New("expected an NodeBalancer when Type was \"nodebalancer\"")
+ }
+ }
+ }
+ return so, nil
+}
+
+// CreateTag creates a Tag
+func (c *Client) CreateTag(ctx context.Context, opts TagCreateOptions) (*Tag, error) {
+ e := "tags"
+ response, err := doPOSTRequest[Tag](ctx, c, e, opts)
+ return response, err
+}
+
+// DeleteTag deletes the Tag with the specified id
+func (c *Client) DeleteTag(ctx context.Context, label string) error {
+ e := formatAPIPath("tags/%s", label)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/types.go b/vendor/github.com/linode/linodego/types.go
new file mode 100644
index 00000000..bd9b801c
--- /dev/null
+++ b/vendor/github.com/linode/linodego/types.go
@@ -0,0 +1,102 @@
+package linodego
+
+import (
+ "context"
+ "net/url"
+)
+
+// LinodeType represents a linode type object
+type LinodeType struct {
+ ID string `json:"id"`
+ Disk int `json:"disk"`
+ Class LinodeTypeClass `json:"class"` // enum: nanode, standard, highmem, dedicated, gpu
+ Price *LinodePrice `json:"price"`
+ Label string `json:"label"`
+ Addons *LinodeAddons `json:"addons"`
+ RegionPrices []LinodeRegionPrice `json:"region_prices"`
+ NetworkOut int `json:"network_out"`
+ Memory int `json:"memory"`
+ Transfer int `json:"transfer"`
+ VCPUs int `json:"vcpus"`
+ GPUs int `json:"gpus"`
+ Successor string `json:"successor"`
+}
+
+// LinodePrice represents a linode type price object
+type LinodePrice struct {
+ Hourly float32 `json:"hourly"`
+ Monthly float32 `json:"monthly"`
+}
+
+// LinodeBackupsAddon represents a linode backups addon object
+type LinodeBackupsAddon struct {
+ Price *LinodePrice `json:"price"`
+ RegionPrices []LinodeRegionPrice `json:"region_prices"`
+}
+
+// LinodeAddons represent the linode addons object
+type LinodeAddons struct {
+ Backups *LinodeBackupsAddon `json:"backups"`
+}
+
+// LinodeRegionPrice represents an individual type or addon
+// price exception for a region.
+type LinodeRegionPrice struct {
+ ID string `json:"id"`
+ Hourly float32 `json:"hourly"`
+ Monthly float32 `json:"monthly"`
+}
+
+// LinodeTypeClass constants start with Class and include Linode API Instance Type Classes
+type LinodeTypeClass string
+
+// LinodeTypeClass contants are the Instance Type Classes that an Instance Type can be assigned
+const (
+ ClassNanode LinodeTypeClass = "nanode"
+ ClassStandard LinodeTypeClass = "standard"
+ ClassHighmem LinodeTypeClass = "highmem"
+ ClassDedicated LinodeTypeClass = "dedicated"
+ ClassGPU LinodeTypeClass = "gpu"
+)
+
+// ListTypes lists linode types. This endpoint is cached by default.
+func (c *Client) ListTypes(ctx context.Context, opts *ListOptions) ([]LinodeType, error) {
+ e := "linode/types"
+
+ endpoint, err := generateListCacheURL(e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ if result := c.getCachedResponse(endpoint); result != nil {
+ return result.([]LinodeType), nil
+ }
+
+ response, err := getPaginatedResults[LinodeType](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(endpoint, response, &cacheExpiryTime)
+
+ return response, nil
+}
+
+// GetType gets the type with the provided ID. This endpoint is cached by default.
+func (c *Client) GetType(ctx context.Context, typeID string) (*LinodeType, error) {
+ e := formatAPIPath("linode/types/%s", url.PathEscape(typeID))
+
+ if result := c.getCachedResponse(e); result != nil {
+ result := result.(LinodeType)
+ return &result, nil
+ }
+
+ response, err := doGETRequest[LinodeType](ctx, c, e)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(e, response, &cacheExpiryTime)
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/version.go b/vendor/github.com/linode/linodego/version.go
new file mode 100644
index 00000000..cad2662f
--- /dev/null
+++ b/vendor/github.com/linode/linodego/version.go
@@ -0,0 +1,34 @@
+package linodego
+
+import (
+ "fmt"
+ "runtime/debug"
+)
+
+const packagePath = "github.com/linode/linodego"
+
+var (
+ Version = "dev"
+
+ // DefaultUserAgent is the default User-Agent sent in HTTP request headers
+ DefaultUserAgent string
+)
+
+// init attempts to source the version from the build info injected
+// at runtime and sets the DefaultUserAgent.
+func init() {
+ buildInfo, ok := debug.ReadBuildInfo()
+ if ok {
+ for _, dep := range buildInfo.Deps {
+ if dep.Path == packagePath {
+ if dep.Replace != nil {
+ Version = dep.Replace.Version
+ }
+ Version = dep.Version
+ break
+ }
+ }
+ }
+
+ DefaultUserAgent = fmt.Sprintf("linodego/%s https://github.com/linode/linodego", Version)
+}
diff --git a/vendor/github.com/linode/linodego/vlans.go b/vendor/github.com/linode/linodego/vlans.go
new file mode 100644
index 00000000..14732637
--- /dev/null
+++ b/vendor/github.com/linode/linodego/vlans.go
@@ -0,0 +1,66 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+type VLAN struct {
+ Label string `json:"label"`
+ Linodes []int `json:"linodes"`
+ Region string `json:"region"`
+ Created *time.Time `json:"-"`
+}
+
+// UnmarshalJSON for VLAN responses
+func (v *VLAN) UnmarshalJSON(b []byte) error {
+ type Mask VLAN
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ }{
+ Mask: (*Mask)(v),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ v.Created = (*time.Time)(p.Created)
+ return nil
+}
+
+// ListVLANs returns a paginated list of VLANs
+func (c *Client) ListVLANs(ctx context.Context, opts *ListOptions) ([]VLAN, error) {
+ response, err := getPaginatedResults[VLAN](ctx, c, "networking/vlans", opts)
+ return response, err
+}
+
+// GetVLANIPAMAddress returns the IPAM Address for a given VLAN Label as a string (10.0.0.1/24)
+func (c *Client) GetVLANIPAMAddress(ctx context.Context, linodeID int, vlanLabel string) (string, error) {
+ f := Filter{}
+ f.AddField(Eq, "interfaces", vlanLabel)
+ vlanFilter, err := f.MarshalJSON()
+ if err != nil {
+ return "", fmt.Errorf("Unable to convert VLAN label: %s to a filterable object: %w", vlanLabel, err)
+ }
+
+ cfgs, err := c.ListInstanceConfigs(ctx, linodeID, &ListOptions{Filter: string(vlanFilter)})
+ if err != nil {
+ return "", fmt.Errorf("Fetching configs for instance %v failed: %w", linodeID, err)
+ }
+
+ interfaces := cfgs[0].Interfaces
+ for _, face := range interfaces {
+ if face.Label == vlanLabel {
+ return face.IPAMAddress, nil
+ }
+ }
+
+ return "", fmt.Errorf("Failed to find IPAMAddress for VLAN: %s", vlanLabel)
+}
diff --git a/vendor/github.com/linode/linodego/volumes.go b/vendor/github.com/linode/linodego/volumes.go
new file mode 100644
index 00000000..684e718a
--- /dev/null
+++ b/vendor/github.com/linode/linodego/volumes.go
@@ -0,0 +1,181 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// VolumeStatus indicates the status of the Volume
+type VolumeStatus string
+
+const (
+ // VolumeCreating indicates the Volume is being created and is not yet available for use
+ VolumeCreating VolumeStatus = "creating"
+
+ // VolumeActive indicates the Volume is online and available for use
+ VolumeActive VolumeStatus = "active"
+
+ // VolumeResizing indicates the Volume is in the process of upgrading its current capacity
+ VolumeResizing VolumeStatus = "resizing"
+
+ // VolumeContactSupport indicates there is a problem with the Volume. A support ticket must be opened to resolve the issue
+ VolumeContactSupport VolumeStatus = "contact_support"
+)
+
+// Volume represents a linode volume object
+type Volume struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Status VolumeStatus `json:"status"`
+ Region string `json:"region"`
+ Size int `json:"size"`
+ LinodeID *int `json:"linode_id"`
+ FilesystemPath string `json:"filesystem_path"`
+ Tags []string `json:"tags"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+
+ // Note: Block Storage Disk Encryption is not currently available to all users.
+ Encryption string `json:"encryption"`
+}
+
+// VolumeCreateOptions fields are those accepted by CreateVolume
+type VolumeCreateOptions struct {
+ Label string `json:"label,omitempty"`
+ Region string `json:"region,omitempty"`
+ LinodeID int `json:"linode_id,omitempty"`
+ ConfigID int `json:"config_id,omitempty"`
+ // The Volume's size, in GiB. Minimum size is 10GiB, maximum size is 10240GiB. A "0" value will result in the default size.
+ Size int `json:"size,omitempty"`
+ // An array of tags applied to this object. Tags are for organizational purposes only.
+ Tags []string `json:"tags"`
+ PersistAcrossBoots *bool `json:"persist_across_boots,omitempty"`
+ Encryption string `json:"encryption,omitempty"`
+}
+
+// VolumeUpdateOptions fields are those accepted by UpdateVolume
+type VolumeUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+}
+
+// VolumeAttachOptions fields are those accepted by AttachVolume
+type VolumeAttachOptions struct {
+ LinodeID int `json:"linode_id"`
+ ConfigID int `json:"config_id,omitempty"`
+ PersistAcrossBoots *bool `json:"persist_across_boots,omitempty"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface
+func (v *Volume) UnmarshalJSON(b []byte) error {
+ type Mask Volume
+
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(v),
+ }
+
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ v.Created = (*time.Time)(p.Created)
+ v.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
+
+// GetUpdateOptions converts a Volume to VolumeUpdateOptions for use in UpdateVolume
+func (v Volume) GetUpdateOptions() (updateOpts VolumeUpdateOptions) {
+ updateOpts.Label = v.Label
+ updateOpts.Tags = &v.Tags
+ return
+}
+
+// GetCreateOptions converts a Volume to VolumeCreateOptions for use in CreateVolume
+func (v Volume) GetCreateOptions() (createOpts VolumeCreateOptions) {
+ createOpts.Label = v.Label
+ createOpts.Tags = v.Tags
+ createOpts.Region = v.Region
+ createOpts.Size = v.Size
+ if v.LinodeID != nil && *v.LinodeID > 0 {
+ createOpts.LinodeID = *v.LinodeID
+ }
+ return
+}
+
+// ListVolumes lists Volumes
+func (c *Client) ListVolumes(ctx context.Context, opts *ListOptions) ([]Volume, error) {
+ response, err := getPaginatedResults[Volume](ctx, c, "volumes", opts)
+ return response, err
+}
+
+// GetVolume gets the template with the provided ID
+func (c *Client) GetVolume(ctx context.Context, volumeID int) (*Volume, error) {
+ e := formatAPIPath("volumes/%d", volumeID)
+ response, err := doGETRequest[Volume](ctx, c, e)
+ return response, err
+}
+
+// AttachVolume attaches a volume to a Linode instance
+func (c *Client) AttachVolume(ctx context.Context, volumeID int, opts *VolumeAttachOptions) (*Volume, error) {
+ e := formatAPIPath("volumes/%d/attach", volumeID)
+ response, err := doPOSTRequest[Volume](ctx, c, e, opts)
+ return response, err
+}
+
+// CreateVolume creates a Linode Volume
+func (c *Client) CreateVolume(ctx context.Context, opts VolumeCreateOptions) (*Volume, error) {
+ e := "volumes"
+ response, err := doPOSTRequest[Volume](ctx, c, e, opts)
+ return response, err
+}
+
+// UpdateVolume updates the Volume with the specified id
+func (c *Client) UpdateVolume(ctx context.Context, volumeID int, opts VolumeUpdateOptions) (*Volume, error) {
+ e := formatAPIPath("volumes/%d", volumeID)
+ response, err := doPUTRequest[Volume](ctx, c, e, opts)
+ return response, err
+}
+
+// CloneVolume clones a Linode volume
+func (c *Client) CloneVolume(ctx context.Context, volumeID int, label string) (*Volume, error) {
+ opts := map[string]any{
+ "label": label,
+ }
+
+ e := formatAPIPath("volumes/%d/clone", volumeID)
+ response, err := doPOSTRequest[Volume](ctx, c, e, opts)
+ return response, err
+}
+
+// DetachVolume detaches a Linode volume
+func (c *Client) DetachVolume(ctx context.Context, volumeID int) error {
+ e := formatAPIPath("volumes/%d/detach", volumeID)
+ _, err := doPOSTRequest[Volume, any](ctx, c, e)
+ return err
+}
+
+// ResizeVolume resizes an instance to new Linode type
+func (c *Client) ResizeVolume(ctx context.Context, volumeID int, size int) error {
+ opts := map[string]int{
+ "size": size,
+ }
+
+ e := formatAPIPath("volumes/%d/resize", volumeID)
+ _, err := doPOSTRequest[Volume](ctx, c, e, opts)
+ return err
+}
+
+// DeleteVolume deletes the Volume with the specified id
+func (c *Client) DeleteVolume(ctx context.Context, volumeID int) error {
+ e := formatAPIPath("volumes/%d", volumeID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/volumes_types.go b/vendor/github.com/linode/linodego/volumes_types.go
new file mode 100644
index 00000000..887a3c5a
--- /dev/null
+++ b/vendor/github.com/linode/linodego/volumes_types.go
@@ -0,0 +1,45 @@
+package linodego
+
+import (
+ "context"
+)
+
+// VolumeType represents a single valid Volume type.
+type VolumeType struct {
+ baseType[VolumeTypePrice, VolumeTypeRegionPrice]
+}
+
+// VolumeTypePrice represents the base hourly and monthly prices
+// for a volume type entry.
+type VolumeTypePrice struct {
+ baseTypePrice
+}
+
+// VolumeTypeRegionPrice represents the regional hourly and monthly prices
+// for a volume type entry.
+type VolumeTypeRegionPrice struct {
+ baseTypeRegionPrice
+}
+
+// ListVolumeTypes lists Volume types. This endpoint is cached by default.
+func (c *Client) ListVolumeTypes(ctx context.Context, opts *ListOptions) ([]VolumeType, error) {
+ e := "volumes/types"
+
+ endpoint, err := generateListCacheURL(e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ if result := c.getCachedResponse(endpoint); result != nil {
+ return result.([]VolumeType), nil
+ }
+
+ response, err := getPaginatedResults[VolumeType](ctx, c, e, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ c.addCachedResponse(endpoint, response, &cacheExpiryTime)
+
+ return response, nil
+}
diff --git a/vendor/github.com/linode/linodego/vpc.go b/vendor/github.com/linode/linodego/vpc.go
new file mode 100644
index 00000000..78537991
--- /dev/null
+++ b/vendor/github.com/linode/linodego/vpc.go
@@ -0,0 +1,107 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+type VPC struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ Description string `json:"description"`
+ Region string `json:"region"`
+ Subnets []VPCSubnet `json:"subnets"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+}
+
+type VPCCreateOptions struct {
+ Label string `json:"label"`
+ Description string `json:"description,omitempty"`
+ Region string `json:"region"`
+ Subnets []VPCSubnetCreateOptions `json:"subnets,omitempty"`
+}
+
+type VPCUpdateOptions struct {
+ Label string `json:"label,omitempty"`
+ Description string `json:"description,omitempty"`
+}
+
+func (v VPC) GetCreateOptions() VPCCreateOptions {
+ subnetCreations := make([]VPCSubnetCreateOptions, len(v.Subnets))
+ for i, s := range v.Subnets {
+ subnetCreations[i] = s.GetCreateOptions()
+ }
+
+ return VPCCreateOptions{
+ Label: v.Label,
+ Description: v.Description,
+ Region: v.Region,
+ Subnets: subnetCreations,
+ }
+}
+
+func (v VPC) GetUpdateOptions() VPCUpdateOptions {
+ return VPCUpdateOptions{
+ Label: v.Label,
+ Description: v.Description,
+ }
+}
+
+func (v *VPC) UnmarshalJSON(b []byte) error {
+ type Mask VPC
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(v),
+ }
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ v.Created = (*time.Time)(p.Created)
+ v.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
+
+func (c *Client) CreateVPC(
+ ctx context.Context,
+ opts VPCCreateOptions,
+) (*VPC, error) {
+ e := "vpcs"
+ response, err := doPOSTRequest[VPC](ctx, c, e, opts)
+ return response, err
+}
+
+func (c *Client) GetVPC(ctx context.Context, vpcID int) (*VPC, error) {
+ e := formatAPIPath("/vpcs/%d", vpcID)
+ response, err := doGETRequest[VPC](ctx, c, e)
+ return response, err
+}
+
+func (c *Client) ListVPCs(ctx context.Context, opts *ListOptions) ([]VPC, error) {
+ response, err := getPaginatedResults[VPC](ctx, c, "vpcs", opts)
+ return response, err
+}
+
+func (c *Client) UpdateVPC(
+ ctx context.Context,
+ vpcID int,
+ opts VPCUpdateOptions,
+) (*VPC, error) {
+ e := formatAPIPath("vpcs/%d", vpcID)
+ response, err := doPUTRequest[VPC](ctx, c, e, opts)
+ return response, err
+}
+
+func (c *Client) DeleteVPC(ctx context.Context, vpcID int) error {
+ e := formatAPIPath("vpcs/%d", vpcID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/vpc_ips.go b/vendor/github.com/linode/linodego/vpc_ips.go
new file mode 100644
index 00000000..7ccef887
--- /dev/null
+++ b/vendor/github.com/linode/linodego/vpc_ips.go
@@ -0,0 +1,20 @@
+package linodego
+
+import (
+ "context"
+ "fmt"
+)
+
+// ListAllVPCIPAddresses gets the list of all IP addresses of all VPCs in the Linode account.
+func (c *Client) ListAllVPCIPAddresses(
+ ctx context.Context, opts *ListOptions,
+) ([]VPCIP, error) {
+ return getPaginatedResults[VPCIP](ctx, c, "vpcs/ips", opts)
+}
+
+// ListVPCIPAddresses gets the list of all IP addresses of a specific VPC.
+func (c *Client) ListVPCIPAddresses(
+ ctx context.Context, vpcID int, opts *ListOptions,
+) ([]VPCIP, error) {
+ return getPaginatedResults[VPCIP](ctx, c, fmt.Sprintf("vpcs/%d/ips", vpcID), opts)
+}
diff --git a/vendor/github.com/linode/linodego/vpc_subnet.go b/vendor/github.com/linode/linodego/vpc_subnet.go
new file mode 100644
index 00000000..184316c4
--- /dev/null
+++ b/vendor/github.com/linode/linodego/vpc_subnet.go
@@ -0,0 +1,116 @@
+package linodego
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/linode/linodego/internal/parseabletime"
+)
+
+// VPCSubnetLinodeInterface represents an interface on a Linode that is currently
+// assigned to this VPC subnet.
+type VPCSubnetLinodeInterface struct {
+ ID int `json:"id"`
+ Active bool `json:"active"`
+}
+
+// VPCSubnetLinode represents a Linode currently assigned to a VPC subnet.
+type VPCSubnetLinode struct {
+ ID int `json:"id"`
+ Interfaces []VPCSubnetLinodeInterface `json:"interfaces"`
+}
+
+type VPCSubnet struct {
+ ID int `json:"id"`
+ Label string `json:"label"`
+ IPv4 string `json:"ipv4"`
+ Linodes []VPCSubnetLinode `json:"linodes"`
+ Created *time.Time `json:"-"`
+ Updated *time.Time `json:"-"`
+}
+
+type VPCSubnetCreateOptions struct {
+ Label string `json:"label"`
+ IPv4 string `json:"ipv4"`
+}
+
+type VPCSubnetUpdateOptions struct {
+ Label string `json:"label"`
+}
+
+func (v *VPCSubnet) UnmarshalJSON(b []byte) error {
+ type Mask VPCSubnet
+ p := struct {
+ *Mask
+ Created *parseabletime.ParseableTime `json:"created"`
+ Updated *parseabletime.ParseableTime `json:"updated"`
+ }{
+ Mask: (*Mask)(v),
+ }
+ if err := json.Unmarshal(b, &p); err != nil {
+ return err
+ }
+
+ v.Created = (*time.Time)(p.Created)
+ v.Updated = (*time.Time)(p.Updated)
+
+ return nil
+}
+
+func (v VPCSubnet) GetCreateOptions() VPCSubnetCreateOptions {
+ return VPCSubnetCreateOptions{
+ Label: v.Label,
+ IPv4: v.IPv4,
+ }
+}
+
+func (v VPCSubnet) GetUpdateOptions() VPCSubnetUpdateOptions {
+ return VPCSubnetUpdateOptions{Label: v.Label}
+}
+
+func (c *Client) CreateVPCSubnet(
+ ctx context.Context,
+ opts VPCSubnetCreateOptions,
+ vpcID int,
+) (*VPCSubnet, error) {
+ e := formatAPIPath("vpcs/%d/subnets", vpcID)
+ response, err := doPOSTRequest[VPCSubnet](ctx, c, e, opts)
+ return response, err
+}
+
+func (c *Client) GetVPCSubnet(
+ ctx context.Context,
+ vpcID int,
+ subnetID int,
+) (*VPCSubnet, error) {
+ e := formatAPIPath("vpcs/%d/subnets/%d", vpcID, subnetID)
+ response, err := doGETRequest[VPCSubnet](ctx, c, e)
+ return response, err
+}
+
+func (c *Client) ListVPCSubnets(
+ ctx context.Context,
+ vpcID int,
+ opts *ListOptions,
+) ([]VPCSubnet, error) {
+ response, err := getPaginatedResults[VPCSubnet](ctx, c, formatAPIPath("vpcs/%d/subnets", vpcID), opts)
+ return response, err
+}
+
+func (c *Client) UpdateVPCSubnet(
+ ctx context.Context,
+ vpcID int,
+ subnetID int,
+ opts VPCSubnetUpdateOptions,
+) (*VPCSubnet, error) {
+ e := formatAPIPath("vpcs/%d/subnets/%d", vpcID, subnetID)
+ response, err := doPUTRequest[VPCSubnet](ctx, c, e, opts)
+ return response, err
+}
+
+func (c *Client) DeleteVPCSubnet(ctx context.Context, vpcID int, subnetID int) error {
+ e := formatAPIPath("vpcs/%d/subnets/%d", vpcID, subnetID)
+ err := doDELETERequest(ctx, c, e)
+ return err
+}
diff --git a/vendor/github.com/linode/linodego/waitfor.go b/vendor/github.com/linode/linodego/waitfor.go
new file mode 100644
index 00000000..e65e491a
--- /dev/null
+++ b/vendor/github.com/linode/linodego/waitfor.go
@@ -0,0 +1,832 @@
+package linodego
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "net/http"
+ "slices"
+ "strconv"
+ "time"
+
+ "golang.org/x/text/cases"
+ "golang.org/x/text/language"
+)
+
+var englishTitle = cases.Title(language.English)
+
+type EventPoller struct {
+ EntityID any
+ EntityType EntityType
+
+ // Type is excluded here because it is implicitly determined
+ // by the event action.
+ SecondaryEntityID any
+
+ Action EventAction
+
+ client Client
+ previousEvents map[int]bool
+}
+
+// WaitForInstanceStatus waits for the Linode instance to reach the desired state
+// before returning. It will timeout with an error after timeoutSeconds.
+func (client Client) WaitForInstanceStatus(ctx context.Context, instanceID int, status InstanceStatus, timeoutSeconds int) (*Instance, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ instance, err := client.GetInstance(ctx, instanceID)
+ if err != nil {
+ return instance, err
+ }
+ complete := (instance.Status == status)
+
+ if complete {
+ return instance, nil
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("Error waiting for Instance %d status %s: %w", instanceID, status, ctx.Err())
+ }
+ }
+}
+
+// WaitForInstanceDiskStatus waits for the Linode instance disk to reach the desired state
+// before returning. It will timeout with an error after timeoutSeconds.
+func (client Client) WaitForInstanceDiskStatus(ctx context.Context, instanceID int, diskID int, status DiskStatus, timeoutSeconds int) (*InstanceDisk, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ // GetInstanceDisk will 404 on newly created disks. use List instead.
+ // disk, err := client.GetInstanceDisk(ctx, instanceID, diskID)
+ disks, err := client.ListInstanceDisks(ctx, instanceID, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ for _, disk := range disks {
+ if disk.ID == diskID {
+ complete := (disk.Status == status)
+ if complete {
+ return &disk, nil
+ }
+
+ break
+ }
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("Error waiting for Instance %d Disk %d status %s: %w", instanceID, diskID, status, ctx.Err())
+ }
+ }
+}
+
+// WaitForVolumeStatus waits for the Volume to reach the desired state
+// before returning. It will timeout with an error after timeoutSeconds.
+func (client Client) WaitForVolumeStatus(ctx context.Context, volumeID int, status VolumeStatus, timeoutSeconds int) (*Volume, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ volume, err := client.GetVolume(ctx, volumeID)
+ if err != nil {
+ return volume, err
+ }
+ complete := (volume.Status == status)
+
+ if complete {
+ return volume, nil
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("Error waiting for Volume %d status %s: %w", volumeID, status, ctx.Err())
+ }
+ }
+}
+
+// WaitForSnapshotStatus waits for the Snapshot to reach the desired state
+// before returning. It will timeout with an error after timeoutSeconds.
+func (client Client) WaitForSnapshotStatus(ctx context.Context, instanceID int, snapshotID int, status InstanceSnapshotStatus, timeoutSeconds int) (*InstanceSnapshot, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ snapshot, err := client.GetInstanceSnapshot(ctx, instanceID, snapshotID)
+ if err != nil {
+ return snapshot, err
+ }
+ complete := (snapshot.Status == status)
+
+ if complete {
+ return snapshot, nil
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("Error waiting for Instance %d Snapshot %d status %s: %w", instanceID, snapshotID, status, ctx.Err())
+ }
+ }
+}
+
+// WaitForVolumeLinodeID waits for the Volume to match the desired LinodeID
+// before returning. An active Instance will not immediately attach or detach a volume, so
+// the LinodeID must be polled to determine volume readiness from the API.
+// WaitForVolumeLinodeID will timeout with an error after timeoutSeconds.
+func (client Client) WaitForVolumeLinodeID(ctx context.Context, volumeID int, linodeID *int, timeoutSeconds int) (*Volume, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ volume, err := client.GetVolume(ctx, volumeID)
+ if err != nil {
+ return volume, err
+ }
+
+ switch {
+ case linodeID == nil && volume.LinodeID == nil:
+ return volume, nil
+ case linodeID == nil || volume.LinodeID == nil:
+ // continue waiting
+ case *volume.LinodeID == *linodeID:
+ return volume, nil
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("Error waiting for Volume %d to have Instance %v: %w", volumeID, linodeID, ctx.Err())
+ }
+ }
+}
+
+// WaitForLKEClusterStatus waits for the LKECluster to reach the desired state
+// before returning. It will timeout with an error after timeoutSeconds.
+func (client Client) WaitForLKEClusterStatus(ctx context.Context, clusterID int, status LKEClusterStatus, timeoutSeconds int) (*LKECluster, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ cluster, err := client.GetLKECluster(ctx, clusterID)
+ if err != nil {
+ return cluster, err
+ }
+ complete := (cluster.Status == status)
+
+ if complete {
+ return cluster, nil
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("Error waiting for Cluster %d status %s: %w", clusterID, status, ctx.Err())
+ }
+ }
+}
+
+// LKEClusterPollOptions configures polls against LKE Clusters.
+type LKEClusterPollOptions struct {
+ // Retry will cause the Poll to ignore interimittent errors
+ Retry bool
+
+ // TimeoutSeconds is the number of Seconds to wait for the poll to succeed
+ // before exiting.
+ TimeoutSeconds int
+
+ // TansportWrapper allows adding a transport middleware function that will
+ // wrap the LKE Cluster client's underlying http.RoundTripper.
+ TransportWrapper func(http.RoundTripper) http.RoundTripper
+}
+
+type ClusterConditionOptions struct {
+ LKEClusterKubeconfig *LKEClusterKubeconfig
+ TransportWrapper func(http.RoundTripper) http.RoundTripper
+}
+
+// ClusterConditionFunc represents a function that tests a condition against an LKE cluster,
+// returns true if the condition has been reached, false if it has not yet been reached.
+type ClusterConditionFunc func(context.Context, ClusterConditionOptions) (bool, error)
+
+// WaitForLKEClusterConditions waits for the given LKE conditions to be true
+func (client Client) WaitForLKEClusterConditions(
+ ctx context.Context,
+ clusterID int,
+ options LKEClusterPollOptions,
+ conditions ...ClusterConditionFunc,
+) error {
+ ctx, cancel := context.WithCancel(ctx)
+ if options.TimeoutSeconds != 0 {
+ ctx, cancel = context.WithTimeout(ctx, time.Duration(options.TimeoutSeconds)*time.Second)
+ }
+ defer cancel()
+
+ lkeKubeConfig, err := client.GetLKEClusterKubeconfig(ctx, clusterID)
+ if err != nil {
+ return fmt.Errorf("failed to get Kubeconfig for LKE cluster %d: %w", clusterID, err)
+ }
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ conditionOptions := ClusterConditionOptions{LKEClusterKubeconfig: lkeKubeConfig, TransportWrapper: options.TransportWrapper}
+
+ for _, condition := range conditions {
+ ConditionSucceeded:
+ for {
+ select {
+ case <-ticker.C:
+ result, err := condition(ctx, conditionOptions)
+ if err != nil {
+ log.Printf("[WARN] Ignoring WaitForLKEClusterConditions conditional error: %s", err)
+ if !options.Retry {
+ return err
+ }
+ }
+
+ if result {
+ break ConditionSucceeded
+ }
+
+ case <-ctx.Done():
+ return fmt.Errorf("Error waiting for cluster %d conditions: %w", clusterID, ctx.Err())
+ }
+ }
+ }
+ return nil
+}
+
+// WaitForEventFinished waits for an entity action to reach the 'finished' state
+// before returning. It will timeout with an error after timeoutSeconds.
+// If the event indicates a failure both the failed event and the error will be returned.
+// nolint
+func (client Client) WaitForEventFinished(
+ ctx context.Context,
+ id any,
+ entityType EntityType,
+ action EventAction,
+ minStart time.Time,
+ timeoutSeconds int,
+) (*Event, error) {
+ titledEntityType := englishTitle.String(string(entityType))
+ filter := Filter{
+ Order: Descending,
+ OrderBy: "created",
+ }
+ filter.AddField(Eq, "action", action)
+ filter.AddField(Gte, "created", minStart.UTC().Format("2006-01-02T15:04:05"))
+
+ // Optimistically restrict results to page 1. We should remove this when more
+ // precise filtering options exist.
+ pages := 1
+
+ // The API has limitted filtering support for Event ID and Event Type
+ // Optimize the list, if possible
+ switch entityType {
+ case EntityDisk, EntityDatabase, EntityLinode, EntityDomain, EntityNodebalancer:
+ // All of the filter supported types have int ids
+ filterableEntityID, err := strconv.Atoi(fmt.Sprintf("%v", id))
+ if err != nil {
+ return nil, fmt.Errorf("error parsing Entity ID %q for optimized "+
+ "WaitForEventFinished EventType %q: %w", id, entityType, err)
+ }
+ filter.AddField(Eq, "entity.id", filterableEntityID)
+ filter.AddField(Eq, "entity.type", entityType)
+ }
+
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ if deadline, ok := ctx.Deadline(); ok {
+ duration := time.Until(deadline)
+ log.Printf("[INFO] Waiting %d seconds for %s events since %v for %s %v", int(duration.Seconds()), action, minStart, titledEntityType, id)
+ }
+
+ ticker := time.NewTicker(client.pollInterval)
+
+ // avoid repeating log messages
+ nextLog := ""
+ lastLog := ""
+ lastEventID := 0
+
+ defer ticker.Stop()
+ for {
+ select {
+ case <-ticker.C:
+ if lastEventID > 0 {
+ filter.AddField(Gte, "id", lastEventID)
+ }
+
+ filterStr, err := filter.MarshalJSON()
+ if err != nil {
+ return nil, err
+ }
+
+ listOptions := NewListOptions(pages, string(filterStr))
+
+ events, err := client.ListEvents(ctx, listOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ // If there are events for this instance + action, inspect them
+ for _, event := range events {
+ event := event
+
+ if event.Entity == nil || event.Entity.Type != entityType {
+ // log.Println("type mismatch", event.Entity.Type, entityType)
+ continue
+ }
+
+ var entID string
+
+ switch id := event.Entity.ID.(type) {
+ case float64, float32:
+ entID = fmt.Sprintf("%.f", id)
+ case int:
+ entID = strconv.Itoa(id)
+ default:
+ entID = fmt.Sprintf("%v", id)
+ }
+
+ var findID string
+ switch id := id.(type) {
+ case float64, float32:
+ findID = fmt.Sprintf("%.f", id)
+ case int:
+ findID = strconv.Itoa(id)
+ default:
+ findID = fmt.Sprintf("%v", id)
+ }
+
+ if entID != findID {
+ // log.Println("id mismatch", entID, findID)
+ continue
+ }
+
+ if event.Created == nil {
+ log.Printf("[WARN] event.Created is nil when API returned: %#+v", event.Created)
+ }
+
+ // This is the event we are looking for. Save our place.
+ if lastEventID == 0 {
+ lastEventID = event.ID
+ }
+
+ switch event.Status {
+ case EventFailed:
+ return &event, fmt.Errorf("%s %v action %s failed", titledEntityType, id, action)
+ case EventFinished:
+ log.Printf("[INFO] %s %v action %s is finished", titledEntityType, id, action)
+ return &event, nil
+ }
+
+ nextLog = fmt.Sprintf("[INFO] %s %v action %s is %s", titledEntityType, id, action, event.Status)
+ }
+
+ // de-dupe logging statements
+ if nextLog != lastLog {
+ log.Print(nextLog)
+ lastLog = nextLog
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("Error waiting for Event Status '%s' of %s %v action '%s': %w", EventFinished, titledEntityType, id, action, ctx.Err())
+ }
+ }
+}
+
+// WaitForImageStatus waits for the Image to reach the desired state
+// before returning. It will timeout with an error after timeoutSeconds.
+func (client Client) WaitForImageStatus(ctx context.Context, imageID string, status ImageStatus, timeoutSeconds int) (*Image, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ image, err := client.GetImage(ctx, imageID)
+ if err != nil {
+ return image, err
+ }
+ complete := image.Status == status
+
+ if complete {
+ return image, nil
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("failed to wait for Image %s status %s: %w", imageID, status, ctx.Err())
+ }
+ }
+}
+
+// WaitForImageRegionStatus waits for an Image's replica to reach the desired state
+// before returning.
+func (client Client) WaitForImageRegionStatus(ctx context.Context, imageID, region string, status ImageRegionStatus) (*Image, error) {
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ image, err := client.GetImage(ctx, imageID)
+ if err != nil {
+ return image, err
+ }
+
+ replicaIdx := slices.IndexFunc(
+ image.Regions,
+ func(r ImageRegion) bool {
+ return r.Region == region
+ },
+ )
+
+ // If no replica was found or the status doesn't match, try again
+ if replicaIdx < 0 || image.Regions[replicaIdx].Status != status {
+ continue
+ }
+
+ return image, nil
+
+ case <-ctx.Done():
+ return nil, fmt.Errorf("failed to wait for Image %s status %s: %w", imageID, status, ctx.Err())
+ }
+ }
+}
+
+// WaitForMySQLDatabaseBackup waits for the backup with the given label to be available.
+func (client Client) WaitForMySQLDatabaseBackup(ctx context.Context, dbID int, label string, timeoutSeconds int) (*MySQLDatabaseBackup, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ backups, err := client.ListMySQLDatabaseBackups(ctx, dbID, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ for _, backup := range backups {
+ if backup.Label == label {
+ return &backup, nil
+ }
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("failed to wait for backup %s: %w", label, ctx.Err())
+ }
+ }
+}
+
+// WaitForPostgresDatabaseBackup waits for the backup with the given label to be available.
+func (client Client) WaitForPostgresDatabaseBackup(ctx context.Context, dbID int, label string, timeoutSeconds int) (*PostgresDatabaseBackup, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ backups, err := client.ListPostgresDatabaseBackups(ctx, dbID, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ for _, backup := range backups {
+ if backup.Label == label {
+ return &backup, nil
+ }
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("failed to wait for backup %s: %w", label, ctx.Err())
+ }
+ }
+}
+
+type databaseStatusFunc func(ctx context.Context, client Client, dbID int) (DatabaseStatus, error)
+
+var databaseStatusHandlers = map[DatabaseEngineType]databaseStatusFunc{
+ DatabaseEngineTypeMySQL: func(ctx context.Context, client Client, dbID int) (DatabaseStatus, error) {
+ db, err := client.GetMySQLDatabase(ctx, dbID)
+ if err != nil {
+ return "", err
+ }
+
+ return db.Status, nil
+ },
+ DatabaseEngineTypePostgres: func(ctx context.Context, client Client, dbID int) (DatabaseStatus, error) {
+ db, err := client.GetPostgresDatabase(ctx, dbID)
+ if err != nil {
+ return "", err
+ }
+
+ return db.Status, nil
+ },
+}
+
+// WaitForDatabaseStatus waits for the provided database to have the given status.
+func (client Client) WaitForDatabaseStatus(
+ ctx context.Context, dbID int, dbEngine DatabaseEngineType, status DatabaseStatus, timeoutSeconds int,
+) error {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ for {
+ select {
+ case <-ticker.C:
+ statusHandler, ok := databaseStatusHandlers[dbEngine]
+ if !ok {
+ return fmt.Errorf("invalid db engine: %s", dbEngine)
+ }
+
+ currentStatus, err := statusHandler(ctx, client, dbID)
+ if err != nil {
+ return fmt.Errorf("failed to get db status: %w", err)
+ }
+
+ if currentStatus == status {
+ return nil
+ }
+ case <-ctx.Done():
+ return fmt.Errorf("failed to wait for database %d status: %w", dbID, ctx.Err())
+ }
+ }
+}
+
+// NewEventPoller initializes a new Linode event poller. This should be run before the event is triggered as it stores
+// the previous state of the entity's events.
+func (client Client) NewEventPoller(
+ ctx context.Context, id any, entityType EntityType, action EventAction,
+) (*EventPoller, error) {
+ result := EventPoller{
+ EntityID: id,
+ EntityType: entityType,
+ Action: action,
+
+ client: client,
+ }
+
+ if err := result.PreTask(ctx); err != nil {
+ return nil, fmt.Errorf("failed to run pretask: %w", err)
+ }
+
+ return &result, nil
+}
+
+// NewEventPollerWithSecondary initializes a new Linode event poller with for events with a
+// specific secondary entity.
+func (client Client) NewEventPollerWithSecondary(
+ ctx context.Context, id any, primaryEntityType EntityType, secondaryID int, action EventAction,
+) (*EventPoller, error) {
+ poller, err := client.NewEventPoller(ctx, id, primaryEntityType, action)
+ if err != nil {
+ return nil, err
+ }
+
+ poller.SecondaryEntityID = secondaryID
+
+ return poller, nil
+}
+
+// NewEventPollerWithoutEntity initializes a new Linode event poller without a target entity ID.
+// This is useful for create events where the ID of the entity is not yet known.
+// For example:
+// p, _ := client.NewEventPollerWithoutEntity(...)
+// inst, _ := client.CreateInstance(...)
+// p.EntityID = inst.ID
+// ...
+func (client Client) NewEventPollerWithoutEntity(entityType EntityType, action EventAction) (*EventPoller, error) {
+ result := EventPoller{
+ EntityType: entityType,
+ Action: action,
+ EntityID: 0,
+ previousEvents: make(map[int]bool, 0),
+
+ client: client,
+ }
+
+ return &result, nil
+}
+
+// PreTask stores all current events for the given entity to prevent them from being
+// processed on subsequent runs.
+func (p *EventPoller) PreTask(ctx context.Context) error {
+ f := Filter{
+ OrderBy: "created",
+ Order: Descending,
+ }
+ f.AddField(Eq, "entity.type", p.EntityType)
+ f.AddField(Eq, "entity.id", p.EntityID)
+ f.AddField(Eq, "action", p.Action)
+
+ fBytes, err := f.MarshalJSON()
+ if err != nil {
+ return err
+ }
+
+ events, err := p.client.ListEvents(ctx, &ListOptions{
+ Filter: string(fBytes),
+ PageOptions: &PageOptions{Page: 1},
+ })
+ if err != nil {
+ return fmt.Errorf("failed to list events: %w", err)
+ }
+
+ eventIDs := make(map[int]bool, len(events))
+ for _, event := range events {
+ eventIDs[event.ID] = true
+ }
+
+ p.previousEvents = eventIDs
+
+ return nil
+}
+
+func (p *EventPoller) WaitForLatestUnknownEvent(ctx context.Context) (*Event, error) {
+ ticker := time.NewTicker(p.client.pollInterval)
+ defer ticker.Stop()
+
+ f := Filter{
+ OrderBy: "created",
+ Order: Descending,
+ }
+ f.AddField(Eq, "entity.type", p.EntityType)
+ f.AddField(Eq, "entity.id", p.EntityID)
+ f.AddField(Eq, "action", p.Action)
+
+ fBytes, err := f.MarshalJSON()
+ if err != nil {
+ return nil, err
+ }
+
+ listOpts := ListOptions{
+ Filter: string(fBytes),
+ PageOptions: &PageOptions{Page: 1},
+ }
+
+ for {
+ select {
+ case <-ticker.C:
+ events, err := p.client.ListEvents(ctx, &listOpts)
+ if err != nil {
+ return nil, fmt.Errorf("failed to list events: %w", err)
+ }
+
+ for _, event := range events {
+ if p.SecondaryEntityID != nil && !eventMatchesSecondary(p.SecondaryEntityID, event) {
+ continue
+ }
+
+ if _, ok := p.previousEvents[event.ID]; !ok {
+ // Store this event so it is no longer picked up
+ // on subsequent jobs
+ p.previousEvents[event.ID] = true
+
+ return &event, nil
+ }
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("failed to wait for event: %w", ctx.Err())
+ }
+ }
+}
+
+// WaitForFinished waits for a new event to be finished.
+func (p *EventPoller) WaitForFinished(
+ ctx context.Context, timeoutSeconds int,
+) (*Event, error) {
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(p.client.pollInterval)
+ defer ticker.Stop()
+
+ event, err := p.WaitForLatestUnknownEvent(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("failed to wait for event: %w", err)
+ }
+
+ for {
+ select {
+ case <-ticker.C:
+ event, err := p.client.GetEvent(ctx, event.ID)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get event: %w", err)
+ }
+
+ switch event.Status {
+ case EventFinished:
+ return event, nil
+ case EventFailed:
+ return nil, fmt.Errorf("event %d has failed", event.ID)
+ case EventScheduled, EventStarted, EventNotification:
+ continue
+ }
+ case <-ctx.Done():
+ return nil, fmt.Errorf("failed to wait for event finished: %w", ctx.Err())
+ }
+ }
+}
+
+// WaitForResourceFree waits for a resource to have no running events.
+func (client Client) WaitForResourceFree(
+ ctx context.Context, entityType EntityType, entityID any, timeoutSeconds int,
+) error {
+ apiFilter := Filter{
+ Order: Descending,
+ OrderBy: "created",
+ }
+ apiFilter.AddField(Eq, "entity.id", entityID)
+ apiFilter.AddField(Eq, "entity.type", entityType)
+
+ filterStr, err := apiFilter.MarshalJSON()
+ if err != nil {
+ return fmt.Errorf("failed to create filter: %s", err)
+ }
+
+ ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
+ defer cancel()
+
+ ticker := time.NewTicker(client.pollInterval)
+ defer ticker.Stop()
+
+ // A helper function to determine whether a resource is busy
+ checkIsBusy := func(events []Event) bool {
+ for _, event := range events {
+ if event.Status == EventStarted || event.Status == EventScheduled {
+ return true
+ }
+ }
+
+ return false
+ }
+
+ for {
+ select {
+ case <-ticker.C:
+ events, err := client.ListEvents(ctx, &ListOptions{
+ Filter: string(filterStr),
+ })
+ if err != nil {
+ return fmt.Errorf("failed to list events: %s", err)
+ }
+
+ if !checkIsBusy(events) {
+ return nil
+ }
+
+ case <-ctx.Done():
+ return fmt.Errorf("failed to wait for resource free: %s", ctx.Err())
+ }
+ }
+}
+
+// eventMatchesSecondary returns whether the given event's secondary entity
+// matches the configured secondary ID.
+// This logic has been broken out to improve readability.
+func eventMatchesSecondary(configuredID any, e Event) bool {
+ // We should return false if the event has no secondary entity.
+ // e.g. A previous disk deletion has completed.
+ if e.SecondaryEntity == nil {
+ return false
+ }
+
+ secondaryID := e.SecondaryEntity.ID
+
+ // Evil hack to correct IDs parsed as floats
+ if value, ok := secondaryID.(float64); ok {
+ secondaryID = int(value)
+ }
+
+ return secondaryID == configuredID
+}
diff --git a/vendor/golang.org/x/crypto/LICENSE b/vendor/golang.org/x/crypto/LICENSE
index 6a66aea5..2a7cf70d 100644
--- a/vendor/golang.org/x/crypto/LICENSE
+++ b/vendor/golang.org/x/crypto/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
+Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google Inc. nor the names of its
+ * Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go
index 93da7322..8cf5d811 100644
--- a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go
+++ b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go
@@ -5,7 +5,7 @@
// Package chacha20poly1305 implements the ChaCha20-Poly1305 AEAD and its
// extended nonce variant XChaCha20-Poly1305, as specified in RFC 8439 and
// draft-irtf-cfrg-xchacha-01.
-package chacha20poly1305 // import "golang.org/x/crypto/chacha20poly1305"
+package chacha20poly1305
import (
"crypto/cipher"
diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s
index 731d2ac6..fd5ee845 100644
--- a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s
+++ b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s
@@ -1,2715 +1,9762 @@
-// Copyright 2016 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.
-
-// This file was originally from https://golang.org/cl/24717 by Vlad Krasnov of CloudFlare.
+// Code generated by command: go run chacha20poly1305_amd64_asm.go -out ../chacha20poly1305_amd64.s -pkg chacha20poly1305. DO NOT EDIT.
//go:build gc && !purego
#include "textflag.h"
-// General register allocation
-#define oup DI
-#define inp SI
-#define inl BX
-#define adp CX // free to reuse, after we hash the additional data
-#define keyp R8 // free to reuse, when we copy the key to stack
-#define itr2 R9 // general iterator
-#define itr1 CX // general iterator
-#define acc0 R10
-#define acc1 R11
-#define acc2 R12
-#define t0 R13
-#define t1 R14
-#define t2 R15
-#define t3 R8
-// Register and stack allocation for the SSE code
-#define rStore (0*16)(BP)
-#define sStore (1*16)(BP)
-#define state1Store (2*16)(BP)
-#define state2Store (3*16)(BP)
-#define tmpStore (4*16)(BP)
-#define ctr0Store (5*16)(BP)
-#define ctr1Store (6*16)(BP)
-#define ctr2Store (7*16)(BP)
-#define ctr3Store (8*16)(BP)
-#define A0 X0
-#define A1 X1
-#define A2 X2
-#define B0 X3
-#define B1 X4
-#define B2 X5
-#define C0 X6
-#define C1 X7
-#define C2 X8
-#define D0 X9
-#define D1 X10
-#define D2 X11
-#define T0 X12
-#define T1 X13
-#define T2 X14
-#define T3 X15
-#define A3 T0
-#define B3 T1
-#define C3 T2
-#define D3 T3
-// Register and stack allocation for the AVX2 code
-#define rsStoreAVX2 (0*32)(BP)
-#define state1StoreAVX2 (1*32)(BP)
-#define state2StoreAVX2 (2*32)(BP)
-#define ctr0StoreAVX2 (3*32)(BP)
-#define ctr1StoreAVX2 (4*32)(BP)
-#define ctr2StoreAVX2 (5*32)(BP)
-#define ctr3StoreAVX2 (6*32)(BP)
-#define tmpStoreAVX2 (7*32)(BP) // 256 bytes on stack
-#define AA0 Y0
-#define AA1 Y5
-#define AA2 Y6
-#define AA3 Y7
-#define BB0 Y14
-#define BB1 Y9
-#define BB2 Y10
-#define BB3 Y11
-#define CC0 Y12
-#define CC1 Y13
-#define CC2 Y8
-#define CC3 Y15
-#define DD0 Y4
-#define DD1 Y1
-#define DD2 Y2
-#define DD3 Y3
-#define TT0 DD3
-#define TT1 AA3
-#define TT2 BB3
-#define TT3 CC3
-// ChaCha20 constants
-DATA Β·chacha20Constants<>+0x00(SB)/4, $0x61707865
-DATA Β·chacha20Constants<>+0x04(SB)/4, $0x3320646e
-DATA Β·chacha20Constants<>+0x08(SB)/4, $0x79622d32
-DATA Β·chacha20Constants<>+0x0c(SB)/4, $0x6b206574
-DATA Β·chacha20Constants<>+0x10(SB)/4, $0x61707865
-DATA Β·chacha20Constants<>+0x14(SB)/4, $0x3320646e
-DATA Β·chacha20Constants<>+0x18(SB)/4, $0x79622d32
-DATA Β·chacha20Constants<>+0x1c(SB)/4, $0x6b206574
-// <<< 16 with PSHUFB
-DATA Β·rol16<>+0x00(SB)/8, $0x0504070601000302
-DATA Β·rol16<>+0x08(SB)/8, $0x0D0C0F0E09080B0A
-DATA Β·rol16<>+0x10(SB)/8, $0x0504070601000302
-DATA Β·rol16<>+0x18(SB)/8, $0x0D0C0F0E09080B0A
-// <<< 8 with PSHUFB
-DATA Β·rol8<>+0x00(SB)/8, $0x0605040702010003
-DATA Β·rol8<>+0x08(SB)/8, $0x0E0D0C0F0A09080B
-DATA Β·rol8<>+0x10(SB)/8, $0x0605040702010003
-DATA Β·rol8<>+0x18(SB)/8, $0x0E0D0C0F0A09080B
-
-DATA Β·avx2InitMask<>+0x00(SB)/8, $0x0
-DATA Β·avx2InitMask<>+0x08(SB)/8, $0x0
-DATA Β·avx2InitMask<>+0x10(SB)/8, $0x1
-DATA Β·avx2InitMask<>+0x18(SB)/8, $0x0
-
-DATA Β·avx2IncMask<>+0x00(SB)/8, $0x2
-DATA Β·avx2IncMask<>+0x08(SB)/8, $0x0
-DATA Β·avx2IncMask<>+0x10(SB)/8, $0x2
-DATA Β·avx2IncMask<>+0x18(SB)/8, $0x0
-// Poly1305 key clamp
-DATA Β·polyClampMask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF
-DATA Β·polyClampMask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC
-DATA Β·polyClampMask<>+0x10(SB)/8, $0xFFFFFFFFFFFFFFFF
-DATA Β·polyClampMask<>+0x18(SB)/8, $0xFFFFFFFFFFFFFFFF
-
-DATA Β·sseIncMask<>+0x00(SB)/8, $0x1
-DATA Β·sseIncMask<>+0x08(SB)/8, $0x0
-// To load/store the last < 16 bytes in a buffer
-DATA Β·andMask<>+0x00(SB)/8, $0x00000000000000ff
-DATA Β·andMask<>+0x08(SB)/8, $0x0000000000000000
-DATA Β·andMask<>+0x10(SB)/8, $0x000000000000ffff
-DATA Β·andMask<>+0x18(SB)/8, $0x0000000000000000
-DATA Β·andMask<>+0x20(SB)/8, $0x0000000000ffffff
-DATA Β·andMask<>+0x28(SB)/8, $0x0000000000000000
-DATA Β·andMask<>+0x30(SB)/8, $0x00000000ffffffff
-DATA Β·andMask<>+0x38(SB)/8, $0x0000000000000000
-DATA Β·andMask<>+0x40(SB)/8, $0x000000ffffffffff
-DATA Β·andMask<>+0x48(SB)/8, $0x0000000000000000
-DATA Β·andMask<>+0x50(SB)/8, $0x0000ffffffffffff
-DATA Β·andMask<>+0x58(SB)/8, $0x0000000000000000
-DATA Β·andMask<>+0x60(SB)/8, $0x00ffffffffffffff
-DATA Β·andMask<>+0x68(SB)/8, $0x0000000000000000
-DATA Β·andMask<>+0x70(SB)/8, $0xffffffffffffffff
-DATA Β·andMask<>+0x78(SB)/8, $0x0000000000000000
-DATA Β·andMask<>+0x80(SB)/8, $0xffffffffffffffff
-DATA Β·andMask<>+0x88(SB)/8, $0x00000000000000ff
-DATA Β·andMask<>+0x90(SB)/8, $0xffffffffffffffff
-DATA Β·andMask<>+0x98(SB)/8, $0x000000000000ffff
-DATA Β·andMask<>+0xa0(SB)/8, $0xffffffffffffffff
-DATA Β·andMask<>+0xa8(SB)/8, $0x0000000000ffffff
-DATA Β·andMask<>+0xb0(SB)/8, $0xffffffffffffffff
-DATA Β·andMask<>+0xb8(SB)/8, $0x00000000ffffffff
-DATA Β·andMask<>+0xc0(SB)/8, $0xffffffffffffffff
-DATA Β·andMask<>+0xc8(SB)/8, $0x000000ffffffffff
-DATA Β·andMask<>+0xd0(SB)/8, $0xffffffffffffffff
-DATA Β·andMask<>+0xd8(SB)/8, $0x0000ffffffffffff
-DATA Β·andMask<>+0xe0(SB)/8, $0xffffffffffffffff
-DATA Β·andMask<>+0xe8(SB)/8, $0x00ffffffffffffff
-
-GLOBL Β·chacha20Constants<>(SB), (NOPTR+RODATA), $32
-GLOBL Β·rol16<>(SB), (NOPTR+RODATA), $32
-GLOBL Β·rol8<>(SB), (NOPTR+RODATA), $32
-GLOBL Β·sseIncMask<>(SB), (NOPTR+RODATA), $16
-GLOBL Β·avx2IncMask<>(SB), (NOPTR+RODATA), $32
-GLOBL Β·avx2InitMask<>(SB), (NOPTR+RODATA), $32
-GLOBL Β·polyClampMask<>(SB), (NOPTR+RODATA), $32
-GLOBL Β·andMask<>(SB), (NOPTR+RODATA), $240
-// No PALIGNR in Go ASM yet (but VPALIGNR is present).
-#define shiftB0Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x04 // PALIGNR $4, X3, X3
-#define shiftB1Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xe4; BYTE $0x04 // PALIGNR $4, X4, X4
-#define shiftB2Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x04 // PALIGNR $4, X5, X5
-#define shiftB3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x04 // PALIGNR $4, X13, X13
-#define shiftC0Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xf6; BYTE $0x08 // PALIGNR $8, X6, X6
-#define shiftC1Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x08 // PALIGNR $8, X7, X7
-#define shiftC2Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc0; BYTE $0x08 // PALIGNR $8, X8, X8
-#define shiftC3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xf6; BYTE $0x08 // PALIGNR $8, X14, X14
-#define shiftD0Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc9; BYTE $0x0c // PALIGNR $12, X9, X9
-#define shiftD1Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xd2; BYTE $0x0c // PALIGNR $12, X10, X10
-#define shiftD2Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x0c // PALIGNR $12, X11, X11
-#define shiftD3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x0c // PALIGNR $12, X15, X15
-#define shiftB0Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x0c // PALIGNR $12, X3, X3
-#define shiftB1Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xe4; BYTE $0x0c // PALIGNR $12, X4, X4
-#define shiftB2Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x0c // PALIGNR $12, X5, X5
-#define shiftB3Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x0c // PALIGNR $12, X13, X13
-#define shiftC0Right shiftC0Left
-#define shiftC1Right shiftC1Left
-#define shiftC2Right shiftC2Left
-#define shiftC3Right shiftC3Left
-#define shiftD0Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc9; BYTE $0x04 // PALIGNR $4, X9, X9
-#define shiftD1Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xd2; BYTE $0x04 // PALIGNR $4, X10, X10
-#define shiftD2Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x04 // PALIGNR $4, X11, X11
-#define shiftD3Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x04 // PALIGNR $4, X15, X15
-
-// Some macros
-
-// ROL rotates the uint32s in register R left by N bits, using temporary T.
-#define ROL(N, R, T) \
- MOVO R, T; PSLLL $(N), T; PSRLL $(32-(N)), R; PXOR T, R
-
-// ROL16 rotates the uint32s in register R left by 16, using temporary T if needed.
-#ifdef GOAMD64_v2
-#define ROL16(R, T) PSHUFB Β·rol16<>(SB), R
-#else
-#define ROL16(R, T) ROL(16, R, T)
-#endif
-
-// ROL8 rotates the uint32s in register R left by 8, using temporary T if needed.
-#ifdef GOAMD64_v2
-#define ROL8(R, T) PSHUFB Β·rol8<>(SB), R
-#else
-#define ROL8(R, T) ROL(8, R, T)
-#endif
-
-#define chachaQR(A, B, C, D, T) \
- PADDD B, A; PXOR A, D; ROL16(D, T) \
- PADDD D, C; PXOR C, B; MOVO B, T; PSLLL $12, T; PSRLL $20, B; PXOR T, B \
- PADDD B, A; PXOR A, D; ROL8(D, T) \
- PADDD D, C; PXOR C, B; MOVO B, T; PSLLL $7, T; PSRLL $25, B; PXOR T, B
-
-#define chachaQR_AVX2(A, B, C, D, T) \
- VPADDD B, A, A; VPXOR A, D, D; VPSHUFB Β·rol16<>(SB), D, D \
- VPADDD D, C, C; VPXOR C, B, B; VPSLLD $12, B, T; VPSRLD $20, B, B; VPXOR T, B, B \
- VPADDD B, A, A; VPXOR A, D, D; VPSHUFB Β·rol8<>(SB), D, D \
- VPADDD D, C, C; VPXOR C, B, B; VPSLLD $7, B, T; VPSRLD $25, B, B; VPXOR T, B, B
-
-#define polyAdd(S) ADDQ S, acc0; ADCQ 8+S, acc1; ADCQ $1, acc2
-#define polyMulStage1 MOVQ (0*8)(BP), AX; MOVQ AX, t2; MULQ acc0; MOVQ AX, t0; MOVQ DX, t1; MOVQ (0*8)(BP), AX; MULQ acc1; IMULQ acc2, t2; ADDQ AX, t1; ADCQ DX, t2
-#define polyMulStage2 MOVQ (1*8)(BP), AX; MOVQ AX, t3; MULQ acc0; ADDQ AX, t1; ADCQ $0, DX; MOVQ DX, acc0; MOVQ (1*8)(BP), AX; MULQ acc1; ADDQ AX, t2; ADCQ $0, DX
-#define polyMulStage3 IMULQ acc2, t3; ADDQ acc0, t2; ADCQ DX, t3
-#define polyMulReduceStage MOVQ t0, acc0; MOVQ t1, acc1; MOVQ t2, acc2; ANDQ $3, acc2; MOVQ t2, t0; ANDQ $-4, t0; MOVQ t3, t1; SHRQ $2, t3, t2; SHRQ $2, t3; ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $0, acc2; ADDQ t2, acc0; ADCQ t3, acc1; ADCQ $0, acc2
-
-#define polyMulStage1_AVX2 MOVQ (0*8)(BP), DX; MOVQ DX, t2; MULXQ acc0, t0, t1; IMULQ acc2, t2; MULXQ acc1, AX, DX; ADDQ AX, t1; ADCQ DX, t2
-#define polyMulStage2_AVX2 MOVQ (1*8)(BP), DX; MULXQ acc0, acc0, AX; ADDQ acc0, t1; MULXQ acc1, acc1, t3; ADCQ acc1, t2; ADCQ $0, t3
-#define polyMulStage3_AVX2 IMULQ acc2, DX; ADDQ AX, t2; ADCQ DX, t3
-
-#define polyMul polyMulStage1; polyMulStage2; polyMulStage3; polyMulReduceStage
-#define polyMulAVX2 polyMulStage1_AVX2; polyMulStage2_AVX2; polyMulStage3_AVX2; polyMulReduceStage
-// ----------------------------------------------------------------------------
+
+// func polyHashADInternal<>()
TEXT polyHashADInternal<>(SB), NOSPLIT, $0
- // adp points to beginning of additional data
- // itr2 holds ad length
- XORQ acc0, acc0
- XORQ acc1, acc1
- XORQ acc2, acc2
- CMPQ itr2, $13
- JNE hashADLoop
-
-openFastTLSAD:
- // Special treatment for the TLS case of 13 bytes
- MOVQ (adp), acc0
- MOVQ 5(adp), acc1
- SHRQ $24, acc1
- MOVQ $1, acc2
- polyMul
+ // Hack: Must declare #define macros inside of a function due to Avo constraints
+ // ROL rotates the uint32s in register R left by N bits, using temporary T.
+ #define ROL(N, R, T) \
+ MOVO R, T; \
+ PSLLL $(N), T; \
+ PSRLL $(32-(N)), R; \
+ PXOR T, R
+
+ // ROL8 rotates the uint32s in register R left by 8, using temporary T if needed.
+ #ifdef GOAMD64_v2
+ #define ROL8(R, T) PSHUFB Β·rol8<>(SB), R
+ #else
+ #define ROL8(R, T) ROL(8, R, T)
+ #endif
+
+ // ROL16 rotates the uint32s in register R left by 16, using temporary T if needed.
+ #ifdef GOAMD64_v2
+ #define ROL16(R, T) PSHUFB Β·rol16<>(SB), R
+ #else
+ #define ROL16(R, T) ROL(16, R, T)
+ #endif
+ XORQ R10, R10
+ XORQ R11, R11
+ XORQ R12, R12
+ CMPQ R9, $0x0d
+ JNE hashADLoop
+ MOVQ (CX), R10
+ MOVQ 5(CX), R11
+ SHRQ $0x18, R11
+ MOVQ $0x00000001, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
RET
hashADLoop:
// Hash in 16 byte chunks
- CMPQ itr2, $16
- JB hashADTail
- polyAdd(0(adp))
- LEAQ (1*16)(adp), adp
- SUBQ $16, itr2
- polyMul
- JMP hashADLoop
+ CMPQ R9, $0x10
+ JB hashADTail
+ ADDQ (CX), R10
+ ADCQ 8(CX), R11
+ ADCQ $0x01, R12
+ LEAQ 16(CX), CX
+ SUBQ $0x10, R9
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ JMP hashADLoop
hashADTail:
- CMPQ itr2, $0
+ CMPQ R9, $0x00
JE hashADDone
// Hash last < 16 byte tail
- XORQ t0, t0
- XORQ t1, t1
- XORQ t2, t2
- ADDQ itr2, adp
+ XORQ R13, R13
+ XORQ R14, R14
+ XORQ R15, R15
+ ADDQ R9, CX
hashADTailLoop:
- SHLQ $8, t0, t1
- SHLQ $8, t0
- MOVB -1(adp), t2
- XORQ t2, t0
- DECQ adp
- DECQ itr2
- JNE hashADTailLoop
-
-hashADTailFinish:
- ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2
- polyMul
-
- // Finished AD
+ SHLQ $0x08, R13, R14
+ SHLQ $0x08, R13
+ MOVB -1(CX), R15
+ XORQ R15, R13
+ DECQ CX
+ DECQ R9
+ JNE hashADTailLoop
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+
hashADDone:
RET
-// ----------------------------------------------------------------------------
-// func chacha20Poly1305Open(dst, key, src, ad []byte) bool
-TEXT Β·chacha20Poly1305Open(SB), 0, $288-97
+// func chacha20Poly1305Open(dst []byte, key []uint32, src []byte, ad []byte) bool
+// Requires: AVX, AVX2, BMI2, CMOV, SSE2
+TEXT Β·chacha20Poly1305Open(SB), $288-97
// For aligned stack access
MOVQ SP, BP
- ADDQ $32, BP
+ ADDQ $0x20, BP
ANDQ $-32, BP
- MOVQ dst+0(FP), oup
- MOVQ key+24(FP), keyp
- MOVQ src+48(FP), inp
- MOVQ src_len+56(FP), inl
- MOVQ ad+72(FP), adp
+ MOVQ dst_base+0(FP), DI
+ MOVQ key_base+24(FP), R8
+ MOVQ src_base+48(FP), SI
+ MOVQ src_len+56(FP), BX
+ MOVQ ad_base+72(FP), CX
// Check for AVX2 support
- CMPB Β·useAVX2(SB), $1
+ CMPB Β·useAVX2+0(SB), $0x01
JE chacha20Poly1305Open_AVX2
// Special optimization, for very short buffers
- CMPQ inl, $128
- JBE openSSE128 // About 16% faster
+ CMPQ BX, $0x80
+ JBE openSSE128
// For long buffers, prepare the poly key first
- MOVOU Β·chacha20Constants<>(SB), A0
- MOVOU (1*16)(keyp), B0
- MOVOU (2*16)(keyp), C0
- MOVOU (3*16)(keyp), D0
- MOVO D0, T1
+ MOVOU Β·chacha20Constants<>+0(SB), X0
+ MOVOU 16(R8), X3
+ MOVOU 32(R8), X6
+ MOVOU 48(R8), X9
+ MOVO X9, X13
// Store state on stack for future use
- MOVO B0, state1Store
- MOVO C0, state2Store
- MOVO D0, ctr3Store
- MOVQ $10, itr2
+ MOVO X3, 32(BP)
+ MOVO X6, 48(BP)
+ MOVO X9, 128(BP)
+ MOVQ $0x0000000a, R9
openSSEPreparePolyKey:
- chachaQR(A0, B0, C0, D0, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- chachaQR(A0, B0, C0, D0, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- DECQ itr2
- JNE openSSEPreparePolyKey
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ DECQ R9
+ JNE openSSEPreparePolyKey
// A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded
- PADDL Β·chacha20Constants<>(SB), A0; PADDL state1Store, B0
+ PADDL Β·chacha20Constants<>+0(SB), X0
+ PADDL 32(BP), X3
// Clamp and store the key
- PAND Β·polyClampMask<>(SB), A0
- MOVO A0, rStore; MOVO B0, sStore
+ PAND Β·polyClampMask<>+0(SB), X0
+ MOVO X0, (BP)
+ MOVO X3, 16(BP)
// Hash AAD
- MOVQ ad_len+80(FP), itr2
+ MOVQ ad_len+80(FP), R9
CALL polyHashADInternal<>(SB)
openSSEMainLoop:
- CMPQ inl, $256
+ CMPQ BX, $0x00000100
JB openSSEMainLoopDone
// Load state, increment counter blocks
- MOVO Β·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL Β·sseIncMask<>(SB), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL Β·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL Β·sseIncMask<>(SB), D2
- MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL Β·sseIncMask<>(SB), D3
+ MOVO Β·chacha20Constants<>+0(SB), X0
+ MOVO 32(BP), X3
+ MOVO 48(BP), X6
+ MOVO 128(BP), X9
+ PADDL Β·sseIncMask<>+0(SB), X9
+ MOVO X0, X1
+ MOVO X3, X4
+ MOVO X6, X7
+ MOVO X9, X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X1, X2
+ MOVO X4, X5
+ MOVO X7, X8
+ MOVO X10, X11
+ PADDL Β·sseIncMask<>+0(SB), X11
+ MOVO X2, X12
+ MOVO X5, X13
+ MOVO X8, X14
+ MOVO X11, X15
+ PADDL Β·sseIncMask<>+0(SB), X15
// Store counters
- MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store
+ MOVO X9, 80(BP)
+ MOVO X10, 96(BP)
+ MOVO X11, 112(BP)
+ MOVO X15, 128(BP)
- // There are 10 ChaCha20 iterations of 2QR each, so for 6 iterations we hash 2 blocks, and for the remaining 4 only 1 block - for a total of 16
- MOVQ $4, itr1
- MOVQ inp, itr2
+ // There are 10 ChaCha20 iterations of 2QR each, so for 6 iterations we hash
+ // 2 blocks, and for the remaining 4 only 1 block - for a total of 16
+ MOVQ $0x00000004, CX
+ MOVQ SI, R9
openSSEInternalLoop:
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyAdd(0(itr2))
- shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left
- shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left
- shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left
- polyMulStage1
- polyMulStage2
- LEAQ (2*8)(itr2), itr2
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- polyMulStage3
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyMulReduceStage
- shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right
- shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right
- shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right
- DECQ itr1
- JGE openSSEInternalLoop
-
- polyAdd(0(itr2))
- polyMul
- LEAQ (2*8)(itr2), itr2
-
- CMPQ itr1, $-6
- JG openSSEInternalLoop
+ MOVO X14, 64(BP)
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X3
+ PXOR X14, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X3
+ PXOR X14, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X4
+ PXOR X14, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X4
+ PXOR X14, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X5
+ PXOR X14, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X5
+ PXOR X14, X5
+ MOVO 64(BP), X14
+ MOVO X7, 64(BP)
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL16(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x0c, X7
+ PSRLL $0x14, X13
+ PXOR X7, X13
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL8(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x07, X7
+ PSRLL $0x19, X13
+ PXOR X7, X13
+ MOVO 64(BP), X7
+ ADDQ (R9), R10
+ ADCQ 8(R9), R11
+ ADCQ $0x01, R12
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x0c
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ LEAQ 16(R9), R9
+ MOVO X14, 64(BP)
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X3
+ PXOR X14, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X3
+ PXOR X14, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X4
+ PXOR X14, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X4
+ PXOR X14, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X5
+ PXOR X14, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X5
+ PXOR X14, X5
+ MOVO 64(BP), X14
+ MOVO X7, 64(BP)
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL16(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x0c, X7
+ PSRLL $0x14, X13
+ PXOR X7, X13
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL8(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x07, X7
+ PSRLL $0x19, X13
+ PXOR X7, X13
+ MOVO 64(BP), X7
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x04
+ DECQ CX
+ JGE openSSEInternalLoop
+ ADDQ (R9), R10
+ ADCQ 8(R9), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(R9), R9
+ CMPQ CX, $-6
+ JG openSSEInternalLoop
// Add in the state
- PADDD Β·chacha20Constants<>(SB), A0; PADDD Β·chacha20Constants<>(SB), A1; PADDD Β·chacha20Constants<>(SB), A2; PADDD Β·chacha20Constants<>(SB), A3
- PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3
- PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3
- PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3
+ PADDD Β·chacha20Constants<>+0(SB), X0
+ PADDD Β·chacha20Constants<>+0(SB), X1
+ PADDD Β·chacha20Constants<>+0(SB), X2
+ PADDD Β·chacha20Constants<>+0(SB), X12
+ PADDD 32(BP), X3
+ PADDD 32(BP), X4
+ PADDD 32(BP), X5
+ PADDD 32(BP), X13
+ PADDD 48(BP), X6
+ PADDD 48(BP), X7
+ PADDD 48(BP), X8
+ PADDD 48(BP), X14
+ PADDD 80(BP), X9
+ PADDD 96(BP), X10
+ PADDD 112(BP), X11
+ PADDD 128(BP), X15
// Load - xor - store
- MOVO D3, tmpStore
- MOVOU (0*16)(inp), D3; PXOR D3, A0; MOVOU A0, (0*16)(oup)
- MOVOU (1*16)(inp), D3; PXOR D3, B0; MOVOU B0, (1*16)(oup)
- MOVOU (2*16)(inp), D3; PXOR D3, C0; MOVOU C0, (2*16)(oup)
- MOVOU (3*16)(inp), D3; PXOR D3, D0; MOVOU D0, (3*16)(oup)
- MOVOU (4*16)(inp), D0; PXOR D0, A1; MOVOU A1, (4*16)(oup)
- MOVOU (5*16)(inp), D0; PXOR D0, B1; MOVOU B1, (5*16)(oup)
- MOVOU (6*16)(inp), D0; PXOR D0, C1; MOVOU C1, (6*16)(oup)
- MOVOU (7*16)(inp), D0; PXOR D0, D1; MOVOU D1, (7*16)(oup)
- MOVOU (8*16)(inp), D0; PXOR D0, A2; MOVOU A2, (8*16)(oup)
- MOVOU (9*16)(inp), D0; PXOR D0, B2; MOVOU B2, (9*16)(oup)
- MOVOU (10*16)(inp), D0; PXOR D0, C2; MOVOU C2, (10*16)(oup)
- MOVOU (11*16)(inp), D0; PXOR D0, D2; MOVOU D2, (11*16)(oup)
- MOVOU (12*16)(inp), D0; PXOR D0, A3; MOVOU A3, (12*16)(oup)
- MOVOU (13*16)(inp), D0; PXOR D0, B3; MOVOU B3, (13*16)(oup)
- MOVOU (14*16)(inp), D0; PXOR D0, C3; MOVOU C3, (14*16)(oup)
- MOVOU (15*16)(inp), D0; PXOR tmpStore, D0; MOVOU D0, (15*16)(oup)
- LEAQ 256(inp), inp
- LEAQ 256(oup), oup
- SUBQ $256, inl
+ MOVO X15, 64(BP)
+ MOVOU (SI), X15
+ PXOR X15, X0
+ MOVOU X0, (DI)
+ MOVOU 16(SI), X15
+ PXOR X15, X3
+ MOVOU X3, 16(DI)
+ MOVOU 32(SI), X15
+ PXOR X15, X6
+ MOVOU X6, 32(DI)
+ MOVOU 48(SI), X15
+ PXOR X15, X9
+ MOVOU X9, 48(DI)
+ MOVOU 64(SI), X9
+ PXOR X9, X1
+ MOVOU X1, 64(DI)
+ MOVOU 80(SI), X9
+ PXOR X9, X4
+ MOVOU X4, 80(DI)
+ MOVOU 96(SI), X9
+ PXOR X9, X7
+ MOVOU X7, 96(DI)
+ MOVOU 112(SI), X9
+ PXOR X9, X10
+ MOVOU X10, 112(DI)
+ MOVOU 128(SI), X9
+ PXOR X9, X2
+ MOVOU X2, 128(DI)
+ MOVOU 144(SI), X9
+ PXOR X9, X5
+ MOVOU X5, 144(DI)
+ MOVOU 160(SI), X9
+ PXOR X9, X8
+ MOVOU X8, 160(DI)
+ MOVOU 176(SI), X9
+ PXOR X9, X11
+ MOVOU X11, 176(DI)
+ MOVOU 192(SI), X9
+ PXOR X9, X12
+ MOVOU X12, 192(DI)
+ MOVOU 208(SI), X9
+ PXOR X9, X13
+ MOVOU X13, 208(DI)
+ MOVOU 224(SI), X9
+ PXOR X9, X14
+ MOVOU X14, 224(DI)
+ MOVOU 240(SI), X9
+ PXOR 64(BP), X9
+ MOVOU X9, 240(DI)
+ LEAQ 256(SI), SI
+ LEAQ 256(DI), DI
+ SUBQ $0x00000100, BX
JMP openSSEMainLoop
openSSEMainLoopDone:
// Handle the various tail sizes efficiently
- TESTQ inl, inl
+ TESTQ BX, BX
JE openSSEFinalize
- CMPQ inl, $64
+ CMPQ BX, $0x40
JBE openSSETail64
- CMPQ inl, $128
+ CMPQ BX, $0x80
JBE openSSETail128
- CMPQ inl, $192
+ CMPQ BX, $0xc0
JBE openSSETail192
JMP openSSETail256
openSSEFinalize:
// Hash in the PT, AAD lengths
- ADDQ ad_len+80(FP), acc0; ADCQ src_len+56(FP), acc1; ADCQ $1, acc2
- polyMul
+ ADDQ ad_len+80(FP), R10
+ ADCQ src_len+56(FP), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
// Final reduce
- MOVQ acc0, t0
- MOVQ acc1, t1
- MOVQ acc2, t2
- SUBQ $-5, acc0
- SBBQ $-1, acc1
- SBBQ $3, acc2
- CMOVQCS t0, acc0
- CMOVQCS t1, acc1
- CMOVQCS t2, acc2
+ MOVQ R10, R13
+ MOVQ R11, R14
+ MOVQ R12, R15
+ SUBQ $-5, R10
+ SBBQ $-1, R11
+ SBBQ $0x03, R12
+ CMOVQCS R13, R10
+ CMOVQCS R14, R11
+ CMOVQCS R15, R12
// Add in the "s" part of the key
- ADDQ 0+sStore, acc0
- ADCQ 8+sStore, acc1
+ ADDQ 16(BP), R10
+ ADCQ 24(BP), R11
// Finally, constant time compare to the tag at the end of the message
XORQ AX, AX
- MOVQ $1, DX
- XORQ (0*8)(inp), acc0
- XORQ (1*8)(inp), acc1
- ORQ acc1, acc0
+ MOVQ $0x00000001, DX
+ XORQ (SI), R10
+ XORQ 8(SI), R11
+ ORQ R11, R10
CMOVQEQ DX, AX
// Return true iff tags are equal
MOVB AX, ret+96(FP)
RET
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 129 bytes
openSSE128:
- // For up to 128 bytes of ciphertext and 64 bytes for the poly key, we require to process three blocks
- MOVOU Β·chacha20Constants<>(SB), A0; MOVOU (1*16)(keyp), B0; MOVOU (2*16)(keyp), C0; MOVOU (3*16)(keyp), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL Β·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL Β·sseIncMask<>(SB), D2
- MOVO B0, T1; MOVO C0, T2; MOVO D1, T3
- MOVQ $10, itr2
+ MOVOU Β·chacha20Constants<>+0(SB), X0
+ MOVOU 16(R8), X3
+ MOVOU 32(R8), X6
+ MOVOU 48(R8), X9
+ MOVO X0, X1
+ MOVO X3, X4
+ MOVO X6, X7
+ MOVO X9, X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X1, X2
+ MOVO X4, X5
+ MOVO X7, X8
+ MOVO X10, X11
+ PADDL Β·sseIncMask<>+0(SB), X11
+ MOVO X3, X13
+ MOVO X6, X14
+ MOVO X10, X15
+ MOVQ $0x0000000a, R9
openSSE128InnerCipherLoop:
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Left; shiftB1Left; shiftB2Left
- shiftC0Left; shiftC1Left; shiftC2Left
- shiftD0Left; shiftD1Left; shiftD2Left
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Right; shiftB1Right; shiftB2Right
- shiftC0Right; shiftC1Right; shiftC2Right
- shiftD0Right; shiftD1Right; shiftD2Right
- DECQ itr2
- JNE openSSE128InnerCipherLoop
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X5
+ PXOR X12, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X5
+ PXOR X12, X5
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X5
+ PXOR X12, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X5
+ PXOR X12, X5
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ DECQ R9
+ JNE openSSE128InnerCipherLoop
// A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded
- PADDL Β·chacha20Constants<>(SB), A0; PADDL Β·chacha20Constants<>(SB), A1; PADDL Β·chacha20Constants<>(SB), A2
- PADDL T1, B0; PADDL T1, B1; PADDL T1, B2
- PADDL T2, C1; PADDL T2, C2
- PADDL T3, D1; PADDL Β·sseIncMask<>(SB), T3; PADDL T3, D2
+ PADDL Β·chacha20Constants<>+0(SB), X0
+ PADDL Β·chacha20Constants<>+0(SB), X1
+ PADDL Β·chacha20Constants<>+0(SB), X2
+ PADDL X13, X3
+ PADDL X13, X4
+ PADDL X13, X5
+ PADDL X14, X7
+ PADDL X14, X8
+ PADDL X15, X10
+ PADDL Β·sseIncMask<>+0(SB), X15
+ PADDL X15, X11
// Clamp and store the key
- PAND Β·polyClampMask<>(SB), A0
- MOVOU A0, rStore; MOVOU B0, sStore
+ PAND Β·polyClampMask<>+0(SB), X0
+ MOVOU X0, (BP)
+ MOVOU X3, 16(BP)
// Hash
- MOVQ ad_len+80(FP), itr2
+ MOVQ ad_len+80(FP), R9
CALL polyHashADInternal<>(SB)
openSSE128Open:
- CMPQ inl, $16
+ CMPQ BX, $0x10
JB openSSETail16
- SUBQ $16, inl
+ SUBQ $0x10, BX
// Load for hashing
- polyAdd(0(inp))
+ ADDQ (SI), R10
+ ADCQ 8(SI), R11
+ ADCQ $0x01, R12
// Load for decryption
- MOVOU (inp), T0; PXOR T0, A1; MOVOU A1, (oup)
- LEAQ (1*16)(inp), inp
- LEAQ (1*16)(oup), oup
- polyMul
+ MOVOU (SI), X12
+ PXOR X12, X1
+ MOVOU X1, (DI)
+ LEAQ 16(SI), SI
+ LEAQ 16(DI), DI
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
// Shift the stream "left"
- MOVO B1, A1
- MOVO C1, B1
- MOVO D1, C1
- MOVO A2, D1
- MOVO B2, A2
- MOVO C2, B2
- MOVO D2, C2
+ MOVO X4, X1
+ MOVO X7, X4
+ MOVO X10, X7
+ MOVO X2, X10
+ MOVO X5, X2
+ MOVO X8, X5
+ MOVO X11, X8
JMP openSSE128Open
openSSETail16:
- TESTQ inl, inl
+ TESTQ BX, BX
JE openSSEFinalize
// We can safely load the CT from the end, because it is padded with the MAC
- MOVQ inl, itr2
- SHLQ $4, itr2
- LEAQ Β·andMask<>(SB), t0
- MOVOU (inp), T0
- ADDQ inl, inp
- PAND -16(t0)(itr2*1), T0
- MOVO T0, 0+tmpStore
- MOVQ T0, t0
- MOVQ 8+tmpStore, t1
- PXOR A1, T0
+ MOVQ BX, R9
+ SHLQ $0x04, R9
+ LEAQ Β·andMask<>+0(SB), R13
+ MOVOU (SI), X12
+ ADDQ BX, SI
+ PAND -16(R13)(R9*1), X12
+ MOVO X12, 64(BP)
+ MOVQ X12, R13
+ MOVQ 72(BP), R14
+ PXOR X1, X12
// We can only store one byte at a time, since plaintext can be shorter than 16 bytes
openSSETail16Store:
- MOVQ T0, t3
- MOVB t3, (oup)
- PSRLDQ $1, T0
- INCQ oup
- DECQ inl
+ MOVQ X12, R8
+ MOVB R8, (DI)
+ PSRLDQ $0x01, X12
+ INCQ DI
+ DECQ BX
JNE openSSETail16Store
- ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2
- polyMul
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
JMP openSSEFinalize
-// ----------------------------------------------------------------------------
-// Special optimization for the last 64 bytes of ciphertext
openSSETail64:
- // Need to decrypt up to 64 bytes - prepare single block
- MOVO Β·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL Β·sseIncMask<>(SB), D0; MOVO D0, ctr0Store
- XORQ itr2, itr2
- MOVQ inl, itr1
- CMPQ itr1, $16
- JB openSSETail64LoopB
+ MOVO Β·chacha20Constants<>+0(SB), X0
+ MOVO 32(BP), X3
+ MOVO 48(BP), X6
+ MOVO 128(BP), X9
+ PADDL Β·sseIncMask<>+0(SB), X9
+ MOVO X9, 80(BP)
+ XORQ R9, R9
+ MOVQ BX, CX
+ CMPQ CX, $0x10
+ JB openSSETail64LoopB
openSSETail64LoopA:
- // Perform ChaCha rounds, while hashing the remaining input
- polyAdd(0(inp)(itr2*1))
- polyMul
- SUBQ $16, itr1
+ ADDQ (SI)(R9*1), R10
+ ADCQ 8(SI)(R9*1), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ SUBQ $0x10, CX
openSSETail64LoopB:
- ADDQ $16, itr2
- chachaQR(A0, B0, C0, D0, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- chachaQR(A0, B0, C0, D0, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
-
- CMPQ itr1, $16
- JAE openSSETail64LoopA
-
- CMPQ itr2, $160
- JNE openSSETail64LoopB
-
- PADDL Β·chacha20Constants<>(SB), A0; PADDL state1Store, B0; PADDL state2Store, C0; PADDL ctr0Store, D0
+ ADDQ $0x10, R9
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ CMPQ CX, $0x10
+ JAE openSSETail64LoopA
+ CMPQ R9, $0xa0
+ JNE openSSETail64LoopB
+ PADDL Β·chacha20Constants<>+0(SB), X0
+ PADDL 32(BP), X3
+ PADDL 48(BP), X6
+ PADDL 80(BP), X9
openSSETail64DecLoop:
- CMPQ inl, $16
+ CMPQ BX, $0x10
JB openSSETail64DecLoopDone
- SUBQ $16, inl
- MOVOU (inp), T0
- PXOR T0, A0
- MOVOU A0, (oup)
- LEAQ 16(inp), inp
- LEAQ 16(oup), oup
- MOVO B0, A0
- MOVO C0, B0
- MOVO D0, C0
+ SUBQ $0x10, BX
+ MOVOU (SI), X12
+ PXOR X12, X0
+ MOVOU X0, (DI)
+ LEAQ 16(SI), SI
+ LEAQ 16(DI), DI
+ MOVO X3, X0
+ MOVO X6, X3
+ MOVO X9, X6
JMP openSSETail64DecLoop
openSSETail64DecLoopDone:
- MOVO A0, A1
+ MOVO X0, X1
JMP openSSETail16
-// ----------------------------------------------------------------------------
-// Special optimization for the last 128 bytes of ciphertext
openSSETail128:
- // Need to decrypt up to 128 bytes - prepare two blocks
- MOVO Β·chacha20Constants<>(SB), A1; MOVO state1Store, B1; MOVO state2Store, C1; MOVO ctr3Store, D1; PADDL Β·sseIncMask<>(SB), D1; MOVO D1, ctr0Store
- MOVO A1, A0; MOVO B1, B0; MOVO C1, C0; MOVO D1, D0; PADDL Β·sseIncMask<>(SB), D0; MOVO D0, ctr1Store
- XORQ itr2, itr2
- MOVQ inl, itr1
- ANDQ $-16, itr1
+ MOVO Β·chacha20Constants<>+0(SB), X1
+ MOVO 32(BP), X4
+ MOVO 48(BP), X7
+ MOVO 128(BP), X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X10, 80(BP)
+ MOVO X1, X0
+ MOVO X4, X3
+ MOVO X7, X6
+ MOVO X10, X9
+ PADDL Β·sseIncMask<>+0(SB), X9
+ MOVO X9, 96(BP)
+ XORQ R9, R9
+ MOVQ BX, CX
+ ANDQ $-16, CX
openSSETail128LoopA:
- // Perform ChaCha rounds, while hashing the remaining input
- polyAdd(0(inp)(itr2*1))
- polyMul
+ ADDQ (SI)(R9*1), R10
+ ADCQ 8(SI)(R9*1), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
openSSETail128LoopB:
- ADDQ $16, itr2
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- shiftB1Left; shiftC1Left; shiftD1Left
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- shiftB1Right; shiftC1Right; shiftD1Right
-
- CMPQ itr2, itr1
- JB openSSETail128LoopA
-
- CMPQ itr2, $160
- JNE openSSETail128LoopB
-
- PADDL Β·chacha20Constants<>(SB), A0; PADDL Β·chacha20Constants<>(SB), A1
- PADDL state1Store, B0; PADDL state1Store, B1
- PADDL state2Store, C0; PADDL state2Store, C1
- PADDL ctr1Store, D0; PADDL ctr0Store, D1
-
- MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3
- PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1
- MOVOU A1, (0*16)(oup); MOVOU B1, (1*16)(oup); MOVOU C1, (2*16)(oup); MOVOU D1, (3*16)(oup)
-
- SUBQ $64, inl
- LEAQ 64(inp), inp
- LEAQ 64(oup), oup
- JMP openSSETail64DecLoop
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 192 bytes of ciphertext
+ ADDQ $0x10, R9
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ CMPQ R9, CX
+ JB openSSETail128LoopA
+ CMPQ R9, $0xa0
+ JNE openSSETail128LoopB
+ PADDL Β·chacha20Constants<>+0(SB), X0
+ PADDL Β·chacha20Constants<>+0(SB), X1
+ PADDL 32(BP), X3
+ PADDL 32(BP), X4
+ PADDL 48(BP), X6
+ PADDL 48(BP), X7
+ PADDL 96(BP), X9
+ PADDL 80(BP), X10
+ MOVOU (SI), X12
+ MOVOU 16(SI), X13
+ MOVOU 32(SI), X14
+ MOVOU 48(SI), X15
+ PXOR X12, X1
+ PXOR X13, X4
+ PXOR X14, X7
+ PXOR X15, X10
+ MOVOU X1, (DI)
+ MOVOU X4, 16(DI)
+ MOVOU X7, 32(DI)
+ MOVOU X10, 48(DI)
+ SUBQ $0x40, BX
+ LEAQ 64(SI), SI
+ LEAQ 64(DI), DI
+ JMP openSSETail64DecLoop
+
openSSETail192:
- // Need to decrypt up to 192 bytes - prepare three blocks
- MOVO Β·chacha20Constants<>(SB), A2; MOVO state1Store, B2; MOVO state2Store, C2; MOVO ctr3Store, D2; PADDL Β·sseIncMask<>(SB), D2; MOVO D2, ctr0Store
- MOVO A2, A1; MOVO B2, B1; MOVO C2, C1; MOVO D2, D1; PADDL Β·sseIncMask<>(SB), D1; MOVO D1, ctr1Store
- MOVO A1, A0; MOVO B1, B0; MOVO C1, C0; MOVO D1, D0; PADDL Β·sseIncMask<>(SB), D0; MOVO D0, ctr2Store
-
- MOVQ inl, itr1
- MOVQ $160, itr2
- CMPQ itr1, $160
- CMOVQGT itr2, itr1
- ANDQ $-16, itr1
- XORQ itr2, itr2
+ MOVO Β·chacha20Constants<>+0(SB), X2
+ MOVO 32(BP), X5
+ MOVO 48(BP), X8
+ MOVO 128(BP), X11
+ PADDL Β·sseIncMask<>+0(SB), X11
+ MOVO X11, 80(BP)
+ MOVO X2, X1
+ MOVO X5, X4
+ MOVO X8, X7
+ MOVO X11, X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X10, 96(BP)
+ MOVO X1, X0
+ MOVO X4, X3
+ MOVO X7, X6
+ MOVO X10, X9
+ PADDL Β·sseIncMask<>+0(SB), X9
+ MOVO X9, 112(BP)
+ MOVQ BX, CX
+ MOVQ $0x000000a0, R9
+ CMPQ CX, $0xa0
+ CMOVQGT R9, CX
+ ANDQ $-16, CX
+ XORQ R9, R9
openSSLTail192LoopA:
- // Perform ChaCha rounds, while hashing the remaining input
- polyAdd(0(inp)(itr2*1))
- polyMul
+ ADDQ (SI)(R9*1), R10
+ ADCQ 8(SI)(R9*1), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
openSSLTail192LoopB:
- ADDQ $16, itr2
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- shiftB1Left; shiftC1Left; shiftD1Left
- shiftB2Left; shiftC2Left; shiftD2Left
-
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- shiftB1Right; shiftC1Right; shiftD1Right
- shiftB2Right; shiftC2Right; shiftD2Right
-
- CMPQ itr2, itr1
- JB openSSLTail192LoopA
-
- CMPQ itr2, $160
- JNE openSSLTail192LoopB
-
- CMPQ inl, $176
- JB openSSLTail192Store
-
- polyAdd(160(inp))
- polyMul
-
- CMPQ inl, $192
- JB openSSLTail192Store
-
- polyAdd(176(inp))
- polyMul
+ ADDQ $0x10, R9
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X5
+ PXOR X12, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X5
+ PXOR X12, X5
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X5
+ PXOR X12, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X5
+ PXOR X12, X5
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ CMPQ R9, CX
+ JB openSSLTail192LoopA
+ CMPQ R9, $0xa0
+ JNE openSSLTail192LoopB
+ CMPQ BX, $0xb0
+ JB openSSLTail192Store
+ ADDQ 160(SI), R10
+ ADCQ 168(SI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ CMPQ BX, $0xc0
+ JB openSSLTail192Store
+ ADDQ 176(SI), R10
+ ADCQ 184(SI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
openSSLTail192Store:
- PADDL Β·chacha20Constants<>(SB), A0; PADDL Β·chacha20Constants<>(SB), A1; PADDL Β·chacha20Constants<>(SB), A2
- PADDL state1Store, B0; PADDL state1Store, B1; PADDL state1Store, B2
- PADDL state2Store, C0; PADDL state2Store, C1; PADDL state2Store, C2
- PADDL ctr2Store, D0; PADDL ctr1Store, D1; PADDL ctr0Store, D2
-
- MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3
- PXOR T0, A2; PXOR T1, B2; PXOR T2, C2; PXOR T3, D2
- MOVOU A2, (0*16)(oup); MOVOU B2, (1*16)(oup); MOVOU C2, (2*16)(oup); MOVOU D2, (3*16)(oup)
-
- MOVOU (4*16)(inp), T0; MOVOU (5*16)(inp), T1; MOVOU (6*16)(inp), T2; MOVOU (7*16)(inp), T3
- PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1
- MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup)
-
- SUBQ $128, inl
- LEAQ 128(inp), inp
- LEAQ 128(oup), oup
- JMP openSSETail64DecLoop
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 256 bytes of ciphertext
+ PADDL Β·chacha20Constants<>+0(SB), X0
+ PADDL Β·chacha20Constants<>+0(SB), X1
+ PADDL Β·chacha20Constants<>+0(SB), X2
+ PADDL 32(BP), X3
+ PADDL 32(BP), X4
+ PADDL 32(BP), X5
+ PADDL 48(BP), X6
+ PADDL 48(BP), X7
+ PADDL 48(BP), X8
+ PADDL 112(BP), X9
+ PADDL 96(BP), X10
+ PADDL 80(BP), X11
+ MOVOU (SI), X12
+ MOVOU 16(SI), X13
+ MOVOU 32(SI), X14
+ MOVOU 48(SI), X15
+ PXOR X12, X2
+ PXOR X13, X5
+ PXOR X14, X8
+ PXOR X15, X11
+ MOVOU X2, (DI)
+ MOVOU X5, 16(DI)
+ MOVOU X8, 32(DI)
+ MOVOU X11, 48(DI)
+ MOVOU 64(SI), X12
+ MOVOU 80(SI), X13
+ MOVOU 96(SI), X14
+ MOVOU 112(SI), X15
+ PXOR X12, X1
+ PXOR X13, X4
+ PXOR X14, X7
+ PXOR X15, X10
+ MOVOU X1, 64(DI)
+ MOVOU X4, 80(DI)
+ MOVOU X7, 96(DI)
+ MOVOU X10, 112(DI)
+ SUBQ $0x80, BX
+ LEAQ 128(SI), SI
+ LEAQ 128(DI), DI
+ JMP openSSETail64DecLoop
+
openSSETail256:
- // Need to decrypt up to 256 bytes - prepare four blocks
- MOVO Β·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL Β·sseIncMask<>(SB), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL Β·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL Β·sseIncMask<>(SB), D2
- MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL Β·sseIncMask<>(SB), D3
+ MOVO Β·chacha20Constants<>+0(SB), X0
+ MOVO 32(BP), X3
+ MOVO 48(BP), X6
+ MOVO 128(BP), X9
+ PADDL Β·sseIncMask<>+0(SB), X9
+ MOVO X0, X1
+ MOVO X3, X4
+ MOVO X6, X7
+ MOVO X9, X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X1, X2
+ MOVO X4, X5
+ MOVO X7, X8
+ MOVO X10, X11
+ PADDL Β·sseIncMask<>+0(SB), X11
+ MOVO X2, X12
+ MOVO X5, X13
+ MOVO X8, X14
+ MOVO X11, X15
+ PADDL Β·sseIncMask<>+0(SB), X15
// Store counters
- MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store
- XORQ itr2, itr2
+ MOVO X9, 80(BP)
+ MOVO X10, 96(BP)
+ MOVO X11, 112(BP)
+ MOVO X15, 128(BP)
+ XORQ R9, R9
openSSETail256Loop:
- // This loop inteleaves 8 ChaCha quarter rounds with 1 poly multiplication
- polyAdd(0(inp)(itr2*1))
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left
- shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left
- shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left
- polyMulStage1
- polyMulStage2
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyMulStage3
- polyMulReduceStage
- shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right
- shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right
- shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right
- ADDQ $2*8, itr2
- CMPQ itr2, $160
- JB openSSETail256Loop
- MOVQ inl, itr1
- ANDQ $-16, itr1
+ ADDQ (SI)(R9*1), R10
+ ADCQ 8(SI)(R9*1), R11
+ ADCQ $0x01, R12
+ MOVO X14, 64(BP)
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X3
+ PXOR X14, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X3
+ PXOR X14, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X4
+ PXOR X14, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X4
+ PXOR X14, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X5
+ PXOR X14, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X5
+ PXOR X14, X5
+ MOVO 64(BP), X14
+ MOVO X7, 64(BP)
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL16(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x0c, X7
+ PSRLL $0x14, X13
+ PXOR X7, X13
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL8(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x07, X7
+ PSRLL $0x19, X13
+ PXOR X7, X13
+ MOVO 64(BP), X7
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x0c
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ MOVO X14, 64(BP)
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X3
+ PXOR X14, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X3
+ PXOR X14, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X4
+ PXOR X14, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X4
+ PXOR X14, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X5
+ PXOR X14, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X5
+ PXOR X14, X5
+ MOVO 64(BP), X14
+ MOVO X7, 64(BP)
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL16(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x0c, X7
+ PSRLL $0x14, X13
+ PXOR X7, X13
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL8(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x07, X7
+ PSRLL $0x19, X13
+ PXOR X7, X13
+ MOVO 64(BP), X7
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x04
+ ADDQ $0x10, R9
+ CMPQ R9, $0xa0
+ JB openSSETail256Loop
+ MOVQ BX, CX
+ ANDQ $-16, CX
openSSETail256HashLoop:
- polyAdd(0(inp)(itr2*1))
- polyMul
- ADDQ $2*8, itr2
- CMPQ itr2, itr1
- JB openSSETail256HashLoop
+ ADDQ (SI)(R9*1), R10
+ ADCQ 8(SI)(R9*1), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ ADDQ $0x10, R9
+ CMPQ R9, CX
+ JB openSSETail256HashLoop
// Add in the state
- PADDD Β·chacha20Constants<>(SB), A0; PADDD Β·chacha20Constants<>(SB), A1; PADDD Β·chacha20Constants<>(SB), A2; PADDD Β·chacha20Constants<>(SB), A3
- PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3
- PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3
- PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3
- MOVO D3, tmpStore
+ PADDD Β·chacha20Constants<>+0(SB), X0
+ PADDD Β·chacha20Constants<>+0(SB), X1
+ PADDD Β·chacha20Constants<>+0(SB), X2
+ PADDD Β·chacha20Constants<>+0(SB), X12
+ PADDD 32(BP), X3
+ PADDD 32(BP), X4
+ PADDD 32(BP), X5
+ PADDD 32(BP), X13
+ PADDD 48(BP), X6
+ PADDD 48(BP), X7
+ PADDD 48(BP), X8
+ PADDD 48(BP), X14
+ PADDD 80(BP), X9
+ PADDD 96(BP), X10
+ PADDD 112(BP), X11
+ PADDD 128(BP), X15
+ MOVO X15, 64(BP)
// Load - xor - store
- MOVOU (0*16)(inp), D3; PXOR D3, A0
- MOVOU (1*16)(inp), D3; PXOR D3, B0
- MOVOU (2*16)(inp), D3; PXOR D3, C0
- MOVOU (3*16)(inp), D3; PXOR D3, D0
- MOVOU A0, (0*16)(oup)
- MOVOU B0, (1*16)(oup)
- MOVOU C0, (2*16)(oup)
- MOVOU D0, (3*16)(oup)
- MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0
- PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1
- MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup)
- MOVOU (8*16)(inp), A0; MOVOU (9*16)(inp), B0; MOVOU (10*16)(inp), C0; MOVOU (11*16)(inp), D0
- PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2
- MOVOU A2, (8*16)(oup); MOVOU B2, (9*16)(oup); MOVOU C2, (10*16)(oup); MOVOU D2, (11*16)(oup)
- LEAQ 192(inp), inp
- LEAQ 192(oup), oup
- SUBQ $192, inl
- MOVO A3, A0
- MOVO B3, B0
- MOVO C3, C0
- MOVO tmpStore, D0
-
- JMP openSSETail64DecLoop
-
-// ----------------------------------------------------------------------------
-// ------------------------- AVX2 Code ----------------------------------------
+ MOVOU (SI), X15
+ PXOR X15, X0
+ MOVOU 16(SI), X15
+ PXOR X15, X3
+ MOVOU 32(SI), X15
+ PXOR X15, X6
+ MOVOU 48(SI), X15
+ PXOR X15, X9
+ MOVOU X0, (DI)
+ MOVOU X3, 16(DI)
+ MOVOU X6, 32(DI)
+ MOVOU X9, 48(DI)
+ MOVOU 64(SI), X0
+ MOVOU 80(SI), X3
+ MOVOU 96(SI), X6
+ MOVOU 112(SI), X9
+ PXOR X0, X1
+ PXOR X3, X4
+ PXOR X6, X7
+ PXOR X9, X10
+ MOVOU X1, 64(DI)
+ MOVOU X4, 80(DI)
+ MOVOU X7, 96(DI)
+ MOVOU X10, 112(DI)
+ MOVOU 128(SI), X0
+ MOVOU 144(SI), X3
+ MOVOU 160(SI), X6
+ MOVOU 176(SI), X9
+ PXOR X0, X2
+ PXOR X3, X5
+ PXOR X6, X8
+ PXOR X9, X11
+ MOVOU X2, 128(DI)
+ MOVOU X5, 144(DI)
+ MOVOU X8, 160(DI)
+ MOVOU X11, 176(DI)
+ LEAQ 192(SI), SI
+ LEAQ 192(DI), DI
+ SUBQ $0xc0, BX
+ MOVO X12, X0
+ MOVO X13, X3
+ MOVO X14, X6
+ MOVO 64(BP), X9
+ JMP openSSETail64DecLoop
+
chacha20Poly1305Open_AVX2:
VZEROUPPER
- VMOVDQU Β·chacha20Constants<>(SB), AA0
- BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x70; BYTE $0x10 // broadcasti128 16(r8), ymm14
- BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x20 // broadcasti128 32(r8), ymm12
- BYTE $0xc4; BYTE $0xc2; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x30 // broadcasti128 48(r8), ymm4
- VPADDD Β·avx2InitMask<>(SB), DD0, DD0
+ VMOVDQU Β·chacha20Constants<>+0(SB), Y0
+ BYTE $0xc4
+ BYTE $0x42
+ BYTE $0x7d
+ BYTE $0x5a
+ BYTE $0x70
+ BYTE $0x10
+ BYTE $0xc4
+ BYTE $0x42
+ BYTE $0x7d
+ BYTE $0x5a
+ BYTE $0x60
+ BYTE $0x20
+ BYTE $0xc4
+ BYTE $0xc2
+ BYTE $0x7d
+ BYTE $0x5a
+ BYTE $0x60
+ BYTE $0x30
+ VPADDD Β·avx2InitMask<>+0(SB), Y4, Y4
// Special optimization, for very short buffers
- CMPQ inl, $192
+ CMPQ BX, $0xc0
JBE openAVX2192
- CMPQ inl, $320
+ CMPQ BX, $0x00000140
JBE openAVX2320
// For the general key prepare the key first - as a byproduct we have 64 bytes of cipher stream
- VMOVDQA BB0, state1StoreAVX2
- VMOVDQA CC0, state2StoreAVX2
- VMOVDQA DD0, ctr3StoreAVX2
- MOVQ $10, itr2
+ VMOVDQA Y14, 32(BP)
+ VMOVDQA Y12, 64(BP)
+ VMOVDQA Y4, 192(BP)
+ MOVQ $0x0000000a, R9
openAVX2PreparePolyKey:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0
- DECQ itr2
- JNE openAVX2PreparePolyKey
-
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0
- VPADDD state1StoreAVX2, BB0, BB0
- VPADDD state2StoreAVX2, CC0, CC0
- VPADDD ctr3StoreAVX2, DD0, DD0
-
- VPERM2I128 $0x02, AA0, BB0, TT0
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x04, Y4, Y4, Y4
+ DECQ R9
+ JNE openAVX2PreparePolyKey
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 192(BP), Y4, Y4
+ VPERM2I128 $0x02, Y0, Y14, Y3
// Clamp and store poly key
- VPAND Β·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
+ VPAND Β·polyClampMask<>+0(SB), Y3, Y3
+ VMOVDQA Y3, (BP)
// Stream for the first 64 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
+ VPERM2I128 $0x13, Y0, Y14, Y0
+ VPERM2I128 $0x13, Y12, Y4, Y14
// Hash AD + first 64 bytes
- MOVQ ad_len+80(FP), itr2
+ MOVQ ad_len+80(FP), R9
CALL polyHashADInternal<>(SB)
- XORQ itr1, itr1
+ XORQ CX, CX
openAVX2InitialHash64:
- polyAdd(0(inp)(itr1*1))
- polyMulAVX2
- ADDQ $16, itr1
- CMPQ itr1, $64
- JNE openAVX2InitialHash64
+ ADDQ (SI)(CX*1), R10
+ ADCQ 8(SI)(CX*1), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ ADDQ $0x10, CX
+ CMPQ CX, $0x40
+ JNE openAVX2InitialHash64
// Decrypt the first 64 bytes
- VPXOR (0*32)(inp), AA0, AA0
- VPXOR (1*32)(inp), BB0, BB0
- VMOVDQU AA0, (0*32)(oup)
- VMOVDQU BB0, (1*32)(oup)
- LEAQ (2*32)(inp), inp
- LEAQ (2*32)(oup), oup
- SUBQ $64, inl
+ VPXOR (SI), Y0, Y0
+ VPXOR 32(SI), Y14, Y14
+ VMOVDQU Y0, (DI)
+ VMOVDQU Y14, 32(DI)
+ LEAQ 64(SI), SI
+ LEAQ 64(DI), DI
+ SUBQ $0x40, BX
openAVX2MainLoop:
- CMPQ inl, $512
+ CMPQ BX, $0x00000200
JB openAVX2MainLoopDone
// Load state, increment counter blocks, store the incremented counters
- VMOVDQU Β·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0; VPADDD Β·avx2IncMask<>(SB), DD0, DD0; VPADDD Β·avx2IncMask<>(SB), DD0, DD1; VPADDD Β·avx2IncMask<>(SB), DD1, DD2; VPADDD Β·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
- XORQ itr1, itr1
+ VMOVDQU Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA Y0, Y5
+ VMOVDQA Y0, Y6
+ VMOVDQA Y0, Y7
+ VMOVDQA 32(BP), Y14
+ VMOVDQA Y14, Y9
+ VMOVDQA Y14, Y10
+ VMOVDQA Y14, Y11
+ VMOVDQA 64(BP), Y12
+ VMOVDQA Y12, Y13
+ VMOVDQA Y12, Y8
+ VMOVDQA Y12, Y15
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VPADDD Β·avx2IncMask<>+0(SB), Y2, Y3
+ VMOVDQA Y4, 96(BP)
+ VMOVDQA Y1, 128(BP)
+ VMOVDQA Y2, 160(BP)
+ VMOVDQA Y3, 192(BP)
+ XORQ CX, CX
openAVX2InternalLoop:
- // Lets just say this spaghetti loop interleaves 2 quarter rounds with 3 poly multiplications
- // Effectively per 512 bytes of stream we hash 480 bytes of ciphertext
- polyAdd(0*8(inp)(itr1*1))
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- polyMulStage1_AVX2
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol16<>(SB), DD0, DD0; VPSHUFB Β·rol16<>(SB), DD1, DD1; VPSHUFB Β·rol16<>(SB), DD2, DD2; VPSHUFB Β·rol16<>(SB), DD3, DD3
- polyMulStage2_AVX2
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyMulStage3_AVX2
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulReduceStage
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol8<>(SB), DD0, DD0; VPSHUFB Β·rol8<>(SB), DD1, DD1; VPSHUFB Β·rol8<>(SB), DD2, DD2; VPSHUFB Β·rol8<>(SB), DD3, DD3
- polyAdd(2*8(inp)(itr1*1))
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- polyMulStage1_AVX2
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulStage2_AVX2
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- polyMulStage3_AVX2
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol16<>(SB), DD0, DD0; VPSHUFB Β·rol16<>(SB), DD1, DD1; VPSHUFB Β·rol16<>(SB), DD2, DD2; VPSHUFB Β·rol16<>(SB), DD3, DD3
- polyMulReduceStage
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyAdd(4*8(inp)(itr1*1))
- LEAQ (6*8)(itr1), itr1
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulStage1_AVX2
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- polyMulStage2_AVX2
- VPSHUFB Β·rol8<>(SB), DD0, DD0; VPSHUFB Β·rol8<>(SB), DD1, DD1; VPSHUFB Β·rol8<>(SB), DD2, DD2; VPSHUFB Β·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- polyMulStage3_AVX2
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulReduceStage
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3
- CMPQ itr1, $480
+ ADDQ (SI)(CX*1), R10
+ ADCQ 8(SI)(CX*1), R11
+ ADCQ $0x01, R12
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x0c, Y11, Y15
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ ADDQ 16(SI)(CX*1), R10
+ ADCQ 24(SI)(CX*1), R11
+ ADCQ $0x01, R12
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x07, Y11, Y15
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x04, Y11, Y11, Y11
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ VPALIGNR $0x0c, Y3, Y3, Y3
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ ADDQ 32(SI)(CX*1), R10
+ ADCQ 40(SI)(CX*1), R11
+ ADCQ $0x01, R12
+ LEAQ 48(CX), CX
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x0c, Y11, Y15
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x07, Y11, Y15
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x0c, Y11, Y11, Y11
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x04, Y2, Y2, Y2
+ VPALIGNR $0x04, Y3, Y3, Y3
+ CMPQ CX, $0x000001e0
JNE openAVX2InternalLoop
-
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0; VPADDD Β·chacha20Constants<>(SB), AA1, AA1; VPADDD Β·chacha20Constants<>(SB), AA2, AA2; VPADDD Β·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
- VMOVDQA CC3, tmpStoreAVX2
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD Β·chacha20Constants<>+0(SB), Y6, Y6
+ VPADDD Β·chacha20Constants<>+0(SB), Y7, Y7
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 32(BP), Y10, Y10
+ VPADDD 32(BP), Y11, Y11
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 64(BP), Y13, Y13
+ VPADDD 64(BP), Y8, Y8
+ VPADDD 64(BP), Y15, Y15
+ VPADDD 96(BP), Y4, Y4
+ VPADDD 128(BP), Y1, Y1
+ VPADDD 160(BP), Y2, Y2
+ VPADDD 192(BP), Y3, Y3
+ VMOVDQA Y15, 224(BP)
// We only hashed 480 of the 512 bytes available - hash the remaining 32 here
- polyAdd(480(inp))
- polyMulAVX2
- VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0
- VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0
- VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0
- VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup)
+ ADDQ 480(SI), R10
+ ADCQ 488(SI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPERM2I128 $0x02, Y0, Y14, Y15
+ VPERM2I128 $0x13, Y0, Y14, Y14
+ VPERM2I128 $0x02, Y12, Y4, Y0
+ VPERM2I128 $0x13, Y12, Y4, Y12
+ VPXOR (SI), Y15, Y15
+ VPXOR 32(SI), Y0, Y0
+ VPXOR 64(SI), Y14, Y14
+ VPXOR 96(SI), Y12, Y12
+ VMOVDQU Y15, (DI)
+ VMOVDQU Y0, 32(DI)
+ VMOVDQU Y14, 64(DI)
+ VMOVDQU Y12, 96(DI)
+ VPERM2I128 $0x02, Y5, Y9, Y0
+ VPERM2I128 $0x02, Y13, Y1, Y14
+ VPERM2I128 $0x13, Y5, Y9, Y12
+ VPERM2I128 $0x13, Y13, Y1, Y4
+ VPXOR 128(SI), Y0, Y0
+ VPXOR 160(SI), Y14, Y14
+ VPXOR 192(SI), Y12, Y12
+ VPXOR 224(SI), Y4, Y4
+ VMOVDQU Y0, 128(DI)
+ VMOVDQU Y14, 160(DI)
+ VMOVDQU Y12, 192(DI)
+ VMOVDQU Y4, 224(DI)
// and here
- polyAdd(496(inp))
- polyMulAVX2
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0
- VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup)
- VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0
- VPXOR (12*32)(inp), AA0, AA0; VPXOR (13*32)(inp), BB0, BB0; VPXOR (14*32)(inp), CC0, CC0; VPXOR (15*32)(inp), DD0, DD0
- VMOVDQU AA0, (12*32)(oup); VMOVDQU BB0, (13*32)(oup); VMOVDQU CC0, (14*32)(oup); VMOVDQU DD0, (15*32)(oup)
- LEAQ (32*16)(inp), inp
- LEAQ (32*16)(oup), oup
- SUBQ $(32*16), inl
+ ADDQ 496(SI), R10
+ ADCQ 504(SI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPERM2I128 $0x02, Y6, Y10, Y0
+ VPERM2I128 $0x02, Y8, Y2, Y14
+ VPERM2I128 $0x13, Y6, Y10, Y12
+ VPERM2I128 $0x13, Y8, Y2, Y4
+ VPXOR 256(SI), Y0, Y0
+ VPXOR 288(SI), Y14, Y14
+ VPXOR 320(SI), Y12, Y12
+ VPXOR 352(SI), Y4, Y4
+ VMOVDQU Y0, 256(DI)
+ VMOVDQU Y14, 288(DI)
+ VMOVDQU Y12, 320(DI)
+ VMOVDQU Y4, 352(DI)
+ VPERM2I128 $0x02, Y7, Y11, Y0
+ VPERM2I128 $0x02, 224(BP), Y3, Y14
+ VPERM2I128 $0x13, Y7, Y11, Y12
+ VPERM2I128 $0x13, 224(BP), Y3, Y4
+ VPXOR 384(SI), Y0, Y0
+ VPXOR 416(SI), Y14, Y14
+ VPXOR 448(SI), Y12, Y12
+ VPXOR 480(SI), Y4, Y4
+ VMOVDQU Y0, 384(DI)
+ VMOVDQU Y14, 416(DI)
+ VMOVDQU Y12, 448(DI)
+ VMOVDQU Y4, 480(DI)
+ LEAQ 512(SI), SI
+ LEAQ 512(DI), DI
+ SUBQ $0x00000200, BX
JMP openAVX2MainLoop
openAVX2MainLoopDone:
// Handle the various tail sizes efficiently
- TESTQ inl, inl
+ TESTQ BX, BX
JE openSSEFinalize
- CMPQ inl, $128
+ CMPQ BX, $0x80
JBE openAVX2Tail128
- CMPQ inl, $256
+ CMPQ BX, $0x00000100
JBE openAVX2Tail256
- CMPQ inl, $384
+ CMPQ BX, $0x00000180
JBE openAVX2Tail384
JMP openAVX2Tail512
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 193 bytes
openAVX2192:
- // For up to 192 bytes of ciphertext and 64 bytes for the poly key, we process four blocks
- VMOVDQA AA0, AA1
- VMOVDQA BB0, BB1
- VMOVDQA CC0, CC1
- VPADDD Β·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA AA0, AA2
- VMOVDQA BB0, BB2
- VMOVDQA CC0, CC2
- VMOVDQA DD0, DD2
- VMOVDQA DD1, TT3
- MOVQ $10, itr2
+ VMOVDQA Y0, Y5
+ VMOVDQA Y14, Y9
+ VMOVDQA Y12, Y13
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VMOVDQA Y0, Y6
+ VMOVDQA Y14, Y10
+ VMOVDQA Y12, Y8
+ VMOVDQA Y4, Y2
+ VMOVDQA Y1, Y15
+ MOVQ $0x0000000a, R9
openAVX2192InnerCipherLoop:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1
- DECQ itr2
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ DECQ R9
JNE openAVX2192InnerCipherLoop
- VPADDD AA2, AA0, AA0; VPADDD AA2, AA1, AA1
- VPADDD BB2, BB0, BB0; VPADDD BB2, BB1, BB1
- VPADDD CC2, CC0, CC0; VPADDD CC2, CC1, CC1
- VPADDD DD2, DD0, DD0; VPADDD TT3, DD1, DD1
- VPERM2I128 $0x02, AA0, BB0, TT0
+ VPADDD Y6, Y0, Y0
+ VPADDD Y6, Y5, Y5
+ VPADDD Y10, Y14, Y14
+ VPADDD Y10, Y9, Y9
+ VPADDD Y8, Y12, Y12
+ VPADDD Y8, Y13, Y13
+ VPADDD Y2, Y4, Y4
+ VPADDD Y15, Y1, Y1
+ VPERM2I128 $0x02, Y0, Y14, Y3
// Clamp and store poly key
- VPAND Β·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
+ VPAND Β·polyClampMask<>+0(SB), Y3, Y3
+ VMOVDQA Y3, (BP)
// Stream for up to 192 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
- VPERM2I128 $0x02, AA1, BB1, CC0
- VPERM2I128 $0x02, CC1, DD1, DD0
- VPERM2I128 $0x13, AA1, BB1, AA1
- VPERM2I128 $0x13, CC1, DD1, BB1
+ VPERM2I128 $0x13, Y0, Y14, Y0
+ VPERM2I128 $0x13, Y12, Y4, Y14
+ VPERM2I128 $0x02, Y5, Y9, Y12
+ VPERM2I128 $0x02, Y13, Y1, Y4
+ VPERM2I128 $0x13, Y5, Y9, Y5
+ VPERM2I128 $0x13, Y13, Y1, Y9
openAVX2ShortOpen:
// Hash
- MOVQ ad_len+80(FP), itr2
+ MOVQ ad_len+80(FP), R9
CALL polyHashADInternal<>(SB)
openAVX2ShortOpenLoop:
- CMPQ inl, $32
+ CMPQ BX, $0x20
JB openAVX2ShortTail32
- SUBQ $32, inl
+ SUBQ $0x20, BX
// Load for hashing
- polyAdd(0*8(inp))
- polyMulAVX2
- polyAdd(2*8(inp))
- polyMulAVX2
+ ADDQ (SI), R10
+ ADCQ 8(SI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ ADDQ 16(SI), R10
+ ADCQ 24(SI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
// Load for decryption
- VPXOR (inp), AA0, AA0
- VMOVDQU AA0, (oup)
- LEAQ (1*32)(inp), inp
- LEAQ (1*32)(oup), oup
+ VPXOR (SI), Y0, Y0
+ VMOVDQU Y0, (DI)
+ LEAQ 32(SI), SI
+ LEAQ 32(DI), DI
// Shift stream left
- VMOVDQA BB0, AA0
- VMOVDQA CC0, BB0
- VMOVDQA DD0, CC0
- VMOVDQA AA1, DD0
- VMOVDQA BB1, AA1
- VMOVDQA CC1, BB1
- VMOVDQA DD1, CC1
- VMOVDQA AA2, DD1
- VMOVDQA BB2, AA2
+ VMOVDQA Y14, Y0
+ VMOVDQA Y12, Y14
+ VMOVDQA Y4, Y12
+ VMOVDQA Y5, Y4
+ VMOVDQA Y9, Y5
+ VMOVDQA Y13, Y9
+ VMOVDQA Y1, Y13
+ VMOVDQA Y6, Y1
+ VMOVDQA Y10, Y6
JMP openAVX2ShortOpenLoop
openAVX2ShortTail32:
- CMPQ inl, $16
- VMOVDQA A0, A1
+ CMPQ BX, $0x10
+ VMOVDQA X0, X1
JB openAVX2ShortDone
-
- SUBQ $16, inl
+ SUBQ $0x10, BX
// Load for hashing
- polyAdd(0*8(inp))
- polyMulAVX2
+ ADDQ (SI), R10
+ ADCQ 8(SI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
// Load for decryption
- VPXOR (inp), A0, T0
- VMOVDQU T0, (oup)
- LEAQ (1*16)(inp), inp
- LEAQ (1*16)(oup), oup
- VPERM2I128 $0x11, AA0, AA0, AA0
- VMOVDQA A0, A1
+ VPXOR (SI), X0, X12
+ VMOVDQU X12, (DI)
+ LEAQ 16(SI), SI
+ LEAQ 16(DI), DI
+ VPERM2I128 $0x11, Y0, Y0, Y0
+ VMOVDQA X0, X1
openAVX2ShortDone:
VZEROUPPER
JMP openSSETail16
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 321 bytes
openAVX2320:
- // For up to 320 bytes of ciphertext and 64 bytes for the poly key, we process six blocks
- VMOVDQA AA0, AA1; VMOVDQA BB0, BB1; VMOVDQA CC0, CC1; VPADDD Β·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA AA0, AA2; VMOVDQA BB0, BB2; VMOVDQA CC0, CC2; VPADDD Β·avx2IncMask<>(SB), DD1, DD2
- VMOVDQA BB0, TT1; VMOVDQA CC0, TT2; VMOVDQA DD0, TT3
- MOVQ $10, itr2
+ VMOVDQA Y0, Y5
+ VMOVDQA Y14, Y9
+ VMOVDQA Y12, Y13
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VMOVDQA Y0, Y6
+ VMOVDQA Y14, Y10
+ VMOVDQA Y12, Y8
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VMOVDQA Y14, Y7
+ VMOVDQA Y12, Y11
+ VMOVDQA Y4, Y15
+ MOVQ $0x0000000a, R9
openAVX2320InnerCipherLoop:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2
- DECQ itr2
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y3
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y3
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y3
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y3
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x04, Y2, Y2, Y2
+ DECQ R9
JNE openAVX2320InnerCipherLoop
-
- VMOVDQA Β·chacha20Constants<>(SB), TT0
- VPADDD TT0, AA0, AA0; VPADDD TT0, AA1, AA1; VPADDD TT0, AA2, AA2
- VPADDD TT1, BB0, BB0; VPADDD TT1, BB1, BB1; VPADDD TT1, BB2, BB2
- VPADDD TT2, CC0, CC0; VPADDD TT2, CC1, CC1; VPADDD TT2, CC2, CC2
- VMOVDQA Β·avx2IncMask<>(SB), TT0
- VPADDD TT3, DD0, DD0; VPADDD TT0, TT3, TT3
- VPADDD TT3, DD1, DD1; VPADDD TT0, TT3, TT3
- VPADDD TT3, DD2, DD2
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y3
+ VPADDD Y3, Y0, Y0
+ VPADDD Y3, Y5, Y5
+ VPADDD Y3, Y6, Y6
+ VPADDD Y7, Y14, Y14
+ VPADDD Y7, Y9, Y9
+ VPADDD Y7, Y10, Y10
+ VPADDD Y11, Y12, Y12
+ VPADDD Y11, Y13, Y13
+ VPADDD Y11, Y8, Y8
+ VMOVDQA Β·avx2IncMask<>+0(SB), Y3
+ VPADDD Y15, Y4, Y4
+ VPADDD Y3, Y15, Y15
+ VPADDD Y15, Y1, Y1
+ VPADDD Y3, Y15, Y15
+ VPADDD Y15, Y2, Y2
// Clamp and store poly key
- VPERM2I128 $0x02, AA0, BB0, TT0
- VPAND Β·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
+ VPERM2I128 $0x02, Y0, Y14, Y3
+ VPAND Β·polyClampMask<>+0(SB), Y3, Y3
+ VMOVDQA Y3, (BP)
// Stream for up to 320 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
- VPERM2I128 $0x02, AA1, BB1, CC0
- VPERM2I128 $0x02, CC1, DD1, DD0
- VPERM2I128 $0x13, AA1, BB1, AA1
- VPERM2I128 $0x13, CC1, DD1, BB1
- VPERM2I128 $0x02, AA2, BB2, CC1
- VPERM2I128 $0x02, CC2, DD2, DD1
- VPERM2I128 $0x13, AA2, BB2, AA2
- VPERM2I128 $0x13, CC2, DD2, BB2
+ VPERM2I128 $0x13, Y0, Y14, Y0
+ VPERM2I128 $0x13, Y12, Y4, Y14
+ VPERM2I128 $0x02, Y5, Y9, Y12
+ VPERM2I128 $0x02, Y13, Y1, Y4
+ VPERM2I128 $0x13, Y5, Y9, Y5
+ VPERM2I128 $0x13, Y13, Y1, Y9
+ VPERM2I128 $0x02, Y6, Y10, Y13
+ VPERM2I128 $0x02, Y8, Y2, Y1
+ VPERM2I128 $0x13, Y6, Y10, Y6
+ VPERM2I128 $0x13, Y8, Y2, Y10
JMP openAVX2ShortOpen
-// ----------------------------------------------------------------------------
-// Special optimization for the last 128 bytes of ciphertext
openAVX2Tail128:
// Need to decrypt up to 128 bytes - prepare two blocks
- VMOVDQA Β·chacha20Constants<>(SB), AA1
- VMOVDQA state1StoreAVX2, BB1
- VMOVDQA state2StoreAVX2, CC1
- VMOVDQA ctr3StoreAVX2, DD1
- VPADDD Β·avx2IncMask<>(SB), DD1, DD1
- VMOVDQA DD1, DD0
-
- XORQ itr2, itr2
- MOVQ inl, itr1
- ANDQ $-16, itr1
- TESTQ itr1, itr1
- JE openAVX2Tail128LoopB
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y5
+ VMOVDQA 32(BP), Y9
+ VMOVDQA 64(BP), Y13
+ VMOVDQA 192(BP), Y1
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y1
+ VMOVDQA Y1, Y4
+ XORQ R9, R9
+ MOVQ BX, CX
+ ANDQ $-16, CX
+ TESTQ CX, CX
+ JE openAVX2Tail128LoopB
openAVX2Tail128LoopA:
- // Perform ChaCha rounds, while hashing the remaining input
- polyAdd(0(inp)(itr2*1))
- polyMulAVX2
+ ADDQ (SI)(R9*1), R10
+ ADCQ 8(SI)(R9*1), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
openAVX2Tail128LoopB:
- ADDQ $16, itr2
- chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD1, DD1, DD1
- chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD1, DD1, DD1
- CMPQ itr2, itr1
- JB openAVX2Tail128LoopA
- CMPQ itr2, $160
- JNE openAVX2Tail128LoopB
-
- VPADDD Β·chacha20Constants<>(SB), AA1, AA1
- VPADDD state1StoreAVX2, BB1, BB1
- VPADDD state2StoreAVX2, CC1, CC1
- VPADDD DD0, DD1, DD1
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
+ ADDQ $0x10, R9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x04, Y1, Y1, Y1
+ CMPQ R9, CX
+ JB openAVX2Tail128LoopA
+ CMPQ R9, $0xa0
+ JNE openAVX2Tail128LoopB
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 64(BP), Y13, Y13
+ VPADDD Y4, Y1, Y1
+ VPERM2I128 $0x02, Y5, Y9, Y0
+ VPERM2I128 $0x02, Y13, Y1, Y14
+ VPERM2I128 $0x13, Y5, Y9, Y12
+ VPERM2I128 $0x13, Y13, Y1, Y4
openAVX2TailLoop:
- CMPQ inl, $32
+ CMPQ BX, $0x20
JB openAVX2Tail
- SUBQ $32, inl
+ SUBQ $0x20, BX
// Load for decryption
- VPXOR (inp), AA0, AA0
- VMOVDQU AA0, (oup)
- LEAQ (1*32)(inp), inp
- LEAQ (1*32)(oup), oup
- VMOVDQA BB0, AA0
- VMOVDQA CC0, BB0
- VMOVDQA DD0, CC0
+ VPXOR (SI), Y0, Y0
+ VMOVDQU Y0, (DI)
+ LEAQ 32(SI), SI
+ LEAQ 32(DI), DI
+ VMOVDQA Y14, Y0
+ VMOVDQA Y12, Y14
+ VMOVDQA Y4, Y12
JMP openAVX2TailLoop
openAVX2Tail:
- CMPQ inl, $16
- VMOVDQA A0, A1
+ CMPQ BX, $0x10
+ VMOVDQA X0, X1
JB openAVX2TailDone
- SUBQ $16, inl
+ SUBQ $0x10, BX
// Load for decryption
- VPXOR (inp), A0, T0
- VMOVDQU T0, (oup)
- LEAQ (1*16)(inp), inp
- LEAQ (1*16)(oup), oup
- VPERM2I128 $0x11, AA0, AA0, AA0
- VMOVDQA A0, A1
+ VPXOR (SI), X0, X12
+ VMOVDQU X12, (DI)
+ LEAQ 16(SI), SI
+ LEAQ 16(DI), DI
+ VPERM2I128 $0x11, Y0, Y0, Y0
+ VMOVDQA X0, X1
openAVX2TailDone:
VZEROUPPER
JMP openSSETail16
-// ----------------------------------------------------------------------------
-// Special optimization for the last 256 bytes of ciphertext
openAVX2Tail256:
- // Need to decrypt up to 256 bytes - prepare four blocks
- VMOVDQA Β·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA DD0, TT1
- VMOVDQA DD1, TT2
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA Y0, Y5
+ VMOVDQA 32(BP), Y14
+ VMOVDQA Y14, Y9
+ VMOVDQA 64(BP), Y12
+ VMOVDQA Y12, Y13
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VMOVDQA Y4, Y7
+ VMOVDQA Y1, Y11
// Compute the number of iterations that will hash data
- MOVQ inl, tmpStoreAVX2
- MOVQ inl, itr1
- SUBQ $128, itr1
- SHRQ $4, itr1
- MOVQ $10, itr2
- CMPQ itr1, $10
- CMOVQGT itr2, itr1
- MOVQ inp, inl
- XORQ itr2, itr2
+ MOVQ BX, 224(BP)
+ MOVQ BX, CX
+ SUBQ $0x80, CX
+ SHRQ $0x04, CX
+ MOVQ $0x0000000a, R9
+ CMPQ CX, $0x0a
+ CMOVQGT R9, CX
+ MOVQ SI, BX
+ XORQ R9, R9
openAVX2Tail256LoopA:
- polyAdd(0(inl))
- polyMulAVX2
- LEAQ 16(inl), inl
+ ADDQ (BX), R10
+ ADCQ 8(BX), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(BX), BX
- // Perform ChaCha rounds, while hashing the remaining input
openAVX2Tail256LoopB:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1
- INCQ itr2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1
- CMPQ itr2, itr1
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ INCQ R9
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ CMPQ R9, CX
JB openAVX2Tail256LoopA
+ CMPQ R9, $0x0a
+ JNE openAVX2Tail256LoopB
+ MOVQ BX, R9
+ SUBQ SI, BX
+ MOVQ BX, CX
+ MOVQ 224(BP), BX
- CMPQ itr2, $10
- JNE openAVX2Tail256LoopB
-
- MOVQ inl, itr2
- SUBQ inp, inl
- MOVQ inl, itr1
- MOVQ tmpStoreAVX2, inl
-
- // Hash the remainder of data (if any)
openAVX2Tail256Hash:
- ADDQ $16, itr1
- CMPQ itr1, inl
- JGT openAVX2Tail256HashEnd
- polyAdd (0(itr2))
- polyMulAVX2
- LEAQ 16(itr2), itr2
- JMP openAVX2Tail256Hash
-
-// Store 128 bytes safely, then go to store loop
+ ADDQ $0x10, CX
+ CMPQ CX, BX
+ JGT openAVX2Tail256HashEnd
+ ADDQ (R9), R10
+ ADCQ 8(R9), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(R9), R9
+ JMP openAVX2Tail256Hash
+
openAVX2Tail256HashEnd:
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0; VPADDD Β·chacha20Constants<>(SB), AA1, AA1
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1
- VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1
- VPERM2I128 $0x02, AA0, BB0, AA2; VPERM2I128 $0x02, CC0, DD0, BB2; VPERM2I128 $0x13, AA0, BB0, CC2; VPERM2I128 $0x13, CC0, DD0, DD2
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
-
- VPXOR (0*32)(inp), AA2, AA2; VPXOR (1*32)(inp), BB2, BB2; VPXOR (2*32)(inp), CC2, CC2; VPXOR (3*32)(inp), DD2, DD2
- VMOVDQU AA2, (0*32)(oup); VMOVDQU BB2, (1*32)(oup); VMOVDQU CC2, (2*32)(oup); VMOVDQU DD2, (3*32)(oup)
- LEAQ (4*32)(inp), inp
- LEAQ (4*32)(oup), oup
- SUBQ $4*32, inl
-
- JMP openAVX2TailLoop
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 384 bytes of ciphertext
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 64(BP), Y13, Y13
+ VPADDD Y7, Y4, Y4
+ VPADDD Y11, Y1, Y1
+ VPERM2I128 $0x02, Y0, Y14, Y6
+ VPERM2I128 $0x02, Y12, Y4, Y10
+ VPERM2I128 $0x13, Y0, Y14, Y8
+ VPERM2I128 $0x13, Y12, Y4, Y2
+ VPERM2I128 $0x02, Y5, Y9, Y0
+ VPERM2I128 $0x02, Y13, Y1, Y14
+ VPERM2I128 $0x13, Y5, Y9, Y12
+ VPERM2I128 $0x13, Y13, Y1, Y4
+ VPXOR (SI), Y6, Y6
+ VPXOR 32(SI), Y10, Y10
+ VPXOR 64(SI), Y8, Y8
+ VPXOR 96(SI), Y2, Y2
+ VMOVDQU Y6, (DI)
+ VMOVDQU Y10, 32(DI)
+ VMOVDQU Y8, 64(DI)
+ VMOVDQU Y2, 96(DI)
+ LEAQ 128(SI), SI
+ LEAQ 128(DI), DI
+ SUBQ $0x80, BX
+ JMP openAVX2TailLoop
+
openAVX2Tail384:
// Need to decrypt up to 384 bytes - prepare six blocks
- VMOVDQA Β·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD1
- VPADDD Β·avx2IncMask<>(SB), DD1, DD2
- VMOVDQA DD0, ctr0StoreAVX2
- VMOVDQA DD1, ctr1StoreAVX2
- VMOVDQA DD2, ctr2StoreAVX2
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA Y0, Y5
+ VMOVDQA Y0, Y6
+ VMOVDQA 32(BP), Y14
+ VMOVDQA Y14, Y9
+ VMOVDQA Y14, Y10
+ VMOVDQA 64(BP), Y12
+ VMOVDQA Y12, Y13
+ VMOVDQA Y12, Y8
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VMOVDQA Y4, 96(BP)
+ VMOVDQA Y1, 128(BP)
+ VMOVDQA Y2, 160(BP)
// Compute the number of iterations that will hash two blocks of data
- MOVQ inl, tmpStoreAVX2
- MOVQ inl, itr1
- SUBQ $256, itr1
- SHRQ $4, itr1
- ADDQ $6, itr1
- MOVQ $10, itr2
- CMPQ itr1, $10
- CMOVQGT itr2, itr1
- MOVQ inp, inl
- XORQ itr2, itr2
-
- // Perform ChaCha rounds, while hashing the remaining input
+ MOVQ BX, 224(BP)
+ MOVQ BX, CX
+ SUBQ $0x00000100, CX
+ SHRQ $0x04, CX
+ ADDQ $0x06, CX
+ MOVQ $0x0000000a, R9
+ CMPQ CX, $0x0a
+ CMOVQGT R9, CX
+ MOVQ SI, BX
+ XORQ R9, R9
+
openAVX2Tail384LoopB:
- polyAdd(0(inl))
- polyMulAVX2
- LEAQ 16(inl), inl
+ ADDQ (BX), R10
+ ADCQ 8(BX), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(BX), BX
openAVX2Tail384LoopA:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2
- polyAdd(0(inl))
- polyMulAVX2
- LEAQ 16(inl), inl
- INCQ itr2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2
-
- CMPQ itr2, itr1
- JB openAVX2Tail384LoopB
-
- CMPQ itr2, $10
- JNE openAVX2Tail384LoopA
-
- MOVQ inl, itr2
- SUBQ inp, inl
- MOVQ inl, itr1
- MOVQ tmpStoreAVX2, inl
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y3
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y3
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ ADDQ (BX), R10
+ ADCQ 8(BX), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(BX), BX
+ INCQ R9
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y3
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y3
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x04, Y2, Y2, Y2
+ CMPQ R9, CX
+ JB openAVX2Tail384LoopB
+ CMPQ R9, $0x0a
+ JNE openAVX2Tail384LoopA
+ MOVQ BX, R9
+ SUBQ SI, BX
+ MOVQ BX, CX
+ MOVQ 224(BP), BX
openAVX2Tail384Hash:
- ADDQ $16, itr1
- CMPQ itr1, inl
- JGT openAVX2Tail384HashEnd
- polyAdd(0(itr2))
- polyMulAVX2
- LEAQ 16(itr2), itr2
- JMP openAVX2Tail384Hash
-
-// Store 256 bytes safely, then go to store loop
+ ADDQ $0x10, CX
+ CMPQ CX, BX
+ JGT openAVX2Tail384HashEnd
+ ADDQ (R9), R10
+ ADCQ 8(R9), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(R9), R9
+ JMP openAVX2Tail384Hash
+
openAVX2Tail384HashEnd:
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0; VPADDD Β·chacha20Constants<>(SB), AA1, AA1; VPADDD Β·chacha20Constants<>(SB), AA2, AA2
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2
- VPERM2I128 $0x02, AA0, BB0, TT0; VPERM2I128 $0x02, CC0, DD0, TT1; VPERM2I128 $0x13, AA0, BB0, TT2; VPERM2I128 $0x13, CC0, DD0, TT3
- VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3
- VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, TT0; VPERM2I128 $0x02, CC1, DD1, TT1; VPERM2I128 $0x13, AA1, BB1, TT2; VPERM2I128 $0x13, CC1, DD1, TT3
- VPXOR (4*32)(inp), TT0, TT0; VPXOR (5*32)(inp), TT1, TT1; VPXOR (6*32)(inp), TT2, TT2; VPXOR (7*32)(inp), TT3, TT3
- VMOVDQU TT0, (4*32)(oup); VMOVDQU TT1, (5*32)(oup); VMOVDQU TT2, (6*32)(oup); VMOVDQU TT3, (7*32)(oup)
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- LEAQ (8*32)(inp), inp
- LEAQ (8*32)(oup), oup
- SUBQ $8*32, inl
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD Β·chacha20Constants<>+0(SB), Y6, Y6
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 32(BP), Y10, Y10
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 64(BP), Y13, Y13
+ VPADDD 64(BP), Y8, Y8
+ VPADDD 96(BP), Y4, Y4
+ VPADDD 128(BP), Y1, Y1
+ VPADDD 160(BP), Y2, Y2
+ VPERM2I128 $0x02, Y0, Y14, Y3
+ VPERM2I128 $0x02, Y12, Y4, Y7
+ VPERM2I128 $0x13, Y0, Y14, Y11
+ VPERM2I128 $0x13, Y12, Y4, Y15
+ VPXOR (SI), Y3, Y3
+ VPXOR 32(SI), Y7, Y7
+ VPXOR 64(SI), Y11, Y11
+ VPXOR 96(SI), Y15, Y15
+ VMOVDQU Y3, (DI)
+ VMOVDQU Y7, 32(DI)
+ VMOVDQU Y11, 64(DI)
+ VMOVDQU Y15, 96(DI)
+ VPERM2I128 $0x02, Y5, Y9, Y3
+ VPERM2I128 $0x02, Y13, Y1, Y7
+ VPERM2I128 $0x13, Y5, Y9, Y11
+ VPERM2I128 $0x13, Y13, Y1, Y15
+ VPXOR 128(SI), Y3, Y3
+ VPXOR 160(SI), Y7, Y7
+ VPXOR 192(SI), Y11, Y11
+ VPXOR 224(SI), Y15, Y15
+ VMOVDQU Y3, 128(DI)
+ VMOVDQU Y7, 160(DI)
+ VMOVDQU Y11, 192(DI)
+ VMOVDQU Y15, 224(DI)
+ VPERM2I128 $0x02, Y6, Y10, Y0
+ VPERM2I128 $0x02, Y8, Y2, Y14
+ VPERM2I128 $0x13, Y6, Y10, Y12
+ VPERM2I128 $0x13, Y8, Y2, Y4
+ LEAQ 256(SI), SI
+ LEAQ 256(DI), DI
+ SUBQ $0x00000100, BX
JMP openAVX2TailLoop
-// ----------------------------------------------------------------------------
-// Special optimization for the last 512 bytes of ciphertext
openAVX2Tail512:
- VMOVDQU Β·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0; VPADDD Β·avx2IncMask<>(SB), DD0, DD0; VPADDD Β·avx2IncMask<>(SB), DD0, DD1; VPADDD Β·avx2IncMask<>(SB), DD1, DD2; VPADDD Β·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
- XORQ itr1, itr1
- MOVQ inp, itr2
+ VMOVDQU Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA Y0, Y5
+ VMOVDQA Y0, Y6
+ VMOVDQA Y0, Y7
+ VMOVDQA 32(BP), Y14
+ VMOVDQA Y14, Y9
+ VMOVDQA Y14, Y10
+ VMOVDQA Y14, Y11
+ VMOVDQA 64(BP), Y12
+ VMOVDQA Y12, Y13
+ VMOVDQA Y12, Y8
+ VMOVDQA Y12, Y15
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VPADDD Β·avx2IncMask<>+0(SB), Y2, Y3
+ VMOVDQA Y4, 96(BP)
+ VMOVDQA Y1, 128(BP)
+ VMOVDQA Y2, 160(BP)
+ VMOVDQA Y3, 192(BP)
+ XORQ CX, CX
+ MOVQ SI, R9
openAVX2Tail512LoopB:
- polyAdd(0(itr2))
- polyMulAVX2
- LEAQ (2*8)(itr2), itr2
+ ADDQ (R9), R10
+ ADCQ 8(R9), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(R9), R9
openAVX2Tail512LoopA:
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol16<>(SB), DD0, DD0; VPSHUFB Β·rol16<>(SB), DD1, DD1; VPSHUFB Β·rol16<>(SB), DD2, DD2; VPSHUFB Β·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyAdd(0*8(itr2))
- polyMulAVX2
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol8<>(SB), DD0, DD0; VPSHUFB Β·rol8<>(SB), DD1, DD1; VPSHUFB Β·rol8<>(SB), DD2, DD2; VPSHUFB Β·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol16<>(SB), DD0, DD0; VPSHUFB Β·rol16<>(SB), DD1, DD1; VPSHUFB Β·rol16<>(SB), DD2, DD2; VPSHUFB Β·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyAdd(2*8(itr2))
- polyMulAVX2
- LEAQ (4*8)(itr2), itr2
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol8<>(SB), DD0, DD0; VPSHUFB Β·rol8<>(SB), DD1, DD1; VPSHUFB Β·rol8<>(SB), DD2, DD2; VPSHUFB Β·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3
- INCQ itr1
- CMPQ itr1, $4
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x0c, Y11, Y15
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ ADDQ (R9), R10
+ ADCQ 8(R9), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x07, Y11, Y15
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x04, Y11, Y11, Y11
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ VPALIGNR $0x0c, Y3, Y3, Y3
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ ADDQ 16(R9), R10
+ ADCQ 24(R9), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 32(R9), R9
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x0c, Y11, Y15
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x07, Y11, Y15
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x0c, Y11, Y11, Y11
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x04, Y2, Y2, Y2
+ VPALIGNR $0x04, Y3, Y3, Y3
+ INCQ CX
+ CMPQ CX, $0x04
JLT openAVX2Tail512LoopB
-
- CMPQ itr1, $10
- JNE openAVX2Tail512LoopA
-
- MOVQ inl, itr1
- SUBQ $384, itr1
- ANDQ $-16, itr1
+ CMPQ CX, $0x0a
+ JNE openAVX2Tail512LoopA
+ MOVQ BX, CX
+ SUBQ $0x00000180, CX
+ ANDQ $-16, CX
openAVX2Tail512HashLoop:
- TESTQ itr1, itr1
+ TESTQ CX, CX
JE openAVX2Tail512HashEnd
- polyAdd(0(itr2))
- polyMulAVX2
- LEAQ 16(itr2), itr2
- SUBQ $16, itr1
+ ADDQ (R9), R10
+ ADCQ 8(R9), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(R9), R9
+ SUBQ $0x10, CX
JMP openAVX2Tail512HashLoop
openAVX2Tail512HashEnd:
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0; VPADDD Β·chacha20Constants<>(SB), AA1, AA1; VPADDD Β·chacha20Constants<>(SB), AA2, AA2; VPADDD Β·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
- VMOVDQA CC3, tmpStoreAVX2
- VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0
- VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0
- VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0
- VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup)
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0
- VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup)
- VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0
-
- LEAQ (12*32)(inp), inp
- LEAQ (12*32)(oup), oup
- SUBQ $12*32, inl
-
- JMP openAVX2TailLoop
-
-// ----------------------------------------------------------------------------
-// ----------------------------------------------------------------------------
-// func chacha20Poly1305Seal(dst, key, src, ad []byte)
-TEXT Β·chacha20Poly1305Seal(SB), 0, $288-96
- // For aligned stack access
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD Β·chacha20Constants<>+0(SB), Y6, Y6
+ VPADDD Β·chacha20Constants<>+0(SB), Y7, Y7
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 32(BP), Y10, Y10
+ VPADDD 32(BP), Y11, Y11
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 64(BP), Y13, Y13
+ VPADDD 64(BP), Y8, Y8
+ VPADDD 64(BP), Y15, Y15
+ VPADDD 96(BP), Y4, Y4
+ VPADDD 128(BP), Y1, Y1
+ VPADDD 160(BP), Y2, Y2
+ VPADDD 192(BP), Y3, Y3
+ VMOVDQA Y15, 224(BP)
+ VPERM2I128 $0x02, Y0, Y14, Y15
+ VPERM2I128 $0x13, Y0, Y14, Y14
+ VPERM2I128 $0x02, Y12, Y4, Y0
+ VPERM2I128 $0x13, Y12, Y4, Y12
+ VPXOR (SI), Y15, Y15
+ VPXOR 32(SI), Y0, Y0
+ VPXOR 64(SI), Y14, Y14
+ VPXOR 96(SI), Y12, Y12
+ VMOVDQU Y15, (DI)
+ VMOVDQU Y0, 32(DI)
+ VMOVDQU Y14, 64(DI)
+ VMOVDQU Y12, 96(DI)
+ VPERM2I128 $0x02, Y5, Y9, Y0
+ VPERM2I128 $0x02, Y13, Y1, Y14
+ VPERM2I128 $0x13, Y5, Y9, Y12
+ VPERM2I128 $0x13, Y13, Y1, Y4
+ VPXOR 128(SI), Y0, Y0
+ VPXOR 160(SI), Y14, Y14
+ VPXOR 192(SI), Y12, Y12
+ VPXOR 224(SI), Y4, Y4
+ VMOVDQU Y0, 128(DI)
+ VMOVDQU Y14, 160(DI)
+ VMOVDQU Y12, 192(DI)
+ VMOVDQU Y4, 224(DI)
+ VPERM2I128 $0x02, Y6, Y10, Y0
+ VPERM2I128 $0x02, Y8, Y2, Y14
+ VPERM2I128 $0x13, Y6, Y10, Y12
+ VPERM2I128 $0x13, Y8, Y2, Y4
+ VPXOR 256(SI), Y0, Y0
+ VPXOR 288(SI), Y14, Y14
+ VPXOR 320(SI), Y12, Y12
+ VPXOR 352(SI), Y4, Y4
+ VMOVDQU Y0, 256(DI)
+ VMOVDQU Y14, 288(DI)
+ VMOVDQU Y12, 320(DI)
+ VMOVDQU Y4, 352(DI)
+ VPERM2I128 $0x02, Y7, Y11, Y0
+ VPERM2I128 $0x02, 224(BP), Y3, Y14
+ VPERM2I128 $0x13, Y7, Y11, Y12
+ VPERM2I128 $0x13, 224(BP), Y3, Y4
+ LEAQ 384(SI), SI
+ LEAQ 384(DI), DI
+ SUBQ $0x00000180, BX
+ JMP openAVX2TailLoop
+
+DATA Β·chacha20Constants<>+0(SB)/4, $0x61707865
+DATA Β·chacha20Constants<>+4(SB)/4, $0x3320646e
+DATA Β·chacha20Constants<>+8(SB)/4, $0x79622d32
+DATA Β·chacha20Constants<>+12(SB)/4, $0x6b206574
+DATA Β·chacha20Constants<>+16(SB)/4, $0x61707865
+DATA Β·chacha20Constants<>+20(SB)/4, $0x3320646e
+DATA Β·chacha20Constants<>+24(SB)/4, $0x79622d32
+DATA Β·chacha20Constants<>+28(SB)/4, $0x6b206574
+GLOBL Β·chacha20Constants<>(SB), RODATA|NOPTR, $32
+
+DATA Β·polyClampMask<>+0(SB)/8, $0x0ffffffc0fffffff
+DATA Β·polyClampMask<>+8(SB)/8, $0x0ffffffc0ffffffc
+DATA Β·polyClampMask<>+16(SB)/8, $0xffffffffffffffff
+DATA Β·polyClampMask<>+24(SB)/8, $0xffffffffffffffff
+GLOBL Β·polyClampMask<>(SB), RODATA|NOPTR, $32
+
+DATA Β·sseIncMask<>+0(SB)/8, $0x0000000000000001
+DATA Β·sseIncMask<>+8(SB)/8, $0x0000000000000000
+GLOBL Β·sseIncMask<>(SB), RODATA|NOPTR, $16
+
+DATA Β·andMask<>+0(SB)/8, $0x00000000000000ff
+DATA Β·andMask<>+8(SB)/8, $0x0000000000000000
+DATA Β·andMask<>+16(SB)/8, $0x000000000000ffff
+DATA Β·andMask<>+24(SB)/8, $0x0000000000000000
+DATA Β·andMask<>+32(SB)/8, $0x0000000000ffffff
+DATA Β·andMask<>+40(SB)/8, $0x0000000000000000
+DATA Β·andMask<>+48(SB)/8, $0x00000000ffffffff
+DATA Β·andMask<>+56(SB)/8, $0x0000000000000000
+DATA Β·andMask<>+64(SB)/8, $0x000000ffffffffff
+DATA Β·andMask<>+72(SB)/8, $0x0000000000000000
+DATA Β·andMask<>+80(SB)/8, $0x0000ffffffffffff
+DATA Β·andMask<>+88(SB)/8, $0x0000000000000000
+DATA Β·andMask<>+96(SB)/8, $0x00ffffffffffffff
+DATA Β·andMask<>+104(SB)/8, $0x0000000000000000
+DATA Β·andMask<>+112(SB)/8, $0xffffffffffffffff
+DATA Β·andMask<>+120(SB)/8, $0x0000000000000000
+DATA Β·andMask<>+128(SB)/8, $0xffffffffffffffff
+DATA Β·andMask<>+136(SB)/8, $0x00000000000000ff
+DATA Β·andMask<>+144(SB)/8, $0xffffffffffffffff
+DATA Β·andMask<>+152(SB)/8, $0x000000000000ffff
+DATA Β·andMask<>+160(SB)/8, $0xffffffffffffffff
+DATA Β·andMask<>+168(SB)/8, $0x0000000000ffffff
+DATA Β·andMask<>+176(SB)/8, $0xffffffffffffffff
+DATA Β·andMask<>+184(SB)/8, $0x00000000ffffffff
+DATA Β·andMask<>+192(SB)/8, $0xffffffffffffffff
+DATA Β·andMask<>+200(SB)/8, $0x000000ffffffffff
+DATA Β·andMask<>+208(SB)/8, $0xffffffffffffffff
+DATA Β·andMask<>+216(SB)/8, $0x0000ffffffffffff
+DATA Β·andMask<>+224(SB)/8, $0xffffffffffffffff
+DATA Β·andMask<>+232(SB)/8, $0x00ffffffffffffff
+GLOBL Β·andMask<>(SB), RODATA|NOPTR, $240
+
+DATA Β·avx2InitMask<>+0(SB)/8, $0x0000000000000000
+DATA Β·avx2InitMask<>+8(SB)/8, $0x0000000000000000
+DATA Β·avx2InitMask<>+16(SB)/8, $0x0000000000000001
+DATA Β·avx2InitMask<>+24(SB)/8, $0x0000000000000000
+GLOBL Β·avx2InitMask<>(SB), RODATA|NOPTR, $32
+
+DATA Β·rol16<>+0(SB)/8, $0x0504070601000302
+DATA Β·rol16<>+8(SB)/8, $0x0d0c0f0e09080b0a
+DATA Β·rol16<>+16(SB)/8, $0x0504070601000302
+DATA Β·rol16<>+24(SB)/8, $0x0d0c0f0e09080b0a
+GLOBL Β·rol16<>(SB), RODATA|NOPTR, $32
+
+DATA Β·rol8<>+0(SB)/8, $0x0605040702010003
+DATA Β·rol8<>+8(SB)/8, $0x0e0d0c0f0a09080b
+DATA Β·rol8<>+16(SB)/8, $0x0605040702010003
+DATA Β·rol8<>+24(SB)/8, $0x0e0d0c0f0a09080b
+GLOBL Β·rol8<>(SB), RODATA|NOPTR, $32
+
+DATA Β·avx2IncMask<>+0(SB)/8, $0x0000000000000002
+DATA Β·avx2IncMask<>+8(SB)/8, $0x0000000000000000
+DATA Β·avx2IncMask<>+16(SB)/8, $0x0000000000000002
+DATA Β·avx2IncMask<>+24(SB)/8, $0x0000000000000000
+GLOBL Β·avx2IncMask<>(SB), RODATA|NOPTR, $32
+
+// func chacha20Poly1305Seal(dst []byte, key []uint32, src []byte, ad []byte)
+// Requires: AVX, AVX2, BMI2, CMOV, SSE2
+TEXT Β·chacha20Poly1305Seal(SB), $288-96
MOVQ SP, BP
- ADDQ $32, BP
+ ADDQ $0x20, BP
ANDQ $-32, BP
- MOVQ dst+0(FP), oup
- MOVQ key+24(FP), keyp
- MOVQ src+48(FP), inp
- MOVQ src_len+56(FP), inl
- MOVQ ad+72(FP), adp
-
- CMPB Β·useAVX2(SB), $1
+ MOVQ dst_base+0(FP), DI
+ MOVQ key_base+24(FP), R8
+ MOVQ src_base+48(FP), SI
+ MOVQ src_len+56(FP), BX
+ MOVQ ad_base+72(FP), CX
+ CMPB Β·useAVX2+0(SB), $0x01
JE chacha20Poly1305Seal_AVX2
// Special optimization, for very short buffers
- CMPQ inl, $128
- JBE sealSSE128 // About 15% faster
+ CMPQ BX, $0x80
+ JBE sealSSE128
// In the seal case - prepare the poly key + 3 blocks of stream in the first iteration
- MOVOU Β·chacha20Constants<>(SB), A0
- MOVOU (1*16)(keyp), B0
- MOVOU (2*16)(keyp), C0
- MOVOU (3*16)(keyp), D0
+ MOVOU Β·chacha20Constants<>+0(SB), X0
+ MOVOU 16(R8), X3
+ MOVOU 32(R8), X6
+ MOVOU 48(R8), X9
// Store state on stack for future use
- MOVO B0, state1Store
- MOVO C0, state2Store
+ MOVO X3, 32(BP)
+ MOVO X6, 48(BP)
// Load state, increment counter blocks
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL Β·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL Β·sseIncMask<>(SB), D2
- MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL Β·sseIncMask<>(SB), D3
+ MOVO X0, X1
+ MOVO X3, X4
+ MOVO X6, X7
+ MOVO X9, X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X1, X2
+ MOVO X4, X5
+ MOVO X7, X8
+ MOVO X10, X11
+ PADDL Β·sseIncMask<>+0(SB), X11
+ MOVO X2, X12
+ MOVO X5, X13
+ MOVO X8, X14
+ MOVO X11, X15
+ PADDL Β·sseIncMask<>+0(SB), X15
// Store counters
- MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store
- MOVQ $10, itr2
+ MOVO X9, 80(BP)
+ MOVO X10, 96(BP)
+ MOVO X11, 112(BP)
+ MOVO X15, 128(BP)
+ MOVQ $0x0000000a, R9
sealSSEIntroLoop:
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left
- shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left
- shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left
-
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right
- shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right
- shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right
- DECQ itr2
- JNE sealSSEIntroLoop
+ MOVO X14, 64(BP)
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X3
+ PXOR X14, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X3
+ PXOR X14, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X4
+ PXOR X14, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X4
+ PXOR X14, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X5
+ PXOR X14, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X5
+ PXOR X14, X5
+ MOVO 64(BP), X14
+ MOVO X7, 64(BP)
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL16(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x0c, X7
+ PSRLL $0x14, X13
+ PXOR X7, X13
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL8(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x07, X7
+ PSRLL $0x19, X13
+ PXOR X7, X13
+ MOVO 64(BP), X7
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x0c
+ MOVO X14, 64(BP)
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X3
+ PXOR X14, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X3
+ PXOR X14, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X4
+ PXOR X14, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X4
+ PXOR X14, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X5
+ PXOR X14, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X5
+ PXOR X14, X5
+ MOVO 64(BP), X14
+ MOVO X7, 64(BP)
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL16(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x0c, X7
+ PSRLL $0x14, X13
+ PXOR X7, X13
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL8(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x07, X7
+ PSRLL $0x19, X13
+ PXOR X7, X13
+ MOVO 64(BP), X7
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x04
+ DECQ R9
+ JNE sealSSEIntroLoop
// Add in the state
- PADDD Β·chacha20Constants<>(SB), A0; PADDD Β·chacha20Constants<>(SB), A1; PADDD Β·chacha20Constants<>(SB), A2; PADDD Β·chacha20Constants<>(SB), A3
- PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3
- PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3
- PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3
+ PADDD Β·chacha20Constants<>+0(SB), X0
+ PADDD Β·chacha20Constants<>+0(SB), X1
+ PADDD Β·chacha20Constants<>+0(SB), X2
+ PADDD Β·chacha20Constants<>+0(SB), X12
+ PADDD 32(BP), X3
+ PADDD 32(BP), X4
+ PADDD 32(BP), X5
+ PADDD 32(BP), X13
+ PADDD 48(BP), X7
+ PADDD 48(BP), X8
+ PADDD 48(BP), X14
+ PADDD 96(BP), X10
+ PADDD 112(BP), X11
+ PADDD 128(BP), X15
// Clamp and store the key
- PAND Β·polyClampMask<>(SB), A0
- MOVO A0, rStore
- MOVO B0, sStore
+ PAND Β·polyClampMask<>+0(SB), X0
+ MOVO X0, (BP)
+ MOVO X3, 16(BP)
// Hash AAD
- MOVQ ad_len+80(FP), itr2
- CALL polyHashADInternal<>(SB)
-
- MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0
- PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1
- MOVOU A1, (0*16)(oup); MOVOU B1, (1*16)(oup); MOVOU C1, (2*16)(oup); MOVOU D1, (3*16)(oup)
- MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0
- PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2
- MOVOU A2, (4*16)(oup); MOVOU B2, (5*16)(oup); MOVOU C2, (6*16)(oup); MOVOU D2, (7*16)(oup)
-
- MOVQ $128, itr1
- SUBQ $128, inl
- LEAQ 128(inp), inp
-
- MOVO A3, A1; MOVO B3, B1; MOVO C3, C1; MOVO D3, D1
-
- CMPQ inl, $64
- JBE sealSSE128SealHash
-
- MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0
- PXOR A0, A3; PXOR B0, B3; PXOR C0, C3; PXOR D0, D3
- MOVOU A3, (8*16)(oup); MOVOU B3, (9*16)(oup); MOVOU C3, (10*16)(oup); MOVOU D3, (11*16)(oup)
-
- ADDQ $64, itr1
- SUBQ $64, inl
- LEAQ 64(inp), inp
-
- MOVQ $2, itr1
- MOVQ $8, itr2
-
- CMPQ inl, $64
- JBE sealSSETail64
- CMPQ inl, $128
- JBE sealSSETail128
- CMPQ inl, $192
- JBE sealSSETail192
+ MOVQ ad_len+80(FP), R9
+ CALL polyHashADInternal<>(SB)
+ MOVOU (SI), X0
+ MOVOU 16(SI), X3
+ MOVOU 32(SI), X6
+ MOVOU 48(SI), X9
+ PXOR X0, X1
+ PXOR X3, X4
+ PXOR X6, X7
+ PXOR X9, X10
+ MOVOU X1, (DI)
+ MOVOU X4, 16(DI)
+ MOVOU X7, 32(DI)
+ MOVOU X10, 48(DI)
+ MOVOU 64(SI), X0
+ MOVOU 80(SI), X3
+ MOVOU 96(SI), X6
+ MOVOU 112(SI), X9
+ PXOR X0, X2
+ PXOR X3, X5
+ PXOR X6, X8
+ PXOR X9, X11
+ MOVOU X2, 64(DI)
+ MOVOU X5, 80(DI)
+ MOVOU X8, 96(DI)
+ MOVOU X11, 112(DI)
+ MOVQ $0x00000080, CX
+ SUBQ $0x80, BX
+ LEAQ 128(SI), SI
+ MOVO X12, X1
+ MOVO X13, X4
+ MOVO X14, X7
+ MOVO X15, X10
+ CMPQ BX, $0x40
+ JBE sealSSE128SealHash
+ MOVOU (SI), X0
+ MOVOU 16(SI), X3
+ MOVOU 32(SI), X6
+ MOVOU 48(SI), X9
+ PXOR X0, X12
+ PXOR X3, X13
+ PXOR X6, X14
+ PXOR X9, X15
+ MOVOU X12, 128(DI)
+ MOVOU X13, 144(DI)
+ MOVOU X14, 160(DI)
+ MOVOU X15, 176(DI)
+ ADDQ $0x40, CX
+ SUBQ $0x40, BX
+ LEAQ 64(SI), SI
+ MOVQ $0x00000002, CX
+ MOVQ $0x00000008, R9
+ CMPQ BX, $0x40
+ JBE sealSSETail64
+ CMPQ BX, $0x80
+ JBE sealSSETail128
+ CMPQ BX, $0xc0
+ JBE sealSSETail192
sealSSEMainLoop:
// Load state, increment counter blocks
- MOVO Β·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL Β·sseIncMask<>(SB), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL Β·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL Β·sseIncMask<>(SB), D2
- MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL Β·sseIncMask<>(SB), D3
+ MOVO Β·chacha20Constants<>+0(SB), X0
+ MOVO 32(BP), X3
+ MOVO 48(BP), X6
+ MOVO 128(BP), X9
+ PADDL Β·sseIncMask<>+0(SB), X9
+ MOVO X0, X1
+ MOVO X3, X4
+ MOVO X6, X7
+ MOVO X9, X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X1, X2
+ MOVO X4, X5
+ MOVO X7, X8
+ MOVO X10, X11
+ PADDL Β·sseIncMask<>+0(SB), X11
+ MOVO X2, X12
+ MOVO X5, X13
+ MOVO X8, X14
+ MOVO X11, X15
+ PADDL Β·sseIncMask<>+0(SB), X15
// Store counters
- MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store
+ MOVO X9, 80(BP)
+ MOVO X10, 96(BP)
+ MOVO X11, 112(BP)
+ MOVO X15, 128(BP)
sealSSEInnerLoop:
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyAdd(0(oup))
- shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left
- shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left
- shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left
- polyMulStage1
- polyMulStage2
- LEAQ (2*8)(oup), oup
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- polyMulStage3
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyMulReduceStage
- shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right
- shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right
- shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right
- DECQ itr2
- JGE sealSSEInnerLoop
- polyAdd(0(oup))
- polyMul
- LEAQ (2*8)(oup), oup
- DECQ itr1
- JG sealSSEInnerLoop
+ MOVO X14, 64(BP)
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X3
+ PXOR X14, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X3
+ PXOR X14, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X4
+ PXOR X14, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X4
+ PXOR X14, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X5
+ PXOR X14, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X5
+ PXOR X14, X5
+ MOVO 64(BP), X14
+ MOVO X7, 64(BP)
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL16(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x0c, X7
+ PSRLL $0x14, X13
+ PXOR X7, X13
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL8(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x07, X7
+ PSRLL $0x19, X13
+ PXOR X7, X13
+ MOVO 64(BP), X7
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x0c
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ LEAQ 16(DI), DI
+ MOVO X14, 64(BP)
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X3
+ PXOR X14, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X14)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X3
+ PXOR X14, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X4
+ PXOR X14, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X14)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X4
+ PXOR X14, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x0c, X14
+ PSRLL $0x14, X5
+ PXOR X14, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X14)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X14
+ PSLLL $0x07, X14
+ PSRLL $0x19, X5
+ PXOR X14, X5
+ MOVO 64(BP), X14
+ MOVO X7, 64(BP)
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL16(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x0c, X7
+ PSRLL $0x14, X13
+ PXOR X7, X13
+ PADDD X13, X12
+ PXOR X12, X15
+ ROL8(X15, X7)
+ PADDD X15, X14
+ PXOR X14, X13
+ MOVO X13, X7
+ PSLLL $0x07, X7
+ PSRLL $0x19, X13
+ PXOR X7, X13
+ MOVO 64(BP), X7
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x04
+ DECQ R9
+ JGE sealSSEInnerLoop
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
+ DECQ CX
+ JG sealSSEInnerLoop
// Add in the state
- PADDD Β·chacha20Constants<>(SB), A0; PADDD Β·chacha20Constants<>(SB), A1; PADDD Β·chacha20Constants<>(SB), A2; PADDD Β·chacha20Constants<>(SB), A3
- PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3
- PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3
- PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3
- MOVO D3, tmpStore
+ PADDD Β·chacha20Constants<>+0(SB), X0
+ PADDD Β·chacha20Constants<>+0(SB), X1
+ PADDD Β·chacha20Constants<>+0(SB), X2
+ PADDD Β·chacha20Constants<>+0(SB), X12
+ PADDD 32(BP), X3
+ PADDD 32(BP), X4
+ PADDD 32(BP), X5
+ PADDD 32(BP), X13
+ PADDD 48(BP), X6
+ PADDD 48(BP), X7
+ PADDD 48(BP), X8
+ PADDD 48(BP), X14
+ PADDD 80(BP), X9
+ PADDD 96(BP), X10
+ PADDD 112(BP), X11
+ PADDD 128(BP), X15
+ MOVO X15, 64(BP)
// Load - xor - store
- MOVOU (0*16)(inp), D3; PXOR D3, A0
- MOVOU (1*16)(inp), D3; PXOR D3, B0
- MOVOU (2*16)(inp), D3; PXOR D3, C0
- MOVOU (3*16)(inp), D3; PXOR D3, D0
- MOVOU A0, (0*16)(oup)
- MOVOU B0, (1*16)(oup)
- MOVOU C0, (2*16)(oup)
- MOVOU D0, (3*16)(oup)
- MOVO tmpStore, D3
-
- MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0
- PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1
- MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup)
- MOVOU (8*16)(inp), A0; MOVOU (9*16)(inp), B0; MOVOU (10*16)(inp), C0; MOVOU (11*16)(inp), D0
- PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2
- MOVOU A2, (8*16)(oup); MOVOU B2, (9*16)(oup); MOVOU C2, (10*16)(oup); MOVOU D2, (11*16)(oup)
- ADDQ $192, inp
- MOVQ $192, itr1
- SUBQ $192, inl
- MOVO A3, A1
- MOVO B3, B1
- MOVO C3, C1
- MOVO D3, D1
- CMPQ inl, $64
+ MOVOU (SI), X15
+ PXOR X15, X0
+ MOVOU 16(SI), X15
+ PXOR X15, X3
+ MOVOU 32(SI), X15
+ PXOR X15, X6
+ MOVOU 48(SI), X15
+ PXOR X15, X9
+ MOVOU X0, (DI)
+ MOVOU X3, 16(DI)
+ MOVOU X6, 32(DI)
+ MOVOU X9, 48(DI)
+ MOVO 64(BP), X15
+ MOVOU 64(SI), X0
+ MOVOU 80(SI), X3
+ MOVOU 96(SI), X6
+ MOVOU 112(SI), X9
+ PXOR X0, X1
+ PXOR X3, X4
+ PXOR X6, X7
+ PXOR X9, X10
+ MOVOU X1, 64(DI)
+ MOVOU X4, 80(DI)
+ MOVOU X7, 96(DI)
+ MOVOU X10, 112(DI)
+ MOVOU 128(SI), X0
+ MOVOU 144(SI), X3
+ MOVOU 160(SI), X6
+ MOVOU 176(SI), X9
+ PXOR X0, X2
+ PXOR X3, X5
+ PXOR X6, X8
+ PXOR X9, X11
+ MOVOU X2, 128(DI)
+ MOVOU X5, 144(DI)
+ MOVOU X8, 160(DI)
+ MOVOU X11, 176(DI)
+ ADDQ $0xc0, SI
+ MOVQ $0x000000c0, CX
+ SUBQ $0xc0, BX
+ MOVO X12, X1
+ MOVO X13, X4
+ MOVO X14, X7
+ MOVO X15, X10
+ CMPQ BX, $0x40
JBE sealSSE128SealHash
- MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0
- PXOR A0, A3; PXOR B0, B3; PXOR C0, C3; PXOR D0, D3
- MOVOU A3, (12*16)(oup); MOVOU B3, (13*16)(oup); MOVOU C3, (14*16)(oup); MOVOU D3, (15*16)(oup)
- LEAQ 64(inp), inp
- SUBQ $64, inl
- MOVQ $6, itr1
- MOVQ $4, itr2
- CMPQ inl, $192
+ MOVOU (SI), X0
+ MOVOU 16(SI), X3
+ MOVOU 32(SI), X6
+ MOVOU 48(SI), X9
+ PXOR X0, X12
+ PXOR X3, X13
+ PXOR X6, X14
+ PXOR X9, X15
+ MOVOU X12, 192(DI)
+ MOVOU X13, 208(DI)
+ MOVOU X14, 224(DI)
+ MOVOU X15, 240(DI)
+ LEAQ 64(SI), SI
+ SUBQ $0x40, BX
+ MOVQ $0x00000006, CX
+ MOVQ $0x00000004, R9
+ CMPQ BX, $0xc0
JG sealSSEMainLoop
-
- MOVQ inl, itr1
- TESTQ inl, inl
+ MOVQ BX, CX
+ TESTQ BX, BX
JE sealSSE128SealHash
- MOVQ $6, itr1
- CMPQ inl, $64
+ MOVQ $0x00000006, CX
+ CMPQ BX, $0x40
JBE sealSSETail64
- CMPQ inl, $128
+ CMPQ BX, $0x80
JBE sealSSETail128
JMP sealSSETail192
-// ----------------------------------------------------------------------------
-// Special optimization for the last 64 bytes of plaintext
sealSSETail64:
- // Need to encrypt up to 64 bytes - prepare single block, hash 192 or 256 bytes
- MOVO Β·chacha20Constants<>(SB), A1
- MOVO state1Store, B1
- MOVO state2Store, C1
- MOVO ctr3Store, D1
- PADDL Β·sseIncMask<>(SB), D1
- MOVO D1, ctr0Store
+ MOVO Β·chacha20Constants<>+0(SB), X1
+ MOVO 32(BP), X4
+ MOVO 48(BP), X7
+ MOVO 128(BP), X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X10, 80(BP)
sealSSETail64LoopA:
- // Perform ChaCha rounds, while hashing the previously encrypted ciphertext
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
sealSSETail64LoopB:
- chachaQR(A1, B1, C1, D1, T1)
- shiftB1Left; shiftC1Left; shiftD1Left
- chachaQR(A1, B1, C1, D1, T1)
- shiftB1Right; shiftC1Right; shiftD1Right
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
- DECQ itr1
- JG sealSSETail64LoopA
-
- DECQ itr2
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X13)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X13
+ PSLLL $0x0c, X13
+ PSRLL $0x14, X4
+ PXOR X13, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X13)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X13
+ PSLLL $0x07, X13
+ PSRLL $0x19, X4
+ PXOR X13, X4
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X13)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X13
+ PSLLL $0x0c, X13
+ PSRLL $0x14, X4
+ PXOR X13, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X13)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X13
+ PSLLL $0x07, X13
+ PSRLL $0x19, X4
+ PXOR X13, X4
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
+ DECQ CX
+ JG sealSSETail64LoopA
+ DECQ R9
JGE sealSSETail64LoopB
- PADDL Β·chacha20Constants<>(SB), A1
- PADDL state1Store, B1
- PADDL state2Store, C1
- PADDL ctr0Store, D1
+ PADDL Β·chacha20Constants<>+0(SB), X1
+ PADDL 32(BP), X4
+ PADDL 48(BP), X7
+ PADDL 80(BP), X10
+ JMP sealSSE128Seal
- JMP sealSSE128Seal
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 128 bytes of plaintext
sealSSETail128:
- // Need to encrypt up to 128 bytes - prepare two blocks, hash 192 or 256 bytes
- MOVO Β·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL Β·sseIncMask<>(SB), D0; MOVO D0, ctr0Store
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL Β·sseIncMask<>(SB), D1; MOVO D1, ctr1Store
+ MOVO Β·chacha20Constants<>+0(SB), X0
+ MOVO 32(BP), X3
+ MOVO 48(BP), X6
+ MOVO 128(BP), X9
+ PADDL Β·sseIncMask<>+0(SB), X9
+ MOVO X9, 80(BP)
+ MOVO X0, X1
+ MOVO X3, X4
+ MOVO X6, X7
+ MOVO X9, X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X10, 96(BP)
sealSSETail128LoopA:
- // Perform ChaCha rounds, while hashing the previously encrypted ciphertext
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
sealSSETail128LoopB:
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- shiftB1Left; shiftC1Left; shiftD1Left
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- shiftB1Right; shiftC1Right; shiftD1Right
-
- DECQ itr1
- JG sealSSETail128LoopA
-
- DECQ itr2
- JGE sealSSETail128LoopB
-
- PADDL Β·chacha20Constants<>(SB), A0; PADDL Β·chacha20Constants<>(SB), A1
- PADDL state1Store, B0; PADDL state1Store, B1
- PADDL state2Store, C0; PADDL state2Store, C1
- PADDL ctr0Store, D0; PADDL ctr1Store, D1
-
- MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3
- PXOR T0, A0; PXOR T1, B0; PXOR T2, C0; PXOR T3, D0
- MOVOU A0, (0*16)(oup); MOVOU B0, (1*16)(oup); MOVOU C0, (2*16)(oup); MOVOU D0, (3*16)(oup)
-
- MOVQ $64, itr1
- LEAQ 64(inp), inp
- SUBQ $64, inl
-
- JMP sealSSE128SealHash
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 192 bytes of plaintext
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ DECQ CX
+ JG sealSSETail128LoopA
+ DECQ R9
+ JGE sealSSETail128LoopB
+ PADDL Β·chacha20Constants<>+0(SB), X0
+ PADDL Β·chacha20Constants<>+0(SB), X1
+ PADDL 32(BP), X3
+ PADDL 32(BP), X4
+ PADDL 48(BP), X6
+ PADDL 48(BP), X7
+ PADDL 80(BP), X9
+ PADDL 96(BP), X10
+ MOVOU (SI), X12
+ MOVOU 16(SI), X13
+ MOVOU 32(SI), X14
+ MOVOU 48(SI), X15
+ PXOR X12, X0
+ PXOR X13, X3
+ PXOR X14, X6
+ PXOR X15, X9
+ MOVOU X0, (DI)
+ MOVOU X3, 16(DI)
+ MOVOU X6, 32(DI)
+ MOVOU X9, 48(DI)
+ MOVQ $0x00000040, CX
+ LEAQ 64(SI), SI
+ SUBQ $0x40, BX
+ JMP sealSSE128SealHash
+
sealSSETail192:
- // Need to encrypt up to 192 bytes - prepare three blocks, hash 192 or 256 bytes
- MOVO Β·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL Β·sseIncMask<>(SB), D0; MOVO D0, ctr0Store
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL Β·sseIncMask<>(SB), D1; MOVO D1, ctr1Store
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL Β·sseIncMask<>(SB), D2; MOVO D2, ctr2Store
+ MOVO Β·chacha20Constants<>+0(SB), X0
+ MOVO 32(BP), X3
+ MOVO 48(BP), X6
+ MOVO 128(BP), X9
+ PADDL Β·sseIncMask<>+0(SB), X9
+ MOVO X9, 80(BP)
+ MOVO X0, X1
+ MOVO X3, X4
+ MOVO X6, X7
+ MOVO X9, X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X10, 96(BP)
+ MOVO X1, X2
+ MOVO X4, X5
+ MOVO X7, X8
+ MOVO X10, X11
+ PADDL Β·sseIncMask<>+0(SB), X11
+ MOVO X11, 112(BP)
sealSSETail192LoopA:
- // Perform ChaCha rounds, while hashing the previously encrypted ciphertext
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
sealSSETail192LoopB:
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- shiftB1Left; shiftC1Left; shiftD1Left
- shiftB2Left; shiftC2Left; shiftD2Left
-
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- shiftB1Right; shiftC1Right; shiftD1Right
- shiftB2Right; shiftC2Right; shiftD2Right
-
- DECQ itr1
- JG sealSSETail192LoopA
-
- DECQ itr2
- JGE sealSSETail192LoopB
-
- PADDL Β·chacha20Constants<>(SB), A0; PADDL Β·chacha20Constants<>(SB), A1; PADDL Β·chacha20Constants<>(SB), A2
- PADDL state1Store, B0; PADDL state1Store, B1; PADDL state1Store, B2
- PADDL state2Store, C0; PADDL state2Store, C1; PADDL state2Store, C2
- PADDL ctr0Store, D0; PADDL ctr1Store, D1; PADDL ctr2Store, D2
-
- MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3
- PXOR T0, A0; PXOR T1, B0; PXOR T2, C0; PXOR T3, D0
- MOVOU A0, (0*16)(oup); MOVOU B0, (1*16)(oup); MOVOU C0, (2*16)(oup); MOVOU D0, (3*16)(oup)
- MOVOU (4*16)(inp), T0; MOVOU (5*16)(inp), T1; MOVOU (6*16)(inp), T2; MOVOU (7*16)(inp), T3
- PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1
- MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup)
-
- MOVO A2, A1
- MOVO B2, B1
- MOVO C2, C1
- MOVO D2, D1
- MOVQ $128, itr1
- LEAQ 128(inp), inp
- SUBQ $128, inl
-
- JMP sealSSE128SealHash
-
-// ----------------------------------------------------------------------------
-// Special seal optimization for buffers smaller than 129 bytes
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X5
+ PXOR X12, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X5
+ PXOR X12, X5
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X5
+ PXOR X12, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X5
+ PXOR X12, X5
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ DECQ CX
+ JG sealSSETail192LoopA
+ DECQ R9
+ JGE sealSSETail192LoopB
+ PADDL Β·chacha20Constants<>+0(SB), X0
+ PADDL Β·chacha20Constants<>+0(SB), X1
+ PADDL Β·chacha20Constants<>+0(SB), X2
+ PADDL 32(BP), X3
+ PADDL 32(BP), X4
+ PADDL 32(BP), X5
+ PADDL 48(BP), X6
+ PADDL 48(BP), X7
+ PADDL 48(BP), X8
+ PADDL 80(BP), X9
+ PADDL 96(BP), X10
+ PADDL 112(BP), X11
+ MOVOU (SI), X12
+ MOVOU 16(SI), X13
+ MOVOU 32(SI), X14
+ MOVOU 48(SI), X15
+ PXOR X12, X0
+ PXOR X13, X3
+ PXOR X14, X6
+ PXOR X15, X9
+ MOVOU X0, (DI)
+ MOVOU X3, 16(DI)
+ MOVOU X6, 32(DI)
+ MOVOU X9, 48(DI)
+ MOVOU 64(SI), X12
+ MOVOU 80(SI), X13
+ MOVOU 96(SI), X14
+ MOVOU 112(SI), X15
+ PXOR X12, X1
+ PXOR X13, X4
+ PXOR X14, X7
+ PXOR X15, X10
+ MOVOU X1, 64(DI)
+ MOVOU X4, 80(DI)
+ MOVOU X7, 96(DI)
+ MOVOU X10, 112(DI)
+ MOVO X2, X1
+ MOVO X5, X4
+ MOVO X8, X7
+ MOVO X11, X10
+ MOVQ $0x00000080, CX
+ LEAQ 128(SI), SI
+ SUBQ $0x80, BX
+ JMP sealSSE128SealHash
+
sealSSE128:
- // For up to 128 bytes of ciphertext and 64 bytes for the poly key, we require to process three blocks
- MOVOU Β·chacha20Constants<>(SB), A0; MOVOU (1*16)(keyp), B0; MOVOU (2*16)(keyp), C0; MOVOU (3*16)(keyp), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL Β·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL Β·sseIncMask<>(SB), D2
- MOVO B0, T1; MOVO C0, T2; MOVO D1, T3
- MOVQ $10, itr2
+ MOVOU Β·chacha20Constants<>+0(SB), X0
+ MOVOU 16(R8), X3
+ MOVOU 32(R8), X6
+ MOVOU 48(R8), X9
+ MOVO X0, X1
+ MOVO X3, X4
+ MOVO X6, X7
+ MOVO X9, X10
+ PADDL Β·sseIncMask<>+0(SB), X10
+ MOVO X1, X2
+ MOVO X4, X5
+ MOVO X7, X8
+ MOVO X10, X11
+ PADDL Β·sseIncMask<>+0(SB), X11
+ MOVO X3, X13
+ MOVO X6, X14
+ MOVO X10, X15
+ MOVQ $0x0000000a, R9
sealSSE128InnerCipherLoop:
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Left; shiftB1Left; shiftB2Left
- shiftC0Left; shiftC1Left; shiftC2Left
- shiftD0Left; shiftD1Left; shiftD2Left
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Right; shiftB1Right; shiftB2Right
- shiftC0Right; shiftC1Right; shiftC2Right
- shiftD0Right; shiftD1Right; shiftD2Right
- DECQ itr2
- JNE sealSSE128InnerCipherLoop
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X5
+ PXOR X12, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X5
+ PXOR X12, X5
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL16(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X3
+ PXOR X12, X3
+ PADDD X3, X0
+ PXOR X0, X9
+ ROL8(X9, X12)
+ PADDD X9, X6
+ PXOR X6, X3
+ MOVO X3, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X3
+ PXOR X12, X3
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL16(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X4
+ PXOR X12, X4
+ PADDD X4, X1
+ PXOR X1, X10
+ ROL8(X10, X12)
+ PADDD X10, X7
+ PXOR X7, X4
+ MOVO X4, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X4
+ PXOR X12, X4
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL16(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x0c, X12
+ PSRLL $0x14, X5
+ PXOR X12, X5
+ PADDD X5, X2
+ PXOR X2, X11
+ ROL8(X11, X12)
+ PADDD X11, X8
+ PXOR X8, X5
+ MOVO X5, X12
+ PSLLL $0x07, X12
+ PSRLL $0x19, X5
+ PXOR X12, X5
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xe4
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xed
+ BYTE $0x0c
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xf6
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xff
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc0
+ BYTE $0x08
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xc9
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xd2
+ BYTE $0x04
+ BYTE $0x66
+ BYTE $0x45
+ BYTE $0x0f
+ BYTE $0x3a
+ BYTE $0x0f
+ BYTE $0xdb
+ BYTE $0x04
+ DECQ R9
+ JNE sealSSE128InnerCipherLoop
// A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded
- PADDL Β·chacha20Constants<>(SB), A0; PADDL Β·chacha20Constants<>(SB), A1; PADDL Β·chacha20Constants<>(SB), A2
- PADDL T1, B0; PADDL T1, B1; PADDL T1, B2
- PADDL T2, C1; PADDL T2, C2
- PADDL T3, D1; PADDL Β·sseIncMask<>(SB), T3; PADDL T3, D2
- PAND Β·polyClampMask<>(SB), A0
- MOVOU A0, rStore
- MOVOU B0, sStore
+ PADDL Β·chacha20Constants<>+0(SB), X0
+ PADDL Β·chacha20Constants<>+0(SB), X1
+ PADDL Β·chacha20Constants<>+0(SB), X2
+ PADDL X13, X3
+ PADDL X13, X4
+ PADDL X13, X5
+ PADDL X14, X7
+ PADDL X14, X8
+ PADDL X15, X10
+ PADDL Β·sseIncMask<>+0(SB), X15
+ PADDL X15, X11
+ PAND Β·polyClampMask<>+0(SB), X0
+ MOVOU X0, (BP)
+ MOVOU X3, 16(BP)
// Hash
- MOVQ ad_len+80(FP), itr2
+ MOVQ ad_len+80(FP), R9
CALL polyHashADInternal<>(SB)
- XORQ itr1, itr1
+ XORQ CX, CX
sealSSE128SealHash:
- // itr1 holds the number of bytes encrypted but not yet hashed
- CMPQ itr1, $16
- JB sealSSE128Seal
- polyAdd(0(oup))
- polyMul
-
- SUBQ $16, itr1
- ADDQ $16, oup
-
- JMP sealSSE128SealHash
+ CMPQ CX, $0x10
+ JB sealSSE128Seal
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ SUBQ $0x10, CX
+ ADDQ $0x10, DI
+ JMP sealSSE128SealHash
sealSSE128Seal:
- CMPQ inl, $16
+ CMPQ BX, $0x10
JB sealSSETail
- SUBQ $16, inl
+ SUBQ $0x10, BX
// Load for decryption
- MOVOU (inp), T0
- PXOR T0, A1
- MOVOU A1, (oup)
- LEAQ (1*16)(inp), inp
- LEAQ (1*16)(oup), oup
+ MOVOU (SI), X12
+ PXOR X12, X1
+ MOVOU X1, (DI)
+ LEAQ 16(SI), SI
+ LEAQ 16(DI), DI
// Extract for hashing
- MOVQ A1, t0
- PSRLDQ $8, A1
- MOVQ A1, t1
- ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2
- polyMul
+ MOVQ X1, R13
+ PSRLDQ $0x08, X1
+ MOVQ X1, R14
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
// Shift the stream "left"
- MOVO B1, A1
- MOVO C1, B1
- MOVO D1, C1
- MOVO A2, D1
- MOVO B2, A2
- MOVO C2, B2
- MOVO D2, C2
+ MOVO X4, X1
+ MOVO X7, X4
+ MOVO X10, X7
+ MOVO X2, X10
+ MOVO X5, X2
+ MOVO X8, X5
+ MOVO X11, X8
JMP sealSSE128Seal
sealSSETail:
- TESTQ inl, inl
+ TESTQ BX, BX
JE sealSSEFinalize
// We can only load the PT one byte at a time to avoid read after end of buffer
- MOVQ inl, itr2
- SHLQ $4, itr2
- LEAQ Β·andMask<>(SB), t0
- MOVQ inl, itr1
- LEAQ -1(inp)(inl*1), inp
- XORQ t2, t2
- XORQ t3, t3
+ MOVQ BX, R9
+ SHLQ $0x04, R9
+ LEAQ Β·andMask<>+0(SB), R13
+ MOVQ BX, CX
+ LEAQ -1(SI)(BX*1), SI
+ XORQ R15, R15
+ XORQ R8, R8
XORQ AX, AX
sealSSETailLoadLoop:
- SHLQ $8, t2, t3
- SHLQ $8, t2
- MOVB (inp), AX
- XORQ AX, t2
- LEAQ -1(inp), inp
- DECQ itr1
+ SHLQ $0x08, R15, R8
+ SHLQ $0x08, R15
+ MOVB (SI), AX
+ XORQ AX, R15
+ LEAQ -1(SI), SI
+ DECQ CX
JNE sealSSETailLoadLoop
- MOVQ t2, 0+tmpStore
- MOVQ t3, 8+tmpStore
- PXOR 0+tmpStore, A1
- MOVOU A1, (oup)
- MOVOU -16(t0)(itr2*1), T0
- PAND T0, A1
- MOVQ A1, t0
- PSRLDQ $8, A1
- MOVQ A1, t1
- ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2
- polyMul
-
- ADDQ inl, oup
+ MOVQ R15, 64(BP)
+ MOVQ R8, 72(BP)
+ PXOR 64(BP), X1
+ MOVOU X1, (DI)
+ MOVOU -16(R13)(R9*1), X12
+ PAND X12, X1
+ MOVQ X1, R13
+ PSRLDQ $0x08, X1
+ MOVQ X1, R14
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ ADDQ BX, DI
sealSSEFinalize:
// Hash in the buffer lengths
- ADDQ ad_len+80(FP), acc0
- ADCQ src_len+56(FP), acc1
- ADCQ $1, acc2
- polyMul
+ ADDQ ad_len+80(FP), R10
+ ADCQ src_len+56(FP), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
// Final reduce
- MOVQ acc0, t0
- MOVQ acc1, t1
- MOVQ acc2, t2
- SUBQ $-5, acc0
- SBBQ $-1, acc1
- SBBQ $3, acc2
- CMOVQCS t0, acc0
- CMOVQCS t1, acc1
- CMOVQCS t2, acc2
+ MOVQ R10, R13
+ MOVQ R11, R14
+ MOVQ R12, R15
+ SUBQ $-5, R10
+ SBBQ $-1, R11
+ SBBQ $0x03, R12
+ CMOVQCS R13, R10
+ CMOVQCS R14, R11
+ CMOVQCS R15, R12
// Add in the "s" part of the key
- ADDQ 0+sStore, acc0
- ADCQ 8+sStore, acc1
+ ADDQ 16(BP), R10
+ ADCQ 24(BP), R11
// Finally store the tag at the end of the message
- MOVQ acc0, (0*8)(oup)
- MOVQ acc1, (1*8)(oup)
+ MOVQ R10, (DI)
+ MOVQ R11, 8(DI)
RET
-// ----------------------------------------------------------------------------
-// ------------------------- AVX2 Code ----------------------------------------
chacha20Poly1305Seal_AVX2:
VZEROUPPER
- VMOVDQU Β·chacha20Constants<>(SB), AA0
- BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x70; BYTE $0x10 // broadcasti128 16(r8), ymm14
- BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x20 // broadcasti128 32(r8), ymm12
- BYTE $0xc4; BYTE $0xc2; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x30 // broadcasti128 48(r8), ymm4
- VPADDD Β·avx2InitMask<>(SB), DD0, DD0
+ VMOVDQU Β·chacha20Constants<>+0(SB), Y0
+ BYTE $0xc4
+ BYTE $0x42
+ BYTE $0x7d
+ BYTE $0x5a
+ BYTE $0x70
+ BYTE $0x10
+ BYTE $0xc4
+ BYTE $0x42
+ BYTE $0x7d
+ BYTE $0x5a
+ BYTE $0x60
+ BYTE $0x20
+ BYTE $0xc4
+ BYTE $0xc2
+ BYTE $0x7d
+ BYTE $0x5a
+ BYTE $0x60
+ BYTE $0x30
+ VPADDD Β·avx2InitMask<>+0(SB), Y4, Y4
// Special optimizations, for very short buffers
- CMPQ inl, $192
- JBE seal192AVX2 // 33% faster
- CMPQ inl, $320
- JBE seal320AVX2 // 17% faster
+ CMPQ BX, $0x000000c0
+ JBE seal192AVX2
+ CMPQ BX, $0x00000140
+ JBE seal320AVX2
// For the general key prepare the key first - as a byproduct we have 64 bytes of cipher stream
- VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3; VMOVDQA BB0, state1StoreAVX2
- VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3; VMOVDQA CC0, state2StoreAVX2
- VPADDD Β·avx2IncMask<>(SB), DD0, DD1; VMOVDQA DD0, ctr0StoreAVX2
- VPADDD Β·avx2IncMask<>(SB), DD1, DD2; VMOVDQA DD1, ctr1StoreAVX2
- VPADDD Β·avx2IncMask<>(SB), DD2, DD3; VMOVDQA DD2, ctr2StoreAVX2
- VMOVDQA DD3, ctr3StoreAVX2
- MOVQ $10, itr2
+ VMOVDQA Y0, Y5
+ VMOVDQA Y0, Y6
+ VMOVDQA Y0, Y7
+ VMOVDQA Y14, Y9
+ VMOVDQA Y14, Y10
+ VMOVDQA Y14, Y11
+ VMOVDQA Y14, 32(BP)
+ VMOVDQA Y12, Y13
+ VMOVDQA Y12, Y8
+ VMOVDQA Y12, Y15
+ VMOVDQA Y12, 64(BP)
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VMOVDQA Y4, 96(BP)
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VMOVDQA Y1, 128(BP)
+ VPADDD Β·avx2IncMask<>+0(SB), Y2, Y3
+ VMOVDQA Y2, 160(BP)
+ VMOVDQA Y3, 192(BP)
+ MOVQ $0x0000000a, R9
sealAVX2IntroLoop:
- VMOVDQA CC3, tmpStoreAVX2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3)
- VMOVDQA tmpStoreAVX2, CC3
- VMOVDQA CC1, tmpStoreAVX2
- chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1)
- VMOVDQA tmpStoreAVX2, CC1
-
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0
- VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $12, DD1, DD1, DD1
- VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $12, DD2, DD2, DD2
- VPALIGNR $4, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $12, DD3, DD3, DD3
-
- VMOVDQA CC3, tmpStoreAVX2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3)
- VMOVDQA tmpStoreAVX2, CC3
- VMOVDQA CC1, tmpStoreAVX2
- chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1)
- VMOVDQA tmpStoreAVX2, CC1
-
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0
- VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $4, DD1, DD1, DD1
- VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $4, DD2, DD2, DD2
- VPALIGNR $12, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $4, DD3, DD3, DD3
- DECQ itr2
- JNE sealAVX2IntroLoop
-
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0; VPADDD Β·chacha20Constants<>(SB), AA1, AA1; VPADDD Β·chacha20Constants<>(SB), AA2, AA2; VPADDD Β·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
-
- VPERM2I128 $0x13, CC0, DD0, CC0 // Stream bytes 96 - 127
- VPERM2I128 $0x02, AA0, BB0, DD0 // The Poly1305 key
- VPERM2I128 $0x13, AA0, BB0, AA0 // Stream bytes 64 - 95
+ VMOVDQA Y15, 224(BP)
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VMOVDQA 224(BP), Y15
+ VMOVDQA Y13, 224(BP)
+ VPADDD Y11, Y7, Y7
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ VPADDD Y3, Y15, Y15
+ VPXOR Y15, Y11, Y11
+ VPSLLD $0x0c, Y11, Y13
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y13, Y11, Y11
+ VPADDD Y11, Y7, Y7
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y3, Y15, Y15
+ VPXOR Y15, Y11, Y11
+ VPSLLD $0x07, Y11, Y13
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y13, Y11, Y11
+ VMOVDQA 224(BP), Y13
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ VPALIGNR $0x04, Y11, Y11, Y11
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x0c, Y3, Y3, Y3
+ VMOVDQA Y15, 224(BP)
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VMOVDQA 224(BP), Y15
+ VMOVDQA Y13, 224(BP)
+ VPADDD Y11, Y7, Y7
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ VPADDD Y3, Y15, Y15
+ VPXOR Y15, Y11, Y11
+ VPSLLD $0x0c, Y11, Y13
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y13, Y11, Y11
+ VPADDD Y11, Y7, Y7
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y3, Y15, Y15
+ VPXOR Y15, Y11, Y11
+ VPSLLD $0x07, Y11, Y13
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y13, Y11, Y11
+ VMOVDQA 224(BP), Y13
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x04, Y2, Y2, Y2
+ VPALIGNR $0x0c, Y11, Y11, Y11
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x04, Y3, Y3, Y3
+ DECQ R9
+ JNE sealAVX2IntroLoop
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD Β·chacha20Constants<>+0(SB), Y6, Y6
+ VPADDD Β·chacha20Constants<>+0(SB), Y7, Y7
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 32(BP), Y10, Y10
+ VPADDD 32(BP), Y11, Y11
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 64(BP), Y13, Y13
+ VPADDD 64(BP), Y8, Y8
+ VPADDD 64(BP), Y15, Y15
+ VPADDD 96(BP), Y4, Y4
+ VPADDD 128(BP), Y1, Y1
+ VPADDD 160(BP), Y2, Y2
+ VPADDD 192(BP), Y3, Y3
+ VPERM2I128 $0x13, Y12, Y4, Y12
+ VPERM2I128 $0x02, Y0, Y14, Y4
+ VPERM2I128 $0x13, Y0, Y14, Y0
// Clamp and store poly key
- VPAND Β·polyClampMask<>(SB), DD0, DD0
- VMOVDQA DD0, rsStoreAVX2
+ VPAND Β·polyClampMask<>+0(SB), Y4, Y4
+ VMOVDQA Y4, (BP)
// Hash AD
- MOVQ ad_len+80(FP), itr2
+ MOVQ ad_len+80(FP), R9
CALL polyHashADInternal<>(SB)
// Can store at least 320 bytes
- VPXOR (0*32)(inp), AA0, AA0
- VPXOR (1*32)(inp), CC0, CC0
- VMOVDQU AA0, (0*32)(oup)
- VMOVDQU CC0, (1*32)(oup)
-
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (2*32)(inp), AA0, AA0; VPXOR (3*32)(inp), BB0, BB0; VPXOR (4*32)(inp), CC0, CC0; VPXOR (5*32)(inp), DD0, DD0
- VMOVDQU AA0, (2*32)(oup); VMOVDQU BB0, (3*32)(oup); VMOVDQU CC0, (4*32)(oup); VMOVDQU DD0, (5*32)(oup)
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (6*32)(inp), AA0, AA0; VPXOR (7*32)(inp), BB0, BB0; VPXOR (8*32)(inp), CC0, CC0; VPXOR (9*32)(inp), DD0, DD0
- VMOVDQU AA0, (6*32)(oup); VMOVDQU BB0, (7*32)(oup); VMOVDQU CC0, (8*32)(oup); VMOVDQU DD0, (9*32)(oup)
-
- MOVQ $320, itr1
- SUBQ $320, inl
- LEAQ 320(inp), inp
-
- VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, CC3, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, CC3, DD3, DD0
- CMPQ inl, $128
+ VPXOR (SI), Y0, Y0
+ VPXOR 32(SI), Y12, Y12
+ VMOVDQU Y0, (DI)
+ VMOVDQU Y12, 32(DI)
+ VPERM2I128 $0x02, Y5, Y9, Y0
+ VPERM2I128 $0x02, Y13, Y1, Y14
+ VPERM2I128 $0x13, Y5, Y9, Y12
+ VPERM2I128 $0x13, Y13, Y1, Y4
+ VPXOR 64(SI), Y0, Y0
+ VPXOR 96(SI), Y14, Y14
+ VPXOR 128(SI), Y12, Y12
+ VPXOR 160(SI), Y4, Y4
+ VMOVDQU Y0, 64(DI)
+ VMOVDQU Y14, 96(DI)
+ VMOVDQU Y12, 128(DI)
+ VMOVDQU Y4, 160(DI)
+ VPERM2I128 $0x02, Y6, Y10, Y0
+ VPERM2I128 $0x02, Y8, Y2, Y14
+ VPERM2I128 $0x13, Y6, Y10, Y12
+ VPERM2I128 $0x13, Y8, Y2, Y4
+ VPXOR 192(SI), Y0, Y0
+ VPXOR 224(SI), Y14, Y14
+ VPXOR 256(SI), Y12, Y12
+ VPXOR 288(SI), Y4, Y4
+ VMOVDQU Y0, 192(DI)
+ VMOVDQU Y14, 224(DI)
+ VMOVDQU Y12, 256(DI)
+ VMOVDQU Y4, 288(DI)
+ MOVQ $0x00000140, CX
+ SUBQ $0x00000140, BX
+ LEAQ 320(SI), SI
+ VPERM2I128 $0x02, Y7, Y11, Y0
+ VPERM2I128 $0x02, Y15, Y3, Y14
+ VPERM2I128 $0x13, Y7, Y11, Y12
+ VPERM2I128 $0x13, Y15, Y3, Y4
+ CMPQ BX, $0x80
JBE sealAVX2SealHash
-
- VPXOR (0*32)(inp), AA0, AA0; VPXOR (1*32)(inp), BB0, BB0; VPXOR (2*32)(inp), CC0, CC0; VPXOR (3*32)(inp), DD0, DD0
- VMOVDQU AA0, (10*32)(oup); VMOVDQU BB0, (11*32)(oup); VMOVDQU CC0, (12*32)(oup); VMOVDQU DD0, (13*32)(oup)
- SUBQ $128, inl
- LEAQ 128(inp), inp
-
- MOVQ $8, itr1
- MOVQ $2, itr2
-
- CMPQ inl, $128
- JBE sealAVX2Tail128
- CMPQ inl, $256
- JBE sealAVX2Tail256
- CMPQ inl, $384
- JBE sealAVX2Tail384
- CMPQ inl, $512
- JBE sealAVX2Tail512
+ VPXOR (SI), Y0, Y0
+ VPXOR 32(SI), Y14, Y14
+ VPXOR 64(SI), Y12, Y12
+ VPXOR 96(SI), Y4, Y4
+ VMOVDQU Y0, 320(DI)
+ VMOVDQU Y14, 352(DI)
+ VMOVDQU Y12, 384(DI)
+ VMOVDQU Y4, 416(DI)
+ SUBQ $0x80, BX
+ LEAQ 128(SI), SI
+ MOVQ $0x00000008, CX
+ MOVQ $0x00000002, R9
+ CMPQ BX, $0x80
+ JBE sealAVX2Tail128
+ CMPQ BX, $0x00000100
+ JBE sealAVX2Tail256
+ CMPQ BX, $0x00000180
+ JBE sealAVX2Tail384
+ CMPQ BX, $0x00000200
+ JBE sealAVX2Tail512
// We have 448 bytes to hash, but main loop hashes 512 bytes at a time - perform some rounds, before the main loop
- VMOVDQA Β·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD0; VPADDD Β·avx2IncMask<>(SB), DD0, DD1; VPADDD Β·avx2IncMask<>(SB), DD1, DD2; VPADDD Β·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
-
- VMOVDQA CC3, tmpStoreAVX2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3)
- VMOVDQA tmpStoreAVX2, CC3
- VMOVDQA CC1, tmpStoreAVX2
- chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1)
- VMOVDQA tmpStoreAVX2, CC1
-
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0
- VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $12, DD1, DD1, DD1
- VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $12, DD2, DD2, DD2
- VPALIGNR $4, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $12, DD3, DD3, DD3
-
- VMOVDQA CC3, tmpStoreAVX2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3)
- VMOVDQA tmpStoreAVX2, CC3
- VMOVDQA CC1, tmpStoreAVX2
- chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1)
- VMOVDQA tmpStoreAVX2, CC1
-
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0
- VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $4, DD1, DD1, DD1
- VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $4, DD2, DD2, DD2
- VPALIGNR $12, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $4, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol16<>(SB), DD0, DD0; VPSHUFB Β·rol16<>(SB), DD1, DD1; VPSHUFB Β·rol16<>(SB), DD2, DD2; VPSHUFB Β·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
-
- SUBQ $16, oup // Adjust the pointer
- MOVQ $9, itr1
- JMP sealAVX2InternalLoopStart
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA Y0, Y5
+ VMOVDQA Y0, Y6
+ VMOVDQA Y0, Y7
+ VMOVDQA 32(BP), Y14
+ VMOVDQA Y14, Y9
+ VMOVDQA Y14, Y10
+ VMOVDQA Y14, Y11
+ VMOVDQA 64(BP), Y12
+ VMOVDQA Y12, Y13
+ VMOVDQA Y12, Y8
+ VMOVDQA Y12, Y15
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VPADDD Β·avx2IncMask<>+0(SB), Y2, Y3
+ VMOVDQA Y4, 96(BP)
+ VMOVDQA Y1, 128(BP)
+ VMOVDQA Y2, 160(BP)
+ VMOVDQA Y3, 192(BP)
+ VMOVDQA Y15, 224(BP)
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VMOVDQA 224(BP), Y15
+ VMOVDQA Y13, 224(BP)
+ VPADDD Y11, Y7, Y7
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ VPADDD Y3, Y15, Y15
+ VPXOR Y15, Y11, Y11
+ VPSLLD $0x0c, Y11, Y13
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y13, Y11, Y11
+ VPADDD Y11, Y7, Y7
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y3, Y15, Y15
+ VPXOR Y15, Y11, Y11
+ VPSLLD $0x07, Y11, Y13
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y13, Y11, Y11
+ VMOVDQA 224(BP), Y13
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ VPALIGNR $0x04, Y11, Y11, Y11
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x0c, Y3, Y3, Y3
+ VMOVDQA Y15, 224(BP)
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VMOVDQA 224(BP), Y15
+ VMOVDQA Y13, 224(BP)
+ VPADDD Y11, Y7, Y7
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ VPADDD Y3, Y15, Y15
+ VPXOR Y15, Y11, Y11
+ VPSLLD $0x0c, Y11, Y13
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y13, Y11, Y11
+ VPADDD Y11, Y7, Y7
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y3, Y15, Y15
+ VPXOR Y15, Y11, Y11
+ VPSLLD $0x07, Y11, Y13
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y13, Y11, Y11
+ VMOVDQA 224(BP), Y13
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x04, Y2, Y2, Y2
+ VPALIGNR $0x0c, Y11, Y11, Y11
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x04, Y3, Y3, Y3
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x0c, Y11, Y15
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ SUBQ $0x10, DI
+ MOVQ $0x00000009, CX
+ JMP sealAVX2InternalLoopStart
sealAVX2MainLoop:
- // Load state, increment counter blocks, store the incremented counters
- VMOVDQU Β·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0; VPADDD Β·avx2IncMask<>(SB), DD0, DD0; VPADDD Β·avx2IncMask<>(SB), DD0, DD1; VPADDD Β·avx2IncMask<>(SB), DD1, DD2; VPADDD Β·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
- MOVQ $10, itr1
+ VMOVDQU Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA Y0, Y5
+ VMOVDQA Y0, Y6
+ VMOVDQA Y0, Y7
+ VMOVDQA 32(BP), Y14
+ VMOVDQA Y14, Y9
+ VMOVDQA Y14, Y10
+ VMOVDQA Y14, Y11
+ VMOVDQA 64(BP), Y12
+ VMOVDQA Y12, Y13
+ VMOVDQA Y12, Y8
+ VMOVDQA Y12, Y15
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VPADDD Β·avx2IncMask<>+0(SB), Y2, Y3
+ VMOVDQA Y4, 96(BP)
+ VMOVDQA Y1, 128(BP)
+ VMOVDQA Y2, 160(BP)
+ VMOVDQA Y3, 192(BP)
+ MOVQ $0x0000000a, CX
sealAVX2InternalLoop:
- polyAdd(0*8(oup))
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- polyMulStage1_AVX2
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol16<>(SB), DD0, DD0; VPSHUFB Β·rol16<>(SB), DD1, DD1; VPSHUFB Β·rol16<>(SB), DD2, DD2; VPSHUFB Β·rol16<>(SB), DD3, DD3
- polyMulStage2_AVX2
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyMulStage3_AVX2
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulReduceStage
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x0c, Y11, Y15
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
sealAVX2InternalLoopStart:
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol8<>(SB), DD0, DD0; VPSHUFB Β·rol8<>(SB), DD1, DD1; VPSHUFB Β·rol8<>(SB), DD2, DD2; VPSHUFB Β·rol8<>(SB), DD3, DD3
- polyAdd(2*8(oup))
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- polyMulStage1_AVX2
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulStage2_AVX2
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- polyMulStage3_AVX2
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol16<>(SB), DD0, DD0; VPSHUFB Β·rol16<>(SB), DD1, DD1; VPSHUFB Β·rol16<>(SB), DD2, DD2; VPSHUFB Β·rol16<>(SB), DD3, DD3
- polyMulReduceStage
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyAdd(4*8(oup))
- LEAQ (6*8)(oup), oup
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulStage1_AVX2
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- polyMulStage2_AVX2
- VPSHUFB Β·rol8<>(SB), DD0, DD0; VPSHUFB Β·rol8<>(SB), DD1, DD1; VPSHUFB Β·rol8<>(SB), DD2, DD2; VPSHUFB Β·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- polyMulStage3_AVX2
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulReduceStage
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3
- DECQ itr1
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ ADDQ 16(DI), R10
+ ADCQ 24(DI), R11
+ ADCQ $0x01, R12
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x07, Y11, Y15
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x04, Y11, Y11, Y11
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ VPALIGNR $0x0c, Y3, Y3, Y3
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ ADDQ 32(DI), R10
+ ADCQ 40(DI), R11
+ ADCQ $0x01, R12
+ LEAQ 48(DI), DI
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x0c, Y11, Y15
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x07, Y11, Y15
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x0c, Y11, Y11, Y11
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x04, Y2, Y2, Y2
+ VPALIGNR $0x04, Y3, Y3, Y3
+ DECQ CX
JNE sealAVX2InternalLoop
-
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0; VPADDD Β·chacha20Constants<>(SB), AA1, AA1; VPADDD Β·chacha20Constants<>(SB), AA2, AA2; VPADDD Β·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
- VMOVDQA CC3, tmpStoreAVX2
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD Β·chacha20Constants<>+0(SB), Y6, Y6
+ VPADDD Β·chacha20Constants<>+0(SB), Y7, Y7
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 32(BP), Y10, Y10
+ VPADDD 32(BP), Y11, Y11
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 64(BP), Y13, Y13
+ VPADDD 64(BP), Y8, Y8
+ VPADDD 64(BP), Y15, Y15
+ VPADDD 96(BP), Y4, Y4
+ VPADDD 128(BP), Y1, Y1
+ VPADDD 160(BP), Y2, Y2
+ VPADDD 192(BP), Y3, Y3
+ VMOVDQA Y15, 224(BP)
// We only hashed 480 of the 512 bytes available - hash the remaining 32 here
- polyAdd(0*8(oup))
- polyMulAVX2
- LEAQ (4*8)(oup), oup
- VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0
- VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0
- VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0
- VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup)
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 32(DI), DI
+ VPERM2I128 $0x02, Y0, Y14, Y15
+ VPERM2I128 $0x13, Y0, Y14, Y14
+ VPERM2I128 $0x02, Y12, Y4, Y0
+ VPERM2I128 $0x13, Y12, Y4, Y12
+ VPXOR (SI), Y15, Y15
+ VPXOR 32(SI), Y0, Y0
+ VPXOR 64(SI), Y14, Y14
+ VPXOR 96(SI), Y12, Y12
+ VMOVDQU Y15, (DI)
+ VMOVDQU Y0, 32(DI)
+ VMOVDQU Y14, 64(DI)
+ VMOVDQU Y12, 96(DI)
+ VPERM2I128 $0x02, Y5, Y9, Y0
+ VPERM2I128 $0x02, Y13, Y1, Y14
+ VPERM2I128 $0x13, Y5, Y9, Y12
+ VPERM2I128 $0x13, Y13, Y1, Y4
+ VPXOR 128(SI), Y0, Y0
+ VPXOR 160(SI), Y14, Y14
+ VPXOR 192(SI), Y12, Y12
+ VPXOR 224(SI), Y4, Y4
+ VMOVDQU Y0, 128(DI)
+ VMOVDQU Y14, 160(DI)
+ VMOVDQU Y12, 192(DI)
+ VMOVDQU Y4, 224(DI)
// and here
- polyAdd(-2*8(oup))
- polyMulAVX2
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0
- VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup)
- VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0
- VPXOR (12*32)(inp), AA0, AA0; VPXOR (13*32)(inp), BB0, BB0; VPXOR (14*32)(inp), CC0, CC0; VPXOR (15*32)(inp), DD0, DD0
- VMOVDQU AA0, (12*32)(oup); VMOVDQU BB0, (13*32)(oup); VMOVDQU CC0, (14*32)(oup); VMOVDQU DD0, (15*32)(oup)
- LEAQ (32*16)(inp), inp
- SUBQ $(32*16), inl
- CMPQ inl, $512
+ ADDQ -16(DI), R10
+ ADCQ -8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPERM2I128 $0x02, Y6, Y10, Y0
+ VPERM2I128 $0x02, Y8, Y2, Y14
+ VPERM2I128 $0x13, Y6, Y10, Y12
+ VPERM2I128 $0x13, Y8, Y2, Y4
+ VPXOR 256(SI), Y0, Y0
+ VPXOR 288(SI), Y14, Y14
+ VPXOR 320(SI), Y12, Y12
+ VPXOR 352(SI), Y4, Y4
+ VMOVDQU Y0, 256(DI)
+ VMOVDQU Y14, 288(DI)
+ VMOVDQU Y12, 320(DI)
+ VMOVDQU Y4, 352(DI)
+ VPERM2I128 $0x02, Y7, Y11, Y0
+ VPERM2I128 $0x02, 224(BP), Y3, Y14
+ VPERM2I128 $0x13, Y7, Y11, Y12
+ VPERM2I128 $0x13, 224(BP), Y3, Y4
+ VPXOR 384(SI), Y0, Y0
+ VPXOR 416(SI), Y14, Y14
+ VPXOR 448(SI), Y12, Y12
+ VPXOR 480(SI), Y4, Y4
+ VMOVDQU Y0, 384(DI)
+ VMOVDQU Y14, 416(DI)
+ VMOVDQU Y12, 448(DI)
+ VMOVDQU Y4, 480(DI)
+ LEAQ 512(SI), SI
+ SUBQ $0x00000200, BX
+ CMPQ BX, $0x00000200
JG sealAVX2MainLoop
// Tail can only hash 480 bytes
- polyAdd(0*8(oup))
- polyMulAVX2
- polyAdd(2*8(oup))
- polyMulAVX2
- LEAQ 32(oup), oup
-
- MOVQ $10, itr1
- MOVQ $0, itr2
- CMPQ inl, $128
- JBE sealAVX2Tail128
- CMPQ inl, $256
- JBE sealAVX2Tail256
- CMPQ inl, $384
- JBE sealAVX2Tail384
- JMP sealAVX2Tail512
-
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 193 bytes
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ ADDQ 16(DI), R10
+ ADCQ 24(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 32(DI), DI
+ MOVQ $0x0000000a, CX
+ MOVQ $0x00000000, R9
+ CMPQ BX, $0x80
+ JBE sealAVX2Tail128
+ CMPQ BX, $0x00000100
+ JBE sealAVX2Tail256
+ CMPQ BX, $0x00000180
+ JBE sealAVX2Tail384
+ JMP sealAVX2Tail512
+
seal192AVX2:
- // For up to 192 bytes of ciphertext and 64 bytes for the poly key, we process four blocks
- VMOVDQA AA0, AA1
- VMOVDQA BB0, BB1
- VMOVDQA CC0, CC1
- VPADDD Β·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA AA0, AA2
- VMOVDQA BB0, BB2
- VMOVDQA CC0, CC2
- VMOVDQA DD0, DD2
- VMOVDQA DD1, TT3
- MOVQ $10, itr2
+ VMOVDQA Y0, Y5
+ VMOVDQA Y14, Y9
+ VMOVDQA Y12, Y13
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VMOVDQA Y0, Y6
+ VMOVDQA Y14, Y10
+ VMOVDQA Y12, Y8
+ VMOVDQA Y4, Y2
+ VMOVDQA Y1, Y15
+ MOVQ $0x0000000a, R9
sealAVX2192InnerCipherLoop:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1
- DECQ itr2
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ DECQ R9
JNE sealAVX2192InnerCipherLoop
- VPADDD AA2, AA0, AA0; VPADDD AA2, AA1, AA1
- VPADDD BB2, BB0, BB0; VPADDD BB2, BB1, BB1
- VPADDD CC2, CC0, CC0; VPADDD CC2, CC1, CC1
- VPADDD DD2, DD0, DD0; VPADDD TT3, DD1, DD1
- VPERM2I128 $0x02, AA0, BB0, TT0
+ VPADDD Y6, Y0, Y0
+ VPADDD Y6, Y5, Y5
+ VPADDD Y10, Y14, Y14
+ VPADDD Y10, Y9, Y9
+ VPADDD Y8, Y12, Y12
+ VPADDD Y8, Y13, Y13
+ VPADDD Y2, Y4, Y4
+ VPADDD Y15, Y1, Y1
+ VPERM2I128 $0x02, Y0, Y14, Y3
// Clamp and store poly key
- VPAND Β·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
+ VPAND Β·polyClampMask<>+0(SB), Y3, Y3
+ VMOVDQA Y3, (BP)
// Stream for up to 192 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
- VPERM2I128 $0x02, AA1, BB1, CC0
- VPERM2I128 $0x02, CC1, DD1, DD0
- VPERM2I128 $0x13, AA1, BB1, AA1
- VPERM2I128 $0x13, CC1, DD1, BB1
+ VPERM2I128 $0x13, Y0, Y14, Y0
+ VPERM2I128 $0x13, Y12, Y4, Y14
+ VPERM2I128 $0x02, Y5, Y9, Y12
+ VPERM2I128 $0x02, Y13, Y1, Y4
+ VPERM2I128 $0x13, Y5, Y9, Y5
+ VPERM2I128 $0x13, Y13, Y1, Y9
sealAVX2ShortSeal:
// Hash aad
- MOVQ ad_len+80(FP), itr2
+ MOVQ ad_len+80(FP), R9
CALL polyHashADInternal<>(SB)
- XORQ itr1, itr1
+ XORQ CX, CX
sealAVX2SealHash:
// itr1 holds the number of bytes encrypted but not yet hashed
- CMPQ itr1, $16
- JB sealAVX2ShortSealLoop
- polyAdd(0(oup))
- polyMul
- SUBQ $16, itr1
- ADDQ $16, oup
- JMP sealAVX2SealHash
+ CMPQ CX, $0x10
+ JB sealAVX2ShortSealLoop
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ SUBQ $0x10, CX
+ ADDQ $0x10, DI
+ JMP sealAVX2SealHash
sealAVX2ShortSealLoop:
- CMPQ inl, $32
+ CMPQ BX, $0x20
JB sealAVX2ShortTail32
- SUBQ $32, inl
+ SUBQ $0x20, BX
// Load for encryption
- VPXOR (inp), AA0, AA0
- VMOVDQU AA0, (oup)
- LEAQ (1*32)(inp), inp
+ VPXOR (SI), Y0, Y0
+ VMOVDQU Y0, (DI)
+ LEAQ 32(SI), SI
// Now can hash
- polyAdd(0*8(oup))
- polyMulAVX2
- polyAdd(2*8(oup))
- polyMulAVX2
- LEAQ (1*32)(oup), oup
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ ADDQ 16(DI), R10
+ ADCQ 24(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 32(DI), DI
// Shift stream left
- VMOVDQA BB0, AA0
- VMOVDQA CC0, BB0
- VMOVDQA DD0, CC0
- VMOVDQA AA1, DD0
- VMOVDQA BB1, AA1
- VMOVDQA CC1, BB1
- VMOVDQA DD1, CC1
- VMOVDQA AA2, DD1
- VMOVDQA BB2, AA2
+ VMOVDQA Y14, Y0
+ VMOVDQA Y12, Y14
+ VMOVDQA Y4, Y12
+ VMOVDQA Y5, Y4
+ VMOVDQA Y9, Y5
+ VMOVDQA Y13, Y9
+ VMOVDQA Y1, Y13
+ VMOVDQA Y6, Y1
+ VMOVDQA Y10, Y6
JMP sealAVX2ShortSealLoop
sealAVX2ShortTail32:
- CMPQ inl, $16
- VMOVDQA A0, A1
+ CMPQ BX, $0x10
+ VMOVDQA X0, X1
JB sealAVX2ShortDone
-
- SUBQ $16, inl
+ SUBQ $0x10, BX
// Load for encryption
- VPXOR (inp), A0, T0
- VMOVDQU T0, (oup)
- LEAQ (1*16)(inp), inp
+ VPXOR (SI), X0, X12
+ VMOVDQU X12, (DI)
+ LEAQ 16(SI), SI
// Hash
- polyAdd(0*8(oup))
- polyMulAVX2
- LEAQ (1*16)(oup), oup
- VPERM2I128 $0x11, AA0, AA0, AA0
- VMOVDQA A0, A1
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
+ VPERM2I128 $0x11, Y0, Y0, Y0
+ VMOVDQA X0, X1
sealAVX2ShortDone:
VZEROUPPER
JMP sealSSETail
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 321 bytes
seal320AVX2:
- // For up to 320 bytes of ciphertext and 64 bytes for the poly key, we process six blocks
- VMOVDQA AA0, AA1; VMOVDQA BB0, BB1; VMOVDQA CC0, CC1; VPADDD Β·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA AA0, AA2; VMOVDQA BB0, BB2; VMOVDQA CC0, CC2; VPADDD Β·avx2IncMask<>(SB), DD1, DD2
- VMOVDQA BB0, TT1; VMOVDQA CC0, TT2; VMOVDQA DD0, TT3
- MOVQ $10, itr2
+ VMOVDQA Y0, Y5
+ VMOVDQA Y14, Y9
+ VMOVDQA Y12, Y13
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VMOVDQA Y0, Y6
+ VMOVDQA Y14, Y10
+ VMOVDQA Y12, Y8
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VMOVDQA Y14, Y7
+ VMOVDQA Y12, Y11
+ VMOVDQA Y4, Y15
+ MOVQ $0x0000000a, R9
sealAVX2320InnerCipherLoop:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2
- DECQ itr2
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y3
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y3
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y3
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y3
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x04, Y2, Y2, Y2
+ DECQ R9
JNE sealAVX2320InnerCipherLoop
-
- VMOVDQA Β·chacha20Constants<>(SB), TT0
- VPADDD TT0, AA0, AA0; VPADDD TT0, AA1, AA1; VPADDD TT0, AA2, AA2
- VPADDD TT1, BB0, BB0; VPADDD TT1, BB1, BB1; VPADDD TT1, BB2, BB2
- VPADDD TT2, CC0, CC0; VPADDD TT2, CC1, CC1; VPADDD TT2, CC2, CC2
- VMOVDQA Β·avx2IncMask<>(SB), TT0
- VPADDD TT3, DD0, DD0; VPADDD TT0, TT3, TT3
- VPADDD TT3, DD1, DD1; VPADDD TT0, TT3, TT3
- VPADDD TT3, DD2, DD2
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y3
+ VPADDD Y3, Y0, Y0
+ VPADDD Y3, Y5, Y5
+ VPADDD Y3, Y6, Y6
+ VPADDD Y7, Y14, Y14
+ VPADDD Y7, Y9, Y9
+ VPADDD Y7, Y10, Y10
+ VPADDD Y11, Y12, Y12
+ VPADDD Y11, Y13, Y13
+ VPADDD Y11, Y8, Y8
+ VMOVDQA Β·avx2IncMask<>+0(SB), Y3
+ VPADDD Y15, Y4, Y4
+ VPADDD Y3, Y15, Y15
+ VPADDD Y15, Y1, Y1
+ VPADDD Y3, Y15, Y15
+ VPADDD Y15, Y2, Y2
// Clamp and store poly key
- VPERM2I128 $0x02, AA0, BB0, TT0
- VPAND Β·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
+ VPERM2I128 $0x02, Y0, Y14, Y3
+ VPAND Β·polyClampMask<>+0(SB), Y3, Y3
+ VMOVDQA Y3, (BP)
// Stream for up to 320 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
- VPERM2I128 $0x02, AA1, BB1, CC0
- VPERM2I128 $0x02, CC1, DD1, DD0
- VPERM2I128 $0x13, AA1, BB1, AA1
- VPERM2I128 $0x13, CC1, DD1, BB1
- VPERM2I128 $0x02, AA2, BB2, CC1
- VPERM2I128 $0x02, CC2, DD2, DD1
- VPERM2I128 $0x13, AA2, BB2, AA2
- VPERM2I128 $0x13, CC2, DD2, BB2
+ VPERM2I128 $0x13, Y0, Y14, Y0
+ VPERM2I128 $0x13, Y12, Y4, Y14
+ VPERM2I128 $0x02, Y5, Y9, Y12
+ VPERM2I128 $0x02, Y13, Y1, Y4
+ VPERM2I128 $0x13, Y5, Y9, Y5
+ VPERM2I128 $0x13, Y13, Y1, Y9
+ VPERM2I128 $0x02, Y6, Y10, Y13
+ VPERM2I128 $0x02, Y8, Y2, Y1
+ VPERM2I128 $0x13, Y6, Y10, Y6
+ VPERM2I128 $0x13, Y8, Y2, Y10
JMP sealAVX2ShortSeal
-// ----------------------------------------------------------------------------
-// Special optimization for the last 128 bytes of ciphertext
sealAVX2Tail128:
- // Need to decrypt up to 128 bytes - prepare two blocks
- // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed
- // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed
- VMOVDQA Β·chacha20Constants<>(SB), AA0
- VMOVDQA state1StoreAVX2, BB0
- VMOVDQA state2StoreAVX2, CC0
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD0
- VMOVDQA DD0, DD1
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA 32(BP), Y14
+ VMOVDQA 64(BP), Y12
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VMOVDQA Y4, Y1
sealAVX2Tail128LoopA:
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
sealAVX2Tail128LoopB:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0)
- polyAdd(0(oup))
- polyMul
- VPALIGNR $4, BB0, BB0, BB0
- VPALIGNR $8, CC0, CC0, CC0
- VPALIGNR $12, DD0, DD0, DD0
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0)
- polyAdd(16(oup))
- polyMul
- LEAQ 32(oup), oup
- VPALIGNR $12, BB0, BB0, BB0
- VPALIGNR $8, CC0, CC0, CC0
- VPALIGNR $4, DD0, DD0, DD0
- DECQ itr1
- JG sealAVX2Tail128LoopA
- DECQ itr2
- JGE sealAVX2Tail128LoopB
-
- VPADDD Β·chacha20Constants<>(SB), AA0, AA1
- VPADDD state1StoreAVX2, BB0, BB1
- VPADDD state2StoreAVX2, CC0, CC1
- VPADDD DD1, DD0, DD1
-
- VPERM2I128 $0x02, AA1, BB1, AA0
- VPERM2I128 $0x02, CC1, DD1, BB0
- VPERM2I128 $0x13, AA1, BB1, CC0
- VPERM2I128 $0x13, CC1, DD1, DD0
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ ADDQ 16(DI), R10
+ ADCQ 24(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 32(DI), DI
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x04, Y4, Y4, Y4
+ DECQ CX
+ JG sealAVX2Tail128LoopA
+ DECQ R9
+ JGE sealAVX2Tail128LoopB
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y5
+ VPADDD 32(BP), Y14, Y9
+ VPADDD 64(BP), Y12, Y13
+ VPADDD Y1, Y4, Y1
+ VPERM2I128 $0x02, Y5, Y9, Y0
+ VPERM2I128 $0x02, Y13, Y1, Y14
+ VPERM2I128 $0x13, Y5, Y9, Y12
+ VPERM2I128 $0x13, Y13, Y1, Y4
JMP sealAVX2ShortSealLoop
-// ----------------------------------------------------------------------------
-// Special optimization for the last 256 bytes of ciphertext
sealAVX2Tail256:
- // Need to decrypt up to 256 bytes - prepare two blocks
- // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed
- // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed
- VMOVDQA Β·chacha20Constants<>(SB), AA0; VMOVDQA Β·chacha20Constants<>(SB), AA1
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA state1StoreAVX2, BB1
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA state2StoreAVX2, CC1
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA DD0, TT1
- VMOVDQA DD1, TT2
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y5
+ VMOVDQA 32(BP), Y14
+ VMOVDQA 32(BP), Y9
+ VMOVDQA 64(BP), Y12
+ VMOVDQA 64(BP), Y13
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VMOVDQA Y4, Y7
+ VMOVDQA Y1, Y11
sealAVX2Tail256LoopA:
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
sealAVX2Tail256LoopB:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- polyAdd(0(oup))
- polyMul
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- polyAdd(16(oup))
- polyMul
- LEAQ 32(oup), oup
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1
- DECQ itr1
- JG sealAVX2Tail256LoopA
- DECQ itr2
- JGE sealAVX2Tail256LoopB
-
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0; VPADDD Β·chacha20Constants<>(SB), AA1, AA1
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1
- VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1
- VPERM2I128 $0x02, AA0, BB0, TT0
- VPERM2I128 $0x02, CC0, DD0, TT1
- VPERM2I128 $0x13, AA0, BB0, TT2
- VPERM2I128 $0x13, CC0, DD0, TT3
- VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3
- VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup)
- MOVQ $128, itr1
- LEAQ 128(inp), inp
- SUBQ $128, inl
- VPERM2I128 $0x02, AA1, BB1, AA0
- VPERM2I128 $0x02, CC1, DD1, BB0
- VPERM2I128 $0x13, AA1, BB1, CC0
- VPERM2I128 $0x13, CC1, DD1, DD0
-
- JMP sealAVX2SealHash
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 384 bytes of ciphertext
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ ADDQ 16(DI), R10
+ ADCQ 24(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 32(DI), DI
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ DECQ CX
+ JG sealAVX2Tail256LoopA
+ DECQ R9
+ JGE sealAVX2Tail256LoopB
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 64(BP), Y13, Y13
+ VPADDD Y7, Y4, Y4
+ VPADDD Y11, Y1, Y1
+ VPERM2I128 $0x02, Y0, Y14, Y3
+ VPERM2I128 $0x02, Y12, Y4, Y7
+ VPERM2I128 $0x13, Y0, Y14, Y11
+ VPERM2I128 $0x13, Y12, Y4, Y15
+ VPXOR (SI), Y3, Y3
+ VPXOR 32(SI), Y7, Y7
+ VPXOR 64(SI), Y11, Y11
+ VPXOR 96(SI), Y15, Y15
+ VMOVDQU Y3, (DI)
+ VMOVDQU Y7, 32(DI)
+ VMOVDQU Y11, 64(DI)
+ VMOVDQU Y15, 96(DI)
+ MOVQ $0x00000080, CX
+ LEAQ 128(SI), SI
+ SUBQ $0x80, BX
+ VPERM2I128 $0x02, Y5, Y9, Y0
+ VPERM2I128 $0x02, Y13, Y1, Y14
+ VPERM2I128 $0x13, Y5, Y9, Y12
+ VPERM2I128 $0x13, Y13, Y1, Y4
+ JMP sealAVX2SealHash
+
sealAVX2Tail384:
- // Need to decrypt up to 384 bytes - prepare two blocks
- // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed
- // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed
- VMOVDQA Β·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD0; VPADDD Β·avx2IncMask<>(SB), DD0, DD1; VPADDD Β·avx2IncMask<>(SB), DD1, DD2
- VMOVDQA DD0, TT1; VMOVDQA DD1, TT2; VMOVDQA DD2, TT3
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA Y0, Y5
+ VMOVDQA Y0, Y6
+ VMOVDQA 32(BP), Y14
+ VMOVDQA Y14, Y9
+ VMOVDQA Y14, Y10
+ VMOVDQA 64(BP), Y12
+ VMOVDQA Y12, Y13
+ VMOVDQA Y12, Y8
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VMOVDQA Y4, Y7
+ VMOVDQA Y1, Y11
+ VMOVDQA Y2, Y15
sealAVX2Tail384LoopA:
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
sealAVX2Tail384LoopB:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- polyAdd(0(oup))
- polyMul
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- polyAdd(16(oup))
- polyMul
- LEAQ 32(oup), oup
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2
- DECQ itr1
- JG sealAVX2Tail384LoopA
- DECQ itr2
- JGE sealAVX2Tail384LoopB
-
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0; VPADDD Β·chacha20Constants<>(SB), AA1, AA1; VPADDD Β·chacha20Constants<>(SB), AA2, AA2
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2
- VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1; VPADDD TT3, DD2, DD2
- VPERM2I128 $0x02, AA0, BB0, TT0
- VPERM2I128 $0x02, CC0, DD0, TT1
- VPERM2I128 $0x13, AA0, BB0, TT2
- VPERM2I128 $0x13, CC0, DD0, TT3
- VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3
- VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, TT0
- VPERM2I128 $0x02, CC1, DD1, TT1
- VPERM2I128 $0x13, AA1, BB1, TT2
- VPERM2I128 $0x13, CC1, DD1, TT3
- VPXOR (4*32)(inp), TT0, TT0; VPXOR (5*32)(inp), TT1, TT1; VPXOR (6*32)(inp), TT2, TT2; VPXOR (7*32)(inp), TT3, TT3
- VMOVDQU TT0, (4*32)(oup); VMOVDQU TT1, (5*32)(oup); VMOVDQU TT2, (6*32)(oup); VMOVDQU TT3, (7*32)(oup)
- MOVQ $256, itr1
- LEAQ 256(inp), inp
- SUBQ $256, inl
- VPERM2I128 $0x02, AA2, BB2, AA0
- VPERM2I128 $0x02, CC2, DD2, BB0
- VPERM2I128 $0x13, AA2, BB2, CC0
- VPERM2I128 $0x13, CC2, DD2, DD0
-
- JMP sealAVX2SealHash
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 512 bytes of ciphertext
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y3
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y3
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x0c, Y14, Y3
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y14, Y0, Y0
+ VPXOR Y0, Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPADDD Y4, Y12, Y12
+ VPXOR Y12, Y14, Y14
+ VPSLLD $0x07, Y14, Y3
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y3, Y14, Y14
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x0c, Y9, Y3
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y9, Y5, Y5
+ VPXOR Y5, Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPADDD Y1, Y13, Y13
+ VPXOR Y13, Y9, Y9
+ VPSLLD $0x07, Y9, Y3
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y3, Y9, Y9
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x0c, Y10, Y3
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ VPADDD Y10, Y6, Y6
+ VPXOR Y6, Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPADDD Y2, Y8, Y8
+ VPXOR Y8, Y10, Y10
+ VPSLLD $0x07, Y10, Y3
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y3, Y10, Y10
+ ADDQ 16(DI), R10
+ ADCQ 24(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 32(DI), DI
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x04, Y2, Y2, Y2
+ DECQ CX
+ JG sealAVX2Tail384LoopA
+ DECQ R9
+ JGE sealAVX2Tail384LoopB
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD Β·chacha20Constants<>+0(SB), Y6, Y6
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 32(BP), Y10, Y10
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 64(BP), Y13, Y13
+ VPADDD 64(BP), Y8, Y8
+ VPADDD Y7, Y4, Y4
+ VPADDD Y11, Y1, Y1
+ VPADDD Y15, Y2, Y2
+ VPERM2I128 $0x02, Y0, Y14, Y3
+ VPERM2I128 $0x02, Y12, Y4, Y7
+ VPERM2I128 $0x13, Y0, Y14, Y11
+ VPERM2I128 $0x13, Y12, Y4, Y15
+ VPXOR (SI), Y3, Y3
+ VPXOR 32(SI), Y7, Y7
+ VPXOR 64(SI), Y11, Y11
+ VPXOR 96(SI), Y15, Y15
+ VMOVDQU Y3, (DI)
+ VMOVDQU Y7, 32(DI)
+ VMOVDQU Y11, 64(DI)
+ VMOVDQU Y15, 96(DI)
+ VPERM2I128 $0x02, Y5, Y9, Y3
+ VPERM2I128 $0x02, Y13, Y1, Y7
+ VPERM2I128 $0x13, Y5, Y9, Y11
+ VPERM2I128 $0x13, Y13, Y1, Y15
+ VPXOR 128(SI), Y3, Y3
+ VPXOR 160(SI), Y7, Y7
+ VPXOR 192(SI), Y11, Y11
+ VPXOR 224(SI), Y15, Y15
+ VMOVDQU Y3, 128(DI)
+ VMOVDQU Y7, 160(DI)
+ VMOVDQU Y11, 192(DI)
+ VMOVDQU Y15, 224(DI)
+ MOVQ $0x00000100, CX
+ LEAQ 256(SI), SI
+ SUBQ $0x00000100, BX
+ VPERM2I128 $0x02, Y6, Y10, Y0
+ VPERM2I128 $0x02, Y8, Y2, Y14
+ VPERM2I128 $0x13, Y6, Y10, Y12
+ VPERM2I128 $0x13, Y8, Y2, Y4
+ JMP sealAVX2SealHash
+
sealAVX2Tail512:
- // Need to decrypt up to 512 bytes - prepare two blocks
- // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed
- // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed
- VMOVDQA Β·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD Β·avx2IncMask<>(SB), DD0, DD0; VPADDD Β·avx2IncMask<>(SB), DD0, DD1; VPADDD Β·avx2IncMask<>(SB), DD1, DD2; VPADDD Β·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
+ VMOVDQA Β·chacha20Constants<>+0(SB), Y0
+ VMOVDQA Y0, Y5
+ VMOVDQA Y0, Y6
+ VMOVDQA Y0, Y7
+ VMOVDQA 32(BP), Y14
+ VMOVDQA Y14, Y9
+ VMOVDQA Y14, Y10
+ VMOVDQA Y14, Y11
+ VMOVDQA 64(BP), Y12
+ VMOVDQA Y12, Y13
+ VMOVDQA Y12, Y8
+ VMOVDQA Y12, Y15
+ VMOVDQA 192(BP), Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y4
+ VPADDD Β·avx2IncMask<>+0(SB), Y4, Y1
+ VPADDD Β·avx2IncMask<>+0(SB), Y1, Y2
+ VPADDD Β·avx2IncMask<>+0(SB), Y2, Y3
+ VMOVDQA Y4, 96(BP)
+ VMOVDQA Y1, 128(BP)
+ VMOVDQA Y2, 160(BP)
+ VMOVDQA Y3, 192(BP)
sealAVX2Tail512LoopA:
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), AX
+ MOVQ AX, R15
+ MULQ R10
+ MOVQ AX, R13
+ MOVQ DX, R14
+ MOVQ (BP), AX
+ MULQ R11
+ IMULQ R12, R15
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), AX
+ MOVQ AX, R8
+ MULQ R10
+ ADDQ AX, R14
+ ADCQ $0x00, DX
+ MOVQ DX, R10
+ MOVQ 8(BP), AX
+ MULQ R11
+ ADDQ AX, R15
+ ADCQ $0x00, DX
+ IMULQ R12, R8
+ ADDQ R10, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 16(DI), DI
sealAVX2Tail512LoopB:
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol16<>(SB), DD0, DD0; VPSHUFB Β·rol16<>(SB), DD1, DD1; VPSHUFB Β·rol16<>(SB), DD2, DD2; VPSHUFB Β·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyAdd(0*8(oup))
- polyMulAVX2
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol8<>(SB), DD0, DD0; VPSHUFB Β·rol8<>(SB), DD1, DD1; VPSHUFB Β·rol8<>(SB), DD2, DD2; VPSHUFB Β·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol16<>(SB), DD0, DD0; VPSHUFB Β·rol16<>(SB), DD1, DD1; VPSHUFB Β·rol16<>(SB), DD2, DD2; VPSHUFB Β·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyAdd(2*8(oup))
- polyMulAVX2
- LEAQ (4*8)(oup), oup
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB Β·rol8<>(SB), DD0, DD0; VPSHUFB Β·rol8<>(SB), DD1, DD1; VPSHUFB Β·rol8<>(SB), DD2, DD2; VPSHUFB Β·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3
-
- DECQ itr1
- JG sealAVX2Tail512LoopA
- DECQ itr2
- JGE sealAVX2Tail512LoopB
-
- VPADDD Β·chacha20Constants<>(SB), AA0, AA0; VPADDD Β·chacha20Constants<>(SB), AA1, AA1; VPADDD Β·chacha20Constants<>(SB), AA2, AA2; VPADDD Β·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
- VMOVDQA CC3, tmpStoreAVX2
- VPERM2I128 $0x02, AA0, BB0, CC3
- VPXOR (0*32)(inp), CC3, CC3
- VMOVDQU CC3, (0*32)(oup)
- VPERM2I128 $0x02, CC0, DD0, CC3
- VPXOR (1*32)(inp), CC3, CC3
- VMOVDQU CC3, (1*32)(oup)
- VPERM2I128 $0x13, AA0, BB0, CC3
- VPXOR (2*32)(inp), CC3, CC3
- VMOVDQU CC3, (2*32)(oup)
- VPERM2I128 $0x13, CC0, DD0, CC3
- VPXOR (3*32)(inp), CC3, CC3
- VMOVDQU CC3, (3*32)(oup)
-
- VPERM2I128 $0x02, AA1, BB1, AA0
- VPERM2I128 $0x02, CC1, DD1, BB0
- VPERM2I128 $0x13, AA1, BB1, CC0
- VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0
- VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup)
-
- VPERM2I128 $0x02, AA2, BB2, AA0
- VPERM2I128 $0x02, CC2, DD2, BB0
- VPERM2I128 $0x13, AA2, BB2, CC0
- VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0
- VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup)
-
- MOVQ $384, itr1
- LEAQ 384(inp), inp
- SUBQ $384, inl
- VPERM2I128 $0x02, AA3, BB3, AA0
- VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0
- VPERM2I128 $0x13, AA3, BB3, CC0
- VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0
-
- JMP sealAVX2SealHash
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x0c, Y11, Y15
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ ADDQ (DI), R10
+ ADCQ 8(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x07, Y11, Y15
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ VPALIGNR $0x04, Y14, Y14, Y14
+ VPALIGNR $0x04, Y9, Y9, Y9
+ VPALIGNR $0x04, Y10, Y10, Y10
+ VPALIGNR $0x04, Y11, Y11, Y11
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x0c, Y4, Y4, Y4
+ VPALIGNR $0x0c, Y1, Y1, Y1
+ VPALIGNR $0x0c, Y2, Y2, Y2
+ VPALIGNR $0x0c, Y3, Y3, Y3
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol16<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol16<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol16<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol16<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ ADDQ 16(DI), R10
+ ADCQ 24(DI), R11
+ ADCQ $0x01, R12
+ MOVQ (BP), DX
+ MOVQ DX, R15
+ MULXQ R10, R13, R14
+ IMULQ R12, R15
+ MULXQ R11, AX, DX
+ ADDQ AX, R14
+ ADCQ DX, R15
+ MOVQ 8(BP), DX
+ MULXQ R10, R10, AX
+ ADDQ R10, R14
+ MULXQ R11, R11, R8
+ ADCQ R11, R15
+ ADCQ $0x00, R8
+ IMULQ R12, DX
+ ADDQ AX, R15
+ ADCQ DX, R8
+ MOVQ R13, R10
+ MOVQ R14, R11
+ MOVQ R15, R12
+ ANDQ $0x03, R12
+ MOVQ R15, R13
+ ANDQ $-4, R13
+ MOVQ R8, R14
+ SHRQ $0x02, R8, R15
+ SHRQ $0x02, R8
+ ADDQ R13, R10
+ ADCQ R14, R11
+ ADCQ $0x00, R12
+ ADDQ R15, R10
+ ADCQ R8, R11
+ ADCQ $0x00, R12
+ LEAQ 32(DI), DI
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x0c, Y14, Y15
+ VPSRLD $0x14, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x0c, Y9, Y15
+ VPSRLD $0x14, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x0c, Y10, Y15
+ VPSRLD $0x14, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x0c, Y11, Y15
+ VPSRLD $0x14, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ VPADDD Y14, Y0, Y0
+ VPADDD Y9, Y5, Y5
+ VPADDD Y10, Y6, Y6
+ VPADDD Y11, Y7, Y7
+ VPXOR Y0, Y4, Y4
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ VPSHUFB Β·rol8<>+0(SB), Y4, Y4
+ VPSHUFB Β·rol8<>+0(SB), Y1, Y1
+ VPSHUFB Β·rol8<>+0(SB), Y2, Y2
+ VPSHUFB Β·rol8<>+0(SB), Y3, Y3
+ VPADDD Y4, Y12, Y12
+ VPADDD Y1, Y13, Y13
+ VPADDD Y2, Y8, Y8
+ VPADDD Y3, Y15, Y15
+ VPXOR Y12, Y14, Y14
+ VPXOR Y13, Y9, Y9
+ VPXOR Y8, Y10, Y10
+ VPXOR Y15, Y11, Y11
+ VMOVDQA Y15, 224(BP)
+ VPSLLD $0x07, Y14, Y15
+ VPSRLD $0x19, Y14, Y14
+ VPXOR Y15, Y14, Y14
+ VPSLLD $0x07, Y9, Y15
+ VPSRLD $0x19, Y9, Y9
+ VPXOR Y15, Y9, Y9
+ VPSLLD $0x07, Y10, Y15
+ VPSRLD $0x19, Y10, Y10
+ VPXOR Y15, Y10, Y10
+ VPSLLD $0x07, Y11, Y15
+ VPSRLD $0x19, Y11, Y11
+ VPXOR Y15, Y11, Y11
+ VMOVDQA 224(BP), Y15
+ VPALIGNR $0x0c, Y14, Y14, Y14
+ VPALIGNR $0x0c, Y9, Y9, Y9
+ VPALIGNR $0x0c, Y10, Y10, Y10
+ VPALIGNR $0x0c, Y11, Y11, Y11
+ VPALIGNR $0x08, Y12, Y12, Y12
+ VPALIGNR $0x08, Y13, Y13, Y13
+ VPALIGNR $0x08, Y8, Y8, Y8
+ VPALIGNR $0x08, Y15, Y15, Y15
+ VPALIGNR $0x04, Y4, Y4, Y4
+ VPALIGNR $0x04, Y1, Y1, Y1
+ VPALIGNR $0x04, Y2, Y2, Y2
+ VPALIGNR $0x04, Y3, Y3, Y3
+ DECQ CX
+ JG sealAVX2Tail512LoopA
+ DECQ R9
+ JGE sealAVX2Tail512LoopB
+ VPADDD Β·chacha20Constants<>+0(SB), Y0, Y0
+ VPADDD Β·chacha20Constants<>+0(SB), Y5, Y5
+ VPADDD Β·chacha20Constants<>+0(SB), Y6, Y6
+ VPADDD Β·chacha20Constants<>+0(SB), Y7, Y7
+ VPADDD 32(BP), Y14, Y14
+ VPADDD 32(BP), Y9, Y9
+ VPADDD 32(BP), Y10, Y10
+ VPADDD 32(BP), Y11, Y11
+ VPADDD 64(BP), Y12, Y12
+ VPADDD 64(BP), Y13, Y13
+ VPADDD 64(BP), Y8, Y8
+ VPADDD 64(BP), Y15, Y15
+ VPADDD 96(BP), Y4, Y4
+ VPADDD 128(BP), Y1, Y1
+ VPADDD 160(BP), Y2, Y2
+ VPADDD 192(BP), Y3, Y3
+ VMOVDQA Y15, 224(BP)
+ VPERM2I128 $0x02, Y0, Y14, Y15
+ VPXOR (SI), Y15, Y15
+ VMOVDQU Y15, (DI)
+ VPERM2I128 $0x02, Y12, Y4, Y15
+ VPXOR 32(SI), Y15, Y15
+ VMOVDQU Y15, 32(DI)
+ VPERM2I128 $0x13, Y0, Y14, Y15
+ VPXOR 64(SI), Y15, Y15
+ VMOVDQU Y15, 64(DI)
+ VPERM2I128 $0x13, Y12, Y4, Y15
+ VPXOR 96(SI), Y15, Y15
+ VMOVDQU Y15, 96(DI)
+ VPERM2I128 $0x02, Y5, Y9, Y0
+ VPERM2I128 $0x02, Y13, Y1, Y14
+ VPERM2I128 $0x13, Y5, Y9, Y12
+ VPERM2I128 $0x13, Y13, Y1, Y4
+ VPXOR 128(SI), Y0, Y0
+ VPXOR 160(SI), Y14, Y14
+ VPXOR 192(SI), Y12, Y12
+ VPXOR 224(SI), Y4, Y4
+ VMOVDQU Y0, 128(DI)
+ VMOVDQU Y14, 160(DI)
+ VMOVDQU Y12, 192(DI)
+ VMOVDQU Y4, 224(DI)
+ VPERM2I128 $0x02, Y6, Y10, Y0
+ VPERM2I128 $0x02, Y8, Y2, Y14
+ VPERM2I128 $0x13, Y6, Y10, Y12
+ VPERM2I128 $0x13, Y8, Y2, Y4
+ VPXOR 256(SI), Y0, Y0
+ VPXOR 288(SI), Y14, Y14
+ VPXOR 320(SI), Y12, Y12
+ VPXOR 352(SI), Y4, Y4
+ VMOVDQU Y0, 256(DI)
+ VMOVDQU Y14, 288(DI)
+ VMOVDQU Y12, 320(DI)
+ VMOVDQU Y4, 352(DI)
+ MOVQ $0x00000180, CX
+ LEAQ 384(SI), SI
+ SUBQ $0x00000180, BX
+ VPERM2I128 $0x02, Y7, Y11, Y0
+ VPERM2I128 $0x02, 224(BP), Y3, Y14
+ VPERM2I128 $0x13, Y7, Y11, Y12
+ VPERM2I128 $0x13, 224(BP), Y3, Y4
+ JMP sealAVX2SealHash
diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
index cda8e3ed..90ef6a24 100644
--- a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
+++ b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
@@ -4,7 +4,7 @@
// Package asn1 contains supporting types for parsing and building ASN.1
// messages with the cryptobyte package.
-package asn1 // import "golang.org/x/crypto/cryptobyte/asn1"
+package asn1
// Tag represents an ASN.1 identifier octet, consisting of a tag number
// (indicating a type) and class (such as context-specific or constructed).
diff --git a/vendor/golang.org/x/crypto/cryptobyte/string.go b/vendor/golang.org/x/crypto/cryptobyte/string.go
index 10692a8a..4b0f8097 100644
--- a/vendor/golang.org/x/crypto/cryptobyte/string.go
+++ b/vendor/golang.org/x/crypto/cryptobyte/string.go
@@ -15,7 +15,7 @@
//
// See the documentation and examples for the Builder and String types to get
// started.
-package cryptobyte // import "golang.org/x/crypto/cryptobyte"
+package cryptobyte
// String represents a string of bytes. It provides methods for parsing
// fixed-length and length-prefixed values from it.
diff --git a/vendor/golang.org/x/crypto/hkdf/hkdf.go b/vendor/golang.org/x/crypto/hkdf/hkdf.go
index f4ded5fe..3bee6629 100644
--- a/vendor/golang.org/x/crypto/hkdf/hkdf.go
+++ b/vendor/golang.org/x/crypto/hkdf/hkdf.go
@@ -8,7 +8,7 @@
// HKDF is a cryptographic key derivation function (KDF) with the goal of
// expanding limited input keying material into one or more cryptographically
// strong secret keys.
-package hkdf // import "golang.org/x/crypto/hkdf"
+package hkdf
import (
"crypto/hmac"
diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s
index e0d3c647..13375738 100644
--- a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s
@@ -1,108 +1,93 @@
-// Copyright 2012 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.
+// Code generated by command: go run sum_amd64_asm.go -out ../sum_amd64.s -pkg poly1305. DO NOT EDIT.
//go:build gc && !purego
-#include "textflag.h"
-
-#define POLY1305_ADD(msg, h0, h1, h2) \
- ADDQ 0(msg), h0; \
- ADCQ 8(msg), h1; \
- ADCQ $1, h2; \
- LEAQ 16(msg), msg
-
-#define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3) \
- MOVQ r0, AX; \
- MULQ h0; \
- MOVQ AX, t0; \
- MOVQ DX, t1; \
- MOVQ r0, AX; \
- MULQ h1; \
- ADDQ AX, t1; \
- ADCQ $0, DX; \
- MOVQ r0, t2; \
- IMULQ h2, t2; \
- ADDQ DX, t2; \
- \
- MOVQ r1, AX; \
- MULQ h0; \
- ADDQ AX, t1; \
- ADCQ $0, DX; \
- MOVQ DX, h0; \
- MOVQ r1, t3; \
- IMULQ h2, t3; \
- MOVQ r1, AX; \
- MULQ h1; \
- ADDQ AX, t2; \
- ADCQ DX, t3; \
- ADDQ h0, t2; \
- ADCQ $0, t3; \
- \
- MOVQ t0, h0; \
- MOVQ t1, h1; \
- MOVQ t2, h2; \
- ANDQ $3, h2; \
- MOVQ t2, t0; \
- ANDQ $0xFFFFFFFFFFFFFFFC, t0; \
- ADDQ t0, h0; \
- ADCQ t3, h1; \
- ADCQ $0, h2; \
- SHRQ $2, t3, t2; \
- SHRQ $2, t3; \
- ADDQ t2, h0; \
- ADCQ t3, h1; \
- ADCQ $0, h2
-
-// func update(state *[7]uint64, msg []byte)
+// func update(state *macState, msg []byte)
TEXT Β·update(SB), $0-32
MOVQ state+0(FP), DI
MOVQ msg_base+8(FP), SI
MOVQ msg_len+16(FP), R15
-
- MOVQ 0(DI), R8 // h0
- MOVQ 8(DI), R9 // h1
- MOVQ 16(DI), R10 // h2
- MOVQ 24(DI), R11 // r0
- MOVQ 32(DI), R12 // r1
-
- CMPQ R15, $16
+ MOVQ (DI), R8
+ MOVQ 8(DI), R9
+ MOVQ 16(DI), R10
+ MOVQ 24(DI), R11
+ MOVQ 32(DI), R12
+ CMPQ R15, $0x10
JB bytes_between_0_and_15
loop:
- POLY1305_ADD(SI, R8, R9, R10)
+ ADDQ (SI), R8
+ ADCQ 8(SI), R9
+ ADCQ $0x01, R10
+ LEAQ 16(SI), SI
multiply:
- POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14)
- SUBQ $16, R15
- CMPQ R15, $16
- JAE loop
+ MOVQ R11, AX
+ MULQ R8
+ MOVQ AX, BX
+ MOVQ DX, CX
+ MOVQ R11, AX
+ MULQ R9
+ ADDQ AX, CX
+ ADCQ $0x00, DX
+ MOVQ R11, R13
+ IMULQ R10, R13
+ ADDQ DX, R13
+ MOVQ R12, AX
+ MULQ R8
+ ADDQ AX, CX
+ ADCQ $0x00, DX
+ MOVQ DX, R8
+ MOVQ R12, R14
+ IMULQ R10, R14
+ MOVQ R12, AX
+ MULQ R9
+ ADDQ AX, R13
+ ADCQ DX, R14
+ ADDQ R8, R13
+ ADCQ $0x00, R14
+ MOVQ BX, R8
+ MOVQ CX, R9
+ MOVQ R13, R10
+ ANDQ $0x03, R10
+ MOVQ R13, BX
+ ANDQ $-4, BX
+ ADDQ BX, R8
+ ADCQ R14, R9
+ ADCQ $0x00, R10
+ SHRQ $0x02, R14, R13
+ SHRQ $0x02, R14
+ ADDQ R13, R8
+ ADCQ R14, R9
+ ADCQ $0x00, R10
+ SUBQ $0x10, R15
+ CMPQ R15, $0x10
+ JAE loop
bytes_between_0_and_15:
TESTQ R15, R15
JZ done
- MOVQ $1, BX
+ MOVQ $0x00000001, BX
XORQ CX, CX
XORQ R13, R13
ADDQ R15, SI
flush_buffer:
- SHLQ $8, BX, CX
- SHLQ $8, BX
+ SHLQ $0x08, BX, CX
+ SHLQ $0x08, BX
MOVB -1(SI), R13
XORQ R13, BX
DECQ SI
DECQ R15
JNZ flush_buffer
-
ADDQ BX, R8
ADCQ CX, R9
- ADCQ $0, R10
- MOVQ $16, R15
+ ADCQ $0x00, R10
+ MOVQ $0x00000010, R15
JMP multiply
done:
- MOVQ R8, 0(DI)
+ MOVQ R8, (DI)
MOVQ R9, 8(DI)
MOVQ R10, 16(DI)
RET
diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
index 904b57e0..28cd99c7 100644
--- a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
+++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
@@ -16,7 +16,7 @@ Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To
choose, you can pass the `New` functions from the different SHA packages to
pbkdf2.Key.
*/
-package pbkdf2 // import "golang.org/x/crypto/pbkdf2"
+package pbkdf2
import (
"crypto/hmac"
diff --git a/vendor/golang.org/x/net/LICENSE b/vendor/golang.org/x/net/LICENSE
index 6a66aea5..2a7cf70d 100644
--- a/vendor/golang.org/x/net/LICENSE
+++ b/vendor/golang.org/x/net/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
+Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google Inc. nor the names of its
+ * Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/vendor/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go
index 2466ae3d..3a7e5ab1 100644
--- a/vendor/golang.org/x/net/html/doc.go
+++ b/vendor/golang.org/x/net/html/doc.go
@@ -104,7 +104,7 @@ tokenization, and tokenization and tree construction stages of the WHATWG HTML
parsing specification respectively. While the tokenizer parses and normalizes
individual HTML tokens, only the parser constructs the DOM tree from the
tokenized HTML, as described in the tree construction stage of the
-specification, dynamically modifying or extending the docuemnt's DOM tree.
+specification, dynamically modifying or extending the document's DOM tree.
If your use case requires semantically well-formed HTML documents, as defined by
the WHATWG specification, the parser should be used rather than the tokenizer.
diff --git a/vendor/golang.org/x/net/http/httpguts/httplex.go b/vendor/golang.org/x/net/http/httpguts/httplex.go
index 6e071e85..9b4de940 100644
--- a/vendor/golang.org/x/net/http/httpguts/httplex.go
+++ b/vendor/golang.org/x/net/http/httpguts/httplex.go
@@ -12,7 +12,7 @@ import (
"golang.org/x/net/idna"
)
-var isTokenTable = [127]bool{
+var isTokenTable = [256]bool{
'!': true,
'#': true,
'$': true,
@@ -93,12 +93,7 @@ var isTokenTable = [127]bool{
}
func IsTokenRune(r rune) bool {
- i := int(r)
- return i < len(isTokenTable) && isTokenTable[i]
-}
-
-func isNotToken(r rune) bool {
- return !IsTokenRune(r)
+ return r < utf8.RuneSelf && isTokenTable[byte(r)]
}
// HeaderValuesContainsToken reports whether any string in values
@@ -202,8 +197,8 @@ func ValidHeaderFieldName(v string) bool {
if len(v) == 0 {
return false
}
- for _, r := range v {
- if !IsTokenRune(r) {
+ for i := 0; i < len(v); i++ {
+ if !isTokenTable[v[i]] {
return false
}
}
diff --git a/vendor/golang.org/x/net/http2/config.go b/vendor/golang.org/x/net/http2/config.go
new file mode 100644
index 00000000..de58dfb8
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/config.go
@@ -0,0 +1,122 @@
+// Copyright 2024 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 http2
+
+import (
+ "math"
+ "net/http"
+ "time"
+)
+
+// http2Config is a package-internal version of net/http.HTTP2Config.
+//
+// http.HTTP2Config was added in Go 1.24.
+// When running with a version of net/http that includes HTTP2Config,
+// we merge the configuration with the fields in Transport or Server
+// to produce an http2Config.
+//
+// Zero valued fields in http2Config are interpreted as in the
+// net/http.HTTPConfig documentation.
+//
+// Precedence order for reconciling configurations is:
+//
+// - Use the net/http.{Server,Transport}.HTTP2Config value, when non-zero.
+// - Otherwise use the http2.{Server.Transport} value.
+// - If the resulting value is zero or out of range, use a default.
+type http2Config struct {
+ MaxConcurrentStreams uint32
+ MaxDecoderHeaderTableSize uint32
+ MaxEncoderHeaderTableSize uint32
+ MaxReadFrameSize uint32
+ MaxUploadBufferPerConnection int32
+ MaxUploadBufferPerStream int32
+ SendPingTimeout time.Duration
+ PingTimeout time.Duration
+ WriteByteTimeout time.Duration
+ PermitProhibitedCipherSuites bool
+ CountError func(errType string)
+}
+
+// configFromServer merges configuration settings from
+// net/http.Server.HTTP2Config and http2.Server.
+func configFromServer(h1 *http.Server, h2 *Server) http2Config {
+ conf := http2Config{
+ MaxConcurrentStreams: h2.MaxConcurrentStreams,
+ MaxEncoderHeaderTableSize: h2.MaxEncoderHeaderTableSize,
+ MaxDecoderHeaderTableSize: h2.MaxDecoderHeaderTableSize,
+ MaxReadFrameSize: h2.MaxReadFrameSize,
+ MaxUploadBufferPerConnection: h2.MaxUploadBufferPerConnection,
+ MaxUploadBufferPerStream: h2.MaxUploadBufferPerStream,
+ SendPingTimeout: h2.ReadIdleTimeout,
+ PingTimeout: h2.PingTimeout,
+ WriteByteTimeout: h2.WriteByteTimeout,
+ PermitProhibitedCipherSuites: h2.PermitProhibitedCipherSuites,
+ CountError: h2.CountError,
+ }
+ fillNetHTTPServerConfig(&conf, h1)
+ setConfigDefaults(&conf, true)
+ return conf
+}
+
+// configFromServer merges configuration settings from h2 and h2.t1.HTTP2
+// (the net/http Transport).
+func configFromTransport(h2 *Transport) http2Config {
+ conf := http2Config{
+ MaxEncoderHeaderTableSize: h2.MaxEncoderHeaderTableSize,
+ MaxDecoderHeaderTableSize: h2.MaxDecoderHeaderTableSize,
+ MaxReadFrameSize: h2.MaxReadFrameSize,
+ SendPingTimeout: h2.ReadIdleTimeout,
+ PingTimeout: h2.PingTimeout,
+ WriteByteTimeout: h2.WriteByteTimeout,
+ }
+
+ // Unlike most config fields, where out-of-range values revert to the default,
+ // Transport.MaxReadFrameSize clips.
+ if conf.MaxReadFrameSize < minMaxFrameSize {
+ conf.MaxReadFrameSize = minMaxFrameSize
+ } else if conf.MaxReadFrameSize > maxFrameSize {
+ conf.MaxReadFrameSize = maxFrameSize
+ }
+
+ if h2.t1 != nil {
+ fillNetHTTPTransportConfig(&conf, h2.t1)
+ }
+ setConfigDefaults(&conf, false)
+ return conf
+}
+
+func setDefault[T ~int | ~int32 | ~uint32 | ~int64](v *T, minval, maxval, defval T) {
+ if *v < minval || *v > maxval {
+ *v = defval
+ }
+}
+
+func setConfigDefaults(conf *http2Config, server bool) {
+ setDefault(&conf.MaxConcurrentStreams, 1, math.MaxUint32, defaultMaxStreams)
+ setDefault(&conf.MaxEncoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize)
+ setDefault(&conf.MaxDecoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize)
+ if server {
+ setDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, 1<<20)
+ } else {
+ setDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, transportDefaultConnFlow)
+ }
+ if server {
+ setDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, 1<<20)
+ } else {
+ setDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, transportDefaultStreamFlow)
+ }
+ setDefault(&conf.MaxReadFrameSize, minMaxFrameSize, maxFrameSize, defaultMaxReadFrameSize)
+ setDefault(&conf.PingTimeout, 1, math.MaxInt64, 15*time.Second)
+}
+
+// adjustHTTP1MaxHeaderSize converts a limit in bytes on the size of an HTTP/1 header
+// to an HTTP/2 MAX_HEADER_LIST_SIZE value.
+func adjustHTTP1MaxHeaderSize(n int64) int64 {
+ // http2's count is in a slightly different unit and includes 32 bytes per pair.
+ // So, take the net/http.Server value and pad it up a bit, assuming 10 headers.
+ const perFieldOverhead = 32 // per http2 spec
+ const typicalHeaders = 10 // conservative
+ return n + typicalHeaders*perFieldOverhead
+}
diff --git a/vendor/golang.org/x/net/http2/config_go124.go b/vendor/golang.org/x/net/http2/config_go124.go
new file mode 100644
index 00000000..e3784123
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/config_go124.go
@@ -0,0 +1,61 @@
+// Copyright 2024 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.
+
+//go:build go1.24
+
+package http2
+
+import "net/http"
+
+// fillNetHTTPServerConfig sets fields in conf from srv.HTTP2.
+func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {
+ fillNetHTTPConfig(conf, srv.HTTP2)
+}
+
+// fillNetHTTPServerConfig sets fields in conf from tr.HTTP2.
+func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {
+ fillNetHTTPConfig(conf, tr.HTTP2)
+}
+
+func fillNetHTTPConfig(conf *http2Config, h2 *http.HTTP2Config) {
+ if h2 == nil {
+ return
+ }
+ if h2.MaxConcurrentStreams != 0 {
+ conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
+ }
+ if h2.MaxEncoderHeaderTableSize != 0 {
+ conf.MaxEncoderHeaderTableSize = uint32(h2.MaxEncoderHeaderTableSize)
+ }
+ if h2.MaxDecoderHeaderTableSize != 0 {
+ conf.MaxDecoderHeaderTableSize = uint32(h2.MaxDecoderHeaderTableSize)
+ }
+ if h2.MaxConcurrentStreams != 0 {
+ conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
+ }
+ if h2.MaxReadFrameSize != 0 {
+ conf.MaxReadFrameSize = uint32(h2.MaxReadFrameSize)
+ }
+ if h2.MaxReceiveBufferPerConnection != 0 {
+ conf.MaxUploadBufferPerConnection = int32(h2.MaxReceiveBufferPerConnection)
+ }
+ if h2.MaxReceiveBufferPerStream != 0 {
+ conf.MaxUploadBufferPerStream = int32(h2.MaxReceiveBufferPerStream)
+ }
+ if h2.SendPingTimeout != 0 {
+ conf.SendPingTimeout = h2.SendPingTimeout
+ }
+ if h2.PingTimeout != 0 {
+ conf.PingTimeout = h2.PingTimeout
+ }
+ if h2.WriteByteTimeout != 0 {
+ conf.WriteByteTimeout = h2.WriteByteTimeout
+ }
+ if h2.PermitProhibitedCipherSuites {
+ conf.PermitProhibitedCipherSuites = true
+ }
+ if h2.CountError != nil {
+ conf.CountError = h2.CountError
+ }
+}
diff --git a/vendor/golang.org/x/net/http2/config_pre_go124.go b/vendor/golang.org/x/net/http2/config_pre_go124.go
new file mode 100644
index 00000000..060fd6c6
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/config_pre_go124.go
@@ -0,0 +1,16 @@
+// Copyright 2024 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.
+
+//go:build !go1.24
+
+package http2
+
+import "net/http"
+
+// Pre-Go 1.24 fallback.
+// The Server.HTTP2 and Transport.HTTP2 config fields were added in Go 1.24.
+
+func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {}
+
+func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {}
diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go
index 43557ab7..105c3b27 100644
--- a/vendor/golang.org/x/net/http2/frame.go
+++ b/vendor/golang.org/x/net/http2/frame.go
@@ -490,6 +490,9 @@ func terminalReadFrameError(err error) bool {
// returned error is ErrFrameTooLarge. Other errors may be of type
// ConnectionError, StreamError, or anything else from the underlying
// reader.
+//
+// If ReadFrame returns an error and a non-nil Frame, the Frame's StreamID
+// indicates the stream responsible for the error.
func (fr *Framer) ReadFrame() (Frame, error) {
fr.errDetail = nil
if fr.lastFrame != nil {
@@ -1521,7 +1524,7 @@ func (fr *Framer) maxHeaderStringLen() int {
// readMetaFrame returns 0 or more CONTINUATION frames from fr and
// merge them into the provided hf and returns a MetaHeadersFrame
// with the decoded hpack values.
-func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
+func (fr *Framer) readMetaFrame(hf *HeadersFrame) (Frame, error) {
if fr.AllowIllegalReads {
return nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders")
}
@@ -1592,7 +1595,7 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
}
// It would be nice to send a RST_STREAM before sending the GOAWAY,
// but the structure of the server's frame writer makes this difficult.
- return nil, ConnectionError(ErrCodeProtocol)
+ return mh, ConnectionError(ErrCodeProtocol)
}
// Also close the connection after any CONTINUATION frame following an
@@ -1604,11 +1607,11 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
}
// It would be nice to send a RST_STREAM before sending the GOAWAY,
// but the structure of the server's frame writer makes this difficult.
- return nil, ConnectionError(ErrCodeProtocol)
+ return mh, ConnectionError(ErrCodeProtocol)
}
if _, err := hdec.Write(frag); err != nil {
- return nil, ConnectionError(ErrCodeCompression)
+ return mh, ConnectionError(ErrCodeCompression)
}
if hc.HeadersEnded() {
@@ -1625,7 +1628,7 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
mh.HeadersFrame.invalidate()
if err := hdec.Close(); err != nil {
- return nil, ConnectionError(ErrCodeCompression)
+ return mh, ConnectionError(ErrCodeCompression)
}
if invalid != nil {
fr.errDetail = invalid
diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go
index 6f2df281..7688c356 100644
--- a/vendor/golang.org/x/net/http2/http2.go
+++ b/vendor/golang.org/x/net/http2/http2.go
@@ -17,15 +17,18 @@ package http2 // import "golang.org/x/net/http2"
import (
"bufio"
+ "context"
"crypto/tls"
+ "errors"
"fmt"
- "io"
+ "net"
"net/http"
"os"
"sort"
"strconv"
"strings"
"sync"
+ "time"
"golang.org/x/net/http/httpguts"
)
@@ -210,12 +213,6 @@ type stringWriter interface {
WriteString(s string) (n int, err error)
}
-// A gate lets two goroutines coordinate their activities.
-type gate chan struct{}
-
-func (g gate) Done() { g <- struct{}{} }
-func (g gate) Wait() { <-g }
-
// A closeWaiter is like a sync.WaitGroup but only goes 1 to 0 (open to closed).
type closeWaiter chan struct{}
@@ -241,13 +238,19 @@ func (cw closeWaiter) Wait() {
// Its buffered writer is lazily allocated as needed, to minimize
// idle memory usage with many connections.
type bufferedWriter struct {
- _ incomparable
- w io.Writer // immutable
- bw *bufio.Writer // non-nil when data is buffered
+ _ incomparable
+ group synctestGroupInterface // immutable
+ conn net.Conn // immutable
+ bw *bufio.Writer // non-nil when data is buffered
+ byteTimeout time.Duration // immutable, WriteByteTimeout
}
-func newBufferedWriter(w io.Writer) *bufferedWriter {
- return &bufferedWriter{w: w}
+func newBufferedWriter(group synctestGroupInterface, conn net.Conn, timeout time.Duration) *bufferedWriter {
+ return &bufferedWriter{
+ group: group,
+ conn: conn,
+ byteTimeout: timeout,
+ }
}
// bufWriterPoolBufferSize is the size of bufio.Writer's
@@ -274,7 +277,7 @@ func (w *bufferedWriter) Available() int {
func (w *bufferedWriter) Write(p []byte) (n int, err error) {
if w.bw == nil {
bw := bufWriterPool.Get().(*bufio.Writer)
- bw.Reset(w.w)
+ bw.Reset((*bufferedWriterTimeoutWriter)(w))
w.bw = bw
}
return w.bw.Write(p)
@@ -292,6 +295,38 @@ func (w *bufferedWriter) Flush() error {
return err
}
+type bufferedWriterTimeoutWriter bufferedWriter
+
+func (w *bufferedWriterTimeoutWriter) Write(p []byte) (n int, err error) {
+ return writeWithByteTimeout(w.group, w.conn, w.byteTimeout, p)
+}
+
+// writeWithByteTimeout writes to conn.
+// If more than timeout passes without any bytes being written to the connection,
+// the write fails.
+func writeWithByteTimeout(group synctestGroupInterface, conn net.Conn, timeout time.Duration, p []byte) (n int, err error) {
+ if timeout <= 0 {
+ return conn.Write(p)
+ }
+ for {
+ var now time.Time
+ if group == nil {
+ now = time.Now()
+ } else {
+ now = group.Now()
+ }
+ conn.SetWriteDeadline(now.Add(timeout))
+ nn, err := conn.Write(p[n:])
+ n += nn
+ if n == len(p) || nn == 0 || !errors.Is(err, os.ErrDeadlineExceeded) {
+ // Either we finished the write, made no progress, or hit the deadline.
+ // Whichever it is, we're done now.
+ conn.SetWriteDeadline(time.Time{})
+ return n, err
+ }
+ }
+}
+
func mustUint31(v int32) uint32 {
if v < 0 || v > 2147483647 {
panic("out of range")
@@ -383,3 +418,14 @@ func validPseudoPath(v string) bool {
// makes that struct also non-comparable, and generally doesn't add
// any size (as long as it's first).
type incomparable [0]func()
+
+// synctestGroupInterface is the methods of synctestGroup used by Server and Transport.
+// It's defined as an interface here to let us keep synctestGroup entirely test-only
+// and not a part of non-test builds.
+type synctestGroupInterface interface {
+ Join()
+ Now() time.Time
+ NewTimer(d time.Duration) timer
+ AfterFunc(d time.Duration, f func()) timer
+ ContextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc)
+}
diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go
index ce2e8b40..617b4a47 100644
--- a/vendor/golang.org/x/net/http2/server.go
+++ b/vendor/golang.org/x/net/http2/server.go
@@ -29,6 +29,7 @@ import (
"bufio"
"bytes"
"context"
+ "crypto/rand"
"crypto/tls"
"errors"
"fmt"
@@ -52,10 +53,14 @@ import (
)
const (
- prefaceTimeout = 10 * time.Second
- firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway
- handlerChunkWriteSize = 4 << 10
- defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to?
+ prefaceTimeout = 10 * time.Second
+ firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway
+ handlerChunkWriteSize = 4 << 10
+ defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to?
+
+ // maxQueuedControlFrames is the maximum number of control frames like
+ // SETTINGS, PING and RST_STREAM that will be queued for writing before
+ // the connection is closed to prevent memory exhaustion attacks.
maxQueuedControlFrames = 10000
)
@@ -127,6 +132,22 @@ type Server struct {
// If zero or negative, there is no timeout.
IdleTimeout time.Duration
+ // ReadIdleTimeout is the timeout after which a health check using a ping
+ // frame will be carried out if no frame is received on the connection.
+ // If zero, no health check is performed.
+ ReadIdleTimeout time.Duration
+
+ // PingTimeout is the timeout after which the connection will be closed
+ // if a response to a ping is not received.
+ // If zero, a default of 15 seconds is used.
+ PingTimeout time.Duration
+
+ // WriteByteTimeout is the timeout after which a connection will be
+ // closed if no data can be written to it. The timeout begins when data is
+ // available to write, and is extended whenever any bytes are written.
+ // If zero or negative, there is no timeout.
+ WriteByteTimeout time.Duration
+
// MaxUploadBufferPerConnection is the size of the initial flow
// control window for each connections. The HTTP/2 spec does not
// allow this to be smaller than 65535 or larger than 2^32-1.
@@ -154,57 +175,39 @@ type Server struct {
// so that we don't embed a Mutex in this struct, which will make the
// struct non-copyable, which might break some callers.
state *serverInternalState
-}
-
-func (s *Server) initialConnRecvWindowSize() int32 {
- if s.MaxUploadBufferPerConnection >= initialWindowSize {
- return s.MaxUploadBufferPerConnection
- }
- return 1 << 20
-}
-func (s *Server) initialStreamRecvWindowSize() int32 {
- if s.MaxUploadBufferPerStream > 0 {
- return s.MaxUploadBufferPerStream
- }
- return 1 << 20
+ // Synchronization group used for testing.
+ // Outside of tests, this is nil.
+ group synctestGroupInterface
}
-func (s *Server) maxReadFrameSize() uint32 {
- if v := s.MaxReadFrameSize; v >= minMaxFrameSize && v <= maxFrameSize {
- return v
+func (s *Server) markNewGoroutine() {
+ if s.group != nil {
+ s.group.Join()
}
- return defaultMaxReadFrameSize
}
-func (s *Server) maxConcurrentStreams() uint32 {
- if v := s.MaxConcurrentStreams; v > 0 {
- return v
+func (s *Server) now() time.Time {
+ if s.group != nil {
+ return s.group.Now()
}
- return defaultMaxStreams
+ return time.Now()
}
-func (s *Server) maxDecoderHeaderTableSize() uint32 {
- if v := s.MaxDecoderHeaderTableSize; v > 0 {
- return v
+// newTimer creates a new time.Timer, or a synthetic timer in tests.
+func (s *Server) newTimer(d time.Duration) timer {
+ if s.group != nil {
+ return s.group.NewTimer(d)
}
- return initialHeaderTableSize
+ return timeTimer{time.NewTimer(d)}
}
-func (s *Server) maxEncoderHeaderTableSize() uint32 {
- if v := s.MaxEncoderHeaderTableSize; v > 0 {
- return v
+// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests.
+func (s *Server) afterFunc(d time.Duration, f func()) timer {
+ if s.group != nil {
+ return s.group.AfterFunc(d, f)
}
- return initialHeaderTableSize
-}
-
-// maxQueuedControlFrames is the maximum number of control frames like
-// SETTINGS, PING and RST_STREAM that will be queued for writing before
-// the connection is closed to prevent memory exhaustion attacks.
-func (s *Server) maxQueuedControlFrames() int {
- // TODO: if anybody asks, add a Server field, and remember to define the
- // behavior of negative values.
- return maxQueuedControlFrames
+ return timeTimer{time.AfterFunc(d, f)}
}
type serverInternalState struct {
@@ -400,16 +403,22 @@ func (o *ServeConnOpts) handler() http.Handler {
//
// The opts parameter is optional. If nil, default values are used.
func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
+ s.serveConn(c, opts, nil)
+}
+
+func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverConn)) {
baseCtx, cancel := serverConnBaseContext(c, opts)
defer cancel()
+ http1srv := opts.baseConfig()
+ conf := configFromServer(http1srv, s)
sc := &serverConn{
srv: s,
- hs: opts.baseConfig(),
+ hs: http1srv,
conn: c,
baseCtx: baseCtx,
remoteAddrStr: c.RemoteAddr().String(),
- bw: newBufferedWriter(c),
+ bw: newBufferedWriter(s.group, c, conf.WriteByteTimeout),
handler: opts.handler(),
streams: make(map[uint32]*stream),
readFrameCh: make(chan readFrameResult),
@@ -419,13 +428,19 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
bodyReadCh: make(chan bodyReadMsg), // buffering doesn't matter either way
doneServing: make(chan struct{}),
clientMaxStreams: math.MaxUint32, // Section 6.5.2: "Initially, there is no limit to this value"
- advMaxStreams: s.maxConcurrentStreams(),
+ advMaxStreams: conf.MaxConcurrentStreams,
initialStreamSendWindowSize: initialWindowSize,
+ initialStreamRecvWindowSize: conf.MaxUploadBufferPerStream,
maxFrameSize: initialMaxFrameSize,
+ pingTimeout: conf.PingTimeout,
+ countErrorFunc: conf.CountError,
serveG: newGoroutineLock(),
pushEnabled: true,
sawClientPreface: opts.SawClientPreface,
}
+ if newf != nil {
+ newf(sc)
+ }
s.state.registerConn(sc)
defer s.state.unregisterConn(sc)
@@ -451,15 +466,15 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
sc.flow.add(initialWindowSize)
sc.inflow.init(initialWindowSize)
sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf)
- sc.hpackEncoder.SetMaxDynamicTableSizeLimit(s.maxEncoderHeaderTableSize())
+ sc.hpackEncoder.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize)
fr := NewFramer(sc.bw, c)
- if s.CountError != nil {
- fr.countError = s.CountError
+ if conf.CountError != nil {
+ fr.countError = conf.CountError
}
- fr.ReadMetaHeaders = hpack.NewDecoder(s.maxDecoderHeaderTableSize(), nil)
+ fr.ReadMetaHeaders = hpack.NewDecoder(conf.MaxDecoderHeaderTableSize, nil)
fr.MaxHeaderListSize = sc.maxHeaderListSize()
- fr.SetMaxReadFrameSize(s.maxReadFrameSize())
+ fr.SetMaxReadFrameSize(conf.MaxReadFrameSize)
sc.framer = fr
if tc, ok := c.(connectionStater); ok {
@@ -492,7 +507,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
// So for now, do nothing here again.
}
- if !s.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) {
+ if !conf.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) {
// "Endpoints MAY choose to generate a connection error
// (Section 5.4.1) of type INADEQUATE_SECURITY if one of
// the prohibited cipher suites are negotiated."
@@ -529,7 +544,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
opts.UpgradeRequest = nil
}
- sc.serve()
+ sc.serve(conf)
}
func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx context.Context, cancel func()) {
@@ -569,6 +584,7 @@ type serverConn struct {
tlsState *tls.ConnectionState // shared by all handlers, like net/http
remoteAddrStr string
writeSched WriteScheduler
+ countErrorFunc func(errType string)
// Everything following is owned by the serve loop; use serveG.check():
serveG goroutineLock // used to verify funcs are on serve()
@@ -588,6 +604,7 @@ type serverConn struct {
streams map[uint32]*stream
unstartedHandlers []unstartedHandler
initialStreamSendWindowSize int32
+ initialStreamRecvWindowSize int32
maxFrameSize int32
peerMaxHeaderListSize uint32 // zero means unknown (default)
canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case
@@ -598,9 +615,14 @@ type serverConn struct {
inGoAway bool // we've started to or sent GOAWAY
inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop
needToSendGoAway bool // we need to schedule a GOAWAY frame write
+ pingSent bool
+ sentPingData [8]byte
goAwayCode ErrCode
- shutdownTimer *time.Timer // nil until used
- idleTimer *time.Timer // nil if unused
+ shutdownTimer timer // nil until used
+ idleTimer timer // nil if unused
+ readIdleTimeout time.Duration
+ pingTimeout time.Duration
+ readIdleTimer timer // nil if unused
// Owned by the writeFrameAsync goroutine:
headerWriteBuf bytes.Buffer
@@ -615,11 +637,7 @@ func (sc *serverConn) maxHeaderListSize() uint32 {
if n <= 0 {
n = http.DefaultMaxHeaderBytes
}
- // http2's count is in a slightly different unit and includes 32 bytes per pair.
- // So, take the net/http.Server value and pad it up a bit, assuming 10 headers.
- const perFieldOverhead = 32 // per http2 spec
- const typicalHeaders = 10 // conservative
- return uint32(n + typicalHeaders*perFieldOverhead)
+ return uint32(adjustHTTP1MaxHeaderSize(int64(n)))
}
func (sc *serverConn) curOpenStreams() uint32 {
@@ -649,12 +667,12 @@ type stream struct {
flow outflow // limits writing from Handler to client
inflow inflow // what the client is allowed to POST/etc to us
state streamState
- resetQueued bool // RST_STREAM queued for write; set by sc.resetStream
- gotTrailerHeader bool // HEADER frame for trailers was seen
- wroteHeaders bool // whether we wrote headers (not status 100)
- readDeadline *time.Timer // nil if unused
- writeDeadline *time.Timer // nil if unused
- closeErr error // set before cw is closed
+ resetQueued bool // RST_STREAM queued for write; set by sc.resetStream
+ gotTrailerHeader bool // HEADER frame for trailers was seen
+ wroteHeaders bool // whether we wrote headers (not status 100)
+ readDeadline timer // nil if unused
+ writeDeadline timer // nil if unused
+ closeErr error // set before cw is closed
trailer http.Header // accumulated trailers
reqTrailer http.Header // handler's Request.Trailer
@@ -732,11 +750,7 @@ func isClosedConnError(err error) bool {
return false
}
- // TODO: remove this string search and be more like the Windows
- // case below. That might involve modifying the standard library
- // to return better error types.
- str := err.Error()
- if strings.Contains(str, "use of closed network connection") {
+ if errors.Is(err, net.ErrClosed) {
return true
}
@@ -815,8 +829,9 @@ type readFrameResult struct {
// consumer is done with the frame.
// It's run on its own goroutine.
func (sc *serverConn) readFrames() {
- gate := make(gate)
- gateDone := gate.Done
+ sc.srv.markNewGoroutine()
+ gate := make(chan struct{})
+ gateDone := func() { gate <- struct{}{} }
for {
f, err := sc.framer.ReadFrame()
select {
@@ -847,6 +862,7 @@ type frameWriteResult struct {
// At most one goroutine can be running writeFrameAsync at a time per
// serverConn.
func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest, wd *writeData) {
+ sc.srv.markNewGoroutine()
var err error
if wd == nil {
err = wr.write.writeFrame(sc)
@@ -885,7 +901,7 @@ func (sc *serverConn) notePanic() {
}
}
-func (sc *serverConn) serve() {
+func (sc *serverConn) serve(conf http2Config) {
sc.serveG.check()
defer sc.notePanic()
defer sc.conn.Close()
@@ -899,18 +915,18 @@ func (sc *serverConn) serve() {
sc.writeFrame(FrameWriteRequest{
write: writeSettings{
- {SettingMaxFrameSize, sc.srv.maxReadFrameSize()},
+ {SettingMaxFrameSize, conf.MaxReadFrameSize},
{SettingMaxConcurrentStreams, sc.advMaxStreams},
{SettingMaxHeaderListSize, sc.maxHeaderListSize()},
- {SettingHeaderTableSize, sc.srv.maxDecoderHeaderTableSize()},
- {SettingInitialWindowSize, uint32(sc.srv.initialStreamRecvWindowSize())},
+ {SettingHeaderTableSize, conf.MaxDecoderHeaderTableSize},
+ {SettingInitialWindowSize, uint32(sc.initialStreamRecvWindowSize)},
},
})
sc.unackedSettings++
// Each connection starts with initialWindowSize inflow tokens.
// If a higher value is configured, we add more tokens.
- if diff := sc.srv.initialConnRecvWindowSize() - initialWindowSize; diff > 0 {
+ if diff := conf.MaxUploadBufferPerConnection - initialWindowSize; diff > 0 {
sc.sendWindowUpdate(nil, int(diff))
}
@@ -926,15 +942,22 @@ func (sc *serverConn) serve() {
sc.setConnState(http.StateIdle)
if sc.srv.IdleTimeout > 0 {
- sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)
+ sc.idleTimer = sc.srv.afterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)
defer sc.idleTimer.Stop()
}
+ if conf.SendPingTimeout > 0 {
+ sc.readIdleTimeout = conf.SendPingTimeout
+ sc.readIdleTimer = sc.srv.afterFunc(conf.SendPingTimeout, sc.onReadIdleTimer)
+ defer sc.readIdleTimer.Stop()
+ }
+
go sc.readFrames() // closed by defer sc.conn.Close above
- settingsTimer := time.AfterFunc(firstSettingsTimeout, sc.onSettingsTimer)
+ settingsTimer := sc.srv.afterFunc(firstSettingsTimeout, sc.onSettingsTimer)
defer settingsTimer.Stop()
+ lastFrameTime := sc.srv.now()
loopNum := 0
for {
loopNum++
@@ -948,6 +971,7 @@ func (sc *serverConn) serve() {
case res := <-sc.wroteFrameCh:
sc.wroteFrame(res)
case res := <-sc.readFrameCh:
+ lastFrameTime = sc.srv.now()
// Process any written frames before reading new frames from the client since a
// written frame could have triggered a new stream to be started.
if sc.writingFrameAsync {
@@ -979,6 +1003,8 @@ func (sc *serverConn) serve() {
case idleTimerMsg:
sc.vlogf("connection is idle")
sc.goAway(ErrCodeNo)
+ case readIdleTimerMsg:
+ sc.handlePingTimer(lastFrameTime)
case shutdownTimerMsg:
sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr())
return
@@ -1001,7 +1027,7 @@ func (sc *serverConn) serve() {
// If the peer is causing us to generate a lot of control frames,
// but not reading them from us, assume they are trying to make us
// run out of memory.
- if sc.queuedControlFrames > sc.srv.maxQueuedControlFrames() {
+ if sc.queuedControlFrames > maxQueuedControlFrames {
sc.vlogf("http2: too many control frames in send queue, closing connection")
return
}
@@ -1017,12 +1043,39 @@ func (sc *serverConn) serve() {
}
}
+func (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) {
+ if sc.pingSent {
+ sc.vlogf("timeout waiting for PING response")
+ sc.conn.Close()
+ return
+ }
+
+ pingAt := lastFrameReadTime.Add(sc.readIdleTimeout)
+ now := sc.srv.now()
+ if pingAt.After(now) {
+ // We received frames since arming the ping timer.
+ // Reset it for the next possible timeout.
+ sc.readIdleTimer.Reset(pingAt.Sub(now))
+ return
+ }
+
+ sc.pingSent = true
+ // Ignore crypto/rand.Read errors: It generally can't fail, and worse case if it does
+ // is we send a PING frame containing 0s.
+ _, _ = rand.Read(sc.sentPingData[:])
+ sc.writeFrame(FrameWriteRequest{
+ write: &writePing{data: sc.sentPingData},
+ })
+ sc.readIdleTimer.Reset(sc.pingTimeout)
+}
+
type serverMessage int
// Message values sent to serveMsgCh.
var (
settingsTimerMsg = new(serverMessage)
idleTimerMsg = new(serverMessage)
+ readIdleTimerMsg = new(serverMessage)
shutdownTimerMsg = new(serverMessage)
gracefulShutdownMsg = new(serverMessage)
handlerDoneMsg = new(serverMessage)
@@ -1030,6 +1083,7 @@ var (
func (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) }
func (sc *serverConn) onIdleTimer() { sc.sendServeMsg(idleTimerMsg) }
+func (sc *serverConn) onReadIdleTimer() { sc.sendServeMsg(readIdleTimerMsg) }
func (sc *serverConn) onShutdownTimer() { sc.sendServeMsg(shutdownTimerMsg) }
func (sc *serverConn) sendServeMsg(msg interface{}) {
@@ -1061,10 +1115,10 @@ func (sc *serverConn) readPreface() error {
errc <- nil
}
}()
- timer := time.NewTimer(prefaceTimeout) // TODO: configurable on *Server?
+ timer := sc.srv.newTimer(prefaceTimeout) // TODO: configurable on *Server?
defer timer.Stop()
select {
- case <-timer.C:
+ case <-timer.C():
return errPrefaceTimeout
case err := <-errc:
if err == nil {
@@ -1282,6 +1336,10 @@ func (sc *serverConn) wroteFrame(res frameWriteResult) {
sc.writingFrame = false
sc.writingFrameAsync = false
+ if res.err != nil {
+ sc.conn.Close()
+ }
+
wr := res.wr
if writeEndsStream(wr.write) {
@@ -1429,7 +1487,7 @@ func (sc *serverConn) goAway(code ErrCode) {
func (sc *serverConn) shutDownIn(d time.Duration) {
sc.serveG.check()
- sc.shutdownTimer = time.AfterFunc(d, sc.onShutdownTimer)
+ sc.shutdownTimer = sc.srv.afterFunc(d, sc.onShutdownTimer)
}
func (sc *serverConn) resetStream(se StreamError) {
@@ -1482,6 +1540,11 @@ func (sc *serverConn) processFrameFromReader(res readFrameResult) bool {
sc.goAway(ErrCodeFlowControl)
return true
case ConnectionError:
+ if res.f != nil {
+ if id := res.f.Header().StreamID; id > sc.maxClientStreamID {
+ sc.maxClientStreamID = id
+ }
+ }
sc.logf("http2: server connection error from %v: %v", sc.conn.RemoteAddr(), ev)
sc.goAway(ErrCode(ev))
return true // goAway will handle shutdown
@@ -1551,6 +1614,11 @@ func (sc *serverConn) processFrame(f Frame) error {
func (sc *serverConn) processPing(f *PingFrame) error {
sc.serveG.check()
if f.IsAck() {
+ if sc.pingSent && sc.sentPingData == f.Data {
+ // This is a response to a PING we sent.
+ sc.pingSent = false
+ sc.readIdleTimer.Reset(sc.readIdleTimeout)
+ }
// 6.7 PING: " An endpoint MUST NOT respond to PING frames
// containing this flag."
return nil
@@ -1638,7 +1706,7 @@ func (sc *serverConn) closeStream(st *stream, err error) {
delete(sc.streams, st.id)
if len(sc.streams) == 0 {
sc.setConnState(http.StateIdle)
- if sc.srv.IdleTimeout > 0 {
+ if sc.srv.IdleTimeout > 0 && sc.idleTimer != nil {
sc.idleTimer.Reset(sc.srv.IdleTimeout)
}
if h1ServerKeepAlivesDisabled(sc.hs) {
@@ -1660,6 +1728,7 @@ func (sc *serverConn) closeStream(st *stream, err error) {
}
}
st.closeErr = err
+ st.cancelCtx()
st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc
sc.writeSched.CloseStream(st.id)
}
@@ -2020,7 +2089,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// (in Go 1.8), though. That's a more sane option anyway.
if sc.hs.ReadTimeout > 0 {
sc.conn.SetReadDeadline(time.Time{})
- st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
+ st.readDeadline = sc.srv.afterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
}
return sc.scheduleHandler(id, rw, req, handler)
@@ -2116,9 +2185,9 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream
st.cw.Init()
st.flow.conn = &sc.flow // link to conn-level counter
st.flow.add(sc.initialStreamSendWindowSize)
- st.inflow.init(sc.srv.initialStreamRecvWindowSize())
+ st.inflow.init(sc.initialStreamRecvWindowSize)
if sc.hs.WriteTimeout > 0 {
- st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout)
+ st.writeDeadline = sc.srv.afterFunc(sc.hs.WriteTimeout, st.onWriteTimeout)
}
sc.streams[id] = st
@@ -2342,6 +2411,7 @@ func (sc *serverConn) handlerDone() {
// Run on its own goroutine.
func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) {
+ sc.srv.markNewGoroutine()
defer sc.sendServeMsg(handlerDoneMsg)
didPanic := true
defer func() {
@@ -2638,7 +2708,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
var date string
if _, ok := rws.snapHeader["Date"]; !ok {
// TODO(bradfitz): be faster here, like net/http? measure.
- date = time.Now().UTC().Format(http.TimeFormat)
+ date = rws.conn.srv.now().UTC().Format(http.TimeFormat)
}
for _, v := range rws.snapHeader["Trailer"] {
@@ -2760,7 +2830,7 @@ func (rws *responseWriterState) promoteUndeclaredTrailers() {
func (w *responseWriter) SetReadDeadline(deadline time.Time) error {
st := w.rws.stream
- if !deadline.IsZero() && deadline.Before(time.Now()) {
+ if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) {
// If we're setting a deadline in the past, reset the stream immediately
// so writes after SetWriteDeadline returns will fail.
st.onReadTimeout()
@@ -2776,9 +2846,9 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error {
if deadline.IsZero() {
st.readDeadline = nil
} else if st.readDeadline == nil {
- st.readDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onReadTimeout)
+ st.readDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onReadTimeout)
} else {
- st.readDeadline.Reset(deadline.Sub(time.Now()))
+ st.readDeadline.Reset(deadline.Sub(sc.srv.now()))
}
})
return nil
@@ -2786,7 +2856,7 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error {
func (w *responseWriter) SetWriteDeadline(deadline time.Time) error {
st := w.rws.stream
- if !deadline.IsZero() && deadline.Before(time.Now()) {
+ if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) {
// If we're setting a deadline in the past, reset the stream immediately
// so writes after SetWriteDeadline returns will fail.
st.onWriteTimeout()
@@ -2802,9 +2872,9 @@ func (w *responseWriter) SetWriteDeadline(deadline time.Time) error {
if deadline.IsZero() {
st.writeDeadline = nil
} else if st.writeDeadline == nil {
- st.writeDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onWriteTimeout)
+ st.writeDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onWriteTimeout)
} else {
- st.writeDeadline.Reset(deadline.Sub(time.Now()))
+ st.writeDeadline.Reset(deadline.Sub(sc.srv.now()))
}
})
return nil
@@ -3256,7 +3326,7 @@ func (sc *serverConn) countError(name string, err error) error {
if sc == nil || sc.srv == nil {
return err
}
- f := sc.srv.CountError
+ f := sc.countErrorFunc
if f == nil {
return err
}
diff --git a/vendor/golang.org/x/net/http2/testsync.go b/vendor/golang.org/x/net/http2/testsync.go
deleted file mode 100644
index 61075bd1..00000000
--- a/vendor/golang.org/x/net/http2/testsync.go
+++ /dev/null
@@ -1,331 +0,0 @@
-// Copyright 2024 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 http2
-
-import (
- "context"
- "sync"
- "time"
-)
-
-// testSyncHooks coordinates goroutines in tests.
-//
-// For example, a call to ClientConn.RoundTrip involves several goroutines, including:
-// - the goroutine running RoundTrip;
-// - the clientStream.doRequest goroutine, which writes the request; and
-// - the clientStream.readLoop goroutine, which reads the response.
-//
-// Using testSyncHooks, a test can start a RoundTrip and identify when all these goroutines
-// are blocked waiting for some condition such as reading the Request.Body or waiting for
-// flow control to become available.
-//
-// The testSyncHooks also manage timers and synthetic time in tests.
-// This permits us to, for example, start a request and cause it to time out waiting for
-// response headers without resorting to time.Sleep calls.
-type testSyncHooks struct {
- // active/inactive act as a mutex and condition variable.
- //
- // - neither chan contains a value: testSyncHooks is locked.
- // - active contains a value: unlocked, and at least one goroutine is not blocked
- // - inactive contains a value: unlocked, and all goroutines are blocked
- active chan struct{}
- inactive chan struct{}
-
- // goroutine counts
- total int // total goroutines
- condwait map[*sync.Cond]int // blocked in sync.Cond.Wait
- blocked []*testBlockedGoroutine // otherwise blocked
-
- // fake time
- now time.Time
- timers []*fakeTimer
-
- // Transport testing: Report various events.
- newclientconn func(*ClientConn)
- newstream func(*clientStream)
-}
-
-// testBlockedGoroutine is a blocked goroutine.
-type testBlockedGoroutine struct {
- f func() bool // blocked until f returns true
- ch chan struct{} // closed when unblocked
-}
-
-func newTestSyncHooks() *testSyncHooks {
- h := &testSyncHooks{
- active: make(chan struct{}, 1),
- inactive: make(chan struct{}, 1),
- condwait: map[*sync.Cond]int{},
- }
- h.inactive <- struct{}{}
- h.now = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)
- return h
-}
-
-// lock acquires the testSyncHooks mutex.
-func (h *testSyncHooks) lock() {
- select {
- case <-h.active:
- case <-h.inactive:
- }
-}
-
-// waitInactive waits for all goroutines to become inactive.
-func (h *testSyncHooks) waitInactive() {
- for {
- <-h.inactive
- if !h.unlock() {
- break
- }
- }
-}
-
-// unlock releases the testSyncHooks mutex.
-// It reports whether any goroutines are active.
-func (h *testSyncHooks) unlock() (active bool) {
- // Look for a blocked goroutine which can be unblocked.
- blocked := h.blocked[:0]
- unblocked := false
- for _, b := range h.blocked {
- if !unblocked && b.f() {
- unblocked = true
- close(b.ch)
- } else {
- blocked = append(blocked, b)
- }
- }
- h.blocked = blocked
-
- // Count goroutines blocked on condition variables.
- condwait := 0
- for _, count := range h.condwait {
- condwait += count
- }
-
- if h.total > condwait+len(blocked) {
- h.active <- struct{}{}
- return true
- } else {
- h.inactive <- struct{}{}
- return false
- }
-}
-
-// goRun starts a new goroutine.
-func (h *testSyncHooks) goRun(f func()) {
- h.lock()
- h.total++
- h.unlock()
- go func() {
- defer func() {
- h.lock()
- h.total--
- h.unlock()
- }()
- f()
- }()
-}
-
-// blockUntil indicates that a goroutine is blocked waiting for some condition to become true.
-// It waits until f returns true before proceeding.
-//
-// Example usage:
-//
-// h.blockUntil(func() bool {
-// // Is the context done yet?
-// select {
-// case <-ctx.Done():
-// default:
-// return false
-// }
-// return true
-// })
-// // Wait for the context to become done.
-// <-ctx.Done()
-//
-// The function f passed to blockUntil must be non-blocking and idempotent.
-func (h *testSyncHooks) blockUntil(f func() bool) {
- if f() {
- return
- }
- ch := make(chan struct{})
- h.lock()
- h.blocked = append(h.blocked, &testBlockedGoroutine{
- f: f,
- ch: ch,
- })
- h.unlock()
- <-ch
-}
-
-// broadcast is sync.Cond.Broadcast.
-func (h *testSyncHooks) condBroadcast(cond *sync.Cond) {
- h.lock()
- delete(h.condwait, cond)
- h.unlock()
- cond.Broadcast()
-}
-
-// broadcast is sync.Cond.Wait.
-func (h *testSyncHooks) condWait(cond *sync.Cond) {
- h.lock()
- h.condwait[cond]++
- h.unlock()
-}
-
-// newTimer creates a new fake timer.
-func (h *testSyncHooks) newTimer(d time.Duration) timer {
- h.lock()
- defer h.unlock()
- t := &fakeTimer{
- hooks: h,
- when: h.now.Add(d),
- c: make(chan time.Time),
- }
- h.timers = append(h.timers, t)
- return t
-}
-
-// afterFunc creates a new fake AfterFunc timer.
-func (h *testSyncHooks) afterFunc(d time.Duration, f func()) timer {
- h.lock()
- defer h.unlock()
- t := &fakeTimer{
- hooks: h,
- when: h.now.Add(d),
- f: f,
- }
- h.timers = append(h.timers, t)
- return t
-}
-
-func (h *testSyncHooks) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) {
- ctx, cancel := context.WithCancel(ctx)
- t := h.afterFunc(d, cancel)
- return ctx, func() {
- t.Stop()
- cancel()
- }
-}
-
-func (h *testSyncHooks) timeUntilEvent() time.Duration {
- h.lock()
- defer h.unlock()
- var next time.Time
- for _, t := range h.timers {
- if next.IsZero() || t.when.Before(next) {
- next = t.when
- }
- }
- if d := next.Sub(h.now); d > 0 {
- return d
- }
- return 0
-}
-
-// advance advances time and causes synthetic timers to fire.
-func (h *testSyncHooks) advance(d time.Duration) {
- h.lock()
- defer h.unlock()
- h.now = h.now.Add(d)
- timers := h.timers[:0]
- for _, t := range h.timers {
- t := t // remove after go.mod depends on go1.22
- t.mu.Lock()
- switch {
- case t.when.After(h.now):
- timers = append(timers, t)
- case t.when.IsZero():
- // stopped timer
- default:
- t.when = time.Time{}
- if t.c != nil {
- close(t.c)
- }
- if t.f != nil {
- h.total++
- go func() {
- defer func() {
- h.lock()
- h.total--
- h.unlock()
- }()
- t.f()
- }()
- }
- }
- t.mu.Unlock()
- }
- h.timers = timers
-}
-
-// A timer wraps a time.Timer, or a synthetic equivalent in tests.
-// Unlike time.Timer, timer is single-use: The timer channel is closed when the timer expires.
-type timer interface {
- C() <-chan time.Time
- Stop() bool
- Reset(d time.Duration) bool
-}
-
-// timeTimer implements timer using real time.
-type timeTimer struct {
- t *time.Timer
- c chan time.Time
-}
-
-// newTimeTimer creates a new timer using real time.
-func newTimeTimer(d time.Duration) timer {
- ch := make(chan time.Time)
- t := time.AfterFunc(d, func() {
- close(ch)
- })
- return &timeTimer{t, ch}
-}
-
-// newTimeAfterFunc creates an AfterFunc timer using real time.
-func newTimeAfterFunc(d time.Duration, f func()) timer {
- return &timeTimer{
- t: time.AfterFunc(d, f),
- }
-}
-
-func (t timeTimer) C() <-chan time.Time { return t.c }
-func (t timeTimer) Stop() bool { return t.t.Stop() }
-func (t timeTimer) Reset(d time.Duration) bool { return t.t.Reset(d) }
-
-// fakeTimer implements timer using fake time.
-type fakeTimer struct {
- hooks *testSyncHooks
-
- mu sync.Mutex
- when time.Time // when the timer will fire
- c chan time.Time // closed when the timer fires; mutually exclusive with f
- f func() // called when the timer fires; mutually exclusive with c
-}
-
-func (t *fakeTimer) C() <-chan time.Time { return t.c }
-
-func (t *fakeTimer) Stop() bool {
- t.mu.Lock()
- defer t.mu.Unlock()
- stopped := t.when.IsZero()
- t.when = time.Time{}
- return stopped
-}
-
-func (t *fakeTimer) Reset(d time.Duration) bool {
- if t.c != nil || t.f == nil {
- panic("fakeTimer only supports Reset on AfterFunc timers")
- }
- t.mu.Lock()
- defer t.mu.Unlock()
- t.hooks.lock()
- defer t.hooks.unlock()
- active := !t.when.IsZero()
- t.when = t.hooks.now.Add(d)
- if !active {
- t.hooks.timers = append(t.hooks.timers, t)
- }
- return active
-}
diff --git a/vendor/golang.org/x/net/http2/timer.go b/vendor/golang.org/x/net/http2/timer.go
new file mode 100644
index 00000000..0b1c17b8
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/timer.go
@@ -0,0 +1,20 @@
+// Copyright 2024 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 http2
+
+import "time"
+
+// A timer is a time.Timer, as an interface which can be replaced in tests.
+type timer = interface {
+ C() <-chan time.Time
+ Reset(d time.Duration) bool
+ Stop() bool
+}
+
+// timeTimer adapts a time.Timer to the timer interface.
+type timeTimer struct {
+ *time.Timer
+}
+
+func (t timeTimer) C() <-chan time.Time { return t.Timer.C }
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index ce375c8c..0c5f64aa 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -25,7 +25,6 @@ import (
"net/http"
"net/http/httptrace"
"net/textproto"
- "os"
"sort"
"strconv"
"strings"
@@ -185,42 +184,66 @@ type Transport struct {
connPoolOnce sync.Once
connPoolOrDef ClientConnPool // non-nil version of ConnPool
- syncHooks *testSyncHooks
+ *transportTestHooks
}
-func (t *Transport) maxHeaderListSize() uint32 {
- if t.MaxHeaderListSize == 0 {
- return 10 << 20
- }
- if t.MaxHeaderListSize == 0xffffffff {
- return 0
- }
- return t.MaxHeaderListSize
+// Hook points used for testing.
+// Outside of tests, t.transportTestHooks is nil and these all have minimal implementations.
+// Inside tests, see the testSyncHooks function docs.
+
+type transportTestHooks struct {
+ newclientconn func(*ClientConn)
+ group synctestGroupInterface
}
-func (t *Transport) maxFrameReadSize() uint32 {
- if t.MaxReadFrameSize == 0 {
- return 0 // use the default provided by the peer
+func (t *Transport) markNewGoroutine() {
+ if t != nil && t.transportTestHooks != nil {
+ t.transportTestHooks.group.Join()
}
- if t.MaxReadFrameSize < minMaxFrameSize {
- return minMaxFrameSize
+}
+
+// newTimer creates a new time.Timer, or a synthetic timer in tests.
+func (t *Transport) newTimer(d time.Duration) timer {
+ if t.transportTestHooks != nil {
+ return t.transportTestHooks.group.NewTimer(d)
}
- if t.MaxReadFrameSize > maxFrameSize {
- return maxFrameSize
+ return timeTimer{time.NewTimer(d)}
+}
+
+// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests.
+func (t *Transport) afterFunc(d time.Duration, f func()) timer {
+ if t.transportTestHooks != nil {
+ return t.transportTestHooks.group.AfterFunc(d, f)
}
- return t.MaxReadFrameSize
+ return timeTimer{time.AfterFunc(d, f)}
}
-func (t *Transport) disableCompression() bool {
- return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression)
+func (t *Transport) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) {
+ if t.transportTestHooks != nil {
+ return t.transportTestHooks.group.ContextWithTimeout(ctx, d)
+ }
+ return context.WithTimeout(ctx, d)
}
-func (t *Transport) pingTimeout() time.Duration {
- if t.PingTimeout == 0 {
- return 15 * time.Second
+func (t *Transport) maxHeaderListSize() uint32 {
+ n := int64(t.MaxHeaderListSize)
+ if t.t1 != nil && t.t1.MaxResponseHeaderBytes != 0 {
+ n = t.t1.MaxResponseHeaderBytes
+ if n > 0 {
+ n = adjustHTTP1MaxHeaderSize(n)
+ }
+ }
+ if n <= 0 {
+ return 10 << 20
+ }
+ if n >= 0xffffffff {
+ return 0
}
- return t.PingTimeout
+ return uint32(n)
+}
+func (t *Transport) disableCompression() bool {
+ return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression)
}
// ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2.
@@ -332,11 +355,14 @@ type ClientConn struct {
lastActive time.Time
lastIdle time.Time // time last idle
// Settings from peer: (also guarded by wmu)
- maxFrameSize uint32
- maxConcurrentStreams uint32
- peerMaxHeaderListSize uint64
- peerMaxHeaderTableSize uint32
- initialWindowSize uint32
+ maxFrameSize uint32
+ maxConcurrentStreams uint32
+ peerMaxHeaderListSize uint64
+ peerMaxHeaderTableSize uint32
+ initialWindowSize uint32
+ initialStreamRecvWindowSize int32
+ readIdleTimeout time.Duration
+ pingTimeout time.Duration
// reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests.
// Write to reqHeaderMu to lock it, read from it to unlock.
@@ -352,60 +378,6 @@ type ClientConn struct {
werr error // first write error that has occurred
hbuf bytes.Buffer // HPACK encoder writes into this
henc *hpack.Encoder
-
- syncHooks *testSyncHooks // can be nil
-}
-
-// Hook points used for testing.
-// Outside of tests, cc.syncHooks is nil and these all have minimal implementations.
-// Inside tests, see the testSyncHooks function docs.
-
-// goRun starts a new goroutine.
-func (cc *ClientConn) goRun(f func()) {
- if cc.syncHooks != nil {
- cc.syncHooks.goRun(f)
- return
- }
- go f()
-}
-
-// condBroadcast is cc.cond.Broadcast.
-func (cc *ClientConn) condBroadcast() {
- if cc.syncHooks != nil {
- cc.syncHooks.condBroadcast(cc.cond)
- }
- cc.cond.Broadcast()
-}
-
-// condWait is cc.cond.Wait.
-func (cc *ClientConn) condWait() {
- if cc.syncHooks != nil {
- cc.syncHooks.condWait(cc.cond)
- }
- cc.cond.Wait()
-}
-
-// newTimer creates a new time.Timer, or a synthetic timer in tests.
-func (cc *ClientConn) newTimer(d time.Duration) timer {
- if cc.syncHooks != nil {
- return cc.syncHooks.newTimer(d)
- }
- return newTimeTimer(d)
-}
-
-// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests.
-func (cc *ClientConn) afterFunc(d time.Duration, f func()) timer {
- if cc.syncHooks != nil {
- return cc.syncHooks.afterFunc(d, f)
- }
- return newTimeAfterFunc(d, f)
-}
-
-func (cc *ClientConn) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) {
- if cc.syncHooks != nil {
- return cc.syncHooks.contextWithTimeout(ctx, d)
- }
- return context.WithTimeout(ctx, d)
}
// clientStream is the state for a single HTTP/2 stream. One of these
@@ -487,7 +459,7 @@ func (cs *clientStream) abortStreamLocked(err error) {
// TODO(dneil): Clean up tests where cs.cc.cond is nil.
if cs.cc.cond != nil {
// Wake up writeRequestBody if it is waiting on flow control.
- cs.cc.condBroadcast()
+ cs.cc.cond.Broadcast()
}
}
@@ -497,7 +469,7 @@ func (cs *clientStream) abortRequestBodyWrite() {
defer cc.mu.Unlock()
if cs.reqBody != nil && cs.reqBodyClosed == nil {
cs.closeReqBodyLocked()
- cc.condBroadcast()
+ cc.cond.Broadcast()
}
}
@@ -507,13 +479,15 @@ func (cs *clientStream) closeReqBodyLocked() {
}
cs.reqBodyClosed = make(chan struct{})
reqBodyClosed := cs.reqBodyClosed
- cs.cc.goRun(func() {
+ go func() {
+ cs.cc.t.markNewGoroutine()
cs.reqBody.Close()
close(reqBodyClosed)
- })
+ }()
}
type stickyErrWriter struct {
+ group synctestGroupInterface
conn net.Conn
timeout time.Duration
err *error
@@ -523,22 +497,9 @@ func (sew stickyErrWriter) Write(p []byte) (n int, err error) {
if *sew.err != nil {
return 0, *sew.err
}
- for {
- if sew.timeout != 0 {
- sew.conn.SetWriteDeadline(time.Now().Add(sew.timeout))
- }
- nn, err := sew.conn.Write(p[n:])
- n += nn
- if n < len(p) && nn > 0 && errors.Is(err, os.ErrDeadlineExceeded) {
- // Keep extending the deadline so long as we're making progress.
- continue
- }
- if sew.timeout != 0 {
- sew.conn.SetWriteDeadline(time.Time{})
- }
- *sew.err = err
- return n, err
- }
+ n, err = writeWithByteTimeout(sew.group, sew.conn, sew.timeout, p)
+ *sew.err = err
+ return n, err
}
// noCachedConnError is the concrete type of ErrNoCachedConn, which
@@ -626,21 +587,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
backoff := float64(uint(1) << (uint(retry) - 1))
backoff += backoff * (0.1 * mathrand.Float64())
d := time.Second * time.Duration(backoff)
- var tm timer
- if t.syncHooks != nil {
- tm = t.syncHooks.newTimer(d)
- t.syncHooks.blockUntil(func() bool {
- select {
- case <-tm.C():
- case <-req.Context().Done():
- default:
- return false
- }
- return true
- })
- } else {
- tm = newTimeTimer(d)
- }
+ tm := t.newTimer(d)
select {
case <-tm.C():
t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
@@ -725,8 +672,8 @@ func canRetryError(err error) bool {
}
func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse bool) (*ClientConn, error) {
- if t.syncHooks != nil {
- return t.newClientConn(nil, singleUse, t.syncHooks)
+ if t.transportTestHooks != nil {
+ return t.newClientConn(nil, singleUse)
}
host, _, err := net.SplitHostPort(addr)
if err != nil {
@@ -736,7 +683,7 @@ func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse b
if err != nil {
return nil, err
}
- return t.newClientConn(tconn, singleUse, nil)
+ return t.newClientConn(tconn, singleUse)
}
func (t *Transport) newTLSConfig(host string) *tls.Config {
@@ -787,48 +734,36 @@ func (t *Transport) expectContinueTimeout() time.Duration {
return t.t1.ExpectContinueTimeout
}
-func (t *Transport) maxDecoderHeaderTableSize() uint32 {
- if v := t.MaxDecoderHeaderTableSize; v > 0 {
- return v
- }
- return initialHeaderTableSize
-}
-
-func (t *Transport) maxEncoderHeaderTableSize() uint32 {
- if v := t.MaxEncoderHeaderTableSize; v > 0 {
- return v
- }
- return initialHeaderTableSize
-}
-
func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {
- return t.newClientConn(c, t.disableKeepAlives(), nil)
+ return t.newClientConn(c, t.disableKeepAlives())
}
-func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHooks) (*ClientConn, error) {
+func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) {
+ conf := configFromTransport(t)
cc := &ClientConn{
- t: t,
- tconn: c,
- readerDone: make(chan struct{}),
- nextStreamID: 1,
- maxFrameSize: 16 << 10, // spec default
- initialWindowSize: 65535, // spec default
- maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings.
- peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead.
- streams: make(map[uint32]*clientStream),
- singleUse: singleUse,
- wantSettingsAck: true,
- pings: make(map[[8]byte]chan struct{}),
- reqHeaderMu: make(chan struct{}, 1),
- syncHooks: hooks,
- }
- if hooks != nil {
- hooks.newclientconn(cc)
+ t: t,
+ tconn: c,
+ readerDone: make(chan struct{}),
+ nextStreamID: 1,
+ maxFrameSize: 16 << 10, // spec default
+ initialWindowSize: 65535, // spec default
+ initialStreamRecvWindowSize: conf.MaxUploadBufferPerStream,
+ maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings.
+ peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead.
+ streams: make(map[uint32]*clientStream),
+ singleUse: singleUse,
+ wantSettingsAck: true,
+ readIdleTimeout: conf.SendPingTimeout,
+ pingTimeout: conf.PingTimeout,
+ pings: make(map[[8]byte]chan struct{}),
+ reqHeaderMu: make(chan struct{}, 1),
+ }
+ var group synctestGroupInterface
+ if t.transportTestHooks != nil {
+ t.markNewGoroutine()
+ t.transportTestHooks.newclientconn(cc)
c = cc.tconn
- }
- if d := t.idleConnTimeout(); d != 0 {
- cc.idleTimeout = d
- cc.idleTimer = cc.afterFunc(d, cc.onIdleTimeout)
+ group = t.group
}
if VerboseLogs {
t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr())
@@ -840,30 +775,25 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo
// TODO: adjust this writer size to account for frame size +
// MTU + crypto/tls record padding.
cc.bw = bufio.NewWriter(stickyErrWriter{
+ group: group,
conn: c,
- timeout: t.WriteByteTimeout,
+ timeout: conf.WriteByteTimeout,
err: &cc.werr,
})
cc.br = bufio.NewReader(c)
cc.fr = NewFramer(cc.bw, cc.br)
- if t.maxFrameReadSize() != 0 {
- cc.fr.SetMaxReadFrameSize(t.maxFrameReadSize())
- }
+ cc.fr.SetMaxReadFrameSize(conf.MaxReadFrameSize)
if t.CountError != nil {
cc.fr.countError = t.CountError
}
- maxHeaderTableSize := t.maxDecoderHeaderTableSize()
+ maxHeaderTableSize := conf.MaxDecoderHeaderTableSize
cc.fr.ReadMetaHeaders = hpack.NewDecoder(maxHeaderTableSize, nil)
cc.fr.MaxHeaderListSize = t.maxHeaderListSize()
cc.henc = hpack.NewEncoder(&cc.hbuf)
- cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize())
+ cc.henc.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize)
cc.peerMaxHeaderTableSize = initialHeaderTableSize
- if t.AllowHTTP {
- cc.nextStreamID = 3
- }
-
if cs, ok := c.(connectionStater); ok {
state := cs.ConnectionState()
cc.tlsState = &state
@@ -871,11 +801,9 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo
initialSettings := []Setting{
{ID: SettingEnablePush, Val: 0},
- {ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow},
- }
- if max := t.maxFrameReadSize(); max != 0 {
- initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: max})
+ {ID: SettingInitialWindowSize, Val: uint32(cc.initialStreamRecvWindowSize)},
}
+ initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: conf.MaxReadFrameSize})
if max := t.maxHeaderListSize(); max != 0 {
initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max})
}
@@ -885,23 +813,29 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo
cc.bw.Write(clientPreface)
cc.fr.WriteSettings(initialSettings...)
- cc.fr.WriteWindowUpdate(0, transportDefaultConnFlow)
- cc.inflow.init(transportDefaultConnFlow + initialWindowSize)
+ cc.fr.WriteWindowUpdate(0, uint32(conf.MaxUploadBufferPerConnection))
+ cc.inflow.init(conf.MaxUploadBufferPerConnection + initialWindowSize)
cc.bw.Flush()
if cc.werr != nil {
cc.Close()
return nil, cc.werr
}
- cc.goRun(cc.readLoop)
+ // Start the idle timer after the connection is fully initialized.
+ if d := t.idleConnTimeout(); d != 0 {
+ cc.idleTimeout = d
+ cc.idleTimer = t.afterFunc(d, cc.onIdleTimeout)
+ }
+
+ go cc.readLoop()
return cc, nil
}
func (cc *ClientConn) healthCheck() {
- pingTimeout := cc.t.pingTimeout()
+ pingTimeout := cc.pingTimeout
// We don't need to periodically ping in the health check, because the readLoop of ClientConn will
// trigger the healthCheck again if there is no frame received.
- ctx, cancel := cc.contextWithTimeout(context.Background(), pingTimeout)
+ ctx, cancel := cc.t.contextWithTimeout(context.Background(), pingTimeout)
defer cancel()
cc.vlogf("http2: Transport sending health check")
err := cc.Ping(ctx)
@@ -936,7 +870,20 @@ func (cc *ClientConn) setGoAway(f *GoAwayFrame) {
}
last := f.LastStreamID
for streamID, cs := range cc.streams {
- if streamID > last {
+ if streamID <= last {
+ // The server's GOAWAY indicates that it received this stream.
+ // It will either finish processing it, or close the connection
+ // without doing so. Either way, leave the stream alone for now.
+ continue
+ }
+ if streamID == 1 && cc.goAway.ErrCode != ErrCodeNo {
+ // Don't retry the first stream on a connection if we get a non-NO error.
+ // If the server is sending an error on a new connection,
+ // retrying the request on a new one probably isn't going to work.
+ cs.abortStreamLocked(fmt.Errorf("http2: Transport received GOAWAY from server ErrCode:%v", cc.goAway.ErrCode))
+ } else {
+ // Aborting the stream with errClentConnGotGoAway indicates that
+ // the request should be retried on a new connection.
cs.abortStreamLocked(errClientConnGotGoAway)
}
}
@@ -1131,7 +1078,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
// Wait for all in-flight streams to complete or connection to close
done := make(chan struct{})
cancelled := false // guarded by cc.mu
- cc.goRun(func() {
+ go func() {
+ cc.t.markNewGoroutine()
cc.mu.Lock()
defer cc.mu.Unlock()
for {
@@ -1143,9 +1091,9 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
if cancelled {
break
}
- cc.condWait()
+ cc.cond.Wait()
}
- })
+ }()
shutdownEnterWaitStateHook()
select {
case <-done:
@@ -1155,7 +1103,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
cc.mu.Lock()
// Free the goroutine above
cancelled = true
- cc.condBroadcast()
+ cc.cond.Broadcast()
cc.mu.Unlock()
return ctx.Err()
}
@@ -1193,7 +1141,7 @@ func (cc *ClientConn) closeForError(err error) {
for _, cs := range cc.streams {
cs.abortStreamLocked(err)
}
- cc.condBroadcast()
+ cc.cond.Broadcast()
cc.mu.Unlock()
cc.closeConn()
}
@@ -1308,23 +1256,30 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream))
respHeaderRecv: make(chan struct{}),
donec: make(chan struct{}),
}
- cc.goRun(func() {
- cs.doRequest(req)
- })
+
+ // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
+ if !cc.t.disableCompression() &&
+ req.Header.Get("Accept-Encoding") == "" &&
+ req.Header.Get("Range") == "" &&
+ !cs.isHead {
+ // Request gzip only, not deflate. Deflate is ambiguous and
+ // not as universally supported anyway.
+ // See: https://zlib.net/zlib_faq.html#faq39
+ //
+ // Note that we don't request this for HEAD requests,
+ // due to a bug in nginx:
+ // http://trac.nginx.org/nginx/ticket/358
+ // https://golang.org/issue/5522
+ //
+ // We don't request gzip if the request is for a range, since
+ // auto-decoding a portion of a gzipped document will just fail
+ // anyway. See https://golang.org/issue/8923
+ cs.requestedGzip = true
+ }
+
+ go cs.doRequest(req, streamf)
waitDone := func() error {
- if cc.syncHooks != nil {
- cc.syncHooks.blockUntil(func() bool {
- select {
- case <-cs.donec:
- case <-ctx.Done():
- case <-cs.reqCancel:
- default:
- return false
- }
- return true
- })
- }
select {
case <-cs.donec:
return nil
@@ -1385,24 +1340,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream))
return err
}
- if streamf != nil {
- streamf(cs)
- }
-
for {
- if cc.syncHooks != nil {
- cc.syncHooks.blockUntil(func() bool {
- select {
- case <-cs.respHeaderRecv:
- case <-cs.abort:
- case <-ctx.Done():
- case <-cs.reqCancel:
- default:
- return false
- }
- return true
- })
- }
select {
case <-cs.respHeaderRecv:
return handleResponseHeaders()
@@ -1432,8 +1370,9 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream))
// doRequest runs for the duration of the request lifetime.
//
// It sends the request and performs post-request cleanup (closing Request.Body, etc.).
-func (cs *clientStream) doRequest(req *http.Request) {
- err := cs.writeRequest(req)
+func (cs *clientStream) doRequest(req *http.Request, streamf func(*clientStream)) {
+ cs.cc.t.markNewGoroutine()
+ err := cs.writeRequest(req, streamf)
cs.cleanupWriteRequest(err)
}
@@ -1444,7 +1383,7 @@ func (cs *clientStream) doRequest(req *http.Request) {
//
// It returns non-nil if the request ends otherwise.
// If the returned error is StreamError, the error Code may be used in resetting the stream.
-func (cs *clientStream) writeRequest(req *http.Request) (err error) {
+func (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStream)) (err error) {
cc := cs.cc
ctx := cs.ctx
@@ -1458,21 +1397,6 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) {
if cc.reqHeaderMu == nil {
panic("RoundTrip on uninitialized ClientConn") // for tests
}
- var newStreamHook func(*clientStream)
- if cc.syncHooks != nil {
- newStreamHook = cc.syncHooks.newstream
- cc.syncHooks.blockUntil(func() bool {
- select {
- case cc.reqHeaderMu <- struct{}{}:
- <-cc.reqHeaderMu
- case <-cs.reqCancel:
- case <-ctx.Done():
- default:
- return false
- }
- return true
- })
- }
select {
case cc.reqHeaderMu <- struct{}{}:
case <-cs.reqCancel:
@@ -1497,28 +1421,8 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) {
}
cc.mu.Unlock()
- if newStreamHook != nil {
- newStreamHook(cs)
- }
-
- // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
- if !cc.t.disableCompression() &&
- req.Header.Get("Accept-Encoding") == "" &&
- req.Header.Get("Range") == "" &&
- !cs.isHead {
- // Request gzip only, not deflate. Deflate is ambiguous and
- // not as universally supported anyway.
- // See: https://zlib.net/zlib_faq.html#faq39
- //
- // Note that we don't request this for HEAD requests,
- // due to a bug in nginx:
- // http://trac.nginx.org/nginx/ticket/358
- // https://golang.org/issue/5522
- //
- // We don't request gzip if the request is for a range, since
- // auto-decoding a portion of a gzipped document will just fail
- // anyway. See https://golang.org/issue/8923
- cs.requestedGzip = true
+ if streamf != nil {
+ streamf(cs)
}
continueTimeout := cc.t.expectContinueTimeout()
@@ -1581,7 +1485,7 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) {
var respHeaderTimer <-chan time.Time
var respHeaderRecv chan struct{}
if d := cc.responseHeaderTimeout(); d != 0 {
- timer := cc.newTimer(d)
+ timer := cc.t.newTimer(d)
defer timer.Stop()
respHeaderTimer = timer.C()
respHeaderRecv = cs.respHeaderRecv
@@ -1590,21 +1494,6 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) {
// or until the request is aborted (via context, error, or otherwise),
// whichever comes first.
for {
- if cc.syncHooks != nil {
- cc.syncHooks.blockUntil(func() bool {
- select {
- case <-cs.peerClosed:
- case <-respHeaderTimer:
- case <-respHeaderRecv:
- case <-cs.abort:
- case <-ctx.Done():
- case <-cs.reqCancel:
- default:
- return false
- }
- return true
- })
- }
select {
case <-cs.peerClosed:
return nil
@@ -1753,7 +1642,7 @@ func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error {
return nil
}
cc.pendingRequests++
- cc.condWait()
+ cc.cond.Wait()
cc.pendingRequests--
select {
case <-cs.abort:
@@ -2015,7 +1904,7 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
cs.flow.take(take)
return take, nil
}
- cc.condWait()
+ cc.cond.Wait()
}
}
@@ -2275,7 +2164,7 @@ type resAndError struct {
func (cc *ClientConn) addStreamLocked(cs *clientStream) {
cs.flow.add(int32(cc.initialWindowSize))
cs.flow.setConnFlow(&cc.flow)
- cs.inflow.init(transportDefaultStreamFlow)
+ cs.inflow.init(cc.initialStreamRecvWindowSize)
cs.ID = cc.nextStreamID
cc.nextStreamID += 2
cc.streams[cs.ID] = cs
@@ -2298,7 +2187,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) {
}
// Wake up writeRequestBody via clientStream.awaitFlowControl and
// wake up RoundTrip if there is a pending request.
- cc.condBroadcast()
+ cc.cond.Broadcast()
closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil
if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {
@@ -2320,6 +2209,7 @@ type clientConnReadLoop struct {
// readLoop runs in its own goroutine and reads and dispatches frames.
func (cc *ClientConn) readLoop() {
+ cc.t.markNewGoroutine()
rl := &clientConnReadLoop{cc: cc}
defer rl.cleanup()
cc.readerErr = rl.run()
@@ -2386,7 +2276,7 @@ func (rl *clientConnReadLoop) cleanup() {
cs.abortStreamLocked(err)
}
}
- cc.condBroadcast()
+ cc.cond.Broadcast()
cc.mu.Unlock()
}
@@ -2420,10 +2310,10 @@ func (cc *ClientConn) countReadFrameError(err error) {
func (rl *clientConnReadLoop) run() error {
cc := rl.cc
gotSettings := false
- readIdleTimeout := cc.t.ReadIdleTimeout
+ readIdleTimeout := cc.readIdleTimeout
var t timer
if readIdleTimeout != 0 {
- t = cc.afterFunc(readIdleTimeout, cc.healthCheck)
+ t = cc.t.afterFunc(readIdleTimeout, cc.healthCheck)
}
for {
f, err := cc.fr.ReadFrame()
@@ -3021,7 +2911,7 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error {
for _, cs := range cc.streams {
cs.flow.add(delta)
}
- cc.condBroadcast()
+ cc.cond.Broadcast()
cc.initialWindowSize = s.Val
case SettingHeaderTableSize:
@@ -3076,7 +2966,7 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error {
return ConnectionError(ErrCodeFlowControl)
}
- cc.condBroadcast()
+ cc.cond.Broadcast()
return nil
}
@@ -3120,7 +3010,8 @@ func (cc *ClientConn) Ping(ctx context.Context) error {
}
var pingError error
errc := make(chan struct{})
- cc.goRun(func() {
+ go func() {
+ cc.t.markNewGoroutine()
cc.wmu.Lock()
defer cc.wmu.Unlock()
if pingError = cc.fr.WritePing(false, p); pingError != nil {
@@ -3131,20 +3022,7 @@ func (cc *ClientConn) Ping(ctx context.Context) error {
close(errc)
return
}
- })
- if cc.syncHooks != nil {
- cc.syncHooks.blockUntil(func() bool {
- select {
- case <-c:
- case <-errc:
- case <-ctx.Done():
- case <-cc.readerDone:
- default:
- return false
- }
- return true
- })
- }
+ }()
select {
case <-c:
return nil
diff --git a/vendor/golang.org/x/net/http2/write.go b/vendor/golang.org/x/net/http2/write.go
index 33f61398..6ff6bee7 100644
--- a/vendor/golang.org/x/net/http2/write.go
+++ b/vendor/golang.org/x/net/http2/write.go
@@ -131,6 +131,16 @@ func (se StreamError) writeFrame(ctx writeContext) error {
func (se StreamError) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max }
+type writePing struct {
+ data [8]byte
+}
+
+func (w writePing) writeFrame(ctx writeContext) error {
+ return ctx.Framer().WritePing(false, w.data)
+}
+
+func (w writePing) staysWithinBuffer(max int) bool { return frameHeaderLen+len(w.data) <= max }
+
type writePingAck struct{ pf *PingFrame }
func (w writePingAck) writeFrame(ctx writeContext) error {
diff --git a/vendor/golang.org/x/net/http2/writesched_priority.go b/vendor/golang.org/x/net/http2/writesched_priority.go
index 0a242c66..f6783339 100644
--- a/vendor/golang.org/x/net/http2/writesched_priority.go
+++ b/vendor/golang.org/x/net/http2/writesched_priority.go
@@ -443,8 +443,8 @@ func (ws *priorityWriteScheduler) addClosedOrIdleNode(list *[]*priorityNode, max
}
func (ws *priorityWriteScheduler) removeNode(n *priorityNode) {
- for k := n.kids; k != nil; k = k.next {
- k.setParent(n.parent)
+ for n.kids != nil {
+ n.kids.setParent(n.parent)
}
n.setParent(nil)
delete(ws.nodes, n.id)
diff --git a/vendor/golang.org/x/net/proxy/per_host.go b/vendor/golang.org/x/net/proxy/per_host.go
index 573fe79e..d7d4b8b6 100644
--- a/vendor/golang.org/x/net/proxy/per_host.go
+++ b/vendor/golang.org/x/net/proxy/per_host.go
@@ -137,9 +137,7 @@ func (p *PerHost) AddNetwork(net *net.IPNet) {
// AddZone specifies a DNS suffix that will use the bypass proxy. A zone of
// "example.com" matches "example.com" and all of its subdomains.
func (p *PerHost) AddZone(zone string) {
- if strings.HasSuffix(zone, ".") {
- zone = zone[:len(zone)-1]
- }
+ zone = strings.TrimSuffix(zone, ".")
if !strings.HasPrefix(zone, ".") {
zone = "." + zone
}
@@ -148,8 +146,6 @@ func (p *PerHost) AddZone(zone string) {
// AddHost specifies a host name that will use the bypass proxy.
func (p *PerHost) AddHost(host string) {
- if strings.HasSuffix(host, ".") {
- host = host[:len(host)-1]
- }
+ host = strings.TrimSuffix(host, ".")
p.bypassHosts = append(p.bypassHosts, host)
}
diff --git a/vendor/golang.org/x/net/publicsuffix/data/children b/vendor/golang.org/x/net/publicsuffix/data/children
new file mode 100644
index 00000000..08261bff
Binary files /dev/null and b/vendor/golang.org/x/net/publicsuffix/data/children differ
diff --git a/vendor/golang.org/x/net/publicsuffix/data/nodes b/vendor/golang.org/x/net/publicsuffix/data/nodes
new file mode 100644
index 00000000..1dae6ede
Binary files /dev/null and b/vendor/golang.org/x/net/publicsuffix/data/nodes differ
diff --git a/vendor/golang.org/x/net/publicsuffix/data/text b/vendor/golang.org/x/net/publicsuffix/data/text
new file mode 100644
index 00000000..7e516413
--- /dev/null
+++ b/vendor/golang.org/x/net/publicsuffix/data/text
@@ -0,0 +1 @@
+birkenesoddtangentinglogoweirbitbucketrzynishikatakayamatta-varjjatjomembersaltdalovepopartysfjordiskussionsbereichatinhlfanishikatsuragitappassenger-associationishikawazukamiokameokamakurazakitaurayasudabitternidisrechtrainingloomy-routerbjarkoybjerkreimdbalsan-suedtirololitapunkapsienamsskoganeibmdeveloperauniteroirmemorialombardiadempresashibetsukumiyamagasakinderoyonagunicloudevelopmentaxiijimarriottayninhaccanthobby-siteval-d-aosta-valleyoriikaracolognebinatsukigataiwanumatajimidsundgcahcesuolocustomer-ocimperiautoscanalytics-gatewayonagoyaveroykenflfanpachihayaakasakawaiishopitsitemasekd1kappenginedre-eikerimo-siemenscaledekaascolipicenoboribetsucks3-eu-west-3utilities-16-balestrandabergentappsseekloges3-eu-west-123paginawebcamauction-acornfshostrodawaraktyubinskaunicommbank123kotisivultrobjectselinogradimo-i-rana4u2-localhostrolekanieruchomoscientistordal-o-g-i-nikolaevents3-ap-northeast-2-ddnsking123homepagefrontappchizip61123saitamakawababia-goracleaningheannakadomarineat-urlimanowarudakuneustarostwodzislawdev-myqnapcloudcontrolledgesuite-stagingdyniamusementdllclstagehirnikonantomobelementorayokosukanoyakumoliserniaurland-4-salernord-aurdalipaywhirlimiteddnslivelanddnss3-ap-south-123siteweberlevagangaviikanonji234lima-cityeats3-ap-southeast-123webseiteambulancechireadmyblogspotaribeiraogakicks-assurfakefurniturealmpmninoheguribigawaurskog-holandinggfarsundds3-ap-southeast-20001wwwedeployokote123hjemmesidealerdalaheadjuegoshikibichuobiraustevollimombetsupplyokoze164-balena-devices3-ca-central-123websiteleaf-south-12hparliamentatsunobninsk8s3-eu-central-1337bjugnishimerablackfridaynightjxn--11b4c3ditchyouripatriabloombergretaijindustriesteinkjerbloxcmsaludivtasvuodnakaiwanairlinekobayashimodatecnologiablushakotanishinomiyashironomniwebview-assetsalvadorbmoattachmentsamegawabmsamnangerbmwellbeingzonebnrweatherchannelsdvrdnsamparalleluxenishinoomotegotsukishiwadavvenjargamvikarpaczest-a-la-maisondre-landivttasvuotnakamai-stagingloppennebomlocalzonebonavstackartuzybondigitaloceanspacesamsclubartowest1-usamsunglugsmall-webspacebookonlineboomlaakesvuemielecceboschristmasakilatiron-riopretoeidsvollovesickaruizawabostik-serverrankoshigayachtsandvikcoromantovalle-d-aostakinouebostonakijinsekikogentlentapisa-geekarumaifmemsetkmaxxn--12c1fe0bradescotksatmpaviancapitalonebouncemerckmsdscloudiybounty-fullensakerrypropertiesangovtoyosatoyokawaboutiquebecologialaichaugiangmbhartiengiangminakamichiharaboutireservdrangedalpusercontentoyotapfizerboyfriendoftheinternetflixn--12cfi8ixb8lublindesnesanjosoyrovnoticiasannanishinoshimattelemarkasaokamikitayamatsurinfinitigopocznore-og-uvdalucaniabozen-sudtiroluccanva-appstmnishiokoppegardray-dnsupdaterbozen-suedtirolukowesteuropencraftoyotomiyazakinsurealtypeformesswithdnsannohekinanporovigonohejinternationaluroybplacedogawarabikomaezakirunordkappgfoggiabrandrayddns5ybrasiliadboxoslockerbresciaogashimadachicappadovaapstemp-dnswatchest-mon-blogueurodirumagazinebrindisiciliabroadwaybroke-itvedestrandraydnsanokashibatakashimashikiyosatokigawabrokerbrothermesserlifestylebtimnetzpisdnpharmaciensantamariakebrowsersafetymarketingmodumetacentrumeteorappharmacymruovatlassian-dev-builderschaefflerbrumunddalutskashiharabrusselsantoandreclaimsanukintlon-2bryanskiptveterinaireadthedocsaobernardovre-eikerbrynebwestus2bzhitomirbzzwhitesnowflakecommunity-prochowicecomodalenissandoycompanyaarphdfcbankasumigaurawa-mazowszexn--1ck2e1bambinagisobetsuldalpha-myqnapcloudaccess3-us-east-2ixboxeroxfinityolasiteastus2comparemarkerryhotelsaves-the-whalessandria-trani-barletta-andriatranibarlettaandriacomsecaasnesoddeno-stagingrondarcondoshifteditorxn--1ctwolominamatarnobrzegrongrossetouchijiwadedyn-berlincolnissayokoshibahikariyaltakazakinzais-a-bookkeepermarshallstatebankasuyalibabahccavuotnagaraholtaleniwaizumiotsurugashimaintenanceomutazasavonarviikaminoyamaxunispaceconferenceconstructionflashdrivefsncf-ipfsaxoconsuladobeio-static-accesscamdvrcampaniaconsultantranoyconsultingroundhandlingroznysaitohnoshookuwanakayamangyshlakdnepropetrovskanlandyndns-freeboxostrowwlkpmgrphilipsyno-dschokokekscholarshipschoolbusinessebycontactivetrailcontagematsubaravendbambleborkdalvdalcest-le-patron-rancherkasydneyukuhashimokawavoues3-sa-east-1contractorskenissedalcookingruecoolblogdnsfor-better-thanhhoarairforcentralus-1cooperativano-frankivskodjeephonefosschoolsztynsetransiphotographysiocoproductionschulplattforminamiechizenisshingucciprianiigatairaumalatvuopmicrolightinguidefinimaringatlancastercorsicafjschulservercosenzakopanecosidnshome-webservercellikescandypopensocialcouchpotatofrieschwarzgwangjuh-ohtawaramotoineppueblockbusternopilawacouncilcouponscrapper-sitecozoravennaharimalborkaszubytemarketscrappinguitarscrysecretrosnubananarepublic-inquiryurihonjoyenthickaragandaxarnetbankanzakiwielunnerepairbusanagochigasakishimabarakawaharaolbia-tempio-olbiatempioolbialowiezachpomorskiengiangjesdalolipopmcdirepbodyn53cqcxn--1lqs03niyodogawacrankyotobetsumidaknongujaratmallcrdyndns-homednscwhminamifuranocreditcardyndns-iphutholdingservehttpbincheonl-ams-1creditunionionjukujitawaravpagecremonashorokanaiecrewhoswholidaycricketnedalcrimeast-kazakhstanangercrotonecrowniphuyencrsvp4cruiseservehumourcuisinellair-traffic-controllagdenesnaaseinet-freakserveircasertainaircraftingvolloansnasaarlanduponthewifidelitypedreamhostersaotomeldaluxurycuneocupcakecuritibacgiangiangryggeecurvalled-aostargets-itranslatedyndns-mailcutegirlfriendyndns-office-on-the-webhoptogurafedoraprojectransurlfeirafembetsukuis-a-bruinsfanfermodenakasatsunairportrapaniizaferraraferraris-a-bulls-fanferrerotikagoshimalopolskanittedalfetsundyndns-wikimobetsumitakagildeskaliszkolamericanfamilydservemp3fgunmaniwamannorth-kazakhstanfhvalerfilegear-augustowiiheyakagefilegear-deatnuniversitysvardofilegear-gbizfilegear-iefilegear-jpmorgangwonporterfilegear-sg-1filminamiizukamiminefinalchikugokasellfyis-a-candidatefinancefinnoyfirebaseappiemontefirenetlifylkesbiblackbaudcdn-edgestackhero-networkinggroupowiathletajimabaria-vungtaudiopsysharpigboatshawilliamhillfirenzefirestonefireweblikes-piedmontravelersinsurancefirmdalegalleryfishingoldpoint2thisamitsukefitjarfitnessettsurugiminamimakis-a-catererfjalerfkatsushikabeebyteappilottonsberguovdageaidnunjargausdalflekkefjordyndns-workservep2phxn--1lqs71dyndns-remotewdyndns-picserveminecraftransporteflesbergushikamifuranorthflankatsuyamashikokuchuoflickragerokunohealthcareershellflierneflirfloginlinefloppythonanywherealtorfloraflorencefloripalmasfjordenfloristanohatajiris-a-celticsfanfloromskogxn--2m4a15eflowershimokitayamafltravinhlonganflynnhosting-clusterfncashgabadaddjabbottoyourafndyndns1fnwkzfolldalfoolfor-ourfor-somegurownproviderfor-theaterfordebianforexrotheworkpccwinbar0emmafann-arborlandd-dnsiskinkyowariasahikawarszawashtenawsmppl-wawsglobalacceleratorahimeshimakanegasakievennodebalancern4t3l3p0rtatarantours3-ap-northeast-123minsidaarborteaches-yogano-ipifony-123miwebaccelastx4432-b-datacenterprisesakijobservableusercontentateshinanomachintaifun-dnsdojournalistoloseyouriparisor-fronavuotnarashinoharaetnabudejjunipereggio-emilia-romagnaroyboltateyamajureggiocalabriakrehamnayoro0o0forgotdnshimonitayanagithubpreviewsaikisarazure-mobileirfjordynnservepicservequakeforli-cesena-forlicesenaforlillehammerfeste-ipimientaketomisatoolshimonosekikawaforsalegoismailillesandefjordynservebbservesarcasmileforsandasuolodingenfortalfortefosneshimosuwalkis-a-chefashionstorebaseljordyndns-serverisignfotrdynulvikatowicefoxn--2scrj9casinordlandurbanamexnetgamersapporomurafozfr-1fr-par-1fr-par-2franamizuhoboleslawiecommerce-shoppingyeongnamdinhachijohanamakisofukushimaoris-a-conservativegarsheiheijis-a-cparachutingfredrikstadynv6freedesktopazimuthaibinhphuocelotenkawakayamagnetcieszynh-servebeero-stageiseiroumugifuchungbukharag-cloud-championshiphoplixn--30rr7yfreemyiphosteurovisionredumbrellangevagrigentobishimadridvagsoygardenebakkeshibechambagricoharugbydgoszczecin-berlindasdaburfreesitefreetlshimotsukefreisennankokubunjis-a-cubicle-slavellinodeobjectshimotsumafrenchkisshikindleikangerfreseniushinichinanfriuli-v-giuliafriuli-ve-giuliafriuli-vegiuliafriuli-venezia-giuliafriuli-veneziagiuliafriuli-vgiuliafriuliv-giuliafriulive-giuliafriulivegiuliafriulivenezia-giuliafriuliveneziagiuliafriulivgiuliafrlfroganshinjotelulubin-vpncateringebunkyonanaoshimamateramockashiwarafrognfrolandynvpnpluservicesevastopolitiendafrom-akamaized-stagingfrom-alfrom-arfrom-azurewebsiteshikagamiishibuyabukihokuizumobaragusabaerobaticketshinjukuleuvenicefrom-campobassociatest-iserveblogsytenrissadistdlibestadultrentin-sudtirolfrom-coachaseljeducationcillahppiacenzaganfrom-ctrentin-sued-tirolfrom-dcatfooddagestangefrom-decagliarikuzentakataikillfrom-flapymntrentin-suedtirolfrom-gap-east-1from-higashiagatsumagoianiafrom-iafrom-idyroyrvikingulenfrom-ilfrom-in-the-bandairtelebitbridgestonemurorangecloudplatform0from-kshinkamigototalfrom-kyfrom-langsonyantakahamalselveruminamiminowafrom-malvikaufentigerfrom-mdfrom-mein-vigorlicefrom-mifunefrom-mnfrom-modshinshinotsurgeryfrom-mshinshirofrom-mtnfrom-ncatholicurus-4from-ndfrom-nefrom-nhs-heilbronnoysundfrom-njshintokushimafrom-nminamioguni5from-nvalledaostargithubusercontentrentino-a-adigefrom-nycaxiaskvollpagesardegnarutolgaulardalvivanovoldafrom-ohdancefrom-okegawassamukawataris-a-democratrentino-aadigefrom-orfrom-panasonichernovtsykkylvenneslaskerrylogisticsardiniafrom-pratohmamurogawatsonrenderfrom-ris-a-designerimarugame-hostyhostingfrom-schmidtre-gauldalfrom-sdfrom-tnfrom-txn--32vp30hachinoheavyfrom-utsiracusagaeroclubmedecin-addrammenuorodoyerfrom-val-daostavalleyfrom-vtrentino-alto-adigefrom-wafrom-wiardwebthingsjcbnpparibashkiriafrom-wvallee-aosteroyfrom-wyfrosinonefrostabackplaneapplebesbyengerdalp1froyal-commissionfruskydivingfujiiderafujikawaguchikonefujiminokamoenairtrafficplexus-2fujinomiyadapliefujiokazakinkobearalvahkikonaibetsubame-south-1fujisatoshoeshintomikasaharafujisawafujishiroishidakabiratoridediboxn--3bst00minamisanrikubetsupportrentino-altoadigefujitsuruokakamigaharafujiyoshidappnodearthainguyenfukayabeardubaikawagoefukuchiyamadatsunanjoburgfukudomigawafukuis-a-doctorfukumitsubishigakirkeneshinyoshitomiokamisatokamachippubetsuikitchenfukuokakegawafukuroishikariwakunigamigrationfukusakirovogradoyfukuyamagatakaharunusualpersonfunabashiriuchinadattorelayfunagatakahashimamakiryuohkurafunahashikamiamakusatsumasendaisenergyeongginowaniihamatamakinoharafundfunkfeuerfuoiskujukuriyamandalfuosskoczowindowskrakowinefurubirafurudonordreisa-hockeynutwentertainmentrentino-s-tirolfurukawajimangolffanshiojirishirifujiedafusoctrangfussagamiharafutabayamaguchinomihachimanagementrentino-stirolfutboldlygoingnowhere-for-more-og-romsdalfuttsurutashinais-a-financialadvisor-aurdalfuturecmshioyamelhushirahamatonbetsurnadalfuturehostingfuturemailingfvghakuis-a-gurunzenhakusandnessjoenhaldenhalfmoonscalebookinghostedpictetrentino-sud-tirolhalsakakinokiaham-radio-opinbar1hamburghammarfeastasiahamurakamigoris-a-hard-workershiraokamisunagawahanamigawahanawahandavvesiidanangodaddyn-o-saurealestatefarmerseinehandcrafteducatorprojectrentino-sudtirolhangglidinghangoutrentino-sued-tirolhannannestadhannosegawahanoipinkazohanyuzenhappouzshiratakahagianghasamap-northeast-3hasaminami-alpshishikuis-a-hunterhashbanghasudazaifudaigodogadobeioruntimedio-campidano-mediocampidanomediohasura-appinokokamikoaniikappudopaashisogndalhasvikazteleportrentino-suedtirolhatogayahoooshikamagayaitakamoriokakudamatsuehatoyamazakitahiroshimarcheapartmentshisuifuettertdasnetzhatsukaichikaiseiyoichipshitaramahattfjelldalhayashimamotobusells-for-lesshizukuishimoichilloutsystemscloudsitehazuminobushibukawahelplfinancialhelsinkitakamiizumisanofidonnakamurataitogliattinnhemneshizuokamitondabayashiogamagoriziahemsedalhepforgeblockshoujis-a-knightpointtokaizukamaishikshacknetrentinoa-adigehetemlbfanhigashichichibuzentsujiiehigashihiroshimanehigashiizumozakitakatakanabeautychyattorneyagawakkanaioirasebastopoleangaviikadenagahamaroyhigashikagawahigashikagurasoedahigashikawakitaaikitakyushunantankazunovecorebungoonow-dnshowahigashikurumeinforumzhigashimatsushimarnardalhigashimatsuyamakitaakitadaitoigawahigashimurayamamotorcycleshowtimeloyhigashinarusells-for-uhigashinehigashiomitamanoshiroomghigashiosakasayamanakakogawahigashishirakawamatakanezawahigashisumiyoshikawaminamiaikitamihamadahigashitsunospamproxyhigashiurausukitamotosunnydayhigashiyamatokoriyamanashiibaclieu-1higashiyodogawahigashiyoshinogaris-a-landscaperspectakasakitanakagusukumoldeliveryhippyhiraizumisatohokkaidontexistmein-iservschulecznakaniikawatanagurahirakatashinagawahiranais-a-lawyerhirarahiratsukaeruhirayaizuwakamatsubushikusakadogawahitachiomiyaginozawaonsensiositehitachiotaketakaokalmykiahitraeumtgeradegreehjartdalhjelmelandholyhomegoodshwinnersiiitesilkddiamondsimple-urlhomeipioneerhomelinkyard-cloudjiffyresdalhomelinuxn--3ds443ghomeofficehomesecuritymacaparecidahomesecuritypchiryukyuragiizehomesenseeringhomeskleppippugliahomeunixn--3e0b707ehondahonjyoitakarazukaluganskfh-muensterhornindalhorsells-itrentinoaadigehortendofinternet-dnsimplesitehospitalhotelwithflightsirdalhotmailhoyangerhoylandetakasagooglecodespotrentinoalto-adigehungyenhurdalhurumajis-a-liberalhyllestadhyogoris-a-libertarianhyugawarahyundaiwafuneis-very-evillasalleitungsenis-very-goodyearis-very-niceis-very-sweetpepperugiais-with-thebandoomdnstraceisk01isk02jenv-arubacninhbinhdinhktistoryjeonnamegawajetztrentinostiroljevnakerjewelryjgorajlljls-sto1jls-sto2jls-sto3jmpixolinodeusercontentrentinosud-tiroljnjcloud-ver-jpchitosetogitsuliguriajoyokaichibahcavuotnagaivuotnagaokakyotambabymilk3jozis-a-musicianjpnjprsolarvikhersonlanxessolundbeckhmelnitskiyamasoykosaigawakosakaerodromegalloabatobamaceratachikawafaicloudineencoreapigeekoseis-a-painterhostsolutionslupskhakassiakosheroykoshimizumakis-a-patsfankoshughesomakosugekotohiradomainstitutekotourakouhokumakogenkounosupersalevangerkouyamasudakouzushimatrixn--3pxu8khplaystation-cloudyclusterkozagawakozakis-a-personaltrainerkozowiosomnarviklabudhabikinokawachinaganoharamcocottekpnkppspbarcelonagawakepnord-odalwaysdatabaseballangenkainanaejrietisalatinabenogiehtavuoatnaamesjevuemielnombrendlyngen-rootaruibxos3-us-gov-west-1krasnikahokutokonamegatakatoris-a-photographerokussldkrasnodarkredstonekrelliankristiansandcatsoowitdkmpspawnextdirectrentinosudtirolkristiansundkrodsheradkrokstadelvaldaostavangerkropyvnytskyis-a-playershiftcryptonomichinomiyakekryminamiyamashirokawanabelaudnedalnkumamotoyamatsumaebashimofusakatakatsukis-a-republicanonoichinosekigaharakumanowtvaokumatorinokumejimatsumotofukekumenanyokkaichirurgiens-dentistes-en-francekundenkunisakis-a-rockstarachowicekunitachiaraisaijolsterkunitomigusukukis-a-socialistgstagekunneppubtlsopotrentinosued-tirolkuokgroupizzakurgankurobegetmyipirangalluplidlugolekagaminorddalkurogimimozaokinawashirosatochiokinoshimagentositempurlkuroisodegaurakuromatsunais-a-soxfankuronkurotakikawasakis-a-studentalkushirogawakustanais-a-teacherkassyncloudkusuppliesor-odalkutchanelkutnokuzumakis-a-techietipslzkvafjordkvalsundkvamsterdamnserverbaniakvanangenkvinesdalkvinnheradkviteseidatingkvitsoykwpspdnsor-varangermishimatsusakahogirlymisugitokorozawamitakeharamitourismartlabelingmitoyoakemiuramiyazurecontainerdpoliticaobangmiyotamatsukuris-an-actormjondalenmonzabrianzaramonzaebrianzamonzaedellabrianzamordoviamorenapolicemoriyamatsuuramoriyoshiminamiashigaramormonstermoroyamatsuzakis-an-actressmushcdn77-sslingmortgagemoscowithgoogleapiszmoseushimogosenmosjoenmoskenesorreisahayakawakamiichikawamisatottoris-an-anarchistjordalshalsenmossortlandmosviknx-serversusakiyosupabaseminemotegit-reposoruminanomoviemovimientokyotangotembaixadattowebhareidsbergmozilla-iotrentinosuedtirolmtranbytomaridagawalmartrentinsud-tirolmuikaminokawanishiaizubangemukoelnmunakatanemuosattemupkomatsushimassa-carrara-massacarraramassabuzzmurmanskomforbar2murotorcraftranakatombetsumy-gatewaymusashinodesakegawamuseumincomcastoripressorfoldmusicapetownnews-stagingmutsuzawamy-vigormy-wanggoupilemyactivedirectorymyamazeplaymyasustor-elvdalmycdmycloudnsoundcastorjdevcloudfunctionsokndalmydattolocalcertificationmyddnsgeekgalaxymydissentrentinsudtirolmydobissmarterthanyoumydrobofageometre-experts-comptablesowamydspectruminisitemyeffectrentinsued-tirolmyfastly-edgekey-stagingmyfirewalledreplittlestargardmyforuminterecifedextraspace-to-rentalstomakomaibaramyfritzmyftpaccesspeedpartnermyhome-servermyjinomykolaivencloud66mymailermymediapchoseikarugalsacemyokohamamatsudamypeplatformsharis-an-artistockholmestrandmypetsphinxn--41amyphotoshibajddarvodkafjordvaporcloudmypictureshinomypsxn--42c2d9amysecuritycamerakermyshopblockspjelkavikommunalforbundmyshopifymyspreadshopselectrentinsuedtirolmytabitordermythic-beastspydebergmytis-a-anarchistg-buildermytuleap-partnersquaresindevicenzamyvnchoshichikashukudoyamakeuppermywirecipescaracallypoivronpokerpokrovskommunepolkowicepoltavalle-aostavernpomorzeszowithyoutuberspacekitagawaponpesaro-urbino-pesarourbinopesaromasvuotnaritakurashikis-bykleclerchitachinakagawaltervistaipeigersundynamic-dnsarlpordenonepornporsangerporsangugeporsgrunnanpoznanpraxihuanprdprgmrprimetelprincipeprivatelinkomonowruzhgorodeoprivatizehealthinsuranceprofesionalprogressivegasrlpromonza-e-della-brianzaptokuyamatsushigepropertysnesrvarggatrevisogneprotectionprotonetroandindependent-inquest-a-la-masionprudentialpruszkowiwatsukiyonotaireserve-onlineprvcyonabarumbriaprzeworskogpunyufuelpupulawypussycatanzarowixsitepvhachirogatakahatakaishimojis-a-geekautokeinotteroypvtrogstadpwchowderpzqhadanorthwesternmutualqldqotoyohashimotoshimaqponiatowadaqslgbtroitskomorotsukagawaqualifioapplatter-applatterplcube-serverquangngais-certifiedugit-pagespeedmobilizeroticaltanissettailscaleforcequangninhthuanquangtritonoshonais-foundationquickconnectromsakuragawaquicksytestreamlitapplumbingouvaresearchitectesrhtrentoyonakagyokutoyakomakizunokunimimatakasugais-an-engineeringquipelementstrippertuscanytushungrytuvalle-daostamayukis-into-animeiwamizawatuxfamilytuyenquangbinhthuantwmailvestnesuzukis-gonevestre-slidreggio-calabriavestre-totennishiawakuravestvagoyvevelstadvibo-valentiaavibovalentiavideovinhphuchromedicinagatorogerssarufutsunomiyawakasaikaitakokonoevinnicarbonia-iglesias-carboniaiglesiascarboniavinnytsiavipsinaapplurinacionalvirginanmokurennebuvirtual-userveexchangevirtualservervirtualuserveftpodhalevisakurais-into-carsnoasakuholeckodairaviterboliviajessheimmobilienvivianvivoryvixn--45br5cylvlaanderennesoyvladikavkazimierz-dolnyvladimirvlogintoyonezawavmintsorocabalashovhachiojiyahikobierzycevologdanskoninjambylvolvolkswagencyouvolyngdalvoorlopervossevangenvotevotingvotoyonovps-hostrowiechungnamdalseidfjordynathomebuiltwithdarkhangelskypecorittogojomeetoystre-slidrettozawawmemergencyahabackdropalermochizukikirarahkkeravjuwmflabsvalbardunloppadualstackomvuxn--3hcrj9chonanbuskerudynamisches-dnsarpsborgripeeweeklylotterywoodsidellogliastradingworse-thanhphohochiminhadselbuyshouseshirakolobrzegersundongthapmircloudletshiranukamishihorowowloclawekonskowolawawpdevcloudwpenginepoweredwphostedmailwpmucdnipropetrovskygearappodlasiellaknoluoktagajobojis-an-entertainerwpmudevcdnaccessojamparaglidingwritesthisblogoipodzonewroclawmcloudwsseoullensvanguardianwtcp4wtfastlylbanzaicloudappspotagereporthruherecreationinomiyakonojorpelandigickarasjohkameyamatotakadawuozuerichardlillywzmiuwajimaxn--4it797konsulatrobeepsondriobranconagareyamaizuruhrxn--4pvxs4allxn--54b7fta0ccistrondheimpertrixcdn77-secureadymadealstahaugesunderxn--55qw42gxn--55qx5dxn--5dbhl8dxn--5js045dxn--5rtp49citadelhichisochimkentozsdell-ogliastraderxn--5rtq34kontuminamiuonumatsunoxn--5su34j936bgsgxn--5tzm5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a264citicarrdrobakamaiorigin-stagingmxn--12co0c3b4evalleaostaobaomoriguchiharaffleentrycloudflare-ipfstcgroupaaskimitsubatamibulsan-suedtirolkuszczytnoopscbgrimstadrrxn--80aaa0cvacationsvchoyodobashichinohealth-carereforminamidaitomanaustdalxn--80adxhksveioxn--80ao21axn--80aqecdr1axn--80asehdbarclaycards3-us-west-1xn--80aswgxn--80aukraanghkeliwebpaaskoyabeagleboardxn--8dbq2axn--8ltr62konyvelohmusashimurayamassivegridxn--8pvr4uxn--8y0a063axn--90a1affinitylotterybnikeisencowayxn--90a3academiamicable-modemoneyxn--90aeroportsinfolionetworkangerxn--90aishobaraxn--90amckinseyxn--90azhytomyrxn--9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--aroport-byanagawaxn--asky-iraxn--aurskog-hland-jnbarclays3-us-west-2xn--avery-yuasakurastoragexn--b-5gaxn--b4w605ferdxn--balsan-sdtirol-nsbsvelvikongsbergxn--bck1b9a5dre4civilaviationfabricafederation-webredirectmediatechnologyeongbukashiwazakiyosembokutamamuraxn--bdddj-mrabdxn--bearalvhki-y4axn--berlevg-jxaxn--bhcavuotna-s4axn--bhccavuotna-k7axn--bidr-5nachikatsuuraxn--bievt-0qa2xn--bjarky-fyanaizuxn--bjddar-ptarumizusawaxn--blt-elabcienciamallamaceiobbcn-north-1xn--bmlo-graingerxn--bod-2natalxn--bozen-sdtirol-2obanazawaxn--brnny-wuacademy-firewall-gatewayxn--brnnysund-m8accident-investigation-aptibleadpagesquare7xn--brum-voagatrustkanazawaxn--btsfjord-9zaxn--bulsan-sdtirol-nsbarefootballooningjovikarasjoketokashikiyokawaraxn--c1avgxn--c2br7gxn--c3s14misakis-a-therapistoiaxn--cck2b3baremetalombardyn-vpndns3-website-ap-northeast-1xn--cckwcxetdxn--cesena-forl-mcbremangerxn--cesenaforl-i8axn--cg4bkis-into-cartoonsokamitsuexn--ciqpnxn--clchc0ea0b2g2a9gcdxn--czr694bargainstantcloudfrontdoorestauranthuathienhuebinordre-landiherokuapparochernigovernmentjeldsundiscordsays3-website-ap-southeast-1xn--czrs0trvaroyxn--czru2dxn--czrw28barrel-of-knowledgeapplinziitatebayashijonawatebizenakanojoetsumomodellinglassnillfjordiscordsezgoraxn--d1acj3barrell-of-knowledgecomputermezproxyzgorzeleccoffeedbackanagawarmiastalowa-wolayangroupars3-website-ap-southeast-2xn--d1alfaststacksevenassigdalxn--d1atrysiljanxn--d5qv7z876clanbibaiduckdnsaseboknowsitallxn--davvenjrga-y4axn--djrs72d6uyxn--djty4koobindalxn--dnna-grajewolterskluwerxn--drbak-wuaxn--dyry-iraxn--e1a4cldmail-boxaxn--eckvdtc9dxn--efvn9svn-repostuff-4-salexn--efvy88haebaruericssongdalenviknaklodzkochikushinonsenasakuchinotsuchiurakawaxn--ehqz56nxn--elqq16hagakhanhhoabinhduongxn--eveni-0qa01gaxn--f6qx53axn--fct429kooris-a-nascarfanxn--fhbeiarnxn--finny-yuaxn--fiq228c5hsbcleverappsassarinuyamashinazawaxn--fiq64barsycenterprisecloudcontrolappgafanquangnamasteigenoamishirasatochigifts3-website-eu-west-1xn--fiqs8swidnicaravanylvenetogakushimotoganexn--fiqz9swidnikitagatakkomaganexn--fjord-lraxn--fjq720axn--fl-ziaxn--flor-jraxn--flw351exn--forl-cesena-fcbsswiebodzindependent-commissionxn--forlcesena-c8axn--fpcrj9c3dxn--frde-granexn--frna-woaxn--frya-hraxn--fzc2c9e2clickrisinglesjaguarxn--fzys8d69uvgmailxn--g2xx48clinicasacampinagrandebungotakadaemongolianishitosashimizunaminamiawajikintuitoyotsukaidownloadrudtvsaogoncapooguyxn--gckr3f0fastvps-serveronakanotoddenxn--gecrj9cliniquedaklakasamatsudoesntexisteingeekasserversicherungroks-theatrentin-sud-tirolxn--ggaviika-8ya47hagebostadxn--gildeskl-g0axn--givuotna-8yandexcloudxn--gjvik-wuaxn--gk3at1exn--gls-elacaixaxn--gmq050is-into-gamessinamsosnowieconomiasadojin-dslattuminamitanexn--gmqw5axn--gnstigbestellen-zvbrplsbxn--45brj9churcharterxn--gnstigliefern-wobihirosakikamijimayfirstorfjordxn--h-2failxn--h1ahnxn--h1alizxn--h2breg3eveneswinoujsciencexn--h2brj9c8clothingdustdatadetectrani-andria-barletta-trani-andriaxn--h3cuzk1dienbienxn--hbmer-xqaxn--hcesuolo-7ya35barsyonlinehimejiiyamanouchikujoinvilleirvikarasuyamashikemrevistathellequipmentjmaxxxjavald-aostatics3-website-sa-east-1xn--hebda8basicserversejny-2xn--hery-iraxn--hgebostad-g3axn--hkkinen-5waxn--hmmrfeasta-s4accident-prevention-k3swisstufftoread-booksnestudioxn--hnefoss-q1axn--hobl-iraxn--holtlen-hxaxn--hpmir-xqaxn--hxt814exn--hyanger-q1axn--hylandet-54axn--i1b6b1a6a2exn--imr513nxn--indery-fyaotsusonoxn--io0a7is-leetrentinoaltoadigexn--j1adpohlxn--j1aefauskedsmokorsetagayaseralingenovaraxn--j1ael8basilicataniaxn--j1amhaibarakisosakitahatakamatsukawaxn--j6w193gxn--jlq480n2rgxn--jlster-byasakaiminatoyookananiimiharuxn--jrpeland-54axn--jvr189misasaguris-an-accountantsmolaquilaocais-a-linux-useranishiaritabashikaoizumizakitashiobaraxn--k7yn95exn--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kfjord-iuaxn--klbu-woaxn--klt787dxn--kltp7dxn--kltx9axn--klty5xn--45q11circlerkstagentsasayamaxn--koluokta-7ya57haiduongxn--kprw13dxn--kpry57dxn--kput3is-lostre-toteneis-a-llamarumorimachidaxn--krager-gyasugitlabbvieeexn--kranghke-b0axn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdfastly-terrariuminamiiseharaxn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-fyasuokanmakiwakuratexn--kvnangen-k0axn--l-1fairwindsynology-diskstationxn--l1accentureklamborghinikkofuefukihabororosynology-dsuzakadnsaliastudynaliastrynxn--laheadju-7yatominamibosoftwarendalenugxn--langevg-jxaxn--lcvr32dxn--ldingen-q1axn--leagaviika-52basketballfinanzjaworznoticeableksvikaratsuginamikatagamilanotogawaxn--lesund-huaxn--lgbbat1ad8jejuxn--lgrd-poacctulaspeziaxn--lhppi-xqaxn--linds-pramericanexpresservegame-serverxn--loabt-0qaxn--lrdal-sraxn--lrenskog-54axn--lt-liacn-northwest-1xn--lten-granvindafjordxn--lury-iraxn--m3ch0j3axn--mely-iraxn--merker-kuaxn--mgb2ddesxn--mgb9awbfbsbxn--1qqw23axn--mgba3a3ejtunesuzukamogawaxn--mgba3a4f16axn--mgba3a4fra1-deloittexn--mgba7c0bbn0axn--mgbaakc7dvfsxn--mgbaam7a8haiphongonnakatsugawaxn--mgbab2bdxn--mgbah1a3hjkrdxn--mgbai9a5eva00batsfjordiscountry-snowplowiczeladzlgleezeu-2xn--mgbai9azgqp6jelasticbeanstalkharkovalleeaostexn--mgbayh7gparasitexn--mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgbcpq6gpa1axn--mgberp4a5d4a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4ecexposedxn--mgbpl2fhskopervikhmelnytskyivalleedaostexn--mgbqly7c0a67fbcngroks-thisayamanobeatsaudaxn--mgbqly7cvafricargoboavistanbulsan-sudtirolxn--mgbt3dhdxn--mgbtf8flatangerxn--mgbtx2bauhauspostman-echofunatoriginstances3-website-us-east-1xn--mgbx4cd0abkhaziaxn--mix082fbx-osewienxn--mix891fbxosexyxn--mjndalen-64axn--mk0axindependent-inquiryxn--mk1bu44cnpyatigorskjervoyagexn--mkru45is-not-certifiedxn--mlatvuopmi-s4axn--mli-tlavagiskexn--mlselv-iuaxn--moreke-juaxn--mori-qsakuratanxn--mosjen-eyatsukannamihokksundxn--mot-tlavangenxn--mre-og-romsdal-qqbuservecounterstrikexn--msy-ula0hair-surveillancexn--mtta-vrjjat-k7aflakstadaokayamazonaws-cloud9guacuiababybluebiteckidsmynasushiobaracingrok-freeddnsfreebox-osascoli-picenogatabuseating-organicbcgjerdrumcprequalifymelbourneasypanelblagrarq-authgear-stagingjerstadeltaishinomakilovecollegefantasyleaguenoharauthgearappspacehosted-by-previderehabmereitattoolforgerockyombolzano-altoadigeorgeorgiauthordalandroideporteatonamidorivnebetsukubankanumazuryomitanocparmautocodebergamoarekembuchikumagayagawafflecelloisirs3-external-180reggioemiliaromagnarusawaustrheimbalsan-sudtirolivingitpagexlivornobserveregruhostingivestbyglandroverhalladeskjakamaiedge-stagingivingjemnes3-eu-west-2038xn--muost-0qaxn--mxtq1misawaxn--ngbc5azdxn--ngbe9e0axn--ngbrxn--4dbgdty6ciscofreakamaihd-stagingriwataraindroppdalxn--nit225koryokamikawanehonbetsuwanouchikuhokuryugasakis-a-nursellsyourhomeftpiwatexn--nmesjevuemie-tcbalatinord-frontierxn--nnx388axn--nodessakurawebsozais-savedxn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--ntsq17gxn--nttery-byaeservehalflifeinsurancexn--nvuotna-hwaxn--nyqy26axn--o1achernivtsicilynxn--4dbrk0cexn--o3cw4hakatanortonkotsunndalxn--o3cyx2axn--od0algardxn--od0aq3beneventodayusuharaxn--ogbpf8fldrvelvetromsohuissier-justicexn--oppegrd-ixaxn--ostery-fyatsushiroxn--osyro-wuaxn--otu796dxn--p1acfedjeezxn--p1ais-slickharkivallee-d-aostexn--pgbs0dhlx3xn--porsgu-sta26fedorainfraclouderaxn--pssu33lxn--pssy2uxn--q7ce6axn--q9jyb4cnsauheradyndns-at-homedepotenzamamicrosoftbankasukabedzin-brbalsfjordietgoryoshiokanravocats3-fips-us-gov-west-1xn--qcka1pmcpenzapposxn--qqqt11misconfusedxn--qxa6axn--qxamunexus-3xn--rady-iraxn--rdal-poaxn--rde-ulazioxn--rdy-0nabaris-uberleetrentinos-tirolxn--rennesy-v1axn--rhkkervju-01afedorapeoplefrakkestadyndns-webhostingujogaszxn--rholt-mragowoltlab-democraciaxn--rhqv96gxn--rht27zxn--rht3dxn--rht61exn--risa-5naturalxn--risr-iraxn--rland-uuaxn--rlingen-mxaxn--rmskog-byawaraxn--rny31hakodatexn--rovu88bentleyusuitatamotorsitestinglitchernihivgubs3-website-us-west-1xn--rros-graphicsxn--rskog-uuaxn--rst-0naturbruksgymnxn--rsta-framercanvasxn--rvc1e0am3exn--ryken-vuaxn--ryrvik-byawatahamaxn--s-1faitheshopwarezzoxn--s9brj9cntraniandriabarlettatraniandriaxn--sandnessjen-ogbentrendhostingliwiceu-3xn--sandy-yuaxn--sdtirol-n2axn--seral-lraxn--ses554gxn--sgne-graphoxn--4gbriminiserverxn--skierv-utazurestaticappspaceusercontentunkongsvingerxn--skjervy-v1axn--skjk-soaxn--sknit-yqaxn--sknland-fxaxn--slat-5navigationxn--slt-elabogadobeaemcloud-fr1xn--smla-hraxn--smna-gratangenxn--snase-nraxn--sndre-land-0cbeppublishproxyuufcfanirasakindependent-panelomonza-brianzaporizhzhedmarkarelianceu-4xn--snes-poaxn--snsa-roaxn--sr-aurdal-l8axn--sr-fron-q1axn--sr-odal-q1axn--sr-varanger-ggbeskidyn-ip24xn--srfold-byaxn--srreisa-q1axn--srum-gratis-a-bloggerxn--stfold-9xaxn--stjrdal-s1axn--stjrdalshalsen-sqbestbuyshoparenagasakikuchikuseihicampinashikiminohostfoldnavyuzawaxn--stre-toten-zcbetainaboxfuselfipartindependent-reviewegroweibolognagasukeu-north-1xn--t60b56axn--tckweddingxn--tiq49xqyjelenia-goraxn--tjme-hraxn--tn0agrocerydxn--tnsberg-q1axn--tor131oxn--trany-yuaxn--trentin-sd-tirol-rzbhzc66xn--trentin-sdtirol-7vbialystokkeymachineu-south-1xn--trentino-sd-tirol-c3bielawakuyachimataharanzanishiazaindielddanuorrindigenamerikawauevje-og-hornnes3-website-us-west-2xn--trentino-sdtirol-szbiella-speziaxn--trentinosd-tirol-rzbieszczadygeyachiyodaeguamfamscompute-1xn--trentinosdtirol-7vbievat-band-campaignieznoorstaplesakyotanabellunordeste-idclkarlsoyxn--trentinsd-tirol-6vbifukagawalbrzycharitydalomzaporizhzhiaxn--trentinsdtirol-nsbigv-infolkebiblegnicalvinklein-butterhcloudiscoursesalangenishigotpantheonsitexn--trgstad-r1axn--trna-woaxn--troms-zuaxn--tysvr-vraxn--uc0atventuresinstagingxn--uc0ay4axn--uist22hakonexn--uisz3gxn--unjrga-rtashkenturindalxn--unup4yxn--uuwu58axn--vads-jraxn--valle-aoste-ebbturystykaneyamazoexn--valle-d-aoste-ehboehringerikexn--valleaoste-e7axn--valledaoste-ebbvadsoccertmgreaterxn--vard-jraxn--vegrshei-c0axn--vermgensberater-ctb-hostingxn--vermgensberatung-pwbiharstadotsubetsugarulezajskiervaksdalondonetskarmoyxn--vestvgy-ixa6oxn--vg-yiabruzzombieidskogasawarackmazerbaijan-mayenbaidarmeniaxn--vgan-qoaxn--vgsy-qoa0jellybeanxn--vgu402coguchikuzenishiwakinvestmentsaveincloudyndns-at-workisboringsakershusrcfdyndns-blogsitexn--vhquvestfoldxn--vler-qoaxn--vre-eiker-k8axn--vrggt-xqadxn--vry-yla5gxn--vuq861bihoronobeokagakikugawalesundiscoverdalondrinaplesknsalon-1xn--w4r85el8fhu5dnraxn--w4rs40lxn--wcvs22dxn--wgbh1communexn--wgbl6axn--xhq521bikedaejeonbuk0xn--xkc2al3hye2axn--xkc2dl3a5ee0hakubackyardshiraois-a-greenxn--y9a3aquarelleasingxn--yer-znavois-very-badxn--yfro4i67oxn--ygarden-p1axn--ygbi2ammxn--4it168dxn--ystre-slidre-ujbiofficialorenskoglobodoes-itcouldbeworldishangrilamdongnairkitapps-audibleasecuritytacticsxn--0trq7p7nnishiharaxn--zbx025dxn--zf0ao64axn--zf0avxlxn--zfr164bipartsaloonishiizunazukindustriaxnbayernxz
\ No newline at end of file
diff --git a/vendor/golang.org/x/net/publicsuffix/list.go b/vendor/golang.org/x/net/publicsuffix/list.go
new file mode 100644
index 00000000..d56e9e76
--- /dev/null
+++ b/vendor/golang.org/x/net/publicsuffix/list.go
@@ -0,0 +1,203 @@
+// Copyright 2012 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.
+
+//go:generate go run gen.go
+
+// Package publicsuffix provides a public suffix list based on data from
+// https://publicsuffix.org/
+//
+// A public suffix is one under which Internet users can directly register
+// names. It is related to, but different from, a TLD (top level domain).
+//
+// "com" is a TLD (top level domain). Top level means it has no dots.
+//
+// "com" is also a public suffix. Amazon and Google have registered different
+// siblings under that domain: "amazon.com" and "google.com".
+//
+// "au" is another TLD, again because it has no dots. But it's not "amazon.au".
+// Instead, it's "amazon.com.au".
+//
+// "com.au" isn't an actual TLD, because it's not at the top level (it has
+// dots). But it is an eTLD (effective TLD), because that's the branching point
+// for domain name registrars.
+//
+// Another name for "an eTLD" is "a public suffix". Often, what's more of
+// interest is the eTLD+1, or one more label than the public suffix. For
+// example, browsers partition read/write access to HTTP cookies according to
+// the eTLD+1. Web pages served from "amazon.com.au" can't read cookies from
+// "google.com.au", but web pages served from "maps.google.com" can share
+// cookies from "www.google.com", so you don't have to sign into Google Maps
+// separately from signing into Google Web Search. Note that all four of those
+// domains have 3 labels and 2 dots. The first two domains are each an eTLD+1,
+// the last two are not (but share the same eTLD+1: "google.com").
+//
+// All of these domains have the same eTLD+1:
+// - "www.books.amazon.co.uk"
+// - "books.amazon.co.uk"
+// - "amazon.co.uk"
+//
+// Specifically, the eTLD+1 is "amazon.co.uk", because the eTLD is "co.uk".
+//
+// There is no closed form algorithm to calculate the eTLD of a domain.
+// Instead, the calculation is data driven. This package provides a
+// pre-compiled snapshot of Mozilla's PSL (Public Suffix List) data at
+// https://publicsuffix.org/
+package publicsuffix // import "golang.org/x/net/publicsuffix"
+
+// TODO: specify case sensitivity and leading/trailing dot behavior for
+// func PublicSuffix and func EffectiveTLDPlusOne.
+
+import (
+ "fmt"
+ "net/http/cookiejar"
+ "strings"
+)
+
+// List implements the cookiejar.PublicSuffixList interface by calling the
+// PublicSuffix function.
+var List cookiejar.PublicSuffixList = list{}
+
+type list struct{}
+
+func (list) PublicSuffix(domain string) string {
+ ps, _ := PublicSuffix(domain)
+ return ps
+}
+
+func (list) String() string {
+ return version
+}
+
+// PublicSuffix returns the public suffix of the domain using a copy of the
+// publicsuffix.org database compiled into the library.
+//
+// icann is whether the public suffix is managed by the Internet Corporation
+// for Assigned Names and Numbers. If not, the public suffix is either a
+// privately managed domain (and in practice, not a top level domain) or an
+// unmanaged top level domain (and not explicitly mentioned in the
+// publicsuffix.org list). For example, "foo.org" and "foo.co.uk" are ICANN
+// domains, "foo.dyndns.org" and "foo.blogspot.co.uk" are private domains and
+// "cromulent" is an unmanaged top level domain.
+//
+// Use cases for distinguishing ICANN domains like "foo.com" from private
+// domains like "foo.appspot.com" can be found at
+// https://wiki.mozilla.org/Public_Suffix_List/Use_Cases
+func PublicSuffix(domain string) (publicSuffix string, icann bool) {
+ lo, hi := uint32(0), uint32(numTLD)
+ s, suffix, icannNode, wildcard := domain, len(domain), false, false
+loop:
+ for {
+ dot := strings.LastIndex(s, ".")
+ if wildcard {
+ icann = icannNode
+ suffix = 1 + dot
+ }
+ if lo == hi {
+ break
+ }
+ f := find(s[1+dot:], lo, hi)
+ if f == notFound {
+ break
+ }
+
+ u := uint32(nodes.get(f) >> (nodesBitsTextOffset + nodesBitsTextLength))
+ icannNode = u&(1<>= nodesBitsICANN
+ u = children.get(u & (1<>= childrenBitsLo
+ hi = u & (1<>= childrenBitsHi
+ switch u & (1<>= childrenBitsNodeType
+ wildcard = u&(1<>= nodesBitsTextLength
+ offset := x & (1< 0 {
+ v.Set("scope", strings.Join(c.Scopes, " "))
+ }
+ for _, opt := range opts {
+ opt.setValue(v)
+ }
+ return retrieveDeviceAuth(ctx, c, v)
+}
+
+func retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAuthResponse, error) {
+ if c.Endpoint.DeviceAuthURL == "" {
+ return nil, errors.New("endpoint missing DeviceAuthURL")
+ }
+
+ req, err := http.NewRequest("POST", c.Endpoint.DeviceAuthURL, strings.NewReader(v.Encode()))
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
+ req.Header.Set("Accept", "application/json")
+
+ t := time.Now()
+ r, err := internal.ContextClient(ctx).Do(req)
+ if err != nil {
+ return nil, err
+ }
+
+ body, err := io.ReadAll(io.LimitReader(r.Body, 1<<20))
+ if err != nil {
+ return nil, fmt.Errorf("oauth2: cannot auth device: %v", err)
+ }
+ if code := r.StatusCode; code < 200 || code > 299 {
+ return nil, &RetrieveError{
+ Response: r,
+ Body: body,
+ }
+ }
+
+ da := &DeviceAuthResponse{}
+ err = json.Unmarshal(body, &da)
+ if err != nil {
+ return nil, fmt.Errorf("unmarshal %s", err)
+ }
+
+ if !da.Expiry.IsZero() {
+ // Make a small adjustment to account for time taken by the request
+ da.Expiry = da.Expiry.Add(-time.Since(t))
+ }
+
+ return da, nil
+}
+
+// DeviceAccessToken polls the server to exchange a device code for a token.
+func (c *Config) DeviceAccessToken(ctx context.Context, da *DeviceAuthResponse, opts ...AuthCodeOption) (*Token, error) {
+ if !da.Expiry.IsZero() {
+ var cancel context.CancelFunc
+ ctx, cancel = context.WithDeadline(ctx, da.Expiry)
+ defer cancel()
+ }
+
+ // https://datatracker.ietf.org/doc/html/rfc8628#section-3.4
+ v := url.Values{
+ "client_id": {c.ClientID},
+ "grant_type": {"urn:ietf:params:oauth:grant-type:device_code"},
+ "device_code": {da.DeviceCode},
+ }
+ if len(c.Scopes) > 0 {
+ v.Set("scope", strings.Join(c.Scopes, " "))
+ }
+ for _, opt := range opts {
+ opt.setValue(v)
+ }
+
+ // "If no value is provided, clients MUST use 5 as the default."
+ // https://datatracker.ietf.org/doc/html/rfc8628#section-3.2
+ interval := da.Interval
+ if interval == 0 {
+ interval = 5
+ }
+
+ ticker := time.NewTicker(time.Duration(interval) * time.Second)
+ defer ticker.Stop()
+ for {
+ select {
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ case <-ticker.C:
+ tok, err := retrieveToken(ctx, c, v)
+ if err == nil {
+ return tok, nil
+ }
+
+ e, ok := err.(*RetrieveError)
+ if !ok {
+ return nil, err
+ }
+ switch e.ErrorCode {
+ case errSlowDown:
+ // https://datatracker.ietf.org/doc/html/rfc8628#section-3.5
+ // "the interval MUST be increased by 5 seconds for this and all subsequent requests"
+ interval += 5
+ ticker.Reset(time.Duration(interval) * time.Second)
+ case errAuthorizationPending:
+ // Do nothing.
+ case errAccessDenied, errExpiredToken:
+ fallthrough
+ default:
+ return tok, err
+ }
+ }
+ }
+}
diff --git a/vendor/golang.org/x/oauth2/google/appengine.go b/vendor/golang.org/x/oauth2/google/appengine.go
index feb1157b..564920bd 100644
--- a/vendor/golang.org/x/oauth2/google/appengine.go
+++ b/vendor/golang.org/x/oauth2/google/appengine.go
@@ -6,16 +6,13 @@ package google
import (
"context"
- "time"
+ "log"
+ "sync"
"golang.org/x/oauth2"
)
-// Set at init time by appengine_gen1.go. If nil, we're not on App Engine standard first generation (<= Go 1.9) or App Engine flexible.
-var appengineTokenFunc func(c context.Context, scopes ...string) (token string, expiry time.Time, err error)
-
-// Set at init time by appengine_gen1.go. If nil, we're not on App Engine standard first generation (<= Go 1.9) or App Engine flexible.
-var appengineAppIDFunc func(c context.Context) string
+var logOnce sync.Once // only spam about deprecation once
// AppEngineTokenSource returns a token source that fetches tokens from either
// the current application's service account or from the metadata server,
@@ -23,8 +20,10 @@ var appengineAppIDFunc func(c context.Context) string
// details. If you are implementing a 3-legged OAuth 2.0 flow on App Engine that
// involves user accounts, see oauth2.Config instead.
//
-// First generation App Engine runtimes (<= Go 1.9):
-// AppEngineTokenSource returns a token source that fetches tokens issued to the
+// The current version of this library requires at least Go 1.17 to build,
+// so first generation App Engine runtimes (<= Go 1.9) are unsupported.
+// Previously, on first generation App Engine runtimes, AppEngineTokenSource
+// returned a token source that fetches tokens issued to the
// current App Engine application's service account. The provided context must have
// come from appengine.NewContext.
//
@@ -34,5 +33,8 @@ var appengineAppIDFunc func(c context.Context) string
// context and scopes are not used. Please use DefaultTokenSource (or ComputeTokenSource,
// which DefaultTokenSource will use in this case) instead.
func AppEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource {
- return appEngineTokenSource(ctx, scope...)
+ logOnce.Do(func() {
+ log.Print("google: AppEngineTokenSource is deprecated on App Engine standard second generation runtimes (>= Go 1.11) and App Engine flexible. Please use DefaultTokenSource or ComputeTokenSource.")
+ })
+ return ComputeTokenSource("")
}
diff --git a/vendor/golang.org/x/oauth2/google/appengine_gen1.go b/vendor/golang.org/x/oauth2/google/appengine_gen1.go
deleted file mode 100644
index 16c6c6b9..00000000
--- a/vendor/golang.org/x/oauth2/google/appengine_gen1.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2018 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.
-
-//go:build appengine
-// +build appengine
-
-// This file applies to App Engine first generation runtimes (<= Go 1.9).
-
-package google
-
-import (
- "context"
- "sort"
- "strings"
- "sync"
-
- "golang.org/x/oauth2"
- "google.golang.org/appengine"
-)
-
-func init() {
- appengineTokenFunc = appengine.AccessToken
- appengineAppIDFunc = appengine.AppID
-}
-
-// See comment on AppEngineTokenSource in appengine.go.
-func appEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource {
- scopes := append([]string{}, scope...)
- sort.Strings(scopes)
- return &gaeTokenSource{
- ctx: ctx,
- scopes: scopes,
- key: strings.Join(scopes, " "),
- }
-}
-
-// aeTokens helps the fetched tokens to be reused until their expiration.
-var (
- aeTokensMu sync.Mutex
- aeTokens = make(map[string]*tokenLock) // key is space-separated scopes
-)
-
-type tokenLock struct {
- mu sync.Mutex // guards t; held while fetching or updating t
- t *oauth2.Token
-}
-
-type gaeTokenSource struct {
- ctx context.Context
- scopes []string
- key string // to aeTokens map; space-separated scopes
-}
-
-func (ts *gaeTokenSource) Token() (*oauth2.Token, error) {
- aeTokensMu.Lock()
- tok, ok := aeTokens[ts.key]
- if !ok {
- tok = &tokenLock{}
- aeTokens[ts.key] = tok
- }
- aeTokensMu.Unlock()
-
- tok.mu.Lock()
- defer tok.mu.Unlock()
- if tok.t.Valid() {
- return tok.t, nil
- }
- access, exp, err := appengineTokenFunc(ts.ctx, ts.scopes...)
- if err != nil {
- return nil, err
- }
- tok.t = &oauth2.Token{
- AccessToken: access,
- Expiry: exp,
- }
- return tok.t, nil
-}
diff --git a/vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go b/vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go
deleted file mode 100644
index a7e27b3d..00000000
--- a/vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2018 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.
-
-//go:build !appengine
-// +build !appengine
-
-// This file applies to App Engine second generation runtimes (>= Go 1.11) and App Engine flexible.
-
-package google
-
-import (
- "context"
- "log"
- "sync"
-
- "golang.org/x/oauth2"
-)
-
-var logOnce sync.Once // only spam about deprecation once
-
-// See comment on AppEngineTokenSource in appengine.go.
-func appEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource {
- logOnce.Do(func() {
- log.Print("google: AppEngineTokenSource is deprecated on App Engine standard second generation runtimes (>= Go 1.11) and App Engine flexible. Please use DefaultTokenSource or ComputeTokenSource.")
- })
- return ComputeTokenSource("")
-}
diff --git a/vendor/golang.org/x/oauth2/google/default.go b/vendor/golang.org/x/oauth2/google/default.go
index 2cf71f0f..df958359 100644
--- a/vendor/golang.org/x/oauth2/google/default.go
+++ b/vendor/golang.org/x/oauth2/google/default.go
@@ -12,6 +12,7 @@ import (
"os"
"path/filepath"
"runtime"
+ "sync"
"time"
"cloud.google.com/go/compute/metadata"
@@ -19,7 +20,10 @@ import (
"golang.org/x/oauth2/authhandler"
)
-const adcSetupURL = "https://cloud.google.com/docs/authentication/external/set-up-adc"
+const (
+ adcSetupURL = "https://cloud.google.com/docs/authentication/external/set-up-adc"
+ defaultUniverseDomain = "googleapis.com"
+)
// Credentials holds Google credentials, including "Application Default Credentials".
// For more details, see:
@@ -37,6 +41,64 @@ type Credentials struct {
// environment and not with a credentials file, e.g. when code is
// running on Google Cloud Platform.
JSON []byte
+
+ // UniverseDomainProvider returns the default service domain for a given
+ // Cloud universe. Optional.
+ //
+ // On GCE, UniverseDomainProvider should return the universe domain value
+ // from Google Compute Engine (GCE)'s metadata server. See also [The attached service
+ // account](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa).
+ // If the GCE metadata server returns a 404 error, the default universe
+ // domain value should be returned. If the GCE metadata server returns an
+ // error other than 404, the error should be returned.
+ UniverseDomainProvider func() (string, error)
+
+ udMu sync.Mutex // guards universeDomain
+ // universeDomain is the default service domain for a given Cloud universe.
+ universeDomain string
+}
+
+// UniverseDomain returns the default service domain for a given Cloud universe.
+//
+// The default value is "googleapis.com".
+//
+// Deprecated: Use instead (*Credentials).GetUniverseDomain(), which supports
+// obtaining the universe domain when authenticating via the GCE metadata server.
+// Unlike GetUniverseDomain, this method, UniverseDomain, will always return the
+// default value when authenticating via the GCE metadata server.
+// See also [The attached service account](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa).
+func (c *Credentials) UniverseDomain() string {
+ if c.universeDomain == "" {
+ return defaultUniverseDomain
+ }
+ return c.universeDomain
+}
+
+// GetUniverseDomain returns the default service domain for a given Cloud
+// universe. If present, UniverseDomainProvider will be invoked and its return
+// value will be cached.
+//
+// The default value is "googleapis.com".
+func (c *Credentials) GetUniverseDomain() (string, error) {
+ c.udMu.Lock()
+ defer c.udMu.Unlock()
+ if c.universeDomain == "" && c.UniverseDomainProvider != nil {
+ // On Google Compute Engine, an App Engine standard second generation
+ // runtime, or App Engine flexible, use an externally provided function
+ // to request the universe domain from the metadata server.
+ ud, err := c.UniverseDomainProvider()
+ if err != nil {
+ return "", err
+ }
+ c.universeDomain = ud
+ }
+ // If no UniverseDomainProvider (meaning not on Google Compute Engine), or
+ // in case of any (non-error) empty return value from
+ // UniverseDomainProvider, set the default universe domain.
+ if c.universeDomain == "" {
+ c.universeDomain = defaultUniverseDomain
+ }
+ return c.universeDomain, nil
}
// DefaultCredentials is the old name of Credentials.
@@ -76,6 +138,12 @@ type CredentialsParams struct {
// Note: This option is currently only respected when using credentials
// fetched from the GCE metadata server.
EarlyTokenRefresh time.Duration
+
+ // UniverseDomain is the default service domain for a given Cloud universe.
+ // Only supported in authentication flows that support universe domains.
+ // This value takes precedence over a universe domain explicitly specified
+ // in a credentials config file or by the GCE metadata server. Optional.
+ UniverseDomain string
}
func (params CredentialsParams) deepCopy() CredentialsParams {
@@ -120,9 +188,7 @@ func DefaultTokenSource(ctx context.Context, scope ...string) (oauth2.TokenSourc
// 2. A JSON file in a location known to the gcloud command-line tool.
// On Windows, this is %APPDATA%/gcloud/application_default_credentials.json.
// On other systems, $HOME/.config/gcloud/application_default_credentials.json.
-// 3. On Google App Engine standard first generation runtimes (<= Go 1.9) it uses
-// the appengine.AccessToken function.
-// 4. On Google Compute Engine, Google App Engine standard second generation runtimes
+// 3. On Google Compute Engine, Google App Engine standard second generation runtimes
// (>= Go 1.11), and Google App Engine flexible environment, it fetches
// credentials from the metadata server.
func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsParams) (*Credentials, error) {
@@ -145,23 +211,27 @@ func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsPar
return CredentialsFromJSONWithParams(ctx, b, params)
}
- // Third, if we're on a Google App Engine standard first generation runtime (<= Go 1.9)
- // use those credentials. App Engine standard second generation runtimes (>= Go 1.11)
- // and App Engine flexible use ComputeTokenSource and the metadata server.
- if appengineTokenFunc != nil {
- return &Credentials{
- ProjectID: appengineAppIDFunc(ctx),
- TokenSource: AppEngineTokenSource(ctx, params.Scopes...),
- }, nil
- }
-
- // Fourth, if we're on Google Compute Engine, an App Engine standard second generation runtime,
+ // Third, if we're on Google Compute Engine, an App Engine standard second generation runtime,
// or App Engine flexible, use the metadata server.
if metadata.OnGCE() {
id, _ := metadata.ProjectID()
+ universeDomainProvider := func() (string, error) {
+ universeDomain, err := metadata.Get("universe/universe_domain")
+ if err != nil {
+ if _, ok := err.(metadata.NotDefinedError); ok {
+ // http.StatusNotFound (404)
+ return defaultUniverseDomain, nil
+ } else {
+ return "", err
+ }
+ }
+ return universeDomain, nil
+ }
return &Credentials{
- ProjectID: id,
- TokenSource: computeTokenSource("", params.EarlyTokenRefresh, params.Scopes...),
+ ProjectID: id,
+ TokenSource: computeTokenSource("", params.EarlyTokenRefresh, params.Scopes...),
+ UniverseDomainProvider: universeDomainProvider,
+ universeDomain: params.UniverseDomain,
}, nil
}
@@ -200,15 +270,26 @@ func CredentialsFromJSONWithParams(ctx context.Context, jsonData []byte, params
if err := json.Unmarshal(jsonData, &f); err != nil {
return nil, err
}
+
+ universeDomain := f.UniverseDomain
+ if params.UniverseDomain != "" {
+ universeDomain = params.UniverseDomain
+ }
+ // Authorized user credentials are only supported in the googleapis.com universe.
+ if f.Type == userCredentialsKey {
+ universeDomain = defaultUniverseDomain
+ }
+
ts, err := f.tokenSource(ctx, params)
if err != nil {
return nil, err
}
ts = newErrWrappingTokenSource(ts)
return &Credentials{
- ProjectID: f.ProjectID,
- TokenSource: ts,
- JSON: jsonData,
+ ProjectID: f.ProjectID,
+ TokenSource: ts,
+ JSON: jsonData,
+ universeDomain: universeDomain,
}, nil
}
diff --git a/vendor/golang.org/x/oauth2/google/doc.go b/vendor/golang.org/x/oauth2/google/doc.go
index ca717634..830d268c 100644
--- a/vendor/golang.org/x/oauth2/google/doc.go
+++ b/vendor/golang.org/x/oauth2/google/doc.go
@@ -22,89 +22,9 @@
// the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or
// create an http.Client.
//
-// # Workload Identity Federation
+// # Workload and Workforce Identity Federation
//
-// Using workload identity federation, your application can access Google Cloud
-// resources from Amazon Web Services (AWS), Microsoft Azure or any identity
-// provider that supports OpenID Connect (OIDC) or SAML 2.0.
-// Traditionally, applications running outside Google Cloud have used service
-// account keys to access Google Cloud resources. Using identity federation,
-// you can allow your workload to impersonate a service account.
-// This lets you access Google Cloud resources directly, eliminating the
-// maintenance and security burden associated with service account keys.
-//
-// Follow the detailed instructions on how to configure Workload Identity Federation
-// in various platforms:
-//
-// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#aws
-// Microsoft Azure: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#azure
-// OIDC identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#oidc
-// SAML 2.0 identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#saml
-//
-// For OIDC and SAML providers, the library can retrieve tokens in three ways:
-// from a local file location (file-sourced credentials), from a server
-// (URL-sourced credentials), or from a local executable (executable-sourced
-// credentials).
-// For file-sourced credentials, a background process needs to be continuously
-// refreshing the file location with a new OIDC/SAML token prior to expiration.
-// For tokens with one hour lifetimes, the token needs to be updated in the file
-// every hour. The token can be stored directly as plain text or in JSON format.
-// For URL-sourced credentials, a local server needs to host a GET endpoint to
-// return the OIDC/SAML token. The response can be in plain text or JSON.
-// Additional required request headers can also be specified.
-// For executable-sourced credentials, an application needs to be available to
-// output the OIDC/SAML token and other information in a JSON format.
-// For more information on how these work (and how to implement
-// executable-sourced credentials), please check out:
-// https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create_a_credential_configuration
-//
-// Note that this library does not perform any validation on the token_url, token_info_url,
-// or service_account_impersonation_url fields of the credential configuration.
-// It is not recommended to use a credential configuration that you did not generate with
-// the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain.
-//
-// # Workforce Identity Federation
-//
-// Workforce identity federation lets you use an external identity provider (IdP) to
-// authenticate and authorize a workforceβa group of users, such as employees, partners,
-// and contractorsβusing IAM, so that the users can access Google Cloud services.
-// Workforce identity federation extends Google Cloud's identity capabilities to support
-// syncless, attribute-based single sign on.
-//
-// With workforce identity federation, your workforce can access Google Cloud resources
-// using an external identity provider (IdP) that supports OpenID Connect (OIDC) or
-// SAML 2.0 such as Azure Active Directory (Azure AD), Active Directory Federation
-// Services (AD FS), Okta, and others.
-//
-// Follow the detailed instructions on how to configure Workload Identity Federation
-// in various platforms:
-//
-// Azure AD: https://cloud.google.com/iam/docs/workforce-sign-in-azure-ad
-// Okta: https://cloud.google.com/iam/docs/workforce-sign-in-okta
-// OIDC identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#oidc
-// SAML 2.0 identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#saml
-//
-// For workforce identity federation, the library can retrieve tokens in three ways:
-// from a local file location (file-sourced credentials), from a server
-// (URL-sourced credentials), or from a local executable (executable-sourced
-// credentials).
-// For file-sourced credentials, a background process needs to be continuously
-// refreshing the file location with a new OIDC/SAML token prior to expiration.
-// For tokens with one hour lifetimes, the token needs to be updated in the file
-// every hour. The token can be stored directly as plain text or in JSON format.
-// For URL-sourced credentials, a local server needs to host a GET endpoint to
-// return the OIDC/SAML token. The response can be in plain text or JSON.
-// Additional required request headers can also be specified.
-// For executable-sourced credentials, an application needs to be available to
-// output the OIDC/SAML token and other information in a JSON format.
-// For more information on how these work (and how to implement
-// executable-sourced credentials), please check out:
-// https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#generate_a_configuration_file_for_non-interactive_sign-in
-//
-// Note that this library does not perform any validation on the token_url, token_info_url,
-// or service_account_impersonation_url fields of the credential configuration.
-// It is not recommended to use a credential configuration that you did not generate with
-// the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain.
+// For information on how to use Workload and Workforce Identity Federation, see [golang.org/x/oauth2/google/externalaccount].
//
// # Credentials
//
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go b/vendor/golang.org/x/oauth2/google/externalaccount/aws.go
similarity index 77%
rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go
rename to vendor/golang.org/x/oauth2/google/externalaccount/aws.go
index 2bf3202b..ca27c2e9 100644
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go
+++ b/vendor/golang.org/x/oauth2/google/externalaccount/aws.go
@@ -26,22 +26,28 @@ import (
"golang.org/x/oauth2"
)
-type awsSecurityCredentials struct {
- AccessKeyID string `json:"AccessKeyID"`
+// AwsSecurityCredentials models AWS security credentials.
+type AwsSecurityCredentials struct {
+ // AccessKeyId is the AWS Access Key ID - Required.
+ AccessKeyID string `json:"AccessKeyID"`
+ // SecretAccessKey is the AWS Secret Access Key - Required.
SecretAccessKey string `json:"SecretAccessKey"`
- SecurityToken string `json:"Token"`
+ // SessionToken is the AWS Session token. This should be provided for temporary AWS security credentials - Optional.
+ SessionToken string `json:"Token"`
}
// awsRequestSigner is a utility class to sign http requests using a AWS V4 signature.
type awsRequestSigner struct {
RegionName string
- AwsSecurityCredentials awsSecurityCredentials
+ AwsSecurityCredentials *AwsSecurityCredentials
}
// getenv aliases os.Getenv for testing
var getenv = os.Getenv
const (
+ defaultRegionalCredentialVerificationUrl = "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15"
+
// AWS Signature Version 4 signing algorithm identifier.
awsAlgorithm = "AWS4-HMAC-SHA256"
@@ -197,8 +203,8 @@ func (rs *awsRequestSigner) SignRequest(req *http.Request) error {
signedRequest.Header.Add("host", requestHost(req))
- if rs.AwsSecurityCredentials.SecurityToken != "" {
- signedRequest.Header.Add(awsSecurityTokenHeader, rs.AwsSecurityCredentials.SecurityToken)
+ if rs.AwsSecurityCredentials.SessionToken != "" {
+ signedRequest.Header.Add(awsSecurityTokenHeader, rs.AwsSecurityCredentials.SessionToken)
}
if signedRequest.Header.Get("date") == "" {
@@ -251,16 +257,18 @@ func (rs *awsRequestSigner) generateAuthentication(req *http.Request, timestamp
}
type awsCredentialSource struct {
- EnvironmentID string
- RegionURL string
- RegionalCredVerificationURL string
- CredVerificationURL string
- IMDSv2SessionTokenURL string
- TargetResource string
- requestSigner *awsRequestSigner
- region string
- ctx context.Context
- client *http.Client
+ environmentID string
+ regionURL string
+ regionalCredVerificationURL string
+ credVerificationURL string
+ imdsv2SessionTokenURL string
+ targetResource string
+ requestSigner *awsRequestSigner
+ region string
+ ctx context.Context
+ client *http.Client
+ awsSecurityCredentialsSupplier AwsSecurityCredentialsSupplier
+ supplierOptions SupplierOptions
}
type awsRequestHeader struct {
@@ -274,49 +282,6 @@ type awsRequest struct {
Headers []awsRequestHeader `json:"headers"`
}
-func (cs awsCredentialSource) validateMetadataServers() error {
- if err := cs.validateMetadataServer(cs.RegionURL, "region_url"); err != nil {
- return err
- }
- if err := cs.validateMetadataServer(cs.CredVerificationURL, "url"); err != nil {
- return err
- }
- return cs.validateMetadataServer(cs.IMDSv2SessionTokenURL, "imdsv2_session_token_url")
-}
-
-var validHostnames []string = []string{"169.254.169.254", "fd00:ec2::254"}
-
-func (cs awsCredentialSource) isValidMetadataServer(metadataUrl string) bool {
- if metadataUrl == "" {
- // Zero value means use default, which is valid.
- return true
- }
-
- u, err := url.Parse(metadataUrl)
- if err != nil {
- // Unparseable URL means invalid
- return false
- }
-
- for _, validHostname := range validHostnames {
- if u.Hostname() == validHostname {
- // If it's one of the valid hostnames, everything is good
- return true
- }
- }
-
- // hostname not found in our allowlist, so not valid
- return false
-}
-
-func (cs awsCredentialSource) validateMetadataServer(metadataUrl, urlName string) error {
- if !cs.isValidMetadataServer(metadataUrl) {
- return fmt.Errorf("oauth2/google: invalid hostname %s for %s", metadataUrl, urlName)
- }
-
- return nil
-}
-
func (cs awsCredentialSource) doRequest(req *http.Request) (*http.Response, error) {
if cs.client == nil {
cs.client = oauth2.NewClient(cs.ctx, nil)
@@ -335,14 +300,25 @@ func canRetrieveSecurityCredentialFromEnvironment() bool {
return getenv(awsAccessKeyId) != "" && getenv(awsSecretAccessKey) != ""
}
-func shouldUseMetadataServer() bool {
- return !canRetrieveRegionFromEnvironment() || !canRetrieveSecurityCredentialFromEnvironment()
+func (cs awsCredentialSource) shouldUseMetadataServer() bool {
+ return cs.awsSecurityCredentialsSupplier == nil && (!canRetrieveRegionFromEnvironment() || !canRetrieveSecurityCredentialFromEnvironment())
+}
+
+func (cs awsCredentialSource) credentialSourceType() string {
+ if cs.awsSecurityCredentialsSupplier != nil {
+ return "programmatic"
+ }
+ return "aws"
}
func (cs awsCredentialSource) subjectToken() (string, error) {
+ // Set Defaults
+ if cs.regionalCredVerificationURL == "" {
+ cs.regionalCredVerificationURL = defaultRegionalCredentialVerificationUrl
+ }
if cs.requestSigner == nil {
headers := make(map[string]string)
- if shouldUseMetadataServer() {
+ if cs.shouldUseMetadataServer() {
awsSessionToken, err := cs.getAWSSessionToken()
if err != nil {
return "", err
@@ -357,8 +333,8 @@ func (cs awsCredentialSource) subjectToken() (string, error) {
if err != nil {
return "", err
}
-
- if cs.region, err = cs.getRegion(headers); err != nil {
+ cs.region, err = cs.getRegion(headers)
+ if err != nil {
return "", err
}
@@ -370,7 +346,7 @@ func (cs awsCredentialSource) subjectToken() (string, error) {
// Generate the signed request to AWS STS GetCallerIdentity API.
// Use the required regional endpoint. Otherwise, the request will fail.
- req, err := http.NewRequest("POST", strings.Replace(cs.RegionalCredVerificationURL, "{region}", cs.region, 1), nil)
+ req, err := http.NewRequest("POST", strings.Replace(cs.regionalCredVerificationURL, "{region}", cs.region, 1), nil)
if err != nil {
return "", err
}
@@ -378,8 +354,8 @@ func (cs awsCredentialSource) subjectToken() (string, error) {
// provider, with or without the HTTPS prefix.
// Including this header as part of the signature is recommended to
// ensure data integrity.
- if cs.TargetResource != "" {
- req.Header.Add("x-goog-cloud-target-resource", cs.TargetResource)
+ if cs.targetResource != "" {
+ req.Header.Add("x-goog-cloud-target-resource", cs.targetResource)
}
cs.requestSigner.SignRequest(req)
@@ -426,11 +402,11 @@ func (cs awsCredentialSource) subjectToken() (string, error) {
}
func (cs *awsCredentialSource) getAWSSessionToken() (string, error) {
- if cs.IMDSv2SessionTokenURL == "" {
+ if cs.imdsv2SessionTokenURL == "" {
return "", nil
}
- req, err := http.NewRequest("PUT", cs.IMDSv2SessionTokenURL, nil)
+ req, err := http.NewRequest("PUT", cs.imdsv2SessionTokenURL, nil)
if err != nil {
return "", err
}
@@ -449,25 +425,29 @@ func (cs *awsCredentialSource) getAWSSessionToken() (string, error) {
}
if resp.StatusCode != 200 {
- return "", fmt.Errorf("oauth2/google: unable to retrieve AWS session token - %s", string(respBody))
+ return "", fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS session token - %s", string(respBody))
}
return string(respBody), nil
}
func (cs *awsCredentialSource) getRegion(headers map[string]string) (string, error) {
+ if cs.awsSecurityCredentialsSupplier != nil {
+ return cs.awsSecurityCredentialsSupplier.AwsRegion(cs.ctx, cs.supplierOptions)
+ }
if canRetrieveRegionFromEnvironment() {
if envAwsRegion := getenv(awsRegion); envAwsRegion != "" {
+ cs.region = envAwsRegion
return envAwsRegion, nil
}
return getenv("AWS_DEFAULT_REGION"), nil
}
- if cs.RegionURL == "" {
- return "", errors.New("oauth2/google: unable to determine AWS region")
+ if cs.regionURL == "" {
+ return "", errors.New("oauth2/google/externalaccount: unable to determine AWS region")
}
- req, err := http.NewRequest("GET", cs.RegionURL, nil)
+ req, err := http.NewRequest("GET", cs.regionURL, nil)
if err != nil {
return "", err
}
@@ -488,7 +468,7 @@ func (cs *awsCredentialSource) getRegion(headers map[string]string) (string, err
}
if resp.StatusCode != 200 {
- return "", fmt.Errorf("oauth2/google: unable to retrieve AWS region - %s", string(respBody))
+ return "", fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS region - %s", string(respBody))
}
// This endpoint will return the region in format: us-east-2b.
@@ -500,12 +480,15 @@ func (cs *awsCredentialSource) getRegion(headers map[string]string) (string, err
return string(respBody[:respBodyEnd]), nil
}
-func (cs *awsCredentialSource) getSecurityCredentials(headers map[string]string) (result awsSecurityCredentials, err error) {
+func (cs *awsCredentialSource) getSecurityCredentials(headers map[string]string) (result *AwsSecurityCredentials, err error) {
+ if cs.awsSecurityCredentialsSupplier != nil {
+ return cs.awsSecurityCredentialsSupplier.AwsSecurityCredentials(cs.ctx, cs.supplierOptions)
+ }
if canRetrieveSecurityCredentialFromEnvironment() {
- return awsSecurityCredentials{
+ return &AwsSecurityCredentials{
AccessKeyID: getenv(awsAccessKeyId),
SecretAccessKey: getenv(awsSecretAccessKey),
- SecurityToken: getenv(awsSessionToken),
+ SessionToken: getenv(awsSessionToken),
}, nil
}
@@ -520,24 +503,23 @@ func (cs *awsCredentialSource) getSecurityCredentials(headers map[string]string)
}
if credentials.AccessKeyID == "" {
- return result, errors.New("oauth2/google: missing AccessKeyId credential")
+ return result, errors.New("oauth2/google/externalaccount: missing AccessKeyId credential")
}
if credentials.SecretAccessKey == "" {
- return result, errors.New("oauth2/google: missing SecretAccessKey credential")
+ return result, errors.New("oauth2/google/externalaccount: missing SecretAccessKey credential")
}
- return credentials, nil
+ return &credentials, nil
}
-func (cs *awsCredentialSource) getMetadataSecurityCredentials(roleName string, headers map[string]string) (awsSecurityCredentials, error) {
- var result awsSecurityCredentials
+func (cs *awsCredentialSource) getMetadataSecurityCredentials(roleName string, headers map[string]string) (AwsSecurityCredentials, error) {
+ var result AwsSecurityCredentials
- req, err := http.NewRequest("GET", fmt.Sprintf("%s/%s", cs.CredVerificationURL, roleName), nil)
+ req, err := http.NewRequest("GET", fmt.Sprintf("%s/%s", cs.credVerificationURL, roleName), nil)
if err != nil {
return result, err
}
- req.Header.Add("Content-Type", "application/json")
for name, value := range headers {
req.Header.Add(name, value)
@@ -555,7 +537,7 @@ func (cs *awsCredentialSource) getMetadataSecurityCredentials(roleName string, h
}
if resp.StatusCode != 200 {
- return result, fmt.Errorf("oauth2/google: unable to retrieve AWS security credentials - %s", string(respBody))
+ return result, fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS security credentials - %s", string(respBody))
}
err = json.Unmarshal(respBody, &result)
@@ -563,11 +545,11 @@ func (cs *awsCredentialSource) getMetadataSecurityCredentials(roleName string, h
}
func (cs *awsCredentialSource) getMetadataRoleName(headers map[string]string) (string, error) {
- if cs.CredVerificationURL == "" {
- return "", errors.New("oauth2/google: unable to determine the AWS metadata server security credentials endpoint")
+ if cs.credVerificationURL == "" {
+ return "", errors.New("oauth2/google/externalaccount: unable to determine the AWS metadata server security credentials endpoint")
}
- req, err := http.NewRequest("GET", cs.CredVerificationURL, nil)
+ req, err := http.NewRequest("GET", cs.credVerificationURL, nil)
if err != nil {
return "", err
}
@@ -588,7 +570,7 @@ func (cs *awsCredentialSource) getMetadataRoleName(headers map[string]string) (s
}
if resp.StatusCode != 200 {
- return "", fmt.Errorf("oauth2/google: unable to retrieve AWS role name - %s", string(respBody))
+ return "", fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS role name - %s", string(respBody))
}
return string(respBody), nil
diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go b/vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go
new file mode 100644
index 00000000..6c81a687
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go
@@ -0,0 +1,485 @@
+// Copyright 2020 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 externalaccount provides support for creating workload identity
+federation and workforce identity federation token sources that can be
+used to access Google Cloud resources from external identity providers.
+
+# Workload Identity Federation
+
+Using workload identity federation, your application can access Google Cloud
+resources from Amazon Web Services (AWS), Microsoft Azure or any identity
+provider that supports OpenID Connect (OIDC) or SAML 2.0.
+Traditionally, applications running outside Google Cloud have used service
+account keys to access Google Cloud resources. Using identity federation,
+you can allow your workload to impersonate a service account.
+This lets you access Google Cloud resources directly, eliminating the
+maintenance and security burden associated with service account keys.
+
+Follow the detailed instructions on how to configure Workload Identity Federation
+in various platforms:
+
+Amazon Web Services (AWS): https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#aws
+Microsoft Azure: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#azure
+OIDC identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#oidc
+SAML 2.0 identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#saml
+
+For OIDC and SAML providers, the library can retrieve tokens in fours ways:
+from a local file location (file-sourced credentials), from a server
+(URL-sourced credentials), from a local executable (executable-sourced
+credentials), or from a user defined function that returns an OIDC or SAML token.
+For file-sourced credentials, a background process needs to be continuously
+refreshing the file location with a new OIDC/SAML token prior to expiration.
+For tokens with one hour lifetimes, the token needs to be updated in the file
+every hour. The token can be stored directly as plain text or in JSON format.
+For URL-sourced credentials, a local server needs to host a GET endpoint to
+return the OIDC/SAML token. The response can be in plain text or JSON.
+Additional required request headers can also be specified.
+For executable-sourced credentials, an application needs to be available to
+output the OIDC/SAML token and other information in a JSON format.
+For more information on how these work (and how to implement
+executable-sourced credentials), please check out:
+https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create_a_credential_configuration
+
+To use a custom function to supply the token, define a struct that implements the [SubjectTokenSupplier] interface for OIDC/SAML providers,
+or one that implements [AwsSecurityCredentialsSupplier] for AWS providers. This can then be used when building a [Config].
+The [golang.org/x/oauth2.TokenSource] created from the config using [NewTokenSource] can then be used to access Google
+Cloud resources. For instance, you can create a new client from the
+[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource))
+
+Note that this library does not perform any validation on the token_url, token_info_url,
+or service_account_impersonation_url fields of the credential configuration.
+It is not recommended to use a credential configuration that you did not generate with
+the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain.
+
+# Workforce Identity Federation
+
+Workforce identity federation lets you use an external identity provider (IdP) to
+authenticate and authorize a workforceβa group of users, such as employees, partners,
+and contractorsβusing IAM, so that the users can access Google Cloud services.
+Workforce identity federation extends Google Cloud's identity capabilities to support
+syncless, attribute-based single sign on.
+
+With workforce identity federation, your workforce can access Google Cloud resources
+using an external identity provider (IdP) that supports OpenID Connect (OIDC) or
+SAML 2.0 such as Azure Active Directory (Azure AD), Active Directory Federation
+Services (AD FS), Okta, and others.
+
+Follow the detailed instructions on how to configure Workload Identity Federation
+in various platforms:
+
+Azure AD: https://cloud.google.com/iam/docs/workforce-sign-in-azure-ad
+Okta: https://cloud.google.com/iam/docs/workforce-sign-in-okta
+OIDC identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#oidc
+SAML 2.0 identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#saml
+
+For workforce identity federation, the library can retrieve tokens in four ways:
+from a local file location (file-sourced credentials), from a server
+(URL-sourced credentials), from a local executable (executable-sourced
+credentials), or from a user supplied function that returns an OIDC or SAML token.
+For file-sourced credentials, a background process needs to be continuously
+refreshing the file location with a new OIDC/SAML token prior to expiration.
+For tokens with one hour lifetimes, the token needs to be updated in the file
+every hour. The token can be stored directly as plain text or in JSON format.
+For URL-sourced credentials, a local server needs to host a GET endpoint to
+return the OIDC/SAML token. The response can be in plain text or JSON.
+Additional required request headers can also be specified.
+For executable-sourced credentials, an application needs to be available to
+output the OIDC/SAML token and other information in a JSON format.
+For more information on how these work (and how to implement
+executable-sourced credentials), please check out:
+https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#generate_a_configuration_file_for_non-interactive_sign-in
+
+To use a custom function to supply the token, define a struct that implements the [SubjectTokenSupplier] interface for OIDC/SAML providers.
+This can then be used when building a [Config].
+The [golang.org/x/oauth2.TokenSource] created from the config using [NewTokenSource] can then be used access Google
+Cloud resources. For instance, you can create a new client from the
+[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource))
+
+# Security considerations
+
+Note that this library does not perform any validation on the token_url, token_info_url,
+or service_account_impersonation_url fields of the credential configuration.
+It is not recommended to use a credential configuration that you did not generate with
+the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain.
+*/
+package externalaccount
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "regexp"
+ "strconv"
+ "strings"
+ "time"
+
+ "golang.org/x/oauth2"
+ "golang.org/x/oauth2/google/internal/impersonate"
+ "golang.org/x/oauth2/google/internal/stsexchange"
+)
+
+const (
+ universeDomainPlaceholder = "UNIVERSE_DOMAIN"
+ defaultTokenURL = "https://sts.UNIVERSE_DOMAIN/v1/token"
+ defaultUniverseDomain = "googleapis.com"
+)
+
+// now aliases time.Now for testing
+var now = func() time.Time {
+ return time.Now().UTC()
+}
+
+// Config stores the configuration for fetching tokens with external credentials.
+type Config struct {
+ // Audience is the Secure Token Service (STS) audience which contains the resource name for the workload
+ // identity pool or the workforce pool and the provider identifier in that pool. Required.
+ Audience string
+ // SubjectTokenType is the STS token type based on the Oauth2.0 token exchange spec.
+ // Expected values include:
+ // βurn:ietf:params:oauth:token-type:jwtβ
+ // βurn:ietf:params:oauth:token-type:id-tokenβ
+ // βurn:ietf:params:oauth:token-type:saml2β
+ // βurn:ietf:params:aws:token-type:aws4_requestβ
+ // Required.
+ SubjectTokenType string
+ // TokenURL is the STS token exchange endpoint. If not provided, will default to
+ // https://sts.UNIVERSE_DOMAIN/v1/token, with UNIVERSE_DOMAIN set to the
+ // default service domain googleapis.com unless UniverseDomain is set.
+ // Optional.
+ TokenURL string
+ // TokenInfoURL is the token_info endpoint used to retrieve the account related information (
+ // user attributes like account identifier, eg. email, username, uid, etc). This is
+ // needed for gCloud session account identification. Optional.
+ TokenInfoURL string
+ // ServiceAccountImpersonationURL is the URL for the service account impersonation request. This is only
+ // required for workload identity pools when APIs to be accessed have not integrated with UberMint. Optional.
+ ServiceAccountImpersonationURL string
+ // ServiceAccountImpersonationLifetimeSeconds is the number of seconds the service account impersonation
+ // token will be valid for. If not provided, it will default to 3600. Optional.
+ ServiceAccountImpersonationLifetimeSeconds int
+ // ClientSecret is currently only required if token_info endpoint also
+ // needs to be called with the generated GCP access token. When provided, STS will be
+ // called with additional basic authentication using ClientId as username and ClientSecret as password. Optional.
+ ClientSecret string
+ // ClientID is only required in conjunction with ClientSecret, as described above. Optional.
+ ClientID string
+ // CredentialSource contains the necessary information to retrieve the token itself, as well
+ // as some environmental information. One of SubjectTokenSupplier, AWSSecurityCredentialSupplier or
+ // CredentialSource must be provided. Optional.
+ CredentialSource *CredentialSource
+ // QuotaProjectID is injected by gCloud. If the value is non-empty, the Auth libraries
+ // will set the x-goog-user-project header which overrides the project associated with the credentials. Optional.
+ QuotaProjectID string
+ // Scopes contains the desired scopes for the returned access token. Optional.
+ Scopes []string
+ // WorkforcePoolUserProject is the workforce pool user project number when the credential
+ // corresponds to a workforce pool and not a workload identity pool.
+ // The underlying principal must still have serviceusage.services.use IAM
+ // permission to use the project for billing/quota. Optional.
+ WorkforcePoolUserProject string
+ // SubjectTokenSupplier is an optional token supplier for OIDC/SAML credentials.
+ // One of SubjectTokenSupplier, AWSSecurityCredentialSupplier or CredentialSource must be provided. Optional.
+ SubjectTokenSupplier SubjectTokenSupplier
+ // AwsSecurityCredentialsSupplier is an AWS Security Credential supplier for AWS credentials.
+ // One of SubjectTokenSupplier, AWSSecurityCredentialSupplier or CredentialSource must be provided. Optional.
+ AwsSecurityCredentialsSupplier AwsSecurityCredentialsSupplier
+ // UniverseDomain is the default service domain for a given Cloud universe.
+ // This value will be used in the default STS token URL. The default value
+ // is "googleapis.com". It will not be used if TokenURL is set. Optional.
+ UniverseDomain string
+}
+
+var (
+ validWorkforceAudiencePattern *regexp.Regexp = regexp.MustCompile(`//iam\.googleapis\.com/locations/[^/]+/workforcePools/`)
+)
+
+func validateWorkforceAudience(input string) bool {
+ return validWorkforceAudiencePattern.MatchString(input)
+}
+
+// NewTokenSource Returns an external account TokenSource using the provided external account config.
+func NewTokenSource(ctx context.Context, conf Config) (oauth2.TokenSource, error) {
+ if conf.Audience == "" {
+ return nil, fmt.Errorf("oauth2/google/externalaccount: Audience must be set")
+ }
+ if conf.SubjectTokenType == "" {
+ return nil, fmt.Errorf("oauth2/google/externalaccount: Subject token type must be set")
+ }
+ if conf.WorkforcePoolUserProject != "" {
+ valid := validateWorkforceAudience(conf.Audience)
+ if !valid {
+ return nil, fmt.Errorf("oauth2/google/externalaccount: Workforce pool user project should not be set for non-workforce pool credentials")
+ }
+ }
+ count := 0
+ if conf.CredentialSource != nil {
+ count++
+ }
+ if conf.SubjectTokenSupplier != nil {
+ count++
+ }
+ if conf.AwsSecurityCredentialsSupplier != nil {
+ count++
+ }
+ if count == 0 {
+ return nil, fmt.Errorf("oauth2/google/externalaccount: One of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set")
+ }
+ if count > 1 {
+ return nil, fmt.Errorf("oauth2/google/externalaccount: Only one of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set")
+ }
+ return conf.tokenSource(ctx, "https")
+}
+
+// tokenSource is a private function that's directly called by some of the tests,
+// because the unit test URLs are mocked, and would otherwise fail the
+// validity check.
+func (c *Config) tokenSource(ctx context.Context, scheme string) (oauth2.TokenSource, error) {
+
+ ts := tokenSource{
+ ctx: ctx,
+ conf: c,
+ }
+ if c.ServiceAccountImpersonationURL == "" {
+ return oauth2.ReuseTokenSource(nil, ts), nil
+ }
+ scopes := c.Scopes
+ ts.conf.Scopes = []string{"https://www.googleapis.com/auth/cloud-platform"}
+ imp := impersonate.ImpersonateTokenSource{
+ Ctx: ctx,
+ URL: c.ServiceAccountImpersonationURL,
+ Scopes: scopes,
+ Ts: oauth2.ReuseTokenSource(nil, ts),
+ TokenLifetimeSeconds: c.ServiceAccountImpersonationLifetimeSeconds,
+ }
+ return oauth2.ReuseTokenSource(nil, imp), nil
+}
+
+// Subject token file types.
+const (
+ fileTypeText = "text"
+ fileTypeJSON = "json"
+)
+
+// Format contains information needed to retireve a subject token for URL or File sourced credentials.
+type Format struct {
+ // Type should be either "text" or "json". This determines whether the file or URL sourced credentials
+ // expect a simple text subject token or if the subject token will be contained in a JSON object.
+ // When not provided "text" type is assumed.
+ Type string `json:"type"`
+ // SubjectTokenFieldName is only required for JSON format. This is the field name that the credentials will check
+ // for the subject token in the file or URL response. This would be "access_token" for azure.
+ SubjectTokenFieldName string `json:"subject_token_field_name"`
+}
+
+// CredentialSource stores the information necessary to retrieve the credentials for the STS exchange.
+type CredentialSource struct {
+ // File is the location for file sourced credentials.
+ // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
+ File string `json:"file"`
+
+ // Url is the URL to call for URL sourced credentials.
+ // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
+ URL string `json:"url"`
+ // Headers are the headers to attach to the request for URL sourced credentials.
+ Headers map[string]string `json:"headers"`
+
+ // Executable is the configuration object for executable sourced credentials.
+ // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
+ Executable *ExecutableConfig `json:"executable"`
+
+ // EnvironmentID is the EnvironmentID used for AWS sourced credentials. This should start with "AWS".
+ // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
+ EnvironmentID string `json:"environment_id"`
+ // RegionURL is the metadata URL to retrieve the region from for EC2 AWS credentials.
+ RegionURL string `json:"region_url"`
+ // RegionalCredVerificationURL is the AWS regional credential verification URL, will default to
+ // "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15" if not provided."
+ RegionalCredVerificationURL string `json:"regional_cred_verification_url"`
+ // IMDSv2SessionTokenURL is the URL to retrieve the session token when using IMDSv2 in AWS.
+ IMDSv2SessionTokenURL string `json:"imdsv2_session_token_url"`
+ // Format is the format type for the subject token. Used for File and URL sourced credentials. Expected values are "text" or "json".
+ Format Format `json:"format"`
+}
+
+// ExecutableConfig contains information needed for executable sourced credentials.
+type ExecutableConfig struct {
+ // Command is the the full command to run to retrieve the subject token.
+ // This can include arguments. Must be an absolute path for the program. Required.
+ Command string `json:"command"`
+ // TimeoutMillis is the timeout duration, in milliseconds. Defaults to 30000 milliseconds when not provided. Optional.
+ TimeoutMillis *int `json:"timeout_millis"`
+ // OutputFile is the absolute path to the output file where the executable will cache the response.
+ // If specified the auth libraries will first check this location before running the executable. Optional.
+ OutputFile string `json:"output_file"`
+}
+
+// SubjectTokenSupplier can be used to supply a subject token to exchange for a GCP access token.
+type SubjectTokenSupplier interface {
+ // SubjectToken should return a valid subject token or an error.
+ // The external account token source does not cache the returned subject token, so caching
+ // logic should be implemented in the supplier to prevent multiple requests for the same subject token.
+ SubjectToken(ctx context.Context, options SupplierOptions) (string, error)
+}
+
+// AWSSecurityCredentialsSupplier can be used to supply AwsSecurityCredentials and an AWS Region to
+// exchange for a GCP access token.
+type AwsSecurityCredentialsSupplier interface {
+ // AwsRegion should return the AWS region or an error.
+ AwsRegion(ctx context.Context, options SupplierOptions) (string, error)
+ // GetAwsSecurityCredentials should return a valid set of AwsSecurityCredentials or an error.
+ // The external account token source does not cache the returned security credentials, so caching
+ // logic should be implemented in the supplier to prevent multiple requests for the same security credentials.
+ AwsSecurityCredentials(ctx context.Context, options SupplierOptions) (*AwsSecurityCredentials, error)
+}
+
+// SupplierOptions contains information about the requested subject token or AWS security credentials from the
+// Google external account credential.
+type SupplierOptions struct {
+ // Audience is the requested audience for the external account credential.
+ Audience string
+ // Subject token type is the requested subject token type for the external account credential. Expected values include:
+ // βurn:ietf:params:oauth:token-type:jwtβ
+ // βurn:ietf:params:oauth:token-type:id-tokenβ
+ // βurn:ietf:params:oauth:token-type:saml2β
+ // βurn:ietf:params:aws:token-type:aws4_requestβ
+ SubjectTokenType string
+}
+
+// tokenURL returns the default STS token endpoint with the configured universe
+// domain.
+func (c *Config) tokenURL() string {
+ if c.UniverseDomain == "" {
+ return strings.Replace(defaultTokenURL, universeDomainPlaceholder, defaultUniverseDomain, 1)
+ }
+ return strings.Replace(defaultTokenURL, universeDomainPlaceholder, c.UniverseDomain, 1)
+}
+
+// parse determines the type of CredentialSource needed.
+func (c *Config) parse(ctx context.Context) (baseCredentialSource, error) {
+ //set Defaults
+ if c.TokenURL == "" {
+ c.TokenURL = c.tokenURL()
+ }
+ supplierOptions := SupplierOptions{Audience: c.Audience, SubjectTokenType: c.SubjectTokenType}
+
+ if c.AwsSecurityCredentialsSupplier != nil {
+ awsCredSource := awsCredentialSource{
+ awsSecurityCredentialsSupplier: c.AwsSecurityCredentialsSupplier,
+ targetResource: c.Audience,
+ supplierOptions: supplierOptions,
+ ctx: ctx,
+ }
+ return awsCredSource, nil
+ } else if c.SubjectTokenSupplier != nil {
+ return programmaticRefreshCredentialSource{subjectTokenSupplier: c.SubjectTokenSupplier, supplierOptions: supplierOptions, ctx: ctx}, nil
+ } else if len(c.CredentialSource.EnvironmentID) > 3 && c.CredentialSource.EnvironmentID[:3] == "aws" {
+ if awsVersion, err := strconv.Atoi(c.CredentialSource.EnvironmentID[3:]); err == nil {
+ if awsVersion != 1 {
+ return nil, fmt.Errorf("oauth2/google/externalaccount: aws version '%d' is not supported in the current build", awsVersion)
+ }
+
+ awsCredSource := awsCredentialSource{
+ environmentID: c.CredentialSource.EnvironmentID,
+ regionURL: c.CredentialSource.RegionURL,
+ regionalCredVerificationURL: c.CredentialSource.RegionalCredVerificationURL,
+ credVerificationURL: c.CredentialSource.URL,
+ targetResource: c.Audience,
+ ctx: ctx,
+ }
+ if c.CredentialSource.IMDSv2SessionTokenURL != "" {
+ awsCredSource.imdsv2SessionTokenURL = c.CredentialSource.IMDSv2SessionTokenURL
+ }
+
+ return awsCredSource, nil
+ }
+ } else if c.CredentialSource.File != "" {
+ return fileCredentialSource{File: c.CredentialSource.File, Format: c.CredentialSource.Format}, nil
+ } else if c.CredentialSource.URL != "" {
+ return urlCredentialSource{URL: c.CredentialSource.URL, Headers: c.CredentialSource.Headers, Format: c.CredentialSource.Format, ctx: ctx}, nil
+ } else if c.CredentialSource.Executable != nil {
+ return createExecutableCredential(ctx, c.CredentialSource.Executable, c)
+ }
+ return nil, fmt.Errorf("oauth2/google/externalaccount: unable to parse credential source")
+}
+
+type baseCredentialSource interface {
+ credentialSourceType() string
+ subjectToken() (string, error)
+}
+
+// tokenSource is the source that handles external credentials. It is used to retrieve Tokens.
+type tokenSource struct {
+ ctx context.Context
+ conf *Config
+}
+
+func getMetricsHeaderValue(conf *Config, credSource baseCredentialSource) string {
+ return fmt.Sprintf("gl-go/%s auth/%s google-byoid-sdk source/%s sa-impersonation/%t config-lifetime/%t",
+ goVersion(),
+ "unknown",
+ credSource.credentialSourceType(),
+ conf.ServiceAccountImpersonationURL != "",
+ conf.ServiceAccountImpersonationLifetimeSeconds != 0)
+}
+
+// Token allows tokenSource to conform to the oauth2.TokenSource interface.
+func (ts tokenSource) Token() (*oauth2.Token, error) {
+ conf := ts.conf
+
+ credSource, err := conf.parse(ts.ctx)
+ if err != nil {
+ return nil, err
+ }
+ subjectToken, err := credSource.subjectToken()
+
+ if err != nil {
+ return nil, err
+ }
+ stsRequest := stsexchange.TokenExchangeRequest{
+ GrantType: "urn:ietf:params:oauth:grant-type:token-exchange",
+ Audience: conf.Audience,
+ Scope: conf.Scopes,
+ RequestedTokenType: "urn:ietf:params:oauth:token-type:access_token",
+ SubjectToken: subjectToken,
+ SubjectTokenType: conf.SubjectTokenType,
+ }
+ header := make(http.Header)
+ header.Add("Content-Type", "application/x-www-form-urlencoded")
+ header.Add("x-goog-api-client", getMetricsHeaderValue(conf, credSource))
+ clientAuth := stsexchange.ClientAuthentication{
+ AuthStyle: oauth2.AuthStyleInHeader,
+ ClientID: conf.ClientID,
+ ClientSecret: conf.ClientSecret,
+ }
+ var options map[string]interface{}
+ // Do not pass workforce_pool_user_project when client authentication is used.
+ // The client ID is sufficient for determining the user project.
+ if conf.WorkforcePoolUserProject != "" && conf.ClientID == "" {
+ options = map[string]interface{}{
+ "userProject": conf.WorkforcePoolUserProject,
+ }
+ }
+ stsResp, err := stsexchange.ExchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, options)
+ if err != nil {
+ return nil, err
+ }
+
+ accessToken := &oauth2.Token{
+ AccessToken: stsResp.AccessToken,
+ TokenType: stsResp.TokenType,
+ }
+
+ // The RFC8693 doesn't define the explicit 0 of "expires_in" field behavior.
+ if stsResp.ExpiresIn <= 0 {
+ return nil, fmt.Errorf("oauth2/google/externalaccount: got invalid expiry from security token service")
+ }
+ accessToken.Expiry = now().Add(time.Duration(stsResp.ExpiresIn) * time.Second)
+
+ if stsResp.RefreshToken != "" {
+ accessToken.RefreshToken = stsResp.RefreshToken
+ }
+ return accessToken, nil
+}
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/executablecredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go
similarity index 83%
rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/executablecredsource.go
rename to vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go
index 579bcce5..dca5681a 100644
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/executablecredsource.go
+++ b/vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go
@@ -19,7 +19,7 @@ import (
"time"
)
-var serviceAccountImpersonationRE = regexp.MustCompile("https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/(.*@.*):generateAccessToken")
+var serviceAccountImpersonationRE = regexp.MustCompile("https://iamcredentials\\..+/v1/projects/-/serviceAccounts/(.*@.*):generateAccessToken")
const (
executableSupportedMaxVersion = 1
@@ -39,51 +39,51 @@ func (nce nonCacheableError) Error() string {
}
func missingFieldError(source, field string) error {
- return fmt.Errorf("oauth2/google: %v missing `%q` field", source, field)
+ return fmt.Errorf("oauth2/google/externalaccount: %v missing `%q` field", source, field)
}
func jsonParsingError(source, data string) error {
- return fmt.Errorf("oauth2/google: unable to parse %v\nResponse: %v", source, data)
+ return fmt.Errorf("oauth2/google/externalaccount: unable to parse %v\nResponse: %v", source, data)
}
func malformedFailureError() error {
- return nonCacheableError{"oauth2/google: response must include `error` and `message` fields when unsuccessful"}
+ return nonCacheableError{"oauth2/google/externalaccount: response must include `error` and `message` fields when unsuccessful"}
}
func userDefinedError(code, message string) error {
- return nonCacheableError{fmt.Sprintf("oauth2/google: response contains unsuccessful response: (%v) %v", code, message)}
+ return nonCacheableError{fmt.Sprintf("oauth2/google/externalaccount: response contains unsuccessful response: (%v) %v", code, message)}
}
func unsupportedVersionError(source string, version int) error {
- return fmt.Errorf("oauth2/google: %v contains unsupported version: %v", source, version)
+ return fmt.Errorf("oauth2/google/externalaccount: %v contains unsupported version: %v", source, version)
}
func tokenExpiredError() error {
- return nonCacheableError{"oauth2/google: the token returned by the executable is expired"}
+ return nonCacheableError{"oauth2/google/externalaccount: the token returned by the executable is expired"}
}
func tokenTypeError(source string) error {
- return fmt.Errorf("oauth2/google: %v contains unsupported token type", source)
+ return fmt.Errorf("oauth2/google/externalaccount: %v contains unsupported token type", source)
}
func exitCodeError(exitCode int) error {
- return fmt.Errorf("oauth2/google: executable command failed with exit code %v", exitCode)
+ return fmt.Errorf("oauth2/google/externalaccount: executable command failed with exit code %v", exitCode)
}
func executableError(err error) error {
- return fmt.Errorf("oauth2/google: executable command failed: %v", err)
+ return fmt.Errorf("oauth2/google/externalaccount: executable command failed: %v", err)
}
func executablesDisallowedError() error {
- return errors.New("oauth2/google: executables need to be explicitly allowed (set GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES to '1') to run")
+ return errors.New("oauth2/google/externalaccount: executables need to be explicitly allowed (set GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES to '1') to run")
}
func timeoutRangeError() error {
- return errors.New("oauth2/google: invalid `timeout_millis` field β executable timeout must be between 5 and 120 seconds")
+ return errors.New("oauth2/google/externalaccount: invalid `timeout_millis` field β executable timeout must be between 5 and 120 seconds")
}
func commandMissingError() error {
- return errors.New("oauth2/google: missing `command` field β executable command must be provided")
+ return errors.New("oauth2/google/externalaccount: missing `command` field β executable command must be provided")
}
type environment interface {
@@ -146,7 +146,7 @@ type executableCredentialSource struct {
// CreateExecutableCredential creates an executableCredentialSource given an ExecutableConfig.
// It also performs defaulting and type conversions.
-func CreateExecutableCredential(ctx context.Context, ec *ExecutableConfig, config *Config) (executableCredentialSource, error) {
+func createExecutableCredential(ctx context.Context, ec *ExecutableConfig, config *Config) (executableCredentialSource, error) {
if ec.Command == "" {
return executableCredentialSource{}, commandMissingError()
}
@@ -233,6 +233,10 @@ func (cs executableCredentialSource) parseSubjectTokenFromSource(response []byte
return "", tokenTypeError(source)
}
+func (cs executableCredentialSource) credentialSourceType() string {
+ return "executable"
+}
+
func (cs executableCredentialSource) subjectToken() (string, error) {
if token, err := cs.getTokenFromOutputFile(); token != "" || err != nil {
return token, err
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/filecredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go
similarity index 57%
rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/filecredsource.go
rename to vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go
index e953ddb4..33766b97 100644
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/filecredsource.go
+++ b/vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go
@@ -16,18 +16,22 @@ import (
type fileCredentialSource struct {
File string
- Format format
+ Format Format
+}
+
+func (cs fileCredentialSource) credentialSourceType() string {
+ return "file"
}
func (cs fileCredentialSource) subjectToken() (string, error) {
tokenFile, err := os.Open(cs.File)
if err != nil {
- return "", fmt.Errorf("oauth2/google: failed to open credential file %q", cs.File)
+ return "", fmt.Errorf("oauth2/google/externalaccount: failed to open credential file %q", cs.File)
}
defer tokenFile.Close()
tokenBytes, err := ioutil.ReadAll(io.LimitReader(tokenFile, 1<<20))
if err != nil {
- return "", fmt.Errorf("oauth2/google: failed to read credential file: %v", err)
+ return "", fmt.Errorf("oauth2/google/externalaccount: failed to read credential file: %v", err)
}
tokenBytes = bytes.TrimSpace(tokenBytes)
switch cs.Format.Type {
@@ -35,15 +39,15 @@ func (cs fileCredentialSource) subjectToken() (string, error) {
jsonData := make(map[string]interface{})
err = json.Unmarshal(tokenBytes, &jsonData)
if err != nil {
- return "", fmt.Errorf("oauth2/google: failed to unmarshal subject token file: %v", err)
+ return "", fmt.Errorf("oauth2/google/externalaccount: failed to unmarshal subject token file: %v", err)
}
val, ok := jsonData[cs.Format.SubjectTokenFieldName]
if !ok {
- return "", errors.New("oauth2/google: provided subject_token_field_name not found in credentials")
+ return "", errors.New("oauth2/google/externalaccount: provided subject_token_field_name not found in credentials")
}
token, ok := val.(string)
if !ok {
- return "", errors.New("oauth2/google: improperly formatted subject token")
+ return "", errors.New("oauth2/google/externalaccount: improperly formatted subject token")
}
return token, nil
case "text":
@@ -51,7 +55,7 @@ func (cs fileCredentialSource) subjectToken() (string, error) {
case "":
return string(tokenBytes), nil
default:
- return "", errors.New("oauth2/google: invalid credential_source file format type")
+ return "", errors.New("oauth2/google/externalaccount: invalid credential_source file format type")
}
}
diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/header.go b/vendor/golang.org/x/oauth2/google/externalaccount/header.go
new file mode 100644
index 00000000..1d5aad2e
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/google/externalaccount/header.go
@@ -0,0 +1,64 @@
+// Copyright 2023 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 externalaccount
+
+import (
+ "runtime"
+ "strings"
+ "unicode"
+)
+
+var (
+ // version is a package internal global variable for testing purposes.
+ version = runtime.Version
+)
+
+// versionUnknown is only used when the runtime version cannot be determined.
+const versionUnknown = "UNKNOWN"
+
+// goVersion returns a Go runtime version derived from the runtime environment
+// that is modified to be suitable for reporting in a header, meaning it has no
+// whitespace. If it is unable to determine the Go runtime version, it returns
+// versionUnknown.
+func goVersion() string {
+ const develPrefix = "devel +"
+
+ s := version()
+ if strings.HasPrefix(s, develPrefix) {
+ s = s[len(develPrefix):]
+ if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 {
+ s = s[:p]
+ }
+ return s
+ } else if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 {
+ s = s[:p]
+ }
+
+ notSemverRune := func(r rune) bool {
+ return !strings.ContainsRune("0123456789.", r)
+ }
+
+ if strings.HasPrefix(s, "go1") {
+ s = s[2:]
+ var prerelease string
+ if p := strings.IndexFunc(s, notSemverRune); p >= 0 {
+ s, prerelease = s[:p], s[p:]
+ }
+ if strings.HasSuffix(s, ".") {
+ s += "0"
+ } else if strings.Count(s, ".") < 2 {
+ s += ".0"
+ }
+ if prerelease != "" {
+ // Some release candidates already have a dash in them.
+ if !strings.HasPrefix(prerelease, "-") {
+ prerelease = "-" + prerelease
+ }
+ s += prerelease
+ }
+ return s
+ }
+ return "UNKNOWN"
+}
diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go
new file mode 100644
index 00000000..6c1abdf2
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go
@@ -0,0 +1,21 @@
+// Copyright 2024 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 externalaccount
+
+import "context"
+
+type programmaticRefreshCredentialSource struct {
+ supplierOptions SupplierOptions
+ subjectTokenSupplier SubjectTokenSupplier
+ ctx context.Context
+}
+
+func (cs programmaticRefreshCredentialSource) credentialSourceType() string {
+ return "programmatic"
+}
+
+func (cs programmaticRefreshCredentialSource) subjectToken() (string, error) {
+ return cs.subjectTokenSupplier.SubjectToken(cs.ctx, cs.supplierOptions)
+}
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/urlcredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go
similarity index 57%
rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/urlcredsource.go
rename to vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go
index 16dca654..71a7184e 100644
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/urlcredsource.go
+++ b/vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go
@@ -19,15 +19,19 @@ import (
type urlCredentialSource struct {
URL string
Headers map[string]string
- Format format
+ Format Format
ctx context.Context
}
+func (cs urlCredentialSource) credentialSourceType() string {
+ return "url"
+}
+
func (cs urlCredentialSource) subjectToken() (string, error) {
client := oauth2.NewClient(cs.ctx, nil)
req, err := http.NewRequest("GET", cs.URL, nil)
if err != nil {
- return "", fmt.Errorf("oauth2/google: HTTP request for URL-sourced credential failed: %v", err)
+ return "", fmt.Errorf("oauth2/google/externalaccount: HTTP request for URL-sourced credential failed: %v", err)
}
req = req.WithContext(cs.ctx)
@@ -36,16 +40,16 @@ func (cs urlCredentialSource) subjectToken() (string, error) {
}
resp, err := client.Do(req)
if err != nil {
- return "", fmt.Errorf("oauth2/google: invalid response when retrieving subject token: %v", err)
+ return "", fmt.Errorf("oauth2/google/externalaccount: invalid response when retrieving subject token: %v", err)
}
defer resp.Body.Close()
respBody, err := ioutil.ReadAll(io.LimitReader(resp.Body, 1<<20))
if err != nil {
- return "", fmt.Errorf("oauth2/google: invalid body in subject token URL query: %v", err)
+ return "", fmt.Errorf("oauth2/google/externalaccount: invalid body in subject token URL query: %v", err)
}
if c := resp.StatusCode; c < 200 || c > 299 {
- return "", fmt.Errorf("oauth2/google: status code %d: %s", c, respBody)
+ return "", fmt.Errorf("oauth2/google/externalaccount: status code %d: %s", c, respBody)
}
switch cs.Format.Type {
@@ -53,15 +57,15 @@ func (cs urlCredentialSource) subjectToken() (string, error) {
jsonData := make(map[string]interface{})
err = json.Unmarshal(respBody, &jsonData)
if err != nil {
- return "", fmt.Errorf("oauth2/google: failed to unmarshal subject token file: %v", err)
+ return "", fmt.Errorf("oauth2/google/externalaccount: failed to unmarshal subject token file: %v", err)
}
val, ok := jsonData[cs.Format.SubjectTokenFieldName]
if !ok {
- return "", errors.New("oauth2/google: provided subject_token_field_name not found in credentials")
+ return "", errors.New("oauth2/google/externalaccount: provided subject_token_field_name not found in credentials")
}
token, ok := val.(string)
if !ok {
- return "", errors.New("oauth2/google: improperly formatted subject token")
+ return "", errors.New("oauth2/google/externalaccount: improperly formatted subject token")
}
return token, nil
case "text":
@@ -69,7 +73,7 @@ func (cs urlCredentialSource) subjectToken() (string, error) {
case "":
return string(respBody), nil
default:
- return "", errors.New("oauth2/google: invalid credential_source file format type")
+ return "", errors.New("oauth2/google/externalaccount: invalid credential_source file format type")
}
}
diff --git a/vendor/golang.org/x/oauth2/google/google.go b/vendor/golang.org/x/oauth2/google/google.go
index cc122388..7b82e7a0 100644
--- a/vendor/golang.org/x/oauth2/google/google.go
+++ b/vendor/golang.org/x/oauth2/google/google.go
@@ -15,15 +15,18 @@ import (
"cloud.google.com/go/compute/metadata"
"golang.org/x/oauth2"
- "golang.org/x/oauth2/google/internal/externalaccount"
+ "golang.org/x/oauth2/google/externalaccount"
+ "golang.org/x/oauth2/google/internal/externalaccountauthorizeduser"
+ "golang.org/x/oauth2/google/internal/impersonate"
"golang.org/x/oauth2/jwt"
)
// Endpoint is Google's OAuth 2.0 default endpoint.
var Endpoint = oauth2.Endpoint{
- AuthURL: "https://accounts.google.com/o/oauth2/auth",
- TokenURL: "https://oauth2.googleapis.com/token",
- AuthStyle: oauth2.AuthStyleInParams,
+ AuthURL: "https://accounts.google.com/o/oauth2/auth",
+ TokenURL: "https://oauth2.googleapis.com/token",
+ DeviceAuthURL: "https://oauth2.googleapis.com/device/code",
+ AuthStyle: oauth2.AuthStyleInParams,
}
// MTLSTokenURL is Google's OAuth 2.0 default mTLS endpoint.
@@ -95,10 +98,11 @@ func JWTConfigFromJSON(jsonKey []byte, scope ...string) (*jwt.Config, error) {
// JSON key file types.
const (
- serviceAccountKey = "service_account"
- userCredentialsKey = "authorized_user"
- externalAccountKey = "external_account"
- impersonatedServiceAccount = "impersonated_service_account"
+ serviceAccountKey = "service_account"
+ userCredentialsKey = "authorized_user"
+ externalAccountKey = "external_account"
+ externalAccountAuthorizedUserKey = "external_account_authorized_user"
+ impersonatedServiceAccount = "impersonated_service_account"
)
// credentialsFile is the unmarshalled representation of a credentials file.
@@ -106,12 +110,13 @@ type credentialsFile struct {
Type string `json:"type"`
// Service Account fields
- ClientEmail string `json:"client_email"`
- PrivateKeyID string `json:"private_key_id"`
- PrivateKey string `json:"private_key"`
- AuthURL string `json:"auth_uri"`
- TokenURL string `json:"token_uri"`
- ProjectID string `json:"project_id"`
+ ClientEmail string `json:"client_email"`
+ PrivateKeyID string `json:"private_key_id"`
+ PrivateKey string `json:"private_key"`
+ AuthURL string `json:"auth_uri"`
+ TokenURL string `json:"token_uri"`
+ ProjectID string `json:"project_id"`
+ UniverseDomain string `json:"universe_domain"`
// User Credential fields
// (These typically come from gcloud auth.)
@@ -131,6 +136,9 @@ type credentialsFile struct {
QuotaProjectID string `json:"quota_project_id"`
WorkforcePoolUserProject string `json:"workforce_pool_user_project"`
+ // External Account Authorized User fields
+ RevokeURL string `json:"revoke_url"`
+
// Service account impersonation
SourceCredentials *credentialsFile `json:"source_credentials"`
}
@@ -193,11 +201,24 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar
ServiceAccountImpersonationLifetimeSeconds: f.ServiceAccountImpersonation.TokenLifetimeSeconds,
ClientSecret: f.ClientSecret,
ClientID: f.ClientID,
- CredentialSource: f.CredentialSource,
+ CredentialSource: &f.CredentialSource,
QuotaProjectID: f.QuotaProjectID,
Scopes: params.Scopes,
WorkforcePoolUserProject: f.WorkforcePoolUserProject,
}
+ return externalaccount.NewTokenSource(ctx, *cfg)
+ case externalAccountAuthorizedUserKey:
+ cfg := &externalaccountauthorizeduser.Config{
+ Audience: f.Audience,
+ RefreshToken: f.RefreshToken,
+ TokenURL: f.TokenURLExternal,
+ TokenInfoURL: f.TokenInfoURL,
+ ClientID: f.ClientID,
+ ClientSecret: f.ClientSecret,
+ RevokeURL: f.RevokeURL,
+ QuotaProjectID: f.QuotaProjectID,
+ Scopes: params.Scopes,
+ }
return cfg.TokenSource(ctx)
case impersonatedServiceAccount:
if f.ServiceAccountImpersonationURL == "" || f.SourceCredentials == nil {
@@ -208,7 +229,7 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar
if err != nil {
return nil, err
}
- imp := externalaccount.ImpersonateTokenSource{
+ imp := impersonate.ImpersonateTokenSource{
Ctx: ctx,
URL: f.ServiceAccountImpersonationURL,
Scopes: params.Scopes,
@@ -231,7 +252,10 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar
// Further information about retrieving access tokens from the GCE metadata
// server can be found at https://cloud.google.com/compute/docs/authentication.
func ComputeTokenSource(account string, scope ...string) oauth2.TokenSource {
- return computeTokenSource(account, 0, scope...)
+ // refresh 3 minutes and 45 seconds early. The shortest MDS cache is currently 4 minutes, so any
+ // refreshes earlier are a waste of compute.
+ earlyExpirySecs := 225 * time.Second
+ return computeTokenSource(account, earlyExpirySecs, scope...)
}
func computeTokenSource(account string, earlyExpiry time.Duration, scope ...string) oauth2.TokenSource {
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go b/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go
deleted file mode 100644
index dcd252a6..00000000
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go
+++ /dev/null
@@ -1,269 +0,0 @@
-// Copyright 2020 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 externalaccount
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
- "regexp"
- "strconv"
- "strings"
- "time"
-
- "golang.org/x/oauth2"
-)
-
-// now aliases time.Now for testing
-var now = func() time.Time {
- return time.Now().UTC()
-}
-
-// Config stores the configuration for fetching tokens with external credentials.
-type Config struct {
- // Audience is the Secure Token Service (STS) audience which contains the resource name for the workload
- // identity pool or the workforce pool and the provider identifier in that pool.
- Audience string
- // SubjectTokenType is the STS token type based on the Oauth2.0 token exchange spec
- // e.g. `urn:ietf:params:oauth:token-type:jwt`.
- SubjectTokenType string
- // TokenURL is the STS token exchange endpoint.
- TokenURL string
- // TokenInfoURL is the token_info endpoint used to retrieve the account related information (
- // user attributes like account identifier, eg. email, username, uid, etc). This is
- // needed for gCloud session account identification.
- TokenInfoURL string
- // ServiceAccountImpersonationURL is the URL for the service account impersonation request. This is only
- // required for workload identity pools when APIs to be accessed have not integrated with UberMint.
- ServiceAccountImpersonationURL string
- // ServiceAccountImpersonationLifetimeSeconds is the number of seconds the service account impersonation
- // token will be valid for.
- ServiceAccountImpersonationLifetimeSeconds int
- // ClientSecret is currently only required if token_info endpoint also
- // needs to be called with the generated GCP access token. When provided, STS will be
- // called with additional basic authentication using client_id as username and client_secret as password.
- ClientSecret string
- // ClientID is only required in conjunction with ClientSecret, as described above.
- ClientID string
- // CredentialSource contains the necessary information to retrieve the token itself, as well
- // as some environmental information.
- CredentialSource CredentialSource
- // QuotaProjectID is injected by gCloud. If the value is non-empty, the Auth libraries
- // will set the x-goog-user-project which overrides the project associated with the credentials.
- QuotaProjectID string
- // Scopes contains the desired scopes for the returned access token.
- Scopes []string
- // The optional workforce pool user project number when the credential
- // corresponds to a workforce pool and not a workload identity pool.
- // The underlying principal must still have serviceusage.services.use IAM
- // permission to use the project for billing/quota.
- WorkforcePoolUserProject string
-}
-
-// Each element consists of a list of patterns. validateURLs checks for matches
-// that include all elements in a given list, in that order.
-
-var (
- validWorkforceAudiencePattern *regexp.Regexp = regexp.MustCompile(`//iam\.googleapis\.com/locations/[^/]+/workforcePools/`)
-)
-
-func validateURL(input string, patterns []*regexp.Regexp, scheme string) bool {
- parsed, err := url.Parse(input)
- if err != nil {
- return false
- }
- if !strings.EqualFold(parsed.Scheme, scheme) {
- return false
- }
- toTest := parsed.Host
-
- for _, pattern := range patterns {
- if pattern.MatchString(toTest) {
- return true
- }
- }
- return false
-}
-
-func validateWorkforceAudience(input string) bool {
- return validWorkforceAudiencePattern.MatchString(input)
-}
-
-// TokenSource Returns an external account TokenSource struct. This is to be called by package google to construct a google.Credentials.
-func (c *Config) TokenSource(ctx context.Context) (oauth2.TokenSource, error) {
- return c.tokenSource(ctx, "https")
-}
-
-// tokenSource is a private function that's directly called by some of the tests,
-// because the unit test URLs are mocked, and would otherwise fail the
-// validity check.
-func (c *Config) tokenSource(ctx context.Context, scheme string) (oauth2.TokenSource, error) {
- if c.WorkforcePoolUserProject != "" {
- valid := validateWorkforceAudience(c.Audience)
- if !valid {
- return nil, fmt.Errorf("oauth2/google: workforce_pool_user_project should not be set for non-workforce pool credentials")
- }
- }
-
- ts := tokenSource{
- ctx: ctx,
- conf: c,
- }
- if c.ServiceAccountImpersonationURL == "" {
- return oauth2.ReuseTokenSource(nil, ts), nil
- }
- scopes := c.Scopes
- ts.conf.Scopes = []string{"https://www.googleapis.com/auth/cloud-platform"}
- imp := ImpersonateTokenSource{
- Ctx: ctx,
- URL: c.ServiceAccountImpersonationURL,
- Scopes: scopes,
- Ts: oauth2.ReuseTokenSource(nil, ts),
- TokenLifetimeSeconds: c.ServiceAccountImpersonationLifetimeSeconds,
- }
- return oauth2.ReuseTokenSource(nil, imp), nil
-}
-
-// Subject token file types.
-const (
- fileTypeText = "text"
- fileTypeJSON = "json"
-)
-
-type format struct {
- // Type is either "text" or "json". When not provided "text" type is assumed.
- Type string `json:"type"`
- // SubjectTokenFieldName is only required for JSON format. This would be "access_token" for azure.
- SubjectTokenFieldName string `json:"subject_token_field_name"`
-}
-
-// CredentialSource stores the information necessary to retrieve the credentials for the STS exchange.
-// One field amongst File, URL, and Executable should be filled, depending on the kind of credential in question.
-// The EnvironmentID should start with AWS if being used for an AWS credential.
-type CredentialSource struct {
- File string `json:"file"`
-
- URL string `json:"url"`
- Headers map[string]string `json:"headers"`
-
- Executable *ExecutableConfig `json:"executable"`
-
- EnvironmentID string `json:"environment_id"`
- RegionURL string `json:"region_url"`
- RegionalCredVerificationURL string `json:"regional_cred_verification_url"`
- CredVerificationURL string `json:"cred_verification_url"`
- IMDSv2SessionTokenURL string `json:"imdsv2_session_token_url"`
- Format format `json:"format"`
-}
-
-type ExecutableConfig struct {
- Command string `json:"command"`
- TimeoutMillis *int `json:"timeout_millis"`
- OutputFile string `json:"output_file"`
-}
-
-// parse determines the type of CredentialSource needed.
-func (c *Config) parse(ctx context.Context) (baseCredentialSource, error) {
- if len(c.CredentialSource.EnvironmentID) > 3 && c.CredentialSource.EnvironmentID[:3] == "aws" {
- if awsVersion, err := strconv.Atoi(c.CredentialSource.EnvironmentID[3:]); err == nil {
- if awsVersion != 1 {
- return nil, fmt.Errorf("oauth2/google: aws version '%d' is not supported in the current build", awsVersion)
- }
-
- awsCredSource := awsCredentialSource{
- EnvironmentID: c.CredentialSource.EnvironmentID,
- RegionURL: c.CredentialSource.RegionURL,
- RegionalCredVerificationURL: c.CredentialSource.RegionalCredVerificationURL,
- CredVerificationURL: c.CredentialSource.URL,
- TargetResource: c.Audience,
- ctx: ctx,
- }
- if c.CredentialSource.IMDSv2SessionTokenURL != "" {
- awsCredSource.IMDSv2SessionTokenURL = c.CredentialSource.IMDSv2SessionTokenURL
- }
-
- if err := awsCredSource.validateMetadataServers(); err != nil {
- return nil, err
- }
-
- return awsCredSource, nil
- }
- } else if c.CredentialSource.File != "" {
- return fileCredentialSource{File: c.CredentialSource.File, Format: c.CredentialSource.Format}, nil
- } else if c.CredentialSource.URL != "" {
- return urlCredentialSource{URL: c.CredentialSource.URL, Headers: c.CredentialSource.Headers, Format: c.CredentialSource.Format, ctx: ctx}, nil
- } else if c.CredentialSource.Executable != nil {
- return CreateExecutableCredential(ctx, c.CredentialSource.Executable, c)
- }
- return nil, fmt.Errorf("oauth2/google: unable to parse credential source")
-}
-
-type baseCredentialSource interface {
- subjectToken() (string, error)
-}
-
-// tokenSource is the source that handles external credentials. It is used to retrieve Tokens.
-type tokenSource struct {
- ctx context.Context
- conf *Config
-}
-
-// Token allows tokenSource to conform to the oauth2.TokenSource interface.
-func (ts tokenSource) Token() (*oauth2.Token, error) {
- conf := ts.conf
-
- credSource, err := conf.parse(ts.ctx)
- if err != nil {
- return nil, err
- }
- subjectToken, err := credSource.subjectToken()
-
- if err != nil {
- return nil, err
- }
- stsRequest := stsTokenExchangeRequest{
- GrantType: "urn:ietf:params:oauth:grant-type:token-exchange",
- Audience: conf.Audience,
- Scope: conf.Scopes,
- RequestedTokenType: "urn:ietf:params:oauth:token-type:access_token",
- SubjectToken: subjectToken,
- SubjectTokenType: conf.SubjectTokenType,
- }
- header := make(http.Header)
- header.Add("Content-Type", "application/x-www-form-urlencoded")
- clientAuth := clientAuthentication{
- AuthStyle: oauth2.AuthStyleInHeader,
- ClientID: conf.ClientID,
- ClientSecret: conf.ClientSecret,
- }
- var options map[string]interface{}
- // Do not pass workforce_pool_user_project when client authentication is used.
- // The client ID is sufficient for determining the user project.
- if conf.WorkforcePoolUserProject != "" && conf.ClientID == "" {
- options = map[string]interface{}{
- "userProject": conf.WorkforcePoolUserProject,
- }
- }
- stsResp, err := exchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, options)
- if err != nil {
- return nil, err
- }
-
- accessToken := &oauth2.Token{
- AccessToken: stsResp.AccessToken,
- TokenType: stsResp.TokenType,
- }
- if stsResp.ExpiresIn < 0 {
- return nil, fmt.Errorf("oauth2/google: got invalid expiry from security token service")
- } else if stsResp.ExpiresIn >= 0 {
- accessToken.Expiry = now().Add(time.Duration(stsResp.ExpiresIn) * time.Second)
- }
-
- if stsResp.RefreshToken != "" {
- accessToken.RefreshToken = stsResp.RefreshToken
- }
- return accessToken, nil
-}
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/err.go b/vendor/golang.org/x/oauth2/google/internal/externalaccount/err.go
deleted file mode 100644
index 233a78ce..00000000
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/err.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2020 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 externalaccount
-
-import "fmt"
-
-// Error for handling OAuth related error responses as stated in rfc6749#5.2.
-type Error struct {
- Code string
- URI string
- Description string
-}
-
-func (err *Error) Error() string {
- return fmt.Sprintf("got error code %s from %s: %s", err.Code, err.URI, err.Description)
-}
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccountauthorizeduser/externalaccountauthorizeduser.go b/vendor/golang.org/x/oauth2/google/internal/externalaccountauthorizeduser/externalaccountauthorizeduser.go
new file mode 100644
index 00000000..cb582070
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/google/internal/externalaccountauthorizeduser/externalaccountauthorizeduser.go
@@ -0,0 +1,114 @@
+// Copyright 2023 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 externalaccountauthorizeduser
+
+import (
+ "context"
+ "errors"
+ "time"
+
+ "golang.org/x/oauth2"
+ "golang.org/x/oauth2/google/internal/stsexchange"
+)
+
+// now aliases time.Now for testing.
+var now = func() time.Time {
+ return time.Now().UTC()
+}
+
+var tokenValid = func(token oauth2.Token) bool {
+ return token.Valid()
+}
+
+type Config struct {
+ // Audience is the Secure Token Service (STS) audience which contains the resource name for the workforce pool and
+ // the provider identifier in that pool.
+ Audience string
+ // RefreshToken is the optional OAuth 2.0 refresh token. If specified, credentials can be refreshed.
+ RefreshToken string
+ // TokenURL is the optional STS token exchange endpoint for refresh. Must be specified for refresh, can be left as
+ // None if the token can not be refreshed.
+ TokenURL string
+ // TokenInfoURL is the optional STS endpoint URL for token introspection.
+ TokenInfoURL string
+ // ClientID is only required in conjunction with ClientSecret, as described above.
+ ClientID string
+ // ClientSecret is currently only required if token_info endpoint also needs to be called with the generated GCP
+ // access token. When provided, STS will be called with additional basic authentication using client_id as username
+ // and client_secret as password.
+ ClientSecret string
+ // Token is the OAuth2.0 access token. Can be nil if refresh information is provided.
+ Token string
+ // Expiry is the optional expiration datetime of the OAuth 2.0 access token.
+ Expiry time.Time
+ // RevokeURL is the optional STS endpoint URL for revoking tokens.
+ RevokeURL string
+ // QuotaProjectID is the optional project ID used for quota and billing. This project may be different from the
+ // project used to create the credentials.
+ QuotaProjectID string
+ Scopes []string
+}
+
+func (c *Config) canRefresh() bool {
+ return c.ClientID != "" && c.ClientSecret != "" && c.RefreshToken != "" && c.TokenURL != ""
+}
+
+func (c *Config) TokenSource(ctx context.Context) (oauth2.TokenSource, error) {
+ var token oauth2.Token
+ if c.Token != "" && !c.Expiry.IsZero() {
+ token = oauth2.Token{
+ AccessToken: c.Token,
+ Expiry: c.Expiry,
+ TokenType: "Bearer",
+ }
+ }
+ if !tokenValid(token) && !c.canRefresh() {
+ return nil, errors.New("oauth2/google: Token should be created with fields to make it valid (`token` and `expiry`), or fields to allow it to refresh (`refresh_token`, `token_url`, `client_id`, `client_secret`).")
+ }
+
+ ts := tokenSource{
+ ctx: ctx,
+ conf: c,
+ }
+
+ return oauth2.ReuseTokenSource(&token, ts), nil
+}
+
+type tokenSource struct {
+ ctx context.Context
+ conf *Config
+}
+
+func (ts tokenSource) Token() (*oauth2.Token, error) {
+ conf := ts.conf
+ if !conf.canRefresh() {
+ return nil, errors.New("oauth2/google: The credentials do not contain the necessary fields need to refresh the access token. You must specify refresh_token, token_url, client_id, and client_secret.")
+ }
+
+ clientAuth := stsexchange.ClientAuthentication{
+ AuthStyle: oauth2.AuthStyleInHeader,
+ ClientID: conf.ClientID,
+ ClientSecret: conf.ClientSecret,
+ }
+
+ stsResponse, err := stsexchange.RefreshAccessToken(ts.ctx, conf.TokenURL, conf.RefreshToken, clientAuth, nil)
+ if err != nil {
+ return nil, err
+ }
+ if stsResponse.ExpiresIn < 0 {
+ return nil, errors.New("oauth2/google: got invalid expiry from security token service")
+ }
+
+ if stsResponse.RefreshToken != "" {
+ conf.RefreshToken = stsResponse.RefreshToken
+ }
+
+ token := &oauth2.Token{
+ AccessToken: stsResponse.AccessToken,
+ Expiry: now().Add(time.Duration(stsResponse.ExpiresIn) * time.Second),
+ TokenType: "Bearer",
+ }
+ return token, nil
+}
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go b/vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go
similarity index 99%
rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go
rename to vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go
index 54c8f209..6bc3af11 100644
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go
+++ b/vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package externalaccount
+package impersonate
import (
"bytes"
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/clientauth.go b/vendor/golang.org/x/oauth2/google/internal/stsexchange/clientauth.go
similarity index 88%
rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/clientauth.go
rename to vendor/golang.org/x/oauth2/google/internal/stsexchange/clientauth.go
index 99987ce2..ebd520ea 100644
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/clientauth.go
+++ b/vendor/golang.org/x/oauth2/google/internal/stsexchange/clientauth.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package externalaccount
+package stsexchange
import (
"encoding/base64"
@@ -12,8 +12,8 @@ import (
"golang.org/x/oauth2"
)
-// clientAuthentication represents an OAuth client ID and secret and the mechanism for passing these credentials as stated in rfc6749#2.3.1.
-type clientAuthentication struct {
+// ClientAuthentication represents an OAuth client ID and secret and the mechanism for passing these credentials as stated in rfc6749#2.3.1.
+type ClientAuthentication struct {
// AuthStyle can be either basic or request-body
AuthStyle oauth2.AuthStyle
ClientID string
@@ -23,7 +23,7 @@ type clientAuthentication struct {
// InjectAuthentication is used to add authentication to a Secure Token Service exchange
// request. It modifies either the passed url.Values or http.Header depending on the desired
// authentication format.
-func (c *clientAuthentication) InjectAuthentication(values url.Values, headers http.Header) {
+func (c *ClientAuthentication) InjectAuthentication(values url.Values, headers http.Header) {
if c.ClientID == "" || c.ClientSecret == "" || values == nil || headers == nil {
return
}
diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/sts_exchange.go b/vendor/golang.org/x/oauth2/google/internal/stsexchange/sts_exchange.go
similarity index 68%
rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/sts_exchange.go
rename to vendor/golang.org/x/oauth2/google/internal/stsexchange/sts_exchange.go
index e6fcae5f..1a0bebd1 100644
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/sts_exchange.go
+++ b/vendor/golang.org/x/oauth2/google/internal/stsexchange/sts_exchange.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package externalaccount
+package stsexchange
import (
"context"
@@ -18,14 +18,17 @@ import (
"golang.org/x/oauth2"
)
-// exchangeToken performs an oauth2 token exchange with the provided endpoint.
+func defaultHeader() http.Header {
+ header := make(http.Header)
+ header.Add("Content-Type", "application/x-www-form-urlencoded")
+ return header
+}
+
+// ExchangeToken performs an oauth2 token exchange with the provided endpoint.
// The first 4 fields are all mandatory. headers can be used to pass additional
// headers beyond the bare minimum required by the token exchange. options can
// be used to pass additional JSON-structured options to the remote server.
-func exchangeToken(ctx context.Context, endpoint string, request *stsTokenExchangeRequest, authentication clientAuthentication, headers http.Header, options map[string]interface{}) (*stsTokenExchangeResponse, error) {
-
- client := oauth2.NewClient(ctx, nil)
-
+func ExchangeToken(ctx context.Context, endpoint string, request *TokenExchangeRequest, authentication ClientAuthentication, headers http.Header, options map[string]interface{}) (*Response, error) {
data := url.Values{}
data.Set("audience", request.Audience)
data.Set("grant_type", "urn:ietf:params:oauth:grant-type:token-exchange")
@@ -41,13 +44,28 @@ func exchangeToken(ctx context.Context, endpoint string, request *stsTokenExchan
data.Set("options", string(opts))
}
+ return makeRequest(ctx, endpoint, data, authentication, headers)
+}
+
+func RefreshAccessToken(ctx context.Context, endpoint string, refreshToken string, authentication ClientAuthentication, headers http.Header) (*Response, error) {
+ data := url.Values{}
+ data.Set("grant_type", "refresh_token")
+ data.Set("refresh_token", refreshToken)
+
+ return makeRequest(ctx, endpoint, data, authentication, headers)
+}
+
+func makeRequest(ctx context.Context, endpoint string, data url.Values, authentication ClientAuthentication, headers http.Header) (*Response, error) {
+ if headers == nil {
+ headers = defaultHeader()
+ }
+ client := oauth2.NewClient(ctx, nil)
authentication.InjectAuthentication(data, headers)
encodedData := data.Encode()
req, err := http.NewRequest("POST", endpoint, strings.NewReader(encodedData))
if err != nil {
return nil, fmt.Errorf("oauth2/google: failed to properly build http request: %v", err)
-
}
req = req.WithContext(ctx)
for key, list := range headers {
@@ -71,7 +89,7 @@ func exchangeToken(ctx context.Context, endpoint string, request *stsTokenExchan
if c := resp.StatusCode; c < 200 || c > 299 {
return nil, fmt.Errorf("oauth2/google: status code %d: %s", c, body)
}
- var stsResp stsTokenExchangeResponse
+ var stsResp Response
err = json.Unmarshal(body, &stsResp)
if err != nil {
return nil, fmt.Errorf("oauth2/google: failed to unmarshal response body from Secure Token Server: %v", err)
@@ -81,8 +99,8 @@ func exchangeToken(ctx context.Context, endpoint string, request *stsTokenExchan
return &stsResp, nil
}
-// stsTokenExchangeRequest contains fields necessary to make an oauth2 token exchange.
-type stsTokenExchangeRequest struct {
+// TokenExchangeRequest contains fields necessary to make an oauth2 token exchange.
+type TokenExchangeRequest struct {
ActingParty struct {
ActorToken string
ActorTokenType string
@@ -96,8 +114,8 @@ type stsTokenExchangeRequest struct {
SubjectTokenType string
}
-// stsTokenExchangeResponse is used to decode the remote server response during an oauth2 token exchange.
-type stsTokenExchangeResponse struct {
+// Response is used to decode the remote server response during an oauth2 token exchange.
+type Response struct {
AccessToken string `json:"access_token"`
IssuedTokenType string `json:"issued_token_type"`
TokenType string `json:"token_type"`
diff --git a/vendor/golang.org/x/oauth2/internal/client_appengine.go b/vendor/golang.org/x/oauth2/internal/client_appengine.go
deleted file mode 100644
index e1755d1d..00000000
--- a/vendor/golang.org/x/oauth2/internal/client_appengine.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2018 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.
-
-//go:build appengine
-// +build appengine
-
-package internal
-
-import "google.golang.org/appengine/urlfetch"
-
-func init() {
- appengineClientHook = urlfetch.Client
-}
diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go
index 58901bda..e83ddeef 100644
--- a/vendor/golang.org/x/oauth2/internal/token.go
+++ b/vendor/golang.org/x/oauth2/internal/token.go
@@ -18,6 +18,7 @@ import (
"strconv"
"strings"
"sync"
+ "sync/atomic"
"time"
)
@@ -115,41 +116,60 @@ const (
AuthStyleInHeader AuthStyle = 2
)
-// authStyleCache is the set of tokenURLs we've successfully used via
+// LazyAuthStyleCache is a backwards compatibility compromise to let Configs
+// have a lazily-initialized AuthStyleCache.
+//
+// The two users of this, oauth2.Config and oauth2/clientcredentials.Config,
+// both would ideally just embed an unexported AuthStyleCache but because both
+// were historically allowed to be copied by value we can't retroactively add an
+// uncopyable Mutex to them.
+//
+// We could use an atomic.Pointer, but that was added recently enough (in Go
+// 1.18) that we'd break Go 1.17 users where the tests as of 2023-08-03
+// still pass. By using an atomic.Value, it supports both Go 1.17 and
+// copying by value, even if that's not ideal.
+type LazyAuthStyleCache struct {
+ v atomic.Value // of *AuthStyleCache
+}
+
+func (lc *LazyAuthStyleCache) Get() *AuthStyleCache {
+ if c, ok := lc.v.Load().(*AuthStyleCache); ok {
+ return c
+ }
+ c := new(AuthStyleCache)
+ if !lc.v.CompareAndSwap(nil, c) {
+ c = lc.v.Load().(*AuthStyleCache)
+ }
+ return c
+}
+
+// AuthStyleCache is the set of tokenURLs we've successfully used via
// RetrieveToken and which style auth we ended up using.
// It's called a cache, but it doesn't (yet?) shrink. It's expected that
// the set of OAuth2 servers a program contacts over time is fixed and
// small.
-var authStyleCache struct {
- sync.Mutex
- m map[string]AuthStyle // keyed by tokenURL
-}
-
-// ResetAuthCache resets the global authentication style cache used
-// for AuthStyleUnknown token requests.
-func ResetAuthCache() {
- authStyleCache.Lock()
- defer authStyleCache.Unlock()
- authStyleCache.m = nil
+type AuthStyleCache struct {
+ mu sync.Mutex
+ m map[string]AuthStyle // keyed by tokenURL
}
// lookupAuthStyle reports which auth style we last used with tokenURL
// when calling RetrieveToken and whether we have ever done so.
-func lookupAuthStyle(tokenURL string) (style AuthStyle, ok bool) {
- authStyleCache.Lock()
- defer authStyleCache.Unlock()
- style, ok = authStyleCache.m[tokenURL]
+func (c *AuthStyleCache) lookupAuthStyle(tokenURL string) (style AuthStyle, ok bool) {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ style, ok = c.m[tokenURL]
return
}
// setAuthStyle adds an entry to authStyleCache, documented above.
-func setAuthStyle(tokenURL string, v AuthStyle) {
- authStyleCache.Lock()
- defer authStyleCache.Unlock()
- if authStyleCache.m == nil {
- authStyleCache.m = make(map[string]AuthStyle)
+func (c *AuthStyleCache) setAuthStyle(tokenURL string, v AuthStyle) {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ if c.m == nil {
+ c.m = make(map[string]AuthStyle)
}
- authStyleCache.m[tokenURL] = v
+ c.m[tokenURL] = v
}
// newTokenRequest returns a new *http.Request to retrieve a new token
@@ -189,10 +209,10 @@ func cloneURLValues(v url.Values) url.Values {
return v2
}
-func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle) (*Token, error) {
+func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle, styleCache *AuthStyleCache) (*Token, error) {
needsAuthStyleProbe := authStyle == 0
if needsAuthStyleProbe {
- if style, ok := lookupAuthStyle(tokenURL); ok {
+ if style, ok := styleCache.lookupAuthStyle(tokenURL); ok {
authStyle = style
needsAuthStyleProbe = false
} else {
@@ -222,7 +242,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string,
token, err = doTokenRoundTrip(ctx, req)
}
if needsAuthStyleProbe && err == nil {
- setAuthStyle(tokenURL, authStyle)
+ styleCache.setAuthStyle(tokenURL, authStyle)
}
// Don't overwrite `RefreshToken` with an empty value
// if this was a token refreshing request.
diff --git a/vendor/golang.org/x/oauth2/internal/transport.go b/vendor/golang.org/x/oauth2/internal/transport.go
index 572074a6..b9db01dd 100644
--- a/vendor/golang.org/x/oauth2/internal/transport.go
+++ b/vendor/golang.org/x/oauth2/internal/transport.go
@@ -18,16 +18,11 @@ var HTTPClient ContextKey
// because nobody else can create a ContextKey, being unexported.
type ContextKey struct{}
-var appengineClientHook func(context.Context) *http.Client
-
func ContextClient(ctx context.Context) *http.Client {
if ctx != nil {
if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok {
return hc
}
}
- if appengineClientHook != nil {
- return appengineClientHook(ctx)
- }
return http.DefaultClient
}
diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go
index 9085fabe..09f6a49b 100644
--- a/vendor/golang.org/x/oauth2/oauth2.go
+++ b/vendor/golang.org/x/oauth2/oauth2.go
@@ -58,6 +58,10 @@ type Config struct {
// Scope specifies optional requested permissions.
Scopes []string
+
+ // authStyleCache caches which auth style to use when Endpoint.AuthStyle is
+ // the zero value (AuthStyleAutoDetect).
+ authStyleCache internal.LazyAuthStyleCache
}
// A TokenSource is anything that can return a token.
@@ -71,8 +75,9 @@ type TokenSource interface {
// Endpoint represents an OAuth 2.0 provider's authorization and token
// endpoint URLs.
type Endpoint struct {
- AuthURL string
- TokenURL string
+ AuthURL string
+ DeviceAuthURL string
+ TokenURL string
// AuthStyle optionally specifies how the endpoint wants the
// client ID & client secret sent. The zero value means to
@@ -139,15 +144,19 @@ func SetAuthURLParam(key, value string) AuthCodeOption {
// AuthCodeURL returns a URL to OAuth 2.0 provider's consent page
// that asks for permissions for the required scopes explicitly.
//
-// State is a token to protect the user from CSRF attacks. You must
-// always provide a non-empty string and validate that it matches the
-// state query parameter on your redirect callback.
-// See http://tools.ietf.org/html/rfc6749#section-10.12 for more info.
+// State is an opaque value used by the client to maintain state between the
+// request and callback. The authorization server includes this value when
+// redirecting the user agent back to the client.
//
// Opts may include AccessTypeOnline or AccessTypeOffline, as well
// as ApprovalForce.
-// It can also be used to pass the PKCE challenge.
-// See https://www.oauth.com/oauth2-servers/pkce/ for more info.
+//
+// To protect against CSRF attacks, opts should include a PKCE challenge
+// (S256ChallengeOption). Not all servers support PKCE. An alternative is to
+// generate a random state parameter and verify it after exchange.
+// See https://datatracker.ietf.org/doc/html/rfc6749#section-10.12 (predating
+// PKCE), https://www.oauth.com/oauth2-servers/pkce/ and
+// https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-09.html#name-cross-site-request-forgery (describing both approaches)
func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string {
var buf bytes.Buffer
buf.WriteString(c.Endpoint.AuthURL)
@@ -162,7 +171,6 @@ func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string {
v.Set("scope", strings.Join(c.Scopes, " "))
}
if state != "" {
- // TODO(light): Docs say never to omit state; don't allow empty.
v.Set("state", state)
}
for _, opt := range opts {
@@ -207,10 +215,11 @@ func (c *Config) PasswordCredentialsToken(ctx context.Context, username, passwor
// The provided context optionally controls which HTTP client is used. See the HTTPClient variable.
//
// The code will be in the *http.Request.FormValue("code"). Before
-// calling Exchange, be sure to validate FormValue("state").
+// calling Exchange, be sure to validate FormValue("state") if you are
+// using it to protect against CSRF attacks.
//
-// Opts may include the PKCE verifier code if previously used in AuthCodeURL.
-// See https://www.oauth.com/oauth2-servers/pkce/ for more info.
+// If using PKCE to protect against CSRF attacks, opts should include a
+// VerifierOption.
func (c *Config) Exchange(ctx context.Context, code string, opts ...AuthCodeOption) (*Token, error) {
v := url.Values{
"grant_type": {"authorization_code"},
@@ -384,7 +393,7 @@ func ReuseTokenSource(t *Token, src TokenSource) TokenSource {
}
}
-// ReuseTokenSource returns a TokenSource that acts in the same manner as the
+// ReuseTokenSourceWithExpiry returns a TokenSource that acts in the same manner as the
// TokenSource returned by ReuseTokenSource, except the expiry buffer is
// configurable. The expiration time of a token is calculated as
// t.Expiry.Add(-earlyExpiry).
diff --git a/vendor/golang.org/x/oauth2/pkce.go b/vendor/golang.org/x/oauth2/pkce.go
new file mode 100644
index 00000000..50593b6d
--- /dev/null
+++ b/vendor/golang.org/x/oauth2/pkce.go
@@ -0,0 +1,68 @@
+// Copyright 2023 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 oauth2
+
+import (
+ "crypto/rand"
+ "crypto/sha256"
+ "encoding/base64"
+ "net/url"
+)
+
+const (
+ codeChallengeKey = "code_challenge"
+ codeChallengeMethodKey = "code_challenge_method"
+ codeVerifierKey = "code_verifier"
+)
+
+// GenerateVerifier generates a PKCE code verifier with 32 octets of randomness.
+// This follows recommendations in RFC 7636.
+//
+// A fresh verifier should be generated for each authorization.
+// S256ChallengeOption(verifier) should then be passed to Config.AuthCodeURL
+// (or Config.DeviceAccess) and VerifierOption(verifier) to Config.Exchange
+// (or Config.DeviceAccessToken).
+func GenerateVerifier() string {
+ // "RECOMMENDED that the output of a suitable random number generator be
+ // used to create a 32-octet sequence. The octet sequence is then
+ // base64url-encoded to produce a 43-octet URL-safe string to use as the
+ // code verifier."
+ // https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
+ data := make([]byte, 32)
+ if _, err := rand.Read(data); err != nil {
+ panic(err)
+ }
+ return base64.RawURLEncoding.EncodeToString(data)
+}
+
+// VerifierOption returns a PKCE code verifier AuthCodeOption. It should be
+// passed to Config.Exchange or Config.DeviceAccessToken only.
+func VerifierOption(verifier string) AuthCodeOption {
+ return setParam{k: codeVerifierKey, v: verifier}
+}
+
+// S256ChallengeFromVerifier returns a PKCE code challenge derived from verifier with method S256.
+//
+// Prefer to use S256ChallengeOption where possible.
+func S256ChallengeFromVerifier(verifier string) string {
+ sha := sha256.Sum256([]byte(verifier))
+ return base64.RawURLEncoding.EncodeToString(sha[:])
+}
+
+// S256ChallengeOption derives a PKCE code challenge derived from verifier with
+// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAccess
+// only.
+func S256ChallengeOption(verifier string) AuthCodeOption {
+ return challengeOption{
+ challenge_method: "S256",
+ challenge: S256ChallengeFromVerifier(verifier),
+ }
+}
+
+type challengeOption struct{ challenge_method, challenge string }
+
+func (p challengeOption) setValue(m url.Values) {
+ m.Set(codeChallengeMethodKey, p.challenge_method)
+ m.Set(codeChallengeKey, p.challenge)
+}
diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go
index 5ffce976..109997d7 100644
--- a/vendor/golang.org/x/oauth2/token.go
+++ b/vendor/golang.org/x/oauth2/token.go
@@ -49,6 +49,13 @@ type Token struct {
// mechanisms for that TokenSource will not be used.
Expiry time.Time `json:"expiry,omitempty"`
+ // ExpiresIn is the OAuth2 wire format "expires_in" field,
+ // which specifies how many seconds later the token expires,
+ // relative to an unknown time base approximately around "now".
+ // It is the application's responsibility to populate
+ // `Expiry` from `ExpiresIn` when required.
+ ExpiresIn int64 `json:"expires_in,omitempty"`
+
// raw optionally contains extra metadata from the server
// when updating a token.
raw interface{}
@@ -164,7 +171,7 @@ func tokenFromInternal(t *internal.Token) *Token {
// This token is then mapped from *internal.Token into an *oauth2.Token which is returned along
// with an error..
func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error) {
- tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v, internal.AuthStyle(c.Endpoint.AuthStyle))
+ tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v, internal.AuthStyle(c.Endpoint.AuthStyle), c.authStyleCache.Get())
if err != nil {
if rErr, ok := err.(*internal.RetrieveError); ok {
return nil, (*RetrieveError)(rErr)
diff --git a/vendor/golang.org/x/sync/LICENSE b/vendor/golang.org/x/sync/LICENSE
index 6a66aea5..2a7cf70d 100644
--- a/vendor/golang.org/x/sync/LICENSE
+++ b/vendor/golang.org/x/sync/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
+Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google Inc. nor the names of its
+ * Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go
index b18efb74..948a3ee6 100644
--- a/vendor/golang.org/x/sync/errgroup/errgroup.go
+++ b/vendor/golang.org/x/sync/errgroup/errgroup.go
@@ -4,6 +4,9 @@
// Package errgroup provides synchronization, error propagation, and Context
// cancelation for groups of goroutines working on subtasks of a common task.
+//
+// [errgroup.Group] is related to [sync.WaitGroup] but adds handling of tasks
+// returning errors.
package errgroup
import (
diff --git a/vendor/golang.org/x/sync/errgroup/go120.go b/vendor/golang.org/x/sync/errgroup/go120.go
index 7d419d37..f93c740b 100644
--- a/vendor/golang.org/x/sync/errgroup/go120.go
+++ b/vendor/golang.org/x/sync/errgroup/go120.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build go1.20
-// +build go1.20
package errgroup
diff --git a/vendor/golang.org/x/sync/errgroup/pre_go120.go b/vendor/golang.org/x/sync/errgroup/pre_go120.go
index 1795c18a..88ce3343 100644
--- a/vendor/golang.org/x/sync/errgroup/pre_go120.go
+++ b/vendor/golang.org/x/sync/errgroup/pre_go120.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !go1.20
-// +build !go1.20
package errgroup
diff --git a/vendor/golang.org/x/sys/LICENSE b/vendor/golang.org/x/sys/LICENSE
index 6a66aea5..2a7cf70d 100644
--- a/vendor/golang.org/x/sys/LICENSE
+++ b/vendor/golang.org/x/sys/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
+Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google Inc. nor the names of its
+ * Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go
index 8fa707aa..02609d5b 100644
--- a/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/vendor/golang.org/x/sys/cpu/cpu.go
@@ -105,6 +105,8 @@ var ARM64 struct {
HasSVE bool // Scalable Vector Extensions
HasSVE2 bool // Scalable Vector Extensions 2
HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32
+ HasDIT bool // Data Independent Timing support
+ HasI8MM bool // Advanced SIMD Int8 matrix multiplication instructions
_ CacheLinePad
}
@@ -199,6 +201,25 @@ var S390X struct {
_ CacheLinePad
}
+// RISCV64 contains the supported CPU features and performance characteristics for riscv64
+// platforms. The booleans in RISCV64, with the exception of HasFastMisaligned, indicate
+// the presence of RISC-V extensions.
+//
+// It is safe to assume that all the RV64G extensions are supported and so they are omitted from
+// this structure. As riscv64 Go programs require at least RV64G, the code that populates
+// this structure cannot run successfully if some of the RV64G extensions are missing.
+// The struct is padded to avoid false sharing.
+var RISCV64 struct {
+ _ CacheLinePad
+ HasFastMisaligned bool // Fast misaligned accesses
+ HasC bool // Compressed instruction-set extension
+ HasV bool // Vector extension compatible with RVV 1.0
+ HasZba bool // Address generation instructions extension
+ HasZbb bool // Basic bit-manipulation extension
+ HasZbs bool // Single-bit instructions extension
+ _ CacheLinePad
+}
+
func init() {
archInit()
initOptions()
diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go
index 0e27a21e..af2aa99f 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go
@@ -38,6 +38,8 @@ func initOptions() {
{Name: "dcpop", Feature: &ARM64.HasDCPOP},
{Name: "asimddp", Feature: &ARM64.HasASIMDDP},
{Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM},
+ {Name: "dit", Feature: &ARM64.HasDIT},
+ {Name: "i8mm", Feature: &ARM64.HasI8MM},
}
}
@@ -145,6 +147,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
ARM64.HasLRCPC = true
}
+ switch extractBits(isar1, 52, 55) {
+ case 1:
+ ARM64.HasI8MM = true
+ }
+
// ID_AA64PFR0_EL1
switch extractBits(pfr0, 16, 19) {
case 0:
@@ -168,6 +175,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
parseARM64SVERegister(getzfr0())
}
+
+ switch extractBits(pfr0, 48, 51) {
+ case 1:
+ ARM64.HasDIT = true
+ }
}
func parseARM64SVERegister(zfr0 uint64) {
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go
index 3d386d0f..08f35ea1 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go
@@ -35,8 +35,10 @@ const (
hwcap_SHA512 = 1 << 21
hwcap_SVE = 1 << 22
hwcap_ASIMDFHM = 1 << 23
+ hwcap_DIT = 1 << 24
hwcap2_SVE2 = 1 << 1
+ hwcap2_I8MM = 1 << 13
)
// linuxKernelCanEmulateCPUID reports whether we're running
@@ -106,9 +108,12 @@ func doinit() {
ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512)
ARM64.HasSVE = isSet(hwCap, hwcap_SVE)
ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM)
+ ARM64.HasDIT = isSet(hwCap, hwcap_DIT)
+
// HWCAP2 feature bits
ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2)
+ ARM64.HasI8MM = isSet(hwCap2, hwcap2_I8MM)
}
func isSet(hwc uint, value uint) bool {
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
index cd63e733..7d902b68 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x
+//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64
package cpu
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
new file mode 100644
index 00000000..cb4a0c57
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
@@ -0,0 +1,137 @@
+// Copyright 2024 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 cpu
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+// RISC-V extension discovery code for Linux. The approach here is to first try the riscv_hwprobe
+// syscall falling back to HWCAP to check for the C extension if riscv_hwprobe is not available.
+//
+// A note on detection of the Vector extension using HWCAP.
+//
+// Support for the Vector extension version 1.0 was added to the Linux kernel in release 6.5.
+// Support for the riscv_hwprobe syscall was added in 6.4. It follows that if the riscv_hwprobe
+// syscall is not available then neither is the Vector extension (which needs kernel support).
+// The riscv_hwprobe syscall should then be all we need to detect the Vector extension.
+// However, some RISC-V board manufacturers ship boards with an older kernel on top of which
+// they have back-ported various versions of the Vector extension patches but not the riscv_hwprobe
+// patches. These kernels advertise support for the Vector extension using HWCAP. Falling
+// back to HWCAP to detect the Vector extension, if riscv_hwprobe is not available, or simply not
+// bothering with riscv_hwprobe at all and just using HWCAP may then seem like an attractive option.
+//
+// Unfortunately, simply checking the 'V' bit in AT_HWCAP will not work as this bit is used by
+// RISC-V board and cloud instance providers to mean different things. The Lichee Pi 4A board
+// and the Scaleway RV1 cloud instances use the 'V' bit to advertise their support for the unratified
+// 0.7.1 version of the Vector Specification. The Banana Pi BPI-F3 and the CanMV-K230 board use
+// it to advertise support for 1.0 of the Vector extension. Versions 0.7.1 and 1.0 of the Vector
+// extension are binary incompatible. HWCAP can then not be used in isolation to populate the
+// HasV field as this field indicates that the underlying CPU is compatible with RVV 1.0.
+//
+// There is a way at runtime to distinguish between versions 0.7.1 and 1.0 of the Vector
+// specification by issuing a RVV 1.0 vsetvli instruction and checking the vill bit of the vtype
+// register. This check would allow us to safely detect version 1.0 of the Vector extension
+// with HWCAP, if riscv_hwprobe were not available. However, the check cannot
+// be added until the assembler supports the Vector instructions.
+//
+// Note the riscv_hwprobe syscall does not suffer from these ambiguities by design as all of the
+// extensions it advertises support for are explicitly versioned. It's also worth noting that
+// the riscv_hwprobe syscall is the only way to detect multi-letter RISC-V extensions, e.g., Zba.
+// These cannot be detected using HWCAP and so riscv_hwprobe must be used to detect the majority
+// of RISC-V extensions.
+//
+// Please see https://docs.kernel.org/arch/riscv/hwprobe.html for more information.
+
+// golang.org/x/sys/cpu is not allowed to depend on golang.org/x/sys/unix so we must
+// reproduce the constants, types and functions needed to make the riscv_hwprobe syscall
+// here.
+
+const (
+ // Copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go.
+ riscv_HWPROBE_KEY_IMA_EXT_0 = 0x4
+ riscv_HWPROBE_IMA_C = 0x2
+ riscv_HWPROBE_IMA_V = 0x4
+ riscv_HWPROBE_EXT_ZBA = 0x8
+ riscv_HWPROBE_EXT_ZBB = 0x10
+ riscv_HWPROBE_EXT_ZBS = 0x20
+ riscv_HWPROBE_KEY_CPUPERF_0 = 0x5
+ riscv_HWPROBE_MISALIGNED_FAST = 0x3
+ riscv_HWPROBE_MISALIGNED_MASK = 0x7
+)
+
+const (
+ // sys_RISCV_HWPROBE is copied from golang.org/x/sys/unix/zsysnum_linux_riscv64.go.
+ sys_RISCV_HWPROBE = 258
+)
+
+// riscvHWProbePairs is copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go.
+type riscvHWProbePairs struct {
+ key int64
+ value uint64
+}
+
+const (
+ // CPU features
+ hwcap_RISCV_ISA_C = 1 << ('C' - 'A')
+)
+
+func doinit() {
+ // A slice of key/value pair structures is passed to the RISCVHWProbe syscall. The key
+ // field should be initialised with one of the key constants defined above, e.g.,
+ // RISCV_HWPROBE_KEY_IMA_EXT_0. The syscall will set the value field to the appropriate value.
+ // If the kernel does not recognise a key it will set the key field to -1 and the value field to 0.
+
+ pairs := []riscvHWProbePairs{
+ {riscv_HWPROBE_KEY_IMA_EXT_0, 0},
+ {riscv_HWPROBE_KEY_CPUPERF_0, 0},
+ }
+
+ // This call only indicates that extensions are supported if they are implemented on all cores.
+ if riscvHWProbe(pairs, 0) {
+ if pairs[0].key != -1 {
+ v := uint(pairs[0].value)
+ RISCV64.HasC = isSet(v, riscv_HWPROBE_IMA_C)
+ RISCV64.HasV = isSet(v, riscv_HWPROBE_IMA_V)
+ RISCV64.HasZba = isSet(v, riscv_HWPROBE_EXT_ZBA)
+ RISCV64.HasZbb = isSet(v, riscv_HWPROBE_EXT_ZBB)
+ RISCV64.HasZbs = isSet(v, riscv_HWPROBE_EXT_ZBS)
+ }
+ if pairs[1].key != -1 {
+ v := pairs[1].value & riscv_HWPROBE_MISALIGNED_MASK
+ RISCV64.HasFastMisaligned = v == riscv_HWPROBE_MISALIGNED_FAST
+ }
+ }
+
+ // Let's double check with HWCAP if the C extension does not appear to be supported.
+ // This may happen if we're running on a kernel older than 6.4.
+
+ if !RISCV64.HasC {
+ RISCV64.HasC = isSet(hwCap, hwcap_RISCV_ISA_C)
+ }
+}
+
+func isSet(hwc uint, value uint) bool {
+ return hwc&value != 0
+}
+
+// riscvHWProbe is a simplified version of the generated wrapper function found in
+// golang.org/x/sys/unix/zsyscall_linux_riscv64.go. We simplify it by removing the
+// cpuCount and cpus parameters which we do not need. We always want to pass 0 for
+// these parameters here so the kernel only reports the extensions that are present
+// on all cores.
+func riscvHWProbe(pairs []riscvHWProbePairs, flags uint) bool {
+ var _zero uintptr
+ var p0 unsafe.Pointer
+ if len(pairs) > 0 {
+ p0 = unsafe.Pointer(&pairs[0])
+ } else {
+ p0 = unsafe.Pointer(&_zero)
+ }
+
+ _, _, e1 := syscall.Syscall6(sys_RISCV_HWPROBE, uintptr(p0), uintptr(len(pairs)), uintptr(0), uintptr(0), uintptr(flags), 0)
+ return e1 == 0
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
index 7f0c79c0..aca3199c 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
@@ -8,4 +8,13 @@ package cpu
const cacheLineSize = 64
-func initOptions() {}
+func initOptions() {
+ options = []option{
+ {Name: "fastmisaligned", Feature: &RISCV64.HasFastMisaligned},
+ {Name: "c", Feature: &RISCV64.HasC},
+ {Name: "v", Feature: &RISCV64.HasV},
+ {Name: "zba", Feature: &RISCV64.HasZba},
+ {Name: "zbb", Feature: &RISCV64.HasZbb},
+ {Name: "zbs", Feature: &RISCV64.HasZbs},
+ }
+}
diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md
index 7d3c060e..6e08a76a 100644
--- a/vendor/golang.org/x/sys/unix/README.md
+++ b/vendor/golang.org/x/sys/unix/README.md
@@ -156,7 +156,7 @@ from the generated architecture-specific files listed below, and merge these
into a common file for each OS.
The merge is performed in the following steps:
-1. Construct the set of common code that is idential in all architecture-specific files.
+1. Construct the set of common code that is identical in all architecture-specific files.
2. Write this common code to the merged file.
3. Remove the common code from all architecture-specific files.
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index fdcaa974..ac54ecab 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -58,6 +58,7 @@ includes_Darwin='
#define _DARWIN_USE_64_BIT_INODE
#define __APPLE_USE_RFC_3542
#include
+#include
#include
#include
#include
@@ -263,6 +264,7 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
#include
@@ -549,6 +551,8 @@ ccflags="$@"
$2 !~ "NLA_TYPE_MASK" &&
$2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||
+ $2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ ||
+ $2 ~ /^(CONNECT|SAE)_/ ||
$2 ~ /^FIORDCHK$/ ||
$2 ~ /^SIOC/ ||
$2 ~ /^TIOC/ ||
@@ -652,7 +656,7 @@ errors=$(
signals=$(
echo '#include ' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
- grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
+ grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
sort
)
@@ -662,7 +666,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags |
sort >_error.grep
echo '#include ' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
- grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
+ grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
sort >_signal.grep
echo '// mkerrors.sh' "$@"
diff --git a/vendor/golang.org/x/sys/unix/mremap.go b/vendor/golang.org/x/sys/unix/mremap.go
index fd45fe52..3a5e776f 100644
--- a/vendor/golang.org/x/sys/unix/mremap.go
+++ b/vendor/golang.org/x/sys/unix/mremap.go
@@ -50,3 +50,8 @@ func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data [
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
return mapper.Mremap(oldData, newLength, flags)
}
+
+func MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) {
+ xaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr))
+ return unsafe.Pointer(xaddr), err
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go
index 67ce6cef..6f15ba1e 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -360,7 +360,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
var status _C_int
var r Pid_t
err = ERESTART
- // AIX wait4 may return with ERESTART errno, while the processus is still
+ // AIX wait4 may return with ERESTART errno, while the process is still
// active.
for err == ERESTART {
r, err = wait4(Pid_t(pid), &status, options, rusage)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 59542a89..099867de 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -402,6 +402,18 @@ func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {
return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
}
+//sys renamexNp(from string, to string, flag uint32) (err error)
+
+func RenamexNp(from string, to string, flag uint32) (err error) {
+ return renamexNp(from, to, flag)
+}
+
+//sys renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error)
+
+func RenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
+ return renameatxNp(fromfd, from, tofd, to, flag)
+}
+
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
func Uname(uname *Utsname) error {
@@ -542,6 +554,55 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
}
}
+//sys pthread_chdir_np(path string) (err error)
+
+func PthreadChdir(path string) (err error) {
+ return pthread_chdir_np(path)
+}
+
+//sys pthread_fchdir_np(fd int) (err error)
+
+func PthreadFchdir(fd int) (err error) {
+ return pthread_fchdir_np(fd)
+}
+
+// Connectx calls connectx(2) to initiate a connection on a socket.
+//
+// srcIf, srcAddr, and dstAddr are filled into a [SaEndpoints] struct and passed as the endpoints argument.
+//
+// - srcIf is the optional source interface index. 0 means unspecified.
+// - srcAddr is the optional source address. nil means unspecified.
+// - dstAddr is the destination address.
+//
+// On success, Connectx returns the number of bytes enqueued for transmission.
+func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocID, flags uint32, iov []Iovec, connid *SaeConnID) (n uintptr, err error) {
+ endpoints := SaEndpoints{
+ Srcif: srcIf,
+ }
+
+ if srcAddr != nil {
+ addrp, addrlen, err := srcAddr.sockaddr()
+ if err != nil {
+ return 0, err
+ }
+ endpoints.Srcaddr = (*RawSockaddr)(addrp)
+ endpoints.Srcaddrlen = uint32(addrlen)
+ }
+
+ if dstAddr != nil {
+ addrp, addrlen, err := dstAddr.sockaddr()
+ if err != nil {
+ return 0, err
+ }
+ endpoints.Dstaddr = (*RawSockaddr)(addrp)
+ endpoints.Dstaddrlen = uint32(addrlen)
+ }
+
+ err = connectx(fd, &endpoints, associd, flags, iov, &n, connid)
+ return
+}
+
+//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error)
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd.go b/vendor/golang.org/x/sys/unix/syscall_hurd.go
index ba46651f..a6a2d2fc 100644
--- a/vendor/golang.org/x/sys/unix/syscall_hurd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_hurd.go
@@ -11,6 +11,7 @@ package unix
int ioctl(int, unsigned long int, uintptr_t);
*/
import "C"
+import "unsafe"
func ioctl(fd int, req uint, arg uintptr) (err error) {
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 5682e262..f08abd43 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -1295,6 +1295,48 @@ func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {
return &value, err
}
+// GetsockoptTCPCCVegasInfo returns algorithm specific congestion control information for a socket using the "vegas"
+// algorithm.
+//
+// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option:
+//
+// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION)
+func GetsockoptTCPCCVegasInfo(fd, level, opt int) (*TCPVegasInfo, error) {
+ var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment
+ vallen := _Socklen(SizeofTCPCCInfo)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
+ out := (*TCPVegasInfo)(unsafe.Pointer(&value[0]))
+ return out, err
+}
+
+// GetsockoptTCPCCDCTCPInfo returns algorithm specific congestion control information for a socket using the "dctp"
+// algorithm.
+//
+// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option:
+//
+// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION)
+func GetsockoptTCPCCDCTCPInfo(fd, level, opt int) (*TCPDCTCPInfo, error) {
+ var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment
+ vallen := _Socklen(SizeofTCPCCInfo)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
+ out := (*TCPDCTCPInfo)(unsafe.Pointer(&value[0]))
+ return out, err
+}
+
+// GetsockoptTCPCCBBRInfo returns algorithm specific congestion control information for a socket using the "bbr"
+// algorithm.
+//
+// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option:
+//
+// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION)
+func GetsockoptTCPCCBBRInfo(fd, level, opt int) (*TCPBBRInfo, error) {
+ var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment
+ vallen := _Socklen(SizeofTCPCCInfo)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
+ out := (*TCPBBRInfo)(unsafe.Pointer(&value[0]))
+ return out, err
+}
+
// GetsockoptString returns the string value of the socket option opt for the
// socket associated with fd at the given socket level.
func GetsockoptString(fd, level, opt int) (string, error) {
@@ -1959,7 +2001,26 @@ func Getpgrp() (pid int) {
//sysnb Getpid() (pid int)
//sysnb Getppid() (ppid int)
//sys Getpriority(which int, who int) (prio int, err error)
-//sys Getrandom(buf []byte, flags int) (n int, err error)
+
+func Getrandom(buf []byte, flags int) (n int, err error) {
+ vdsoRet, supported := vgetrandom(buf, uint32(flags))
+ if supported {
+ if vdsoRet < 0 {
+ return 0, errnoErr(syscall.Errno(-vdsoRet))
+ }
+ return vdsoRet, nil
+ }
+ var p *byte
+ if len(buf) > 0 {
+ p = &buf[0]
+ }
+ r, _, e := Syscall(SYS_GETRANDOM, uintptr(unsafe.Pointer(p)), uintptr(len(buf)), uintptr(flags))
+ if e != 0 {
+ return 0, errnoErr(e)
+ }
+ return int(r), nil
+}
+
//sysnb Getrusage(who int, rusage *Rusage) (err error)
//sysnb Getsid(pid int) (sid int, err error)
//sysnb Gettid() (tid int)
@@ -2592,3 +2653,4 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
}
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
+//sys Mseal(b []byte, flags uint) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index cf2ee6c7..745e5c7e 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -182,3 +182,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}
+
+const SYS_FSTATAT = SYS_NEWFSTATAT
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
index 3d0e9845..dd2262a4 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
@@ -214,3 +214,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}
+
+const SYS_FSTATAT = SYS_NEWFSTATAT
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index 6f5a2889..8cf3670b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -187,3 +187,5 @@ func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error
}
return riscvHWProbe(pairs, setSize, set, flags)
}
+
+const SYS_FSTATAT = SYS_NEWFSTATAT
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index b25343c7..b86ded54 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -293,6 +293,7 @@ func Uname(uname *Utsname) error {
//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
+//sys Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index 77081de8..4e92e5aa 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -154,6 +154,15 @@ func Munmap(b []byte) (err error) {
return mapper.Munmap(b)
}
+func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) {
+ xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset)
+ return unsafe.Pointer(xaddr), err
+}
+
+func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) {
+ return mapper.munmap(uintptr(addr), length)
+}
+
func Read(fd int, p []byte) (n int, err error) {
n, err = read(fd, p)
if raceenabled {
diff --git a/vendor/golang.org/x/sys/unix/vgetrandom_linux.go b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go
new file mode 100644
index 00000000..07ac8e09
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go
@@ -0,0 +1,13 @@
+// Copyright 2024 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.
+
+//go:build linux && go1.24
+
+package unix
+
+import _ "unsafe"
+
+//go:linkname vgetrandom runtime.vgetrandom
+//go:noescape
+func vgetrandom(p []byte, flags uint32) (ret int, supported bool)
diff --git a/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go
new file mode 100644
index 00000000..297e97bc
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go
@@ -0,0 +1,11 @@
+// Copyright 2024 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.
+
+//go:build !linux || !go1.24
+
+package unix
+
+func vgetrandom(p []byte, flags uint32) (ret int, supported bool) {
+ return -1, false
+}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index e40fa852..d73c4652 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -237,6 +237,9 @@ const (
CLOCK_UPTIME_RAW_APPROX = 0x9
CLONE_NOFOLLOW = 0x1
CLONE_NOOWNERCOPY = 0x2
+ CONNECT_DATA_AUTHENTICATED = 0x4
+ CONNECT_DATA_IDEMPOTENT = 0x2
+ CONNECT_RESUME_ON_READ_WRITE = 0x1
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
@@ -1169,6 +1172,11 @@ const (
PT_WRITE_D = 0x5
PT_WRITE_I = 0x4
PT_WRITE_U = 0x6
+ RENAME_EXCL = 0x4
+ RENAME_NOFOLLOW_ANY = 0x10
+ RENAME_RESERVED1 = 0x8
+ RENAME_SECLUDE = 0x1
+ RENAME_SWAP = 0x2
RLIMIT_AS = 0x5
RLIMIT_CORE = 0x4
RLIMIT_CPU = 0x0
@@ -1260,6 +1268,10 @@ const (
RTV_SSTHRESH = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
+ SAE_ASSOCID_ALL = 0xffffffff
+ SAE_ASSOCID_ANY = 0x0
+ SAE_CONNID_ALL = 0xffffffff
+ SAE_CONNID_ANY = 0x0
SCM_CREDS = 0x3
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index bb02aa6c..4a55a400 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -237,6 +237,9 @@ const (
CLOCK_UPTIME_RAW_APPROX = 0x9
CLONE_NOFOLLOW = 0x1
CLONE_NOOWNERCOPY = 0x2
+ CONNECT_DATA_AUTHENTICATED = 0x4
+ CONNECT_DATA_IDEMPOTENT = 0x2
+ CONNECT_RESUME_ON_READ_WRITE = 0x1
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
@@ -1169,6 +1172,11 @@ const (
PT_WRITE_D = 0x5
PT_WRITE_I = 0x4
PT_WRITE_U = 0x6
+ RENAME_EXCL = 0x4
+ RENAME_NOFOLLOW_ANY = 0x10
+ RENAME_RESERVED1 = 0x8
+ RENAME_SECLUDE = 0x1
+ RENAME_SWAP = 0x2
RLIMIT_AS = 0x5
RLIMIT_CORE = 0x4
RLIMIT_CPU = 0x0
@@ -1260,6 +1268,10 @@ const (
RTV_SSTHRESH = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
+ SAE_ASSOCID_ALL = 0xffffffff
+ SAE_ASSOCID_ANY = 0x0
+ SAE_CONNID_ALL = 0xffffffff
+ SAE_CONNID_ANY = 0x0
SCM_CREDS = 0x3
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index 93a38a97..de3b4624 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -457,6 +457,7 @@ const (
B600 = 0x8
B75 = 0x2
B9600 = 0xd
+ BCACHEFS_SUPER_MAGIC = 0xca451a4e
BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d
@@ -494,6 +495,7 @@ const (
BPF_F_TEST_REG_INVARIANTS = 0x80
BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TEST_RUN_ON_CPU = 0x1
+ BPF_F_TEST_SKB_CHECKSUM_COMPLETE = 0x4
BPF_F_TEST_STATE_FREQ = 0x8
BPF_F_TEST_XDP_LIVE_FRAMES = 0x2
BPF_F_XDP_DEV_BOUND_ONLY = 0x40
@@ -502,6 +504,7 @@ const (
BPF_IMM = 0x0
BPF_IND = 0x40
BPF_JA = 0x0
+ BPF_JCOND = 0xe0
BPF_JEQ = 0x10
BPF_JGE = 0x30
BPF_JGT = 0x20
@@ -657,6 +660,9 @@ const (
CAN_NPROTO = 0x8
CAN_RAW = 0x1
CAN_RAW_FILTER_MAX = 0x200
+ CAN_RAW_XL_VCID_RX_FILTER = 0x4
+ CAN_RAW_XL_VCID_TX_PASS = 0x2
+ CAN_RAW_XL_VCID_TX_SET = 0x1
CAN_RTR_FLAG = 0x40000000
CAN_SFF_ID_BITS = 0xb
CAN_SFF_MASK = 0x7ff
@@ -924,6 +930,7 @@ const (
EPOLL_CTL_ADD = 0x1
EPOLL_CTL_DEL = 0x2
EPOLL_CTL_MOD = 0x3
+ EPOLL_IOC_TYPE = 0x8a
EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
ESP_V4_FLOW = 0xa
ESP_V6_FLOW = 0xc
@@ -937,9 +944,6 @@ const (
ETHTOOL_FEC_OFF = 0x4
ETHTOOL_FEC_RS = 0x8
ETHTOOL_FLAG_ALL = 0x7
- ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
- ETHTOOL_FLAG_OMIT_REPLY = 0x2
- ETHTOOL_FLAG_STATS = 0x4
ETHTOOL_FLASHDEV = 0x33
ETHTOOL_FLASH_MAX_FILENAME = 0x80
ETHTOOL_FWVERS_LEN = 0x20
@@ -1339,6 +1343,7 @@ const (
F_OFD_SETLK = 0x25
F_OFD_SETLKW = 0x26
F_OK = 0x0
+ F_SEAL_EXEC = 0x20
F_SEAL_FUTURE_WRITE = 0x10
F_SEAL_GROW = 0x4
F_SEAL_SEAL = 0x1
@@ -1627,6 +1632,7 @@ const (
IP_FREEBIND = 0xf
IP_HDRINCL = 0x3
IP_IPSEC_POLICY = 0x10
+ IP_LOCAL_PORT_RANGE = 0x33
IP_MAXPACKET = 0xffff
IP_MAX_MEMBERSHIPS = 0x14
IP_MF = 0x2000
@@ -1653,6 +1659,7 @@ const (
IP_PMTUDISC_OMIT = 0x5
IP_PMTUDISC_PROBE = 0x3
IP_PMTUDISC_WANT = 0x1
+ IP_PROTOCOL = 0x34
IP_RECVERR = 0xb
IP_RECVERR_RFC4884 = 0x1a
IP_RECVFRAGSIZE = 0x19
@@ -1698,6 +1705,7 @@ const (
KEXEC_ARCH_S390 = 0x160000
KEXEC_ARCH_SH = 0x2a0000
KEXEC_ARCH_X86_64 = 0x3e0000
+ KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8
KEXEC_FILE_DEBUG = 0x8
KEXEC_FILE_NO_INITRAMFS = 0x4
KEXEC_FILE_ON_CRASH = 0x2
@@ -1773,6 +1781,7 @@ const (
KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
+ LANDLOCK_ACCESS_FS_IOCTL_DEV = 0x8000
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
@@ -1854,6 +1863,19 @@ const (
MAP_FILE = 0x0
MAP_FIXED = 0x10
MAP_FIXED_NOREPLACE = 0x100000
+ MAP_HUGE_16GB = 0x88000000
+ MAP_HUGE_16KB = 0x38000000
+ MAP_HUGE_16MB = 0x60000000
+ MAP_HUGE_1GB = 0x78000000
+ MAP_HUGE_1MB = 0x50000000
+ MAP_HUGE_256MB = 0x70000000
+ MAP_HUGE_2GB = 0x7c000000
+ MAP_HUGE_2MB = 0x54000000
+ MAP_HUGE_32MB = 0x64000000
+ MAP_HUGE_512KB = 0x4c000000
+ MAP_HUGE_512MB = 0x74000000
+ MAP_HUGE_64KB = 0x40000000
+ MAP_HUGE_8MB = 0x5c000000
MAP_HUGE_MASK = 0x3f
MAP_HUGE_SHIFT = 0x1a
MAP_PRIVATE = 0x2
@@ -1901,6 +1923,7 @@ const (
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
MNT_ID_REQ_SIZE_VER0 = 0x18
+ MNT_ID_REQ_SIZE_VER1 = 0x20
MODULE_INIT_COMPRESSED_FILE = 0x4
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
MODULE_INIT_IGNORE_VERMAGIC = 0x2
@@ -2166,10 +2189,10 @@ const (
NFT_REG_SIZE = 0x10
NFT_REJECT_ICMPX_MAX = 0x3
NFT_RT_MAX = 0x4
- NFT_SECMARK_CTX_MAXLEN = 0x100
+ NFT_SECMARK_CTX_MAXLEN = 0x1000
NFT_SET_MAXNAMELEN = 0x100
NFT_SOCKET_MAX = 0x3
- NFT_TABLE_F_MASK = 0x3
+ NFT_TABLE_F_MASK = 0x7
NFT_TABLE_MAXNAMELEN = 0x100
NFT_TRACETYPE_MAX = 0x3
NFT_TUNNEL_F_MASK = 0x7
@@ -2335,9 +2358,11 @@ const (
PERF_MEM_LVLNUM_IO = 0xa
PERF_MEM_LVLNUM_L1 = 0x1
PERF_MEM_LVLNUM_L2 = 0x2
+ PERF_MEM_LVLNUM_L2_MHB = 0x5
PERF_MEM_LVLNUM_L3 = 0x3
PERF_MEM_LVLNUM_L4 = 0x4
PERF_MEM_LVLNUM_LFB = 0xc
+ PERF_MEM_LVLNUM_MSC = 0x6
PERF_MEM_LVLNUM_NA = 0xf
PERF_MEM_LVLNUM_PMEM = 0xe
PERF_MEM_LVLNUM_RAM = 0xd
@@ -2403,12 +2428,14 @@ const (
PERF_RECORD_MISC_USER = 0x2
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
+ PID_FS_MAGIC = 0x50494446
PIPEFS_MAGIC = 0x50495045
PPPIOCGNPMODE = 0xc008744c
PPPIOCNEWUNIT = 0xc004743e
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
+ PROCFS_IOCTL_MAGIC = 'f'
PROC_SUPER_MAGIC = 0x9fa0
PROT_EXEC = 0x4
PROT_GROWSDOWN = 0x1000000
@@ -2490,6 +2517,23 @@ const (
PR_PAC_GET_ENABLED_KEYS = 0x3d
PR_PAC_RESET_KEYS = 0x36
PR_PAC_SET_ENABLED_KEYS = 0x3c
+ PR_PPC_DEXCR_CTRL_CLEAR = 0x4
+ PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC = 0x10
+ PR_PPC_DEXCR_CTRL_EDITABLE = 0x1
+ PR_PPC_DEXCR_CTRL_MASK = 0x1f
+ PR_PPC_DEXCR_CTRL_SET = 0x2
+ PR_PPC_DEXCR_CTRL_SET_ONEXEC = 0x8
+ PR_PPC_DEXCR_IBRTPD = 0x1
+ PR_PPC_DEXCR_NPHIE = 0x3
+ PR_PPC_DEXCR_SBHE = 0x0
+ PR_PPC_DEXCR_SRAPD = 0x2
+ PR_PPC_GET_DEXCR = 0x48
+ PR_PPC_SET_DEXCR = 0x49
+ PR_RISCV_CTX_SW_FENCEI_OFF = 0x1
+ PR_RISCV_CTX_SW_FENCEI_ON = 0x0
+ PR_RISCV_SCOPE_PER_PROCESS = 0x0
+ PR_RISCV_SCOPE_PER_THREAD = 0x1
+ PR_RISCV_SET_ICACHE_FLUSH_CTX = 0x47
PR_RISCV_V_GET_CONTROL = 0x46
PR_RISCV_V_SET_CONTROL = 0x45
PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3
@@ -2894,10 +2938,12 @@ const (
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
RWF_APPEND = 0x10
+ RWF_ATOMIC = 0x40
RWF_DSYNC = 0x2
RWF_HIPRI = 0x1
+ RWF_NOAPPEND = 0x20
RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
+ RWF_SUPPORTED = 0x7f
RWF_SYNC = 0x4
RWF_WRITE_LIFE_NOT_SET = 0x0
SCHED_BATCH = 0x3
@@ -2918,7 +2964,9 @@ const (
SCHED_RESET_ON_FORK = 0x40000000
SCHED_RR = 0x2
SCM_CREDENTIALS = 0x2
+ SCM_PIDFD = 0x4
SCM_RIGHTS = 0x1
+ SCM_SECURITY = 0x3
SCM_TIMESTAMP = 0x1d
SC_LOG_FLUSH = 0x100000
SECCOMP_ADDFD_FLAG_SEND = 0x2
@@ -3051,6 +3099,8 @@ const (
SIOCSMIIREG = 0x8949
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
+ SK_DIAG_BPF_STORAGE_MAX = 0x3
+ SK_DIAG_BPF_STORAGE_REQ_MAX = 0x1
SMACK_MAGIC = 0x43415d53
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
@@ -3071,6 +3121,8 @@ const (
SOCKFS_MAGIC = 0x534f434b
SOCK_BUF_LOCK_MASK = 0x3
SOCK_DCCP = 0x6
+ SOCK_DESTROY = 0x15
+ SOCK_DIAG_BY_FAMILY = 0x14
SOCK_IOC_TYPE = 0x89
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
@@ -3164,6 +3216,7 @@ const (
STATX_ATTR_MOUNT_ROOT = 0x2000
STATX_ATTR_NODUMP = 0x40
STATX_ATTR_VERITY = 0x100000
+ STATX_ATTR_WRITE_ATOMIC = 0x400000
STATX_BASIC_STATS = 0x7ff
STATX_BLOCKS = 0x400
STATX_BTIME = 0x800
@@ -3177,8 +3230,10 @@ const (
STATX_MTIME = 0x40
STATX_NLINK = 0x4
STATX_SIZE = 0x200
+ STATX_SUBVOL = 0x8000
STATX_TYPE = 0x1
STATX_UID = 0x8
+ STATX_WRITE_ATOMIC = 0x10000
STATX__RESERVED = 0x80000000
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
@@ -3260,6 +3315,7 @@ const (
TCP_MAX_WINSHIFT = 0xe
TCP_MD5SIG = 0xe
TCP_MD5SIG_EXT = 0x20
+ TCP_MD5SIG_FLAG_IFINDEX = 0x2
TCP_MD5SIG_FLAG_PREFIX = 0x1
TCP_MD5SIG_MAXKEYLEN = 0x50
TCP_MSS = 0x200
@@ -3576,6 +3632,7 @@ const (
XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
XDP_UMEM_PGOFF_FILL_RING = 0x100000000
XDP_UMEM_REG = 0x4
+ XDP_UMEM_TX_METADATA_LEN = 0x4
XDP_UMEM_TX_SW_CSUM = 0x2
XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
XDP_USE_NEED_WAKEUP = 0x8
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index 42ff8c3c..8aa6d77c 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x80088a02
+ EPIOCSPARAMS = 0x40088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -118,6 +120,7 @@ const (
IXOFF = 0x1000
IXON = 0x400
MAP_32BIT = 0x40
+ MAP_ABOVE4G = 0x80
MAP_ANON = 0x20
MAP_ANONYMOUS = 0x20
MAP_DENYWRITE = 0x800
@@ -150,9 +153,14 @@ const (
NFDBITS = 0x20
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
NS_GET_PARENT = 0xb702
+ NS_GET_PID_FROM_PIDNS = 0x8004b706
+ NS_GET_PID_IN_PIDNS = 0x8004b708
+ NS_GET_TGID_FROM_PIDNS = 0x8004b707
+ NS_GET_TGID_IN_PIDNS = 0x8004b709
NS_GET_USERNS = 0xb701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index dca43600..da428f42 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x80088a02
+ EPIOCSPARAMS = 0x40088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -118,6 +120,7 @@ const (
IXOFF = 0x1000
IXON = 0x400
MAP_32BIT = 0x40
+ MAP_ABOVE4G = 0x80
MAP_ANON = 0x20
MAP_ANONYMOUS = 0x20
MAP_DENYWRITE = 0x800
@@ -150,9 +153,14 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
NS_GET_PARENT = 0xb702
+ NS_GET_PID_FROM_PIDNS = 0x8004b706
+ NS_GET_PID_IN_PIDNS = 0x8004b708
+ NS_GET_TGID_FROM_PIDNS = 0x8004b707
+ NS_GET_TGID_IN_PIDNS = 0x8004b709
NS_GET_USERNS = 0xb701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index 5cca668a..bf45bfec 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x80088a02
+ EPIOCSPARAMS = 0x40088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -148,9 +150,14 @@ const (
NFDBITS = 0x20
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
NS_GET_PARENT = 0xb702
+ NS_GET_PID_FROM_PIDNS = 0x8004b706
+ NS_GET_PID_IN_PIDNS = 0x8004b708
+ NS_GET_TGID_FROM_PIDNS = 0x8004b707
+ NS_GET_TGID_IN_PIDNS = 0x8004b709
NS_GET_USERNS = 0xb701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index d8cae6d1..71c67162 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x80088a02
+ EPIOCSPARAMS = 0x40088a01
EPOLL_CLOEXEC = 0x80000
ESR_MAGIC = 0x45535201
EXTPROC = 0x10000
@@ -87,6 +89,7 @@ const (
FICLONE = 0x40049409
FICLONERANGE = 0x4020940d
FLUSHO = 0x1000
+ FPMR_MAGIC = 0x46504d52
FPSIMD_MAGIC = 0x46508001
FS_IOC_ENABLE_VERITY = 0x40806685
FS_IOC_GETFLAGS = 0x80086601
@@ -151,9 +154,14 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
NS_GET_PARENT = 0xb702
+ NS_GET_PID_FROM_PIDNS = 0x8004b706
+ NS_GET_PID_IN_PIDNS = 0x8004b708
+ NS_GET_TGID_FROM_PIDNS = 0x8004b707
+ NS_GET_TGID_IN_PIDNS = 0x8004b709
NS_GET_USERNS = 0xb701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
index 28e39afd..9476628f 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x80088a02
+ EPIOCSPARAMS = 0x40088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -152,9 +154,14 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
NS_GET_PARENT = 0xb702
+ NS_GET_PID_FROM_PIDNS = 0x8004b706
+ NS_GET_PID_IN_PIDNS = 0x8004b708
+ NS_GET_TGID_FROM_PIDNS = 0x8004b707
+ NS_GET_TGID_IN_PIDNS = 0x8004b709
NS_GET_USERNS = 0xb701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index cd66e92c..b9e85f3c 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x80
+ EPIOCGPARAMS = 0x40088a02
+ EPIOCSPARAMS = 0x80088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -148,9 +150,14 @@ const (
NFDBITS = 0x20
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
NS_GET_PARENT = 0x2000b702
+ NS_GET_PID_FROM_PIDNS = 0x4004b706
+ NS_GET_PID_IN_PIDNS = 0x4004b708
+ NS_GET_TGID_FROM_PIDNS = 0x4004b707
+ NS_GET_TGID_IN_PIDNS = 0x4004b709
NS_GET_USERNS = 0x2000b701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index c1595eba..a48b68a7 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x80
+ EPIOCGPARAMS = 0x40088a02
+ EPIOCSPARAMS = 0x80088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -148,9 +150,14 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
NS_GET_PARENT = 0x2000b702
+ NS_GET_PID_FROM_PIDNS = 0x4004b706
+ NS_GET_PID_IN_PIDNS = 0x4004b708
+ NS_GET_TGID_FROM_PIDNS = 0x4004b707
+ NS_GET_TGID_IN_PIDNS = 0x4004b709
NS_GET_USERNS = 0x2000b701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index ee9456b0..ea00e852 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x80
+ EPIOCGPARAMS = 0x40088a02
+ EPIOCSPARAMS = 0x80088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -148,9 +150,14 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
NS_GET_PARENT = 0x2000b702
+ NS_GET_PID_FROM_PIDNS = 0x4004b706
+ NS_GET_PID_IN_PIDNS = 0x4004b708
+ NS_GET_TGID_FROM_PIDNS = 0x4004b707
+ NS_GET_TGID_IN_PIDNS = 0x4004b709
NS_GET_USERNS = 0x2000b701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 8cfca81e..91c64687 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x80
+ EPIOCGPARAMS = 0x40088a02
+ EPIOCSPARAMS = 0x80088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -148,9 +150,14 @@ const (
NFDBITS = 0x20
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
NS_GET_PARENT = 0x2000b702
+ NS_GET_PID_FROM_PIDNS = 0x4004b706
+ NS_GET_PID_IN_PIDNS = 0x4004b708
+ NS_GET_TGID_FROM_PIDNS = 0x4004b707
+ NS_GET_TGID_IN_PIDNS = 0x4004b709
NS_GET_USERNS = 0x2000b701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
index 60b0deb3..8cbf38d6 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x20
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x40088a02
+ EPIOCSPARAMS = 0x80088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000000
FF1 = 0x4000
@@ -150,9 +152,14 @@ const (
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000
+ NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
NS_GET_PARENT = 0x2000b702
+ NS_GET_PID_FROM_PIDNS = 0x4004b706
+ NS_GET_PID_IN_PIDNS = 0x4004b708
+ NS_GET_TGID_FROM_PIDNS = 0x4004b707
+ NS_GET_TGID_IN_PIDNS = 0x4004b709
NS_GET_USERNS = 0x2000b701
OLCUC = 0x4
ONLCR = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index f90aa728..a2df7341 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x20
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x40088a02
+ EPIOCSPARAMS = 0x80088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000000
FF1 = 0x4000
@@ -150,9 +152,14 @@ const (
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000
+ NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
NS_GET_PARENT = 0x2000b702
+ NS_GET_PID_FROM_PIDNS = 0x4004b706
+ NS_GET_PID_IN_PIDNS = 0x4004b708
+ NS_GET_TGID_FROM_PIDNS = 0x4004b707
+ NS_GET_TGID_IN_PIDNS = 0x4004b709
NS_GET_USERNS = 0x2000b701
OLCUC = 0x4
ONLCR = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index ba9e0150..24791379 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x20
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x40088a02
+ EPIOCSPARAMS = 0x80088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000000
FF1 = 0x4000
@@ -150,9 +152,14 @@ const (
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000
+ NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
NS_GET_PARENT = 0x2000b702
+ NS_GET_PID_FROM_PIDNS = 0x4004b706
+ NS_GET_PID_IN_PIDNS = 0x4004b708
+ NS_GET_TGID_FROM_PIDNS = 0x4004b707
+ NS_GET_TGID_IN_PIDNS = 0x4004b709
NS_GET_USERNS = 0x2000b701
OLCUC = 0x4
ONLCR = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index 07cdfd6e..d265f146 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x80088a02
+ EPIOCSPARAMS = 0x40088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -148,9 +150,14 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
NS_GET_PARENT = 0xb702
+ NS_GET_PID_FROM_PIDNS = 0x8004b706
+ NS_GET_PID_IN_PIDNS = 0x8004b708
+ NS_GET_TGID_FROM_PIDNS = 0x8004b707
+ NS_GET_TGID_IN_PIDNS = 0x8004b709
NS_GET_USERNS = 0xb701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index 2f1dd214..3f2d6443 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -78,6 +78,8 @@ const (
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x80088a02
+ EPIOCSPARAMS = 0x40088a01
EPOLL_CLOEXEC = 0x80000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -148,9 +150,14 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
NS_GET_PARENT = 0xb702
+ NS_GET_PID_FROM_PIDNS = 0x8004b706
+ NS_GET_PID_IN_PIDNS = 0x8004b708
+ NS_GET_TGID_FROM_PIDNS = 0x8004b707
+ NS_GET_TGID_IN_PIDNS = 0x8004b709
NS_GET_USERNS = 0xb701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index f40519d9..5d8b727a 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -82,6 +82,8 @@ const (
EFD_CLOEXEC = 0x400000
EFD_NONBLOCK = 0x4000
EMT_TAGOVF = 0x1
+ EPIOCGPARAMS = 0x40088a02
+ EPIOCSPARAMS = 0x80088a01
EPOLL_CLOEXEC = 0x400000
EXTPROC = 0x10000
FF1 = 0x8000
@@ -153,9 +155,14 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
NS_GET_PARENT = 0x2000b702
+ NS_GET_PID_FROM_PIDNS = 0x4004b706
+ NS_GET_PID_IN_PIDNS = 0x4004b708
+ NS_GET_TGID_FROM_PIDNS = 0x4004b707
+ NS_GET_TGID_IN_PIDNS = 0x4004b709
NS_GET_USERNS = 0x2000b701
OLCUC = 0x2
ONLCR = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
index da08b2ab..1ec2b140 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
@@ -581,6 +581,8 @@ const (
AT_EMPTY_PATH = 0x1000
AT_REMOVEDIR = 0x200
RENAME_NOREPLACE = 1 << 0
+ ST_RDONLY = 1
+ ST_NOSUID = 2
)
const (
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index ccb02f24..24b346e1 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func renamexNp(from string, to string, flag uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_renamex_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_renameatx_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
var _p0 unsafe.Pointer
if len(mib) > 0 {
@@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pthread_chdir_np(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pthread_chdir_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pthread_fchdir_np(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pthread_fchdir_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) {
+ var _p0 unsafe.Pointer
+ if len(iov) > 0 {
+ _p0 = unsafe.Pointer(&iov[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_connectx_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index 8b8bb284..ebd21310 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL Β·libc_ioctl_trampoline_addr(SB), RODATA, $8
DATA Β·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renamex_np(SB)
+GLOBL Β·libc_renamex_np_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB)
+
+TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameatx_np(SB)
+GLOBL Β·libc_renameatx_np_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB)
+
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sysctl(SB)
GLOBL Β·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA Β·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pthread_chdir_np(SB)
+GLOBL Β·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)
+
+TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pthread_fchdir_np(SB)
+GLOBL Β·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)
+
+TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connectx(SB)
+GLOBL Β·libc_connectx_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB)
+
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
GLOBL Β·libc_sendfile_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 1b40b997..824b9c2d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func renamexNp(from string, to string, flag uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_renamex_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_renameatx_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
var _p0 unsafe.Pointer
if len(mib) > 0 {
@@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pthread_chdir_np(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pthread_chdir_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pthread_fchdir_np(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pthread_fchdir_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) {
+ var _p0 unsafe.Pointer
+ if len(iov) > 0 {
+ _p0 = unsafe.Pointer(&iov[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_connectx_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index 08362c1a..4f178a22 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL Β·libc_ioctl_trampoline_addr(SB), RODATA, $8
DATA Β·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renamex_np(SB)
+GLOBL Β·libc_renamex_np_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB)
+
+TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameatx_np(SB)
+GLOBL Β·libc_renameatx_np_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB)
+
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sysctl(SB)
GLOBL Β·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA Β·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pthread_chdir_np(SB)
+GLOBL Β·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)
+
+TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pthread_fchdir_np(SB)
+GLOBL Β·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)
+
+TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connectx(SB)
+GLOBL Β·libc_connectx_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB)
+
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
GLOBL Β·libc_sendfile_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 87d8612a..af30da55 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -971,23 +971,6 @@ func Getpriority(which int, who int) (prio int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
@@ -2229,3 +2212,19 @@ func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint)
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mseal(b []byte, flags uint) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index 9dc42410..1851df14 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dir)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mount mount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
index 41b56173..0b43c693 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
GLOBL Β·libc_mknodat_trampoline_addr(SB), RODATA, $4
DATA Β·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mount(SB)
+GLOBL Β·libc_mount_trampoline_addr(SB), RODATA, $4
+DATA Β·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB)
+
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_nanosleep(SB)
GLOBL Β·libc_nanosleep_trampoline_addr(SB), RODATA, $4
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 0d3a0751..e1ec0dbe 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dir)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mount mount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
index 4019a656..880c6d6e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
GLOBL Β·libc_mknodat_trampoline_addr(SB), RODATA, $8
DATA Β·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mount(SB)
+GLOBL Β·libc_mount_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
+
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_nanosleep(SB)
GLOBL Β·libc_nanosleep_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index c39f7776..7c8452a6 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dir)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mount mount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
index ac4af24f..b8ef95b0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
GLOBL Β·libc_mknodat_trampoline_addr(SB), RODATA, $4
DATA Β·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mount(SB)
+GLOBL Β·libc_mount_trampoline_addr(SB), RODATA, $4
+DATA Β·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB)
+
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_nanosleep(SB)
GLOBL Β·libc_nanosleep_trampoline_addr(SB), RODATA, $4
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index 57571d07..2ffdf861 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dir)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mount mount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
index f77d5321..2af3b5c7 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
GLOBL Β·libc_mknodat_trampoline_addr(SB), RODATA, $8
DATA Β·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mount(SB)
+GLOBL Β·libc_mount_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
+
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_nanosleep(SB)
GLOBL Β·libc_nanosleep_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
index e62963e6..1da08d52 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dir)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mount mount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
index fae140b6..b7a25135 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
GLOBL Β·libc_mknodat_trampoline_addr(SB), RODATA, $8
DATA Β·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mount(SB)
+GLOBL Β·libc_mount_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
+
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_nanosleep(SB)
GLOBL Β·libc_nanosleep_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
index 00831354..6e85b0aa 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dir)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mount mount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
index 9d1e0ff0..f15dadf0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
@@ -555,6 +555,12 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
GLOBL Β·libc_mknodat_trampoline_addr(SB), RODATA, $8
DATA Β·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mount(SB)
+ RET
+GLOBL Β·libc_mount_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
+
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
CALL libc_nanosleep(SB)
RET
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
index 79029ed5..28b487df 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dir)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mount mount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
index da115f9a..1e7f321e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
GLOBL Β·libc_mknodat_trampoline_addr(SB), RODATA, $8
DATA Β·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mount(SB)
+GLOBL Β·libc_mount_trampoline_addr(SB), RODATA, $8
+DATA Β·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
+
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_nanosleep(SB)
GLOBL Β·libc_nanosleep_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index 53aef5dc..524b0820 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -457,4 +457,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index 71d52476..f485dbf4 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -341,6 +341,7 @@ const (
SYS_STATX = 332
SYS_IO_PGETEVENTS = 333
SYS_RSEQ = 334
+ SYS_URETPROBE = 335
SYS_PIDFD_SEND_SIGNAL = 424
SYS_IO_URING_SETUP = 425
SYS_IO_URING_ENTER = 426
@@ -379,4 +380,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index c7477061..70b35bf3 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -421,4 +421,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index f96e214f..1893e2fe 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -85,7 +85,7 @@ const (
SYS_SPLICE = 76
SYS_TEE = 77
SYS_READLINKAT = 78
- SYS_FSTATAT = 79
+ SYS_NEWFSTATAT = 79
SYS_FSTAT = 80
SYS_SYNC = 81
SYS_FSYNC = 82
@@ -324,4 +324,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
index 28425346..16a4017d 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
@@ -84,6 +84,8 @@ const (
SYS_SPLICE = 76
SYS_TEE = 77
SYS_READLINKAT = 78
+ SYS_NEWFSTATAT = 79
+ SYS_FSTAT = 80
SYS_SYNC = 81
SYS_FSYNC = 82
SYS_FDATASYNC = 83
@@ -318,4 +320,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index d0953018..7e567f1e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -441,4 +441,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 4459
SYS_LSM_SET_SELF_ATTR = 4460
SYS_LSM_LIST_MODULES = 4461
+ SYS_MSEAL = 4462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 295c7f4b..38ae55e5 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -371,4 +371,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 5459
SYS_LSM_SET_SELF_ATTR = 5460
SYS_LSM_LIST_MODULES = 5461
+ SYS_MSEAL = 5462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index d1a9eaca..55e92e60 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -371,4 +371,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 5459
SYS_LSM_SET_SELF_ATTR = 5460
SYS_LSM_LIST_MODULES = 5461
+ SYS_MSEAL = 5462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index bec157c3..60658d6a 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -441,4 +441,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 4459
SYS_LSM_SET_SELF_ATTR = 4460
SYS_LSM_LIST_MODULES = 4461
+ SYS_MSEAL = 4462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
index 7ee7bdc4..e203e8a7 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -448,4 +448,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index fad1f25b..5944b97d 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -420,4 +420,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index 7d3e1635..c66d416d 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -420,4 +420,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index 0ed53ad9..a5459e76 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -84,7 +84,7 @@ const (
SYS_SPLICE = 76
SYS_TEE = 77
SYS_READLINKAT = 78
- SYS_FSTATAT = 79
+ SYS_NEWFSTATAT = 79
SYS_FSTAT = 80
SYS_SYNC = 81
SYS_FSYNC = 82
@@ -325,4 +325,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index 2fba04ad..01d86825 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -386,4 +386,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index 621d00d7..7b703e77 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -399,4 +399,5 @@ const (
SYS_LSM_GET_SELF_ATTR = 459
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
+ SYS_MSEAL = 462
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
index 091d107f..d003c3d4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
@@ -306,6 +306,19 @@ type XVSockPgen struct {
type _Socklen uint32
+type SaeAssocID uint32
+
+type SaeConnID uint32
+
+type SaEndpoints struct {
+ Srcif uint32
+ Srcaddr *RawSockaddr
+ Srcaddrlen uint32
+ Dstaddr *RawSockaddr
+ Dstaddrlen uint32
+ _ [4]byte
+}
+
type Xucred struct {
Version uint32
Uid uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
index 28ff4ef7..0d45a941 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
@@ -306,6 +306,19 @@ type XVSockPgen struct {
type _Socklen uint32
+type SaeAssocID uint32
+
+type SaeConnID uint32
+
+type SaEndpoints struct {
+ Srcif uint32
+ Srcaddr *RawSockaddr
+ Srcaddrlen uint32
+ Dstaddr *RawSockaddr
+ Dstaddrlen uint32
+ _ [4]byte
+}
+
type Xucred struct {
Version uint32
Uid uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
index 6cbd094a..51e13eb0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
@@ -625,6 +625,7 @@ const (
POLLRDNORM = 0x40
POLLWRBAND = 0x100
POLLWRNORM = 0x4
+ POLLRDHUP = 0x4000
)
type CapRights struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
index 7c03b6ee..d002d8ef 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
@@ -630,6 +630,7 @@ const (
POLLRDNORM = 0x40
POLLWRBAND = 0x100
POLLWRNORM = 0x4
+ POLLRDHUP = 0x4000
)
type CapRights struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
index 422107ee..3f863d89 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
@@ -616,6 +616,7 @@ const (
POLLRDNORM = 0x40
POLLWRBAND = 0x100
POLLWRNORM = 0x4
+ POLLRDHUP = 0x4000
)
type CapRights struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
index 505a12ac..61c72931 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
@@ -610,6 +610,7 @@ const (
POLLRDNORM = 0x40
POLLWRBAND = 0x100
POLLWRNORM = 0x4
+ POLLRDHUP = 0x4000
)
type CapRights struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
index cc986c79..b5d17414 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
@@ -612,6 +612,7 @@ const (
POLLRDNORM = 0x40
POLLWRBAND = 0x100
POLLWRNORM = 0x4
+ POLLRDHUP = 0x4000
)
type CapRights struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
index 0036746e..3a69e454 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -87,30 +87,35 @@ type StatxTimestamp struct {
}
type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- Mnt_id uint64
- Dio_mem_align uint32
- Dio_offset_align uint32
- _ [12]uint64
+ Mask uint32
+ Blksize uint32
+ Attributes uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Mode uint16
+ _ [1]uint16
+ Ino uint64
+ Size uint64
+ Blocks uint64
+ Attributes_mask uint64
+ Atime StatxTimestamp
+ Btime StatxTimestamp
+ Ctime StatxTimestamp
+ Mtime StatxTimestamp
+ Rdev_major uint32
+ Rdev_minor uint32
+ Dev_major uint32
+ Dev_minor uint32
+ Mnt_id uint64
+ Dio_mem_align uint32
+ Dio_offset_align uint32
+ Subvol uint64
+ Atomic_write_unit_min uint32
+ Atomic_write_unit_max uint32
+ Atomic_write_segments_max uint32
+ _ [1]uint32
+ _ [9]uint64
}
type Fsid struct {
@@ -515,6 +520,29 @@ type TCPInfo struct {
Total_rto_time uint32
}
+type TCPVegasInfo struct {
+ Enabled uint32
+ Rttcnt uint32
+ Rtt uint32
+ Minrtt uint32
+}
+
+type TCPDCTCPInfo struct {
+ Enabled uint16
+ Ce_state uint16
+ Alpha uint32
+ Ab_ecn uint32
+ Ab_tot uint32
+}
+
+type TCPBBRInfo struct {
+ Bw_lo uint32
+ Bw_hi uint32
+ Min_rtt uint32
+ Pacing_gain uint32
+ Cwnd_gain uint32
+}
+
type CanFilter struct {
Id uint32
Mask uint32
@@ -556,6 +584,7 @@ const (
SizeofICMPv6Filter = 0x20
SizeofUcred = 0xc
SizeofTCPInfo = 0xf8
+ SizeofTCPCCInfo = 0x14
SizeofCanFilter = 0x8
SizeofTCPRepairOpt = 0x8
)
@@ -2485,7 +2514,7 @@ type XDPMmapOffsets struct {
type XDPUmemReg struct {
Addr uint64
Len uint64
- Chunk_size uint32
+ Size uint32
Headroom uint32
Flags uint32
Tx_metadata_len uint32
@@ -3473,7 +3502,7 @@ const (
DEVLINK_PORT_FN_ATTR_STATE = 0x2
DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3
DEVLINK_PORT_FN_ATTR_CAPS = 0x4
- DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x5
+ DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x6
)
type FsverityDigest struct {
@@ -3765,7 +3794,7 @@ const (
ETHTOOL_MSG_PSE_GET = 0x24
ETHTOOL_MSG_PSE_SET = 0x25
ETHTOOL_MSG_RSS_GET = 0x26
- ETHTOOL_MSG_USER_MAX = 0x2b
+ ETHTOOL_MSG_USER_MAX = 0x2c
ETHTOOL_MSG_KERNEL_NONE = 0x0
ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
@@ -3805,7 +3834,10 @@ const (
ETHTOOL_MSG_MODULE_NTF = 0x24
ETHTOOL_MSG_PSE_GET_REPLY = 0x25
ETHTOOL_MSG_RSS_GET_REPLY = 0x26
- ETHTOOL_MSG_KERNEL_MAX = 0x2b
+ ETHTOOL_MSG_KERNEL_MAX = 0x2c
+ ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
+ ETHTOOL_FLAG_OMIT_REPLY = 0x2
+ ETHTOOL_FLAG_STATS = 0x4
ETHTOOL_A_HEADER_UNSPEC = 0x0
ETHTOOL_A_HEADER_DEV_INDEX = 0x1
ETHTOOL_A_HEADER_DEV_NAME = 0x2
@@ -3947,7 +3979,7 @@ const (
ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17
ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18
ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19
- ETHTOOL_A_COALESCE_MAX = 0x1c
+ ETHTOOL_A_COALESCE_MAX = 0x1e
ETHTOOL_A_PAUSE_UNSPEC = 0x0
ETHTOOL_A_PAUSE_HEADER = 0x1
ETHTOOL_A_PAUSE_AUTONEG = 0x2
@@ -3975,7 +4007,7 @@ const (
ETHTOOL_A_TSINFO_TX_TYPES = 0x3
ETHTOOL_A_TSINFO_RX_FILTERS = 0x4
ETHTOOL_A_TSINFO_PHC_INDEX = 0x5
- ETHTOOL_A_TSINFO_MAX = 0x5
+ ETHTOOL_A_TSINFO_MAX = 0x6
ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0
ETHTOOL_A_CABLE_TEST_HEADER = 0x1
ETHTOOL_A_CABLE_TEST_MAX = 0x1
@@ -4605,7 +4637,7 @@ const (
NL80211_ATTR_MAC_HINT = 0xc8
NL80211_ATTR_MAC_MASK = 0xd7
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
- NL80211_ATTR_MAX = 0x149
+ NL80211_ATTR_MAX = 0x14c
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
NL80211_ATTR_MAX_MATCH_SETS = 0x85
@@ -5209,7 +5241,7 @@ const (
NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf
NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe
NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf
- NL80211_FREQUENCY_ATTR_MAX = 0x1f
+ NL80211_FREQUENCY_ATTR_MAX = 0x21
NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6
NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11
NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
@@ -5703,7 +5735,7 @@ const (
NL80211_STA_FLAG_ASSOCIATED = 0x7
NL80211_STA_FLAG_AUTHENTICATED = 0x5
NL80211_STA_FLAG_AUTHORIZED = 0x1
- NL80211_STA_FLAG_MAX = 0x7
+ NL80211_STA_FLAG_MAX = 0x8
NL80211_STA_FLAG_MAX_OLD_API = 0x6
NL80211_STA_FLAG_MFP = 0x4
NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2
@@ -6001,3 +6033,34 @@ type CachestatRange struct {
Off uint64
Len uint64
}
+
+const (
+ SK_MEMINFO_RMEM_ALLOC = 0x0
+ SK_MEMINFO_RCVBUF = 0x1
+ SK_MEMINFO_WMEM_ALLOC = 0x2
+ SK_MEMINFO_SNDBUF = 0x3
+ SK_MEMINFO_FWD_ALLOC = 0x4
+ SK_MEMINFO_WMEM_QUEUED = 0x5
+ SK_MEMINFO_OPTMEM = 0x6
+ SK_MEMINFO_BACKLOG = 0x7
+ SK_MEMINFO_DROPS = 0x8
+ SK_MEMINFO_VARS = 0x9
+ SKNLGRP_NONE = 0x0
+ SKNLGRP_INET_TCP_DESTROY = 0x1
+ SKNLGRP_INET_UDP_DESTROY = 0x2
+ SKNLGRP_INET6_TCP_DESTROY = 0x3
+ SKNLGRP_INET6_UDP_DESTROY = 0x4
+ SK_DIAG_BPF_STORAGE_REQ_NONE = 0x0
+ SK_DIAG_BPF_STORAGE_REQ_MAP_FD = 0x1
+ SK_DIAG_BPF_STORAGE_REP_NONE = 0x0
+ SK_DIAG_BPF_STORAGE = 0x1
+ SK_DIAG_BPF_STORAGE_NONE = 0x0
+ SK_DIAG_BPF_STORAGE_PAD = 0x1
+ SK_DIAG_BPF_STORAGE_MAP_ID = 0x2
+ SK_DIAG_BPF_STORAGE_MAP_VALUE = 0x3
+)
+
+type SockDiagReq struct {
+ Family uint8
+ Protocol uint8
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index 15adc041..ad05b51a 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -727,6 +727,37 @@ const (
RISCV_HWPROBE_EXT_ZBA = 0x8
RISCV_HWPROBE_EXT_ZBB = 0x10
RISCV_HWPROBE_EXT_ZBS = 0x20
+ RISCV_HWPROBE_EXT_ZICBOZ = 0x40
+ RISCV_HWPROBE_EXT_ZBC = 0x80
+ RISCV_HWPROBE_EXT_ZBKB = 0x100
+ RISCV_HWPROBE_EXT_ZBKC = 0x200
+ RISCV_HWPROBE_EXT_ZBKX = 0x400
+ RISCV_HWPROBE_EXT_ZKND = 0x800
+ RISCV_HWPROBE_EXT_ZKNE = 0x1000
+ RISCV_HWPROBE_EXT_ZKNH = 0x2000
+ RISCV_HWPROBE_EXT_ZKSED = 0x4000
+ RISCV_HWPROBE_EXT_ZKSH = 0x8000
+ RISCV_HWPROBE_EXT_ZKT = 0x10000
+ RISCV_HWPROBE_EXT_ZVBB = 0x20000
+ RISCV_HWPROBE_EXT_ZVBC = 0x40000
+ RISCV_HWPROBE_EXT_ZVKB = 0x80000
+ RISCV_HWPROBE_EXT_ZVKG = 0x100000
+ RISCV_HWPROBE_EXT_ZVKNED = 0x200000
+ RISCV_HWPROBE_EXT_ZVKNHA = 0x400000
+ RISCV_HWPROBE_EXT_ZVKNHB = 0x800000
+ RISCV_HWPROBE_EXT_ZVKSED = 0x1000000
+ RISCV_HWPROBE_EXT_ZVKSH = 0x2000000
+ RISCV_HWPROBE_EXT_ZVKT = 0x4000000
+ RISCV_HWPROBE_EXT_ZFH = 0x8000000
+ RISCV_HWPROBE_EXT_ZFHMIN = 0x10000000
+ RISCV_HWPROBE_EXT_ZIHINTNTL = 0x20000000
+ RISCV_HWPROBE_EXT_ZVFH = 0x40000000
+ RISCV_HWPROBE_EXT_ZVFHMIN = 0x80000000
+ RISCV_HWPROBE_EXT_ZFA = 0x100000000
+ RISCV_HWPROBE_EXT_ZTSO = 0x200000000
+ RISCV_HWPROBE_EXT_ZACAS = 0x400000000
+ RISCV_HWPROBE_EXT_ZICOND = 0x800000000
+ RISCV_HWPROBE_EXT_ZIHINTPAUSE = 0x1000000000
RISCV_HWPROBE_KEY_CPUPERF_0 = 0x5
RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0x0
RISCV_HWPROBE_MISALIGNED_EMULATED = 0x1
@@ -734,4 +765,6 @@ const (
RISCV_HWPROBE_MISALIGNED_FAST = 0x3
RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4
RISCV_HWPROBE_MISALIGNED_MASK = 0x7
+ RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE = 0x6
+ RISCV_HWPROBE_WHICH_CPUS = 0x1
)
diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go
index 115341fb..4e613cf6 100644
--- a/vendor/golang.org/x/sys/windows/dll_windows.go
+++ b/vendor/golang.org/x/sys/windows/dll_windows.go
@@ -65,7 +65,7 @@ func LoadDLL(name string) (dll *DLL, err error) {
return d, nil
}
-// MustLoadDLL is like LoadDLL but panics if load operation failes.
+// MustLoadDLL is like LoadDLL but panics if load operation fails.
func MustLoadDLL(name string) *DLL {
d, e := LoadDLL(name)
if e != nil {
diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go
index 26be94a8..b6e1ab76 100644
--- a/vendor/golang.org/x/sys/windows/security_windows.go
+++ b/vendor/golang.org/x/sys/windows/security_windows.go
@@ -68,6 +68,7 @@ type UserInfo10 struct {
//sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo
//sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation
//sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree
+//sys NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) = netapi32.NetUserEnum
const (
// do not reorder
@@ -893,7 +894,7 @@ type ACL struct {
aclRevision byte
sbz1 byte
aclSize uint16
- aceCount uint16
+ AceCount uint16
sbz2 uint16
}
@@ -1086,6 +1087,27 @@ type EXPLICIT_ACCESS struct {
Trustee TRUSTEE
}
+// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header
+type ACE_HEADER struct {
+ AceType uint8
+ AceFlags uint8
+ AceSize uint16
+}
+
+// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-access_allowed_ace
+type ACCESS_ALLOWED_ACE struct {
+ Header ACE_HEADER
+ Mask ACCESS_MASK
+ SidStart uint32
+}
+
+const (
+ // Constants for AceType
+ // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header
+ ACCESS_ALLOWED_ACE_TYPE = 0
+ ACCESS_DENIED_ACE_TYPE = 1
+)
+
// This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions.
type TrusteeValue uintptr
@@ -1157,6 +1179,7 @@ type OBJECTS_AND_NAME struct {
//sys makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) = advapi32.MakeSelfRelativeSD
//sys setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) = advapi32.SetEntriesInAclW
+//sys GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) = advapi32.GetAce
// Control returns the security descriptor control bits.
func (sd *SECURITY_DESCRIPTOR) Control() (control SECURITY_DESCRIPTOR_CONTROL, revision uint32, err error) {
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index 6525c62f..5cee9a31 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -17,8 +17,10 @@ import (
"unsafe"
)
-type Handle uintptr
-type HWND uintptr
+type (
+ Handle uintptr
+ HWND uintptr
+)
const (
InvalidHandle = ^Handle(0)
@@ -211,6 +213,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error)
//sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW
//sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId
+//sys LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) [failretval==0] = user32.LoadKeyboardLayoutW
+//sys UnloadKeyboardLayout(hkl Handle) (err error) = user32.UnloadKeyboardLayout
+//sys GetKeyboardLayout(tid uint32) (hkl Handle) = user32.GetKeyboardLayout
+//sys ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) = user32.ToUnicodeEx
//sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow
//sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW
//sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx
@@ -307,6 +313,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode
//sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo
//sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition
+//sys GetConsoleCP() (cp uint32, err error) = kernel32.GetConsoleCP
+//sys GetConsoleOutputCP() (cp uint32, err error) = kernel32.GetConsoleOutputCP
+//sys SetConsoleCP(cp uint32) (err error) = kernel32.SetConsoleCP
+//sys SetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
//sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole
@@ -1368,9 +1378,11 @@ func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
func SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) {
return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4)
}
+
func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) {
return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq)))
}
+
func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) {
return syscall.EWINDOWS
}
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index d8cb71db..7b97a154 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -1060,6 +1060,7 @@ const (
SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6
SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4
SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12
+ SIO_UDP_NETRESET = IOC_IN | IOC_VENDOR | 15
// cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460
@@ -2003,7 +2004,21 @@ const (
MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20
)
-const GAA_FLAG_INCLUDE_PREFIX = 0x00000010
+// Flags for GetAdaptersAddresses, see
+// https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses.
+const (
+ GAA_FLAG_SKIP_UNICAST = 0x1
+ GAA_FLAG_SKIP_ANYCAST = 0x2
+ GAA_FLAG_SKIP_MULTICAST = 0x4
+ GAA_FLAG_SKIP_DNS_SERVER = 0x8
+ GAA_FLAG_INCLUDE_PREFIX = 0x10
+ GAA_FLAG_SKIP_FRIENDLY_NAME = 0x20
+ GAA_FLAG_INCLUDE_WINS_INFO = 0x40
+ GAA_FLAG_INCLUDE_GATEWAYS = 0x80
+ GAA_FLAG_INCLUDE_ALL_INTERFACES = 0x100
+ GAA_FLAG_INCLUDE_ALL_COMPARTMENTS = 0x200
+ GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER = 0x400
+)
const (
IF_TYPE_OTHER = 1
@@ -2017,6 +2032,50 @@ const (
IF_TYPE_IEEE1394 = 144
)
+// Enum NL_PREFIX_ORIGIN for [IpAdapterUnicastAddress], see
+// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_prefix_origin
+const (
+ IpPrefixOriginOther = 0
+ IpPrefixOriginManual = 1
+ IpPrefixOriginWellKnown = 2
+ IpPrefixOriginDhcp = 3
+ IpPrefixOriginRouterAdvertisement = 4
+ IpPrefixOriginUnchanged = 1 << 4
+)
+
+// Enum NL_SUFFIX_ORIGIN for [IpAdapterUnicastAddress], see
+// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_suffix_origin
+const (
+ NlsoOther = 0
+ NlsoManual = 1
+ NlsoWellKnown = 2
+ NlsoDhcp = 3
+ NlsoLinkLayerAddress = 4
+ NlsoRandom = 5
+ IpSuffixOriginOther = 0
+ IpSuffixOriginManual = 1
+ IpSuffixOriginWellKnown = 2
+ IpSuffixOriginDhcp = 3
+ IpSuffixOriginLinkLayerAddress = 4
+ IpSuffixOriginRandom = 5
+ IpSuffixOriginUnchanged = 1 << 4
+)
+
+// Enum NL_DAD_STATE for [IpAdapterUnicastAddress], see
+// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_dad_state
+const (
+ NldsInvalid = 0
+ NldsTentative = 1
+ NldsDuplicate = 2
+ NldsDeprecated = 3
+ NldsPreferred = 4
+ IpDadStateInvalid = 0
+ IpDadStateTentative = 1
+ IpDadStateDuplicate = 2
+ IpDadStateDeprecated = 3
+ IpDadStatePreferred = 4
+)
+
type SocketAddress struct {
Sockaddr *syscall.RawSockaddrAny
SockaddrLength int32
@@ -3404,3 +3463,14 @@ type DCB struct {
EvtChar byte
wReserved1 uint16
}
+
+// Keyboard Layout Flags.
+// See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadkeyboardlayoutw
+const (
+ KLF_ACTIVATE = 0x00000001
+ KLF_SUBSTITUTE_OK = 0x00000002
+ KLF_REORDER = 0x00000008
+ KLF_REPLACELANG = 0x00000010
+ KLF_NOTELLSHELL = 0x00000080
+ KLF_SETFORPROCESS = 0x00000100
+)
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 5c6035dd..4c2e1bdc 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -91,6 +91,7 @@ var (
procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW")
procEqualSid = modadvapi32.NewProc("EqualSid")
procFreeSid = modadvapi32.NewProc("FreeSid")
+ procGetAce = modadvapi32.NewProc("GetAce")
procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW")
procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl")
@@ -246,7 +247,9 @@ var (
procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
+ procGetConsoleCP = modkernel32.NewProc("GetConsoleCP")
procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
+ procGetConsoleOutputCP = modkernel32.NewProc("GetConsoleOutputCP")
procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo")
procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
@@ -346,8 +349,10 @@ var (
procSetCommMask = modkernel32.NewProc("SetCommMask")
procSetCommState = modkernel32.NewProc("SetCommState")
procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts")
+ procSetConsoleCP = modkernel32.NewProc("SetConsoleCP")
procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition")
procSetConsoleMode = modkernel32.NewProc("SetConsoleMode")
+ procSetConsoleOutputCP = modkernel32.NewProc("SetConsoleOutputCP")
procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories")
procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW")
@@ -401,6 +406,7 @@ var (
procTransmitFile = modmswsock.NewProc("TransmitFile")
procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
+ procNetUserEnum = modnetapi32.NewProc("NetUserEnum")
procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
procNtCreateFile = modntdll.NewProc("NtCreateFile")
procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
@@ -476,12 +482,16 @@ var (
procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow")
procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow")
procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo")
+ procGetKeyboardLayout = moduser32.NewProc("GetKeyboardLayout")
procGetShellWindow = moduser32.NewProc("GetShellWindow")
procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
procIsWindow = moduser32.NewProc("IsWindow")
procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode")
procIsWindowVisible = moduser32.NewProc("IsWindowVisible")
+ procLoadKeyboardLayoutW = moduser32.NewProc("LoadKeyboardLayoutW")
procMessageBoxW = moduser32.NewProc("MessageBoxW")
+ procToUnicodeEx = moduser32.NewProc("ToUnicodeEx")
+ procUnloadKeyboardLayout = moduser32.NewProc("UnloadKeyboardLayout")
procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
@@ -787,6 +797,14 @@ func FreeSid(sid *SID) (err error) {
return
}
+func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetAce.Addr(), 3, uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func GetLengthSid(sid *SID) (len uint32) {
r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
len = uint32(r0)
@@ -2148,6 +2166,15 @@ func GetComputerName(buf *uint16, n *uint32) (err error) {
return
}
+func GetConsoleCP() (cp uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetConsoleCP.Addr(), 0, 0, 0, 0)
+ cp = uint32(r0)
+ if cp == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func GetConsoleMode(console Handle, mode *uint32) (err error) {
r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0)
if r1 == 0 {
@@ -2156,6 +2183,15 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) {
return
}
+func GetConsoleOutputCP() (cp uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetConsoleOutputCP.Addr(), 0, 0, 0, 0)
+ cp = uint32(r0)
+ if cp == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) {
r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0)
if r1 == 0 {
@@ -3024,6 +3060,14 @@ func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
return
}
+func SetConsoleCP(cp uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetConsoleCP.Addr(), 1, uintptr(cp), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func setConsoleCursorPosition(console Handle, position uint32) (err error) {
r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0)
if r1 == 0 {
@@ -3040,6 +3084,14 @@ func SetConsoleMode(console Handle, mode uint32) (err error) {
return
}
+func SetConsoleOutputCP(cp uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetConsoleOutputCP.Addr(), 1, uintptr(cp), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func SetCurrentDirectory(path *uint16) (err error) {
r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
if r1 == 0 {
@@ -3486,6 +3538,14 @@ func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (nete
return
}
+func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) {
+ r0, _, _ := syscall.Syscall9(procNetUserEnum.Addr(), 8, uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)), 0)
+ if r0 != 0 {
+ neterr = syscall.Errno(r0)
+ }
+ return
+}
+
func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
if r0 != 0 {
@@ -4064,6 +4124,12 @@ func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
return
}
+func GetKeyboardLayout(tid uint32) (hkl Handle) {
+ r0, _, _ := syscall.Syscall(procGetKeyboardLayout.Addr(), 1, uintptr(tid), 0, 0)
+ hkl = Handle(r0)
+ return
+}
+
func GetShellWindow() (shellWindow HWND) {
r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0)
shellWindow = HWND(r0)
@@ -4097,6 +4163,15 @@ func IsWindowVisible(hwnd HWND) (isVisible bool) {
return
}
+func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procLoadKeyboardLayoutW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(flags), 0)
+ hkl = Handle(r0)
+ if hkl == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
ret = int32(r0)
@@ -4106,6 +4181,20 @@ func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret i
return
}
+func ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) {
+ r0, _, _ := syscall.Syscall9(procToUnicodeEx.Addr(), 7, uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl), 0, 0)
+ ret = int32(r0)
+ return
+}
+
+func UnloadKeyboardLayout(hkl Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procUnloadKeyboardLayout.Addr(), 1, uintptr(hkl), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) {
var _p0 uint32
if inheritExisting {
diff --git a/vendor/golang.org/x/term/LICENSE b/vendor/golang.org/x/term/LICENSE
index 6a66aea5..2a7cf70d 100644
--- a/vendor/golang.org/x/term/LICENSE
+++ b/vendor/golang.org/x/term/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
+Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google Inc. nor the names of its
+ * Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/vendor/golang.org/x/term/term_windows.go b/vendor/golang.org/x/term/term_windows.go
index 465f5606..df6bf948 100644
--- a/vendor/golang.org/x/term/term_windows.go
+++ b/vendor/golang.org/x/term/term_windows.go
@@ -26,6 +26,7 @@ func makeRaw(fd int) (*State, error) {
return nil, err
}
raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
+ raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT
if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil {
return nil, err
}
diff --git a/vendor/golang.org/x/text/LICENSE b/vendor/golang.org/x/text/LICENSE
index 6a66aea5..2a7cf70d 100644
--- a/vendor/golang.org/x/text/LICENSE
+++ b/vendor/golang.org/x/text/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
+Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google Inc. nor the names of its
+ * Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go
index f0e0cf3c..8f6c7f49 100644
--- a/vendor/golang.org/x/time/rate/rate.go
+++ b/vendor/golang.org/x/time/rate/rate.go
@@ -52,6 +52,8 @@ func Every(interval time.Duration) Limit {
// or its associated context.Context is canceled.
//
// The methods AllowN, ReserveN, and WaitN consume n tokens.
+//
+// Limiter is safe for simultaneous use by multiple goroutines.
type Limiter struct {
mu sync.Mutex
limit Limit
diff --git a/vendor/golang.org/x/tools/cmd/goimports/goimports.go b/vendor/golang.org/x/tools/cmd/goimports/goimports.go
index b354c9e8..dcb5023a 100644
--- a/vendor/golang.org/x/tools/cmd/goimports/goimports.go
+++ b/vendor/golang.org/x/tools/cmd/goimports/goimports.go
@@ -11,11 +11,10 @@ import (
"flag"
"fmt"
"go/scanner"
- exec "golang.org/x/sys/execabs"
"io"
- "io/ioutil"
"log"
"os"
+ "os/exec"
"path/filepath"
"runtime"
"runtime/pprof"
@@ -106,7 +105,7 @@ func processFile(filename string, in io.Reader, out io.Writer, argType argumentT
in = f
}
- src, err := ioutil.ReadAll(in)
+ src, err := io.ReadAll(in)
if err != nil {
return err
}
@@ -159,7 +158,7 @@ func processFile(filename string, in io.Reader, out io.Writer, argType argumentT
if fi, err := os.Stat(filename); err == nil {
perms = fi.Mode() & os.ModePerm
}
- err = ioutil.WriteFile(filename, res, perms)
+ err = os.WriteFile(filename, res, perms)
if err != nil {
return err
}
@@ -296,7 +295,7 @@ func gofmtMain() {
}
func writeTempFile(dir, prefix string, data []byte) (string, error) {
- file, err := ioutil.TempFile(dir, prefix)
+ file, err := os.CreateTemp(dir, prefix)
if err != nil {
return "", err
}
diff --git a/vendor/golang.org/x/tools/cmd/goimports/goimports_gc.go b/vendor/golang.org/x/tools/cmd/goimports/goimports_gc.go
index 190a5653..3326646d 100644
--- a/vendor/golang.org/x/tools/cmd/goimports/goimports_gc.go
+++ b/vendor/golang.org/x/tools/cmd/goimports/goimports_gc.go
@@ -19,8 +19,8 @@ func doTrace() func() {
bw, flush := bufferedFileWriter(*traceProfile)
trace.Start(bw)
return func() {
- flush()
trace.Stop()
+ flush()
}
}
return func() {}
diff --git a/vendor/golang.org/x/tools/cmd/stringer/stringer.go b/vendor/golang.org/x/tools/cmd/stringer/stringer.go
index 998d1a51..2b19c93e 100644
--- a/vendor/golang.org/x/tools/cmd/stringer/stringer.go
+++ b/vendor/golang.org/x/tools/cmd/stringer/stringer.go
@@ -188,6 +188,8 @@ type Generator struct {
trimPrefix string
lineComment bool
+
+ logf func(format string, args ...interface{}) // test logging hook; nil when not testing
}
func (g *Generator) Printf(format string, args ...interface{}) {
@@ -221,13 +223,14 @@ func (g *Generator) parsePackage(patterns []string, tags []string) {
// in a separate pass? For later.
Tests: false,
BuildFlags: []string{fmt.Sprintf("-tags=%s", strings.Join(tags, " "))},
+ Logf: g.logf,
}
pkgs, err := packages.Load(cfg, patterns...)
if err != nil {
log.Fatal(err)
}
if len(pkgs) != 1 {
- log.Fatalf("error: %d packages found", len(pkgs))
+ log.Fatalf("error: %d packages matching %v", len(pkgs), strings.Join(patterns, " "))
}
g.addPackage(pkgs[0])
}
diff --git a/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
index 9fa5aa19..2c4c4e23 100644
--- a/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
+++ b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
@@ -11,8 +11,6 @@ import (
"go/ast"
"go/token"
"sort"
-
- "golang.org/x/tools/internal/typeparams"
)
// PathEnclosingInterval returns the node that encloses the source
@@ -322,7 +320,7 @@ func childrenOf(n ast.Node) []ast.Node {
children = append(children, n.Recv)
}
children = append(children, n.Name)
- if tparams := typeparams.ForFuncType(n.Type); tparams != nil {
+ if tparams := n.Type.TypeParams; tparams != nil {
children = append(children, tparams)
}
if n.Type.Params != nil {
@@ -377,7 +375,7 @@ func childrenOf(n ast.Node) []ast.Node {
tok(n.Lbrack, len("[")),
tok(n.Rbrack, len("]")))
- case *typeparams.IndexListExpr:
+ case *ast.IndexListExpr:
children = append(children,
tok(n.Lbrack, len("[")),
tok(n.Rbrack, len("]")))
@@ -588,7 +586,7 @@ func NodeDescription(n ast.Node) string {
return "decrement statement"
case *ast.IndexExpr:
return "index expression"
- case *typeparams.IndexListExpr:
+ case *ast.IndexListExpr:
return "index list expression"
case *ast.InterfaceType:
return "interface type"
diff --git a/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go b/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go
index f430b21b..58934f76 100644
--- a/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go
+++ b/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go
@@ -9,8 +9,6 @@ import (
"go/ast"
"reflect"
"sort"
-
- "golang.org/x/tools/internal/typeparams"
)
// An ApplyFunc is invoked by Apply for each node n, even if n is nil,
@@ -252,7 +250,7 @@ func (a *application) apply(parent ast.Node, name string, iter *iterator, n ast.
a.apply(n, "X", nil, n.X)
a.apply(n, "Index", nil, n.Index)
- case *typeparams.IndexListExpr:
+ case *ast.IndexListExpr:
a.apply(n, "X", nil, n.X)
a.applyList(n, "Indices")
@@ -293,7 +291,7 @@ func (a *application) apply(parent ast.Node, name string, iter *iterator, n ast.
a.apply(n, "Fields", nil, n.Fields)
case *ast.FuncType:
- if tparams := typeparams.ForFuncType(n); tparams != nil {
+ if tparams := n.TypeParams; tparams != nil {
a.apply(n, "TypeParams", nil, tparams)
}
a.apply(n, "Params", nil, n.Params)
@@ -408,7 +406,7 @@ func (a *application) apply(parent ast.Node, name string, iter *iterator, n ast.
case *ast.TypeSpec:
a.apply(n, "Doc", nil, n.Doc)
a.apply(n, "Name", nil, n.Name)
- if tparams := typeparams.ForTypeSpec(n); tparams != nil {
+ if tparams := n.TypeParams; tparams != nil {
a.apply(n, "TypeParams", nil, tparams)
}
a.apply(n, "Type", nil, n.Type)
diff --git a/vendor/golang.org/x/tools/go/ast/inspector/typeof.go b/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
index 703c8139..2a872f89 100644
--- a/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
+++ b/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
@@ -12,8 +12,6 @@ package inspector
import (
"go/ast"
"math"
-
- "golang.org/x/tools/internal/typeparams"
)
const (
@@ -171,7 +169,7 @@ func typeOf(n ast.Node) uint64 {
return 1 << nIncDecStmt
case *ast.IndexExpr:
return 1 << nIndexExpr
- case *typeparams.IndexListExpr:
+ case *ast.IndexListExpr:
return 1 << nIndexListExpr
case *ast.InterfaceType:
return 1 << nInterfaceType
diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
index 03543bd4..137cc8df 100644
--- a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
+++ b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
@@ -47,7 +47,7 @@ import (
func Find(importPath, srcDir string) (filename, path string) {
cmd := exec.Command("go", "list", "-json", "-export", "--", importPath)
cmd.Dir = srcDir
- out, err := cmd.CombinedOutput()
+ out, err := cmd.Output()
if err != nil {
return "", ""
}
diff --git a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go
index 0454cdd7..333676b7 100644
--- a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go
+++ b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go
@@ -13,16 +13,17 @@ import (
"golang.org/x/tools/internal/gocommand"
)
-var debug = false
-
func GetSizesForArgsGolist(ctx context.Context, inv gocommand.Invocation, gocmdRunner *gocommand.Runner) (string, string, error) {
inv.Verb = "list"
inv.Args = []string{"-f", "{{context.GOARCH}} {{context.Compiler}}", "--", "unsafe"}
stdout, stderr, friendlyErr, rawErr := gocmdRunner.RunRaw(ctx, inv)
var goarch, compiler string
if rawErr != nil {
- if rawErrMsg := rawErr.Error(); strings.Contains(rawErrMsg, "cannot find main module") || strings.Contains(rawErrMsg, "go.mod file not found") {
- // User's running outside of a module. All bets are off. Get GOARCH and guess compiler is gc.
+ rawErrMsg := rawErr.Error()
+ if strings.Contains(rawErrMsg, "cannot find main module") ||
+ strings.Contains(rawErrMsg, "go.mod file not found") {
+ // 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?
inv.Verb = "env"
inv.Args = []string{"GOARCH"}
@@ -32,8 +33,12 @@ func GetSizesForArgsGolist(ctx context.Context, inv gocommand.Invocation, gocmdR
}
goarch = strings.TrimSpace(envout.String())
compiler = "gc"
- } else {
+ } else if friendlyErr != nil {
return "", "", friendlyErr
+ } else {
+ // This should be unreachable, but be defensive
+ // in case RunRaw's error results are inconsistent.
+ return "", "", rawErr
}
} else {
fields := strings.Fields(stdout.String())
diff --git a/vendor/golang.org/x/tools/go/packages/doc.go b/vendor/golang.org/x/tools/go/packages/doc.go
index da4ab89f..a8d7b06a 100644
--- a/vendor/golang.org/x/tools/go/packages/doc.go
+++ b/vendor/golang.org/x/tools/go/packages/doc.go
@@ -5,12 +5,20 @@
/*
Package packages loads Go packages for inspection and analysis.
-The Load function takes as input a list of patterns and return a list of Package
-structs describing individual packages matched by those patterns.
-The LoadMode controls the amount of detail in the loaded packages.
-
-Load passes most patterns directly to the underlying build tool,
-but all patterns with the prefix "query=", where query is a
+The [Load] function takes as input a list of patterns and returns a
+list of [Package] values describing individual packages matched by those
+patterns.
+A [Config] specifies configuration options, the most important of which is
+the [LoadMode], which controls the amount of detail in the loaded packages.
+
+Load passes most patterns directly to the underlying build tool.
+The default build tool is the go command.
+Its supported patterns are described at
+https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns.
+Other build systems may be supported by providing a "driver";
+see [The driver protocol].
+
+All patterns with the prefix "query=", where query is a
non-empty string of letters from [a-z], are reserved and may be
interpreted as query operators.
@@ -35,7 +43,7 @@ The Package struct provides basic information about the package, including
- Imports, a map from source import strings to the Packages they name;
- Types, the type information for the package's exported symbols;
- Syntax, the parsed syntax trees for the package's source code; and
- - TypeInfo, the result of a complete type-check of the package syntax trees.
+ - TypesInfo, the result of a complete type-check of the package syntax trees.
(See the documentation for type Package for the complete list of fields
and more detailed descriptions.)
@@ -64,9 +72,31 @@ reported about the loaded packages. See the documentation for type LoadMode
for details.
Most tools should pass their command-line arguments (after any flags)
-uninterpreted to the loader, so that the loader can interpret them
+uninterpreted to [Load], so that it can interpret them
according to the conventions of the underlying build system.
+
See the Example function for typical usage.
+
+# The driver protocol
+
+[Load] may be used to load Go packages even in Go projects that use
+alternative build systems, by installing an appropriate "driver"
+program for the build system and specifying its location in the
+GOPACKAGESDRIVER environment variable.
+For example,
+https://github.com/bazelbuild/rules_go/wiki/Editor-and-tool-integration
+explains how to use the driver for Bazel.
+
+The driver program is responsible for interpreting patterns in its
+preferred notation and reporting information about the packages that
+those patterns identify. Drivers must also support the special "file="
+and "pattern=" patterns described above.
+
+The patterns are provided as positional command-line arguments. A
+JSON-encoded [DriverRequest] message providing additional information
+is written to the driver's standard input. The driver must write a
+JSON-encoded [DriverResponse] message to its standard output. (This
+message differs from the JSON schema produced by 'go list'.)
*/
package packages // import "golang.org/x/tools/go/packages"
diff --git a/vendor/golang.org/x/tools/go/packages/external.go b/vendor/golang.org/x/tools/go/packages/external.go
index 7242a0a7..4335c1eb 100644
--- a/vendor/golang.org/x/tools/go/packages/external.go
+++ b/vendor/golang.org/x/tools/go/packages/external.go
@@ -2,46 +2,85 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// This file enables an external tool to intercept package requests.
-// If the tool is present then its results are used in preference to
-// the go list command.
-
package packages
+// This file defines the protocol that enables an external "driver"
+// tool to supply package metadata in place of 'go list'.
+
import (
"bytes"
"encoding/json"
"fmt"
- exec "golang.org/x/sys/execabs"
"os"
+ "os/exec"
"strings"
)
-// The Driver Protocol
+// DriverRequest defines the schema of a request for package metadata
+// from an external driver program. The JSON-encoded DriverRequest
+// message is provided to the driver program's standard input. The
+// query patterns are provided as command-line arguments.
//
-// The driver, given the inputs to a call to Load, returns metadata about the packages specified.
-// This allows for different build systems to support go/packages by telling go/packages how the
-// packages' source is organized.
-// The driver is a binary, either specified by the GOPACKAGESDRIVER environment variable or in
-// the path as gopackagesdriver. It's given the inputs to load in its argv. See the package
-// documentation in doc.go for the full description of the patterns that need to be supported.
-// A driver receives as a JSON-serialized driverRequest struct in standard input and will
-// produce a JSON-serialized driverResponse (see definition in packages.go) in its standard output.
-
-// driverRequest is used to provide the portion of Load's Config that is needed by a driver.
-type driverRequest struct {
+// See the package documentation for an overview.
+type DriverRequest struct {
Mode LoadMode `json:"mode"`
+
// Env specifies the environment the underlying build system should be run in.
Env []string `json:"env"`
+
// BuildFlags are flags that should be passed to the underlying build system.
BuildFlags []string `json:"build_flags"`
+
// Tests specifies whether the patterns should also return test packages.
Tests bool `json:"tests"`
+
// Overlay maps file paths (relative to the driver's working directory) to the byte contents
// of overlay files.
Overlay map[string][]byte `json:"overlay"`
}
+// DriverResponse defines the schema of a response from an external
+// driver program, providing the results of a query for package
+// metadata. The driver program must write a JSON-encoded
+// DriverResponse message to its standard output.
+//
+// See the package documentation for an overview.
+type DriverResponse struct {
+ // NotHandled is returned if the request can't be handled by the current
+ // driver. If an external driver returns a response with NotHandled, the
+ // rest of the DriverResponse is ignored, and go/packages will fallback
+ // to the next driver. If go/packages is extended in the future to support
+ // lists of multiple drivers, go/packages will fall back to the next driver.
+ NotHandled bool
+
+ // Compiler and Arch are the arguments pass of types.SizesFor
+ // to get a types.Sizes to use when type checking.
+ Compiler string
+ Arch string
+
+ // Roots is the set of package IDs that make up the root packages.
+ // We have to encode this separately because when we encode a single package
+ // we cannot know if it is one of the roots as that requires knowledge of the
+ // graph it is part of.
+ Roots []string `json:",omitempty"`
+
+ // Packages is the full set of packages in the graph.
+ // The packages are not connected into a graph.
+ // The Imports if populated will be stubs that only have their ID set.
+ // Imports will be connected and then type and syntax information added in a
+ // later pass (see refine).
+ Packages []*Package
+
+ // GoVersion is the minor version number used by the driver
+ // (e.g. the go command on the PATH) when selecting .go files.
+ // Zero means unknown.
+ GoVersion int
+}
+
+// driver is the type for functions that query the build system for the
+// packages named by the patterns.
+type driver func(cfg *Config, patterns ...string) (*DriverResponse, error)
+
// findExternalDriver returns the file path of a tool that supplies
// the build system package structure, or "" if not found."
// If GOPACKAGESDRIVER is set in the environment findExternalTool returns its
@@ -64,8 +103,8 @@ func findExternalDriver(cfg *Config) driver {
return nil
}
}
- return func(cfg *Config, words ...string) (*driverResponse, error) {
- req, err := json.Marshal(driverRequest{
+ return func(cfg *Config, words ...string) (*DriverResponse, error) {
+ req, err := json.Marshal(DriverRequest{
Mode: cfg.Mode,
Env: cfg.Env,
BuildFlags: cfg.BuildFlags,
@@ -92,7 +131,7 @@ func findExternalDriver(cfg *Config) driver {
fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(cmd), stderr)
}
- var response driverResponse
+ var response DriverResponse
if err := json.Unmarshal(buf.Bytes(), &response); err != nil {
return nil, err
}
diff --git a/vendor/golang.org/x/tools/go/packages/golist.go b/vendor/golang.org/x/tools/go/packages/golist.go
index b5de9cf9..22305d9c 100644
--- a/vendor/golang.org/x/tools/go/packages/golist.go
+++ b/vendor/golang.org/x/tools/go/packages/golist.go
@@ -9,9 +9,9 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
"log"
"os"
+ "os/exec"
"path"
"path/filepath"
"reflect"
@@ -21,7 +21,6 @@ import (
"sync"
"unicode"
- exec "golang.org/x/sys/execabs"
"golang.org/x/tools/go/internal/packagesdriver"
"golang.org/x/tools/internal/gocommand"
"golang.org/x/tools/internal/packagesinternal"
@@ -36,23 +35,23 @@ type goTooOldError struct {
error
}
-// responseDeduper wraps a driverResponse, deduplicating its contents.
+// responseDeduper wraps a DriverResponse, deduplicating its contents.
type responseDeduper struct {
seenRoots map[string]bool
seenPackages map[string]*Package
- dr *driverResponse
+ dr *DriverResponse
}
func newDeduper() *responseDeduper {
return &responseDeduper{
- dr: &driverResponse{},
+ dr: &DriverResponse{},
seenRoots: map[string]bool{},
seenPackages: map[string]*Package{},
}
}
-// addAll fills in r with a driverResponse.
-func (r *responseDeduper) addAll(dr *driverResponse) {
+// addAll fills in r with a DriverResponse.
+func (r *responseDeduper) addAll(dr *DriverResponse) {
for _, pkg := range dr.Packages {
r.addPackage(pkg)
}
@@ -129,7 +128,7 @@ func (state *golistState) mustGetEnv() map[string]string {
// goListDriver uses the go list command to interpret the patterns and produce
// the build system package structure.
// See driver for more details.
-func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) {
+func goListDriver(cfg *Config, patterns ...string) (_ *DriverResponse, err error) {
// Make sure that any asynchronous go commands are killed when we return.
parentCtx := cfg.Context
if parentCtx == nil {
@@ -147,16 +146,18 @@ func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) {
}
// Fill in response.Sizes asynchronously if necessary.
- var sizeserr error
- var sizeswg sync.WaitGroup
if cfg.Mode&NeedTypesSizes != 0 || cfg.Mode&NeedTypes != 0 {
- sizeswg.Add(1)
+ errCh := make(chan error)
go func() {
compiler, arch, err := packagesdriver.GetSizesForArgsGolist(ctx, state.cfgInvocation(), cfg.gocmdRunner)
- sizeserr = err
response.dr.Compiler = compiler
response.dr.Arch = arch
- sizeswg.Done()
+ errCh <- err
+ }()
+ defer func() {
+ if sizesErr := <-errCh; sizesErr != nil {
+ err = sizesErr
+ }
}()
}
@@ -209,87 +210,10 @@ extractQueries:
}
}
- // Only use go/packages' overlay processing if we're using a Go version
- // below 1.16. Otherwise, go list handles it.
- if goVersion, err := state.getGoVersion(); err == nil && goVersion < 16 {
- modifiedPkgs, needPkgs, err := state.processGolistOverlay(response)
- if err != nil {
- return nil, err
- }
-
- var containsCandidates []string
- if len(containFiles) > 0 {
- containsCandidates = append(containsCandidates, modifiedPkgs...)
- containsCandidates = append(containsCandidates, needPkgs...)
- }
- if err := state.addNeededOverlayPackages(response, needPkgs); err != nil {
- return nil, err
- }
- // Check candidate packages for containFiles.
- if len(containFiles) > 0 {
- for _, id := range containsCandidates {
- pkg, ok := response.seenPackages[id]
- if !ok {
- response.addPackage(&Package{
- ID: id,
- Errors: []Error{{
- Kind: ListError,
- Msg: fmt.Sprintf("package %s expected but not seen", id),
- }},
- })
- continue
- }
- for _, f := range containFiles {
- for _, g := range pkg.GoFiles {
- if sameFile(f, g) {
- response.addRoot(id)
- }
- }
- }
- }
- }
- // Add root for any package that matches a pattern. This applies only to
- // packages that are modified by overlays, since they are not added as
- // roots automatically.
- for _, pattern := range restPatterns {
- match := matchPattern(pattern)
- for _, pkgID := range modifiedPkgs {
- pkg, ok := response.seenPackages[pkgID]
- if !ok {
- continue
- }
- if match(pkg.PkgPath) {
- response.addRoot(pkg.ID)
- }
- }
- }
- }
-
- sizeswg.Wait()
- if sizeserr != nil {
- return nil, sizeserr
- }
+ // (We may yet return an error due to defer.)
return response.dr, nil
}
-func (state *golistState) addNeededOverlayPackages(response *responseDeduper, pkgs []string) error {
- if len(pkgs) == 0 {
- return nil
- }
- dr, err := state.createDriverResponse(pkgs...)
- if err != nil {
- return err
- }
- for _, pkg := range dr.Packages {
- response.addPackage(pkg)
- }
- _, needPkgs, err := state.processGolistOverlay(response)
- if err != nil {
- return err
- }
- return state.addNeededOverlayPackages(response, needPkgs)
-}
-
func (state *golistState) runContainsQueries(response *responseDeduper, queries []string) error {
for _, query := range queries {
// TODO(matloob): Do only one query per directory.
@@ -341,7 +265,7 @@ func (state *golistState) runContainsQueries(response *responseDeduper, queries
// adhocPackage attempts to load or construct an ad-hoc package for a given
// query, if the original call to the driver produced inadequate results.
-func (state *golistState) adhocPackage(pattern, query string) (*driverResponse, error) {
+func (state *golistState) adhocPackage(pattern, query string) (*DriverResponse, error) {
response, err := state.createDriverResponse(query)
if err != nil {
return nil, err
@@ -432,7 +356,7 @@ func otherFiles(p *jsonPackage) [][]string {
// createDriverResponse uses the "go list" command to expand the pattern
// words and return a response for the specified packages.
-func (state *golistState) createDriverResponse(words ...string) (*driverResponse, error) {
+func (state *golistState) createDriverResponse(words ...string) (*DriverResponse, error) {
// go list uses the following identifiers in ImportPath and Imports:
//
// "p" -- importable package or main (command)
@@ -459,7 +383,7 @@ func (state *golistState) createDriverResponse(words ...string) (*driverResponse
pkgs := make(map[string]*Package)
additionalErrors := make(map[string][]Error)
// Decode the JSON and convert it to Package form.
- response := &driverResponse{
+ response := &DriverResponse{
GoVersion: goVersion,
}
for dec := json.NewDecoder(buf); dec.More(); {
@@ -1109,7 +1033,7 @@ func (state *golistState) writeOverlays() (filename string, cleanup func(), err
if len(state.cfg.Overlay) == 0 {
return "", func() {}, nil
}
- dir, err := ioutil.TempDir("", "gopackages-*")
+ dir, err := os.MkdirTemp("", "gopackages-*")
if err != nil {
return "", nil, err
}
@@ -1128,7 +1052,7 @@ func (state *golistState) writeOverlays() (filename string, cleanup func(), err
// Create a unique filename for the overlaid files, to avoid
// creating nested directories.
noSeparator := strings.Join(strings.Split(filepath.ToSlash(k), "/"), "")
- f, err := ioutil.TempFile(dir, fmt.Sprintf("*-%s", noSeparator))
+ f, err := os.CreateTemp(dir, fmt.Sprintf("*-%s", noSeparator))
if err != nil {
return "", func() {}, err
}
@@ -1146,7 +1070,7 @@ func (state *golistState) writeOverlays() (filename string, cleanup func(), err
}
// Write out the overlay file that contains the filepath mappings.
filename = filepath.Join(dir, "overlay.json")
- if err := ioutil.WriteFile(filename, b, 0665); err != nil {
+ if err := os.WriteFile(filename, b, 0665); err != nil {
return "", func() {}, err
}
return filename, cleanup, nil
diff --git a/vendor/golang.org/x/tools/go/packages/golist_overlay.go b/vendor/golang.org/x/tools/go/packages/golist_overlay.go
index 9576b472..d823c474 100644
--- a/vendor/golang.org/x/tools/go/packages/golist_overlay.go
+++ b/vendor/golang.org/x/tools/go/packages/golist_overlay.go
@@ -6,314 +6,11 @@ package packages
import (
"encoding/json"
- "fmt"
- "go/parser"
- "go/token"
- "os"
"path/filepath"
- "regexp"
- "sort"
- "strconv"
- "strings"
"golang.org/x/tools/internal/gocommand"
)
-// processGolistOverlay provides rudimentary support for adding
-// files that don't exist on disk to an overlay. The results can be
-// sometimes incorrect.
-// TODO(matloob): Handle unsupported cases, including the following:
-// - determining the correct package to add given a new import path
-func (state *golistState) processGolistOverlay(response *responseDeduper) (modifiedPkgs, needPkgs []string, err error) {
- havePkgs := make(map[string]string) // importPath -> non-test package ID
- needPkgsSet := make(map[string]bool)
- modifiedPkgsSet := make(map[string]bool)
-
- pkgOfDir := make(map[string][]*Package)
- for _, pkg := range response.dr.Packages {
- // This is an approximation of import path to id. This can be
- // wrong for tests, vendored packages, and a number of other cases.
- havePkgs[pkg.PkgPath] = pkg.ID
- dir, err := commonDir(pkg.GoFiles)
- if err != nil {
- return nil, nil, err
- }
- if dir != "" {
- pkgOfDir[dir] = append(pkgOfDir[dir], pkg)
- }
- }
-
- // If no new imports are added, it is safe to avoid loading any needPkgs.
- // Otherwise, it's hard to tell which package is actually being loaded
- // (due to vendoring) and whether any modified package will show up
- // in the transitive set of dependencies (because new imports are added,
- // potentially modifying the transitive set of dependencies).
- var overlayAddsImports bool
-
- // If both a package and its test package are created by the overlay, we
- // need the real package first. Process all non-test files before test
- // files, and make the whole process deterministic while we're at it.
- var overlayFiles []string
- for opath := range state.cfg.Overlay {
- overlayFiles = append(overlayFiles, opath)
- }
- sort.Slice(overlayFiles, func(i, j int) bool {
- iTest := strings.HasSuffix(overlayFiles[i], "_test.go")
- jTest := strings.HasSuffix(overlayFiles[j], "_test.go")
- if iTest != jTest {
- return !iTest // non-tests are before tests.
- }
- return overlayFiles[i] < overlayFiles[j]
- })
- for _, opath := range overlayFiles {
- contents := state.cfg.Overlay[opath]
- base := filepath.Base(opath)
- dir := filepath.Dir(opath)
- var pkg *Package // if opath belongs to both a package and its test variant, this will be the test variant
- var testVariantOf *Package // if opath is a test file, this is the package it is testing
- var fileExists bool
- isTestFile := strings.HasSuffix(opath, "_test.go")
- pkgName, ok := extractPackageName(opath, contents)
- if !ok {
- // Don't bother adding a file that doesn't even have a parsable package statement
- // to the overlay.
- continue
- }
- // If all the overlay files belong to a different package, change the
- // package name to that package.
- maybeFixPackageName(pkgName, isTestFile, pkgOfDir[dir])
- nextPackage:
- for _, p := range response.dr.Packages {
- if pkgName != p.Name && p.ID != "command-line-arguments" {
- continue
- }
- for _, f := range p.GoFiles {
- if !sameFile(filepath.Dir(f), dir) {
- continue
- }
- // Make sure to capture information on the package's test variant, if needed.
- if isTestFile && !hasTestFiles(p) {
- // TODO(matloob): Are there packages other than the 'production' variant
- // of a package that this can match? This shouldn't match the test main package
- // because the file is generated in another directory.
- testVariantOf = p
- continue nextPackage
- } else if !isTestFile && hasTestFiles(p) {
- // We're examining a test variant, but the overlaid file is
- // a non-test file. Because the overlay implementation
- // (currently) only adds a file to one package, skip this
- // package, so that we can add the file to the production
- // variant of the package. (https://golang.org/issue/36857
- // tracks handling overlays on both the production and test
- // variant of a package).
- continue nextPackage
- }
- if pkg != nil && p != pkg && pkg.PkgPath == p.PkgPath {
- // We have already seen the production version of the
- // for which p is a test variant.
- if hasTestFiles(p) {
- testVariantOf = pkg
- }
- }
- pkg = p
- if filepath.Base(f) == base {
- fileExists = true
- }
- }
- }
- // The overlay could have included an entirely new package or an
- // ad-hoc package. An ad-hoc package is one that we have manually
- // constructed from inadequate `go list` results for a file= query.
- // It will have the ID command-line-arguments.
- if pkg == nil || pkg.ID == "command-line-arguments" {
- // Try to find the module or gopath dir the file is contained in.
- // Then for modules, add the module opath to the beginning.
- pkgPath, ok, err := state.getPkgPath(dir)
- if err != nil {
- return nil, nil, err
- }
- if !ok {
- break
- }
- var forTest string // only set for x tests
- isXTest := strings.HasSuffix(pkgName, "_test")
- if isXTest {
- forTest = pkgPath
- pkgPath += "_test"
- }
- id := pkgPath
- if isTestFile {
- if isXTest {
- id = fmt.Sprintf("%s [%s.test]", pkgPath, forTest)
- } else {
- id = fmt.Sprintf("%s [%s.test]", pkgPath, pkgPath)
- }
- }
- if pkg != nil {
- // TODO(rstambler): We should change the package's path and ID
- // here. The only issue is that this messes with the roots.
- } else {
- // Try to reclaim a package with the same ID, if it exists in the response.
- for _, p := range response.dr.Packages {
- if reclaimPackage(p, id, opath, contents) {
- pkg = p
- break
- }
- }
- // Otherwise, create a new package.
- if pkg == nil {
- pkg = &Package{
- PkgPath: pkgPath,
- ID: id,
- Name: pkgName,
- Imports: make(map[string]*Package),
- }
- response.addPackage(pkg)
- havePkgs[pkg.PkgPath] = id
- // Add the production package's sources for a test variant.
- if isTestFile && !isXTest && testVariantOf != nil {
- pkg.GoFiles = append(pkg.GoFiles, testVariantOf.GoFiles...)
- pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, testVariantOf.CompiledGoFiles...)
- // Add the package under test and its imports to the test variant.
- pkg.forTest = testVariantOf.PkgPath
- for k, v := range testVariantOf.Imports {
- pkg.Imports[k] = &Package{ID: v.ID}
- }
- }
- if isXTest {
- pkg.forTest = forTest
- }
- }
- }
- }
- if !fileExists {
- pkg.GoFiles = append(pkg.GoFiles, opath)
- // TODO(matloob): Adding the file to CompiledGoFiles can exhibit the wrong behavior
- // if the file will be ignored due to its build tags.
- pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, opath)
- modifiedPkgsSet[pkg.ID] = true
- }
- imports, err := extractImports(opath, contents)
- if err != nil {
- // Let the parser or type checker report errors later.
- continue
- }
- for _, imp := range imports {
- // TODO(rstambler): If the package is an x test and the import has
- // a test variant, make sure to replace it.
- if _, found := pkg.Imports[imp]; found {
- continue
- }
- overlayAddsImports = true
- id, ok := havePkgs[imp]
- if !ok {
- var err error
- id, err = state.resolveImport(dir, imp)
- if err != nil {
- return nil, nil, err
- }
- }
- pkg.Imports[imp] = &Package{ID: id}
- // Add dependencies to the non-test variant version of this package as well.
- if testVariantOf != nil {
- testVariantOf.Imports[imp] = &Package{ID: id}
- }
- }
- }
-
- // toPkgPath guesses the package path given the id.
- toPkgPath := func(sourceDir, id string) (string, error) {
- if i := strings.IndexByte(id, ' '); i >= 0 {
- return state.resolveImport(sourceDir, id[:i])
- }
- return state.resolveImport(sourceDir, id)
- }
-
- // Now that new packages have been created, do another pass to determine
- // the new set of missing packages.
- for _, pkg := range response.dr.Packages {
- for _, imp := range pkg.Imports {
- if len(pkg.GoFiles) == 0 {
- return nil, nil, fmt.Errorf("cannot resolve imports for package %q with no Go files", pkg.PkgPath)
- }
- pkgPath, err := toPkgPath(filepath.Dir(pkg.GoFiles[0]), imp.ID)
- if err != nil {
- return nil, nil, err
- }
- if _, ok := havePkgs[pkgPath]; !ok {
- needPkgsSet[pkgPath] = true
- }
- }
- }
-
- if overlayAddsImports {
- needPkgs = make([]string, 0, len(needPkgsSet))
- for pkg := range needPkgsSet {
- needPkgs = append(needPkgs, pkg)
- }
- }
- modifiedPkgs = make([]string, 0, len(modifiedPkgsSet))
- for pkg := range modifiedPkgsSet {
- modifiedPkgs = append(modifiedPkgs, pkg)
- }
- return modifiedPkgs, needPkgs, err
-}
-
-// resolveImport finds the ID of a package given its import path.
-// In particular, it will find the right vendored copy when in GOPATH mode.
-func (state *golistState) resolveImport(sourceDir, importPath string) (string, error) {
- env, err := state.getEnv()
- if err != nil {
- return "", err
- }
- if env["GOMOD"] != "" {
- return importPath, nil
- }
-
- searchDir := sourceDir
- for {
- vendorDir := filepath.Join(searchDir, "vendor")
- exists, ok := state.vendorDirs[vendorDir]
- if !ok {
- info, err := os.Stat(vendorDir)
- exists = err == nil && info.IsDir()
- state.vendorDirs[vendorDir] = exists
- }
-
- if exists {
- vendoredPath := filepath.Join(vendorDir, importPath)
- if info, err := os.Stat(vendoredPath); err == nil && info.IsDir() {
- // We should probably check for .go files here, but shame on anyone who fools us.
- path, ok, err := state.getPkgPath(vendoredPath)
- if err != nil {
- return "", err
- }
- if ok {
- return path, nil
- }
- }
- }
-
- // We know we've hit the top of the filesystem when we Dir / and get /,
- // or C:\ and get C:\, etc.
- next := filepath.Dir(searchDir)
- if next == searchDir {
- break
- }
- searchDir = next
- }
- return importPath, nil
-}
-
-func hasTestFiles(p *Package) bool {
- for _, f := range p.GoFiles {
- if strings.HasSuffix(f, "_test.go") {
- return true
- }
- }
- return false
-}
-
// determineRootDirs returns a mapping from absolute directories that could
// contain code to their corresponding import path prefixes.
func (state *golistState) determineRootDirs() (map[string]string, error) {
@@ -384,192 +81,3 @@ func (state *golistState) determineRootDirsGOPATH() (map[string]string, error) {
}
return m, nil
}
-
-func extractImports(filename string, contents []byte) ([]string, error) {
- f, err := parser.ParseFile(token.NewFileSet(), filename, contents, parser.ImportsOnly) // TODO(matloob): reuse fileset?
- if err != nil {
- return nil, err
- }
- var res []string
- for _, imp := range f.Imports {
- quotedPath := imp.Path.Value
- path, err := strconv.Unquote(quotedPath)
- if err != nil {
- return nil, err
- }
- res = append(res, path)
- }
- return res, nil
-}
-
-// reclaimPackage attempts to reuse a package that failed to load in an overlay.
-//
-// If the package has errors and has no Name, GoFiles, or Imports,
-// then it's possible that it doesn't yet exist on disk.
-func reclaimPackage(pkg *Package, id string, filename string, contents []byte) bool {
- // TODO(rstambler): Check the message of the actual error?
- // It differs between $GOPATH and module mode.
- if pkg.ID != id {
- return false
- }
- if len(pkg.Errors) != 1 {
- return false
- }
- if pkg.Name != "" || pkg.ExportFile != "" {
- return false
- }
- if len(pkg.GoFiles) > 0 || len(pkg.CompiledGoFiles) > 0 || len(pkg.OtherFiles) > 0 {
- return false
- }
- if len(pkg.Imports) > 0 {
- return false
- }
- pkgName, ok := extractPackageName(filename, contents)
- if !ok {
- return false
- }
- pkg.Name = pkgName
- pkg.Errors = nil
- return true
-}
-
-func extractPackageName(filename string, contents []byte) (string, bool) {
- // TODO(rstambler): Check the message of the actual error?
- // It differs between $GOPATH and module mode.
- f, err := parser.ParseFile(token.NewFileSet(), filename, contents, parser.PackageClauseOnly) // TODO(matloob): reuse fileset?
- if err != nil {
- return "", false
- }
- return f.Name.Name, true
-}
-
-// commonDir returns the directory that all files are in, "" if files is empty,
-// or an error if they aren't in the same directory.
-func commonDir(files []string) (string, error) {
- seen := make(map[string]bool)
- for _, f := range files {
- seen[filepath.Dir(f)] = true
- }
- if len(seen) > 1 {
- return "", fmt.Errorf("files (%v) are in more than one directory: %v", files, seen)
- }
- for k := range seen {
- // seen has only one element; return it.
- return k, nil
- }
- return "", nil // no files
-}
-
-// It is possible that the files in the disk directory dir have a different package
-// name from newName, which is deduced from the overlays. If they all have a different
-// package name, and they all have the same package name, then that name becomes
-// the package name.
-// It returns true if it changes the package name, false otherwise.
-func maybeFixPackageName(newName string, isTestFile bool, pkgsOfDir []*Package) {
- names := make(map[string]int)
- for _, p := range pkgsOfDir {
- names[p.Name]++
- }
- if len(names) != 1 {
- // some files are in different packages
- return
- }
- var oldName string
- for k := range names {
- oldName = k
- }
- if newName == oldName {
- return
- }
- // We might have a case where all of the package names in the directory are
- // the same, but the overlay file is for an x test, which belongs to its
- // own package. If the x test does not yet exist on disk, we may not yet
- // have its package name on disk, but we should not rename the packages.
- //
- // We use a heuristic to determine if this file belongs to an x test:
- // The test file should have a package name whose package name has a _test
- // suffix or looks like "newName_test".
- maybeXTest := strings.HasPrefix(oldName+"_test", newName) || strings.HasSuffix(newName, "_test")
- if isTestFile && maybeXTest {
- return
- }
- for _, p := range pkgsOfDir {
- p.Name = newName
- }
-}
-
-// This function is copy-pasted from
-// https://github.com/golang/go/blob/9706f510a5e2754595d716bd64be8375997311fb/src/cmd/go/internal/search/search.go#L360.
-// It should be deleted when we remove support for overlays from go/packages.
-//
-// NOTE: This does not handle any ./... or ./ style queries, as this function
-// doesn't know the working directory.
-//
-// matchPattern(pattern)(name) reports whether
-// name matches pattern. Pattern is a limited glob
-// pattern in which '...' means 'any string' and there
-// is no other special syntax.
-// Unfortunately, there are two special cases. Quoting "go help packages":
-//
-// First, /... at the end of the pattern can match an empty string,
-// so that net/... matches both net and packages in its subdirectories, like net/http.
-// Second, any slash-separated pattern element containing a wildcard never
-// participates in a match of the "vendor" element in the path of a vendored
-// package, so that ./... does not match packages in subdirectories of
-// ./vendor or ./mycode/vendor, but ./vendor/... and ./mycode/vendor/... do.
-// Note, however, that a directory named vendor that itself contains code
-// is not a vendored package: cmd/vendor would be a command named vendor,
-// and the pattern cmd/... matches it.
-func matchPattern(pattern string) func(name string) bool {
- // Convert pattern to regular expression.
- // The strategy for the trailing /... is to nest it in an explicit ? expression.
- // The strategy for the vendor exclusion is to change the unmatchable
- // vendor strings to a disallowed code point (vendorChar) and to use
- // "(anything but that codepoint)*" as the implementation of the ... wildcard.
- // This is a bit complicated but the obvious alternative,
- // namely a hand-written search like in most shell glob matchers,
- // is too easy to make accidentally exponential.
- // Using package regexp guarantees linear-time matching.
-
- const vendorChar = "\x00"
-
- if strings.Contains(pattern, vendorChar) {
- return func(name string) bool { return false }
- }
-
- re := regexp.QuoteMeta(pattern)
- re = replaceVendor(re, vendorChar)
- switch {
- case strings.HasSuffix(re, `/`+vendorChar+`/\.\.\.`):
- re = strings.TrimSuffix(re, `/`+vendorChar+`/\.\.\.`) + `(/vendor|/` + vendorChar + `/\.\.\.)`
- case re == vendorChar+`/\.\.\.`:
- re = `(/vendor|/` + vendorChar + `/\.\.\.)`
- case strings.HasSuffix(re, `/\.\.\.`):
- re = strings.TrimSuffix(re, `/\.\.\.`) + `(/\.\.\.)?`
- }
- re = strings.ReplaceAll(re, `\.\.\.`, `[^`+vendorChar+`]*`)
-
- reg := regexp.MustCompile(`^` + re + `$`)
-
- return func(name string) bool {
- if strings.Contains(name, vendorChar) {
- return false
- }
- return reg.MatchString(replaceVendor(name, vendorChar))
- }
-}
-
-// replaceVendor returns the result of replacing
-// non-trailing vendor path elements in x with repl.
-func replaceVendor(x, repl string) string {
- if !strings.Contains(x, "vendor") {
- return x
- }
- elem := strings.Split(x, "/")
- for i := 0; i < len(elem)-1; i++ {
- if elem[i] == "vendor" {
- elem[i] = repl
- }
- }
- return strings.Join(elem, "/")
-}
diff --git a/vendor/golang.org/x/tools/go/packages/packages.go b/vendor/golang.org/x/tools/go/packages/packages.go
index 124a6fe1..3ea1b3fa 100644
--- a/vendor/golang.org/x/tools/go/packages/packages.go
+++ b/vendor/golang.org/x/tools/go/packages/packages.go
@@ -9,6 +9,7 @@ package packages
import (
"context"
"encoding/json"
+ "errors"
"fmt"
"go/ast"
"go/parser"
@@ -16,7 +17,6 @@ import (
"go/token"
"go/types"
"io"
- "io/ioutil"
"log"
"os"
"path/filepath"
@@ -25,11 +25,13 @@ import (
"sync"
"time"
+ "golang.org/x/sync/errgroup"
+
"golang.org/x/tools/go/gcexportdata"
"golang.org/x/tools/internal/gocommand"
"golang.org/x/tools/internal/packagesinternal"
- "golang.org/x/tools/internal/typeparams"
"golang.org/x/tools/internal/typesinternal"
+ "golang.org/x/tools/internal/versions"
)
// A LoadMode controls the amount of detail to return when loading.
@@ -127,9 +129,8 @@ type Config struct {
Mode LoadMode
// Context specifies the context for the load operation.
- // If the context is cancelled, the loader may stop early
- // and return an ErrCancelled error.
- // If Context is nil, the load cannot be cancelled.
+ // Cancelling the context may cause [Load] to abort and
+ // return an error.
Context context.Context
// Logf is the logger for the config.
@@ -207,50 +208,13 @@ type Config struct {
Overlay map[string][]byte
}
-// driver is the type for functions that query the build system for the
-// packages named by the patterns.
-type driver func(cfg *Config, patterns ...string) (*driverResponse, error)
-
-// driverResponse contains the results for a driver query.
-type driverResponse struct {
- // NotHandled is returned if the request can't be handled by the current
- // driver. If an external driver returns a response with NotHandled, the
- // rest of the driverResponse is ignored, and go/packages will fallback
- // to the next driver. If go/packages is extended in the future to support
- // lists of multiple drivers, go/packages will fall back to the next driver.
- NotHandled bool
-
- // Compiler and Arch are the arguments pass of types.SizesFor
- // to get a types.Sizes to use when type checking.
- Compiler string
- Arch string
-
- // Roots is the set of package IDs that make up the root packages.
- // We have to encode this separately because when we encode a single package
- // we cannot know if it is one of the roots as that requires knowledge of the
- // graph it is part of.
- Roots []string `json:",omitempty"`
-
- // Packages is the full set of packages in the graph.
- // The packages are not connected into a graph.
- // The Imports if populated will be stubs that only have their ID set.
- // Imports will be connected and then type and syntax information added in a
- // later pass (see refine).
- Packages []*Package
-
- // GoVersion is the minor version number used by the driver
- // (e.g. the go command on the PATH) when selecting .go files.
- // Zero means unknown.
- GoVersion int
-}
-
// Load loads and returns the Go packages named by the given patterns.
//
// Config specifies loading options;
// nil behaves the same as an empty Config.
//
-// Load returns an error if any of the patterns was invalid
-// as defined by the underlying build system.
+// If any of the patterns was invalid as defined by the
+// underlying build system, Load returns an error.
// It may return an empty list of packages without an error,
// for instance for an empty expansion of a valid wildcard.
// Errors associated with a particular package are recorded in the
@@ -259,31 +223,145 @@ type driverResponse struct {
// proceeding with further analysis. The PrintErrors function is
// provided for convenient display of all errors.
func Load(cfg *Config, patterns ...string) ([]*Package, error) {
- l := newLoader(cfg)
- response, err := defaultDriver(&l.Config, patterns...)
+ ld := newLoader(cfg)
+ response, external, err := defaultDriver(&ld.Config, patterns...)
if err != nil {
return nil, err
}
- l.sizes = types.SizesFor(response.Compiler, response.Arch)
- return l.refine(response)
+
+ ld.sizes = types.SizesFor(response.Compiler, response.Arch)
+ if ld.sizes == nil && ld.Config.Mode&(NeedTypes|NeedTypesSizes|NeedTypesInfo) != 0 {
+ // Type size information is needed but unavailable.
+ if external {
+ // An external driver may fail to populate the Compiler/GOARCH fields,
+ // especially since they are relatively new (see #63700).
+ // Provide a sensible fallback in this case.
+ ld.sizes = types.SizesFor("gc", runtime.GOARCH)
+ if ld.sizes == nil { // gccgo-only arch
+ ld.sizes = types.SizesFor("gc", "amd64")
+ }
+ } else {
+ // Go list should never fail to deliver accurate size information.
+ // Reject the whole Load since the error is the same for every package.
+ return nil, fmt.Errorf("can't determine type sizes for compiler %q on GOARCH %q",
+ response.Compiler, response.Arch)
+ }
+ }
+
+ return ld.refine(response)
}
// defaultDriver is a driver that implements go/packages' fallback behavior.
// It will try to request to an external driver, if one exists. If there's
// no external driver, or the driver returns a response with NotHandled set,
// defaultDriver will fall back to the go list driver.
-func defaultDriver(cfg *Config, patterns ...string) (*driverResponse, error) {
- driver := findExternalDriver(cfg)
- if driver == nil {
- driver = goListDriver
+// The boolean result indicates that an external driver handled the request.
+func defaultDriver(cfg *Config, patterns ...string) (*DriverResponse, bool, error) {
+ const (
+ // windowsArgMax specifies the maximum command line length for
+ // the Windows' CreateProcess function.
+ windowsArgMax = 32767
+ // maxEnvSize is a very rough estimation of the maximum environment
+ // size of a user.
+ maxEnvSize = 16384
+ // safeArgMax specifies the maximum safe command line length to use
+ // by the underlying driver excl. the environment. We choose the Windows'
+ // ARG_MAX as the starting point because it's one of the lowest ARG_MAX
+ // constants out of the different supported platforms,
+ // e.g., https://www.in-ulm.de/~mascheck/various/argmax/#results.
+ safeArgMax = windowsArgMax - maxEnvSize
+ )
+ chunks, err := splitIntoChunks(patterns, safeArgMax)
+ if err != nil {
+ return nil, false, err
}
- response, err := driver(cfg, patterns...)
+
+ if driver := findExternalDriver(cfg); driver != nil {
+ response, err := callDriverOnChunks(driver, cfg, chunks)
+ if err != nil {
+ return nil, false, err
+ } else if !response.NotHandled {
+ return response, true, nil
+ }
+ // (fall through)
+ }
+
+ response, err := callDriverOnChunks(goListDriver, cfg, chunks)
if err != nil {
- return response, err
- } else if response.NotHandled {
- return goListDriver(cfg, patterns...)
+ return nil, false, err
}
- return response, nil
+ return response, false, err
+}
+
+// splitIntoChunks chunks the slice so that the total number of characters
+// in a chunk is no longer than argMax.
+func splitIntoChunks(patterns []string, argMax int) ([][]string, error) {
+ if argMax <= 0 {
+ return nil, errors.New("failed to split patterns into chunks, negative safe argMax value")
+ }
+ var chunks [][]string
+ charsInChunk := 0
+ nextChunkStart := 0
+ for i, v := range patterns {
+ vChars := len(v)
+ if vChars > argMax {
+ // a single pattern is longer than the maximum safe ARG_MAX, hardly should happen
+ return nil, errors.New("failed to split patterns into chunks, a pattern is too long")
+ }
+ charsInChunk += vChars + 1 // +1 is for a whitespace between patterns that has to be counted too
+ if charsInChunk > argMax {
+ chunks = append(chunks, patterns[nextChunkStart:i])
+ nextChunkStart = i
+ charsInChunk = vChars
+ }
+ }
+ // add the last chunk
+ if nextChunkStart < len(patterns) {
+ chunks = append(chunks, patterns[nextChunkStart:])
+ }
+ return chunks, nil
+}
+
+func callDriverOnChunks(driver driver, cfg *Config, chunks [][]string) (*DriverResponse, error) {
+ if len(chunks) == 0 {
+ return driver(cfg)
+ }
+ responses := make([]*DriverResponse, len(chunks))
+ errNotHandled := errors.New("driver returned NotHandled")
+ var g errgroup.Group
+ for i, chunk := range chunks {
+ i := i
+ chunk := chunk
+ g.Go(func() (err error) {
+ responses[i], err = driver(cfg, chunk...)
+ if responses[i] != nil && responses[i].NotHandled {
+ err = errNotHandled
+ }
+ return err
+ })
+ }
+ if err := g.Wait(); err != nil {
+ if errors.Is(err, errNotHandled) {
+ return &DriverResponse{NotHandled: true}, nil
+ }
+ return nil, err
+ }
+ return mergeResponses(responses...), nil
+}
+
+func mergeResponses(responses ...*DriverResponse) *DriverResponse {
+ if len(responses) == 0 {
+ return nil
+ }
+ response := newDeduper()
+ response.dr.NotHandled = false
+ response.dr.Compiler = responses[0].Compiler
+ response.dr.Arch = responses[0].Arch
+ response.dr.GoVersion = responses[0].GoVersion
+ for _, v := range responses {
+ response.addAll(v)
+ }
+ return response.dr
}
// A Package describes a loaded Go package.
@@ -349,6 +427,10 @@ type Package struct {
// The NeedTypes LoadMode bit sets this field for packages matching the
// patterns; type information for dependencies may be missing or incomplete,
// unless NeedDeps and NeedImports are also set.
+ //
+ // Each call to [Load] returns a consistent set of type
+ // symbols, as defined by the comment at [types.Identical].
+ // Avoid mixing type information from two or more calls to [Load].
Types *types.Package
// Fset provides position information for Types, TypesInfo, and Syntax.
@@ -412,12 +494,6 @@ func init() {
packagesinternal.GetDepsErrors = func(p interface{}) []*packagesinternal.PackageError {
return p.(*Package).depsErrors
}
- packagesinternal.GetGoCmdRunner = func(config interface{}) *gocommand.Runner {
- return config.(*Config).gocmdRunner
- }
- packagesinternal.SetGoCmdRunner = func(config interface{}, runner *gocommand.Runner) {
- config.(*Config).gocmdRunner = runner
- }
packagesinternal.SetModFile = func(config interface{}, value string) {
config.(*Config).modFile = value
}
@@ -554,7 +630,7 @@ type loaderPackage struct {
type loader struct {
pkgs map[string]*loaderPackage
Config
- sizes types.Sizes
+ sizes types.Sizes // non-nil if needed by mode
parseCache map[string]*parseValue
parseCacheMu sync.Mutex
exportMu sync.Mutex // enforces mutual exclusion of exportdata operations
@@ -634,7 +710,7 @@ func newLoader(cfg *Config) *loader {
// refine connects the supplied packages into a graph and then adds type
// and syntax information as requested by the LoadMode.
-func (ld *loader) refine(response *driverResponse) ([]*Package, error) {
+func (ld *loader) refine(response *DriverResponse) ([]*Package, error) {
roots := response.Roots
rootMap := make(map[string]int, len(roots))
for i, root := range roots {
@@ -679,39 +755,38 @@ func (ld *loader) refine(response *driverResponse) ([]*Package, error) {
}
}
- // Materialize the import graph.
-
- const (
- white = 0 // new
- grey = 1 // in progress
- black = 2 // complete
- )
-
- // visit traverses the import graph, depth-first,
- // and materializes the graph as Packages.Imports.
- //
- // Valid imports are saved in the Packages.Import map.
- // Invalid imports (cycles and missing nodes) are saved in the importErrors map.
- // Thus, even in the presence of both kinds of errors, the Import graph remains a DAG.
- //
- // visit returns whether the package needs src or has a transitive
- // dependency on a package that does. These are the only packages
- // for which we load source code.
- var stack []*loaderPackage
- var visit func(lpkg *loaderPackage) bool
- var srcPkgs []*loaderPackage
- visit = func(lpkg *loaderPackage) bool {
- switch lpkg.color {
- case black:
- return lpkg.needsrc
- case grey:
- panic("internal error: grey node")
- }
- lpkg.color = grey
- stack = append(stack, lpkg) // push
- stubs := lpkg.Imports // the structure form has only stubs with the ID in the Imports
- // If NeedImports isn't set, the imports fields will all be zeroed out.
- if ld.Mode&NeedImports != 0 {
+ if ld.Mode&NeedImports != 0 {
+ // Materialize the import graph.
+
+ const (
+ white = 0 // new
+ grey = 1 // in progress
+ black = 2 // complete
+ )
+
+ // visit traverses the import graph, depth-first,
+ // and materializes the graph as Packages.Imports.
+ //
+ // Valid imports are saved in the Packages.Import map.
+ // Invalid imports (cycles and missing nodes) are saved in the importErrors map.
+ // Thus, even in the presence of both kinds of errors,
+ // the Import graph remains a DAG.
+ //
+ // visit returns whether the package needs src or has a transitive
+ // dependency on a package that does. These are the only packages
+ // for which we load source code.
+ var stack []*loaderPackage
+ var visit func(lpkg *loaderPackage) bool
+ visit = func(lpkg *loaderPackage) bool {
+ switch lpkg.color {
+ case black:
+ return lpkg.needsrc
+ case grey:
+ panic("internal error: grey node")
+ }
+ lpkg.color = grey
+ stack = append(stack, lpkg) // push
+ stubs := lpkg.Imports // the structure form has only stubs with the ID in the Imports
lpkg.Imports = make(map[string]*Package, len(stubs))
for importPath, ipkg := range stubs {
var importErr error
@@ -735,40 +810,39 @@ func (ld *loader) refine(response *driverResponse) ([]*Package, error) {
}
lpkg.Imports[importPath] = imp.Package
}
- }
- if lpkg.needsrc {
- srcPkgs = append(srcPkgs, lpkg)
- }
- if ld.Mode&NeedTypesSizes != 0 {
- lpkg.TypesSizes = ld.sizes
- }
- stack = stack[:len(stack)-1] // pop
- lpkg.color = black
- return lpkg.needsrc
- }
+ // Complete type information is required for the
+ // immediate dependencies of each source package.
+ if lpkg.needsrc && ld.Mode&NeedTypes != 0 {
+ for _, ipkg := range lpkg.Imports {
+ ld.pkgs[ipkg.ID].needtypes = true
+ }
+ }
- if ld.Mode&NeedImports == 0 {
- // We do this to drop the stub import packages that we are not even going to try to resolve.
- for _, lpkg := range initial {
- lpkg.Imports = nil
+ // NeedTypeSizes causes TypeSizes to be set even
+ // on packages for which types aren't needed.
+ if ld.Mode&NeedTypesSizes != 0 {
+ lpkg.TypesSizes = ld.sizes
+ }
+ stack = stack[:len(stack)-1] // pop
+ lpkg.color = black
+
+ return lpkg.needsrc
}
- } else {
+
// For each initial package, create its import DAG.
for _, lpkg := range initial {
visit(lpkg)
}
- }
- if ld.Mode&NeedImports != 0 && ld.Mode&NeedTypes != 0 {
- for _, lpkg := range srcPkgs {
- // Complete type information is required for the
- // immediate dependencies of each source package.
- for _, ipkg := range lpkg.Imports {
- imp := ld.pkgs[ipkg.ID]
- imp.needtypes = true
- }
+
+ } else {
+ // !NeedImports: drop the stub (ID-only) import packages
+ // that we are not even going to try to resolve.
+ for _, lpkg := range initial {
+ lpkg.Imports = nil
}
}
+
// Load type data and syntax if needed, starting at
// the initial packages (roots of the import DAG).
if ld.Mode&NeedTypes != 0 || ld.Mode&NeedSyntax != 0 {
@@ -783,6 +857,12 @@ func (ld *loader) refine(response *driverResponse) ([]*Package, error) {
wg.Wait()
}
+ // If the context is done, return its error and
+ // throw out [likely] incomplete packages.
+ if err := ld.Context.Err(); err != nil {
+ return nil, err
+ }
+
result := make([]*Package, len(initial))
for i, lpkg := range initial {
result[i] = lpkg.Package
@@ -878,6 +958,14 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
lpkg.Types = types.NewPackage(lpkg.PkgPath, lpkg.Name)
lpkg.Fset = ld.Fset
+ // Start shutting down if the context is done and do not load
+ // source or export data files.
+ // Packages that import this one will have ld.Context.Err() != nil.
+ // ld.Context.Err() will be returned later by refine.
+ if ld.Context.Err() != nil {
+ return
+ }
+
// Subtle: we populate all Types fields with an empty Package
// before loading export data so that export data processing
// never has to create a types.Package for an indirect dependency,
@@ -997,15 +1085,23 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
return
}
+ // Start shutting down if the context is done and do not type check.
+ // Packages that import this one will have ld.Context.Err() != nil.
+ // ld.Context.Err() will be returned later by refine.
+ if ld.Context.Err() != nil {
+ return
+ }
+
lpkg.TypesInfo = &types.Info{
Types: make(map[ast.Expr]types.TypeAndValue),
Defs: make(map[*ast.Ident]types.Object),
Uses: make(map[*ast.Ident]types.Object),
Implicits: make(map[ast.Node]types.Object),
+ Instances: make(map[*ast.Ident]types.Instance),
Scopes: make(map[ast.Node]*types.Scope),
Selections: make(map[*ast.SelectorExpr]*types.Selection),
}
- typeparams.InitInstanceInfo(lpkg.TypesInfo)
+ versions.InitFileVersions(lpkg.TypesInfo)
lpkg.TypesSizes = ld.sizes
importer := importerFunc(func(path string) (*types.Package, error) {
@@ -1043,10 +1139,10 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
IgnoreFuncBodies: ld.Mode&NeedDeps == 0 && !lpkg.initial,
Error: appendError,
- Sizes: ld.sizes,
+ Sizes: ld.sizes, // may be nil
}
if lpkg.Module != nil && lpkg.Module.GoVersion != "" {
- typesinternal.SetGoVersion(tc, "go"+lpkg.Module.GoVersion)
+ tc.GoVersion = "go" + lpkg.Module.GoVersion
}
if (ld.Mode & typecheckCgo) != 0 {
if !typesinternal.SetUsesCgo(tc) {
@@ -1057,10 +1153,24 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
return
}
}
- types.NewChecker(tc, ld.Fset, lpkg.Types, lpkg.TypesInfo).Files(lpkg.Syntax)
+ typErr := types.NewChecker(tc, ld.Fset, lpkg.Types, lpkg.TypesInfo).Files(lpkg.Syntax)
lpkg.importErrors = nil // no longer needed
+ // In go/types go1.21 and go1.22, Checker.Files failed fast with a
+ // a "too new" error, without calling tc.Error and without
+ // proceeding to type-check the package (#66525).
+ // We rely on the runtimeVersion error to give the suggested remedy.
+ if typErr != nil && len(lpkg.Errors) == 0 && len(lpkg.Syntax) > 0 {
+ if msg := typErr.Error(); strings.HasPrefix(msg, "package requires newer Go version") {
+ appendError(types.Error{
+ Fset: ld.Fset,
+ Pos: lpkg.Syntax[0].Package,
+ Msg: msg,
+ })
+ }
+ }
+
// If !Cgo, the type-checker uses FakeImportC mode, so
// it doesn't invoke the importer for import "C",
// nor report an error for the import,
@@ -1082,6 +1192,12 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
}
}
+ // If types.Checker.Files had an error that was unreported,
+ // make sure to report the unknown error so the package is illTyped.
+ if typErr != nil && len(lpkg.Errors) == 0 {
+ appendError(typErr)
+ }
+
// Record accumulated errors.
illTyped := len(lpkg.Errors) > 0
if !illTyped {
@@ -1127,7 +1243,7 @@ func (ld *loader) parseFile(filename string) (*ast.File, error) {
var err error
if src == nil {
ioLimit <- true // wait
- src, err = ioutil.ReadFile(filename)
+ src, err = os.ReadFile(filename)
<-ioLimit // signal
}
if err != nil {
@@ -1153,11 +1269,6 @@ func (ld *loader) parseFiles(filenames []string) ([]*ast.File, []error) {
parsed := make([]*ast.File, n)
errors := make([]error, n)
for i, file := range filenames {
- if ld.Config.Context.Err() != nil {
- parsed[i] = nil
- errors[i] = ld.Config.Context.Err()
- continue
- }
wg.Add(1)
go func(i int, filename string) {
parsed[i], errors[i] = ld.parseFile(filename)
diff --git a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
index fa5834ba..a2386c34 100644
--- a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
+++ b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
@@ -26,15 +26,15 @@ package objectpath
import (
"fmt"
"go/types"
- "sort"
"strconv"
"strings"
- _ "unsafe"
- "golang.org/x/tools/internal/typeparams"
+ "golang.org/x/tools/internal/aliases"
"golang.org/x/tools/internal/typesinternal"
)
+// TODO(adonovan): think about generic aliases.
+
// A Path is an opaque name that identifies a types.Object
// relative to its package. Conceptually, the name consists of a
// sequence of destructuring operations applied to the package scope
@@ -123,20 +123,7 @@ func For(obj types.Object) (Path, error) {
// An Encoder amortizes the cost of encoding the paths of multiple objects.
// The zero value of an Encoder is ready to use.
type Encoder struct {
- scopeMemo map[*types.Scope][]types.Object // memoization of scopeObjects
- namedMethodsMemo map[*types.Named][]*types.Func // memoization of namedMethods()
- skipMethodSorting bool
-}
-
-// Expose back doors so that gopls can avoid method sorting, which can dominate
-// analysis on certain repositories.
-//
-// TODO(golang/go#61443): remove this.
-func init() {
- typesinternal.SkipEncoderMethodSorting = func(enc interface{}) {
- enc.(*Encoder).skipMethodSorting = true
- }
- typesinternal.ObjectpathObject = object
+ scopeMemo map[*types.Scope][]types.Object // memoization of scopeObjects
}
// For returns the path to an object relative to its package,
@@ -239,7 +226,7 @@ func (enc *Encoder) For(obj types.Object) (Path, error) {
// Reject obviously non-viable cases.
switch obj := obj.(type) {
case *types.TypeName:
- if _, ok := obj.Type().(*typeparams.TypeParam); !ok {
+ if _, ok := aliases.Unalias(obj.Type()).(*types.TypeParam); !ok {
// With the exception of type parameters, only package-level type names
// have a path.
return "", fmt.Errorf("no path for %v", obj)
@@ -299,7 +286,7 @@ func (enc *Encoder) For(obj types.Object) (Path, error) {
}
} else {
if named, _ := T.(*types.Named); named != nil {
- if r := findTypeParam(obj, typeparams.ForNamed(named), path, nil); r != nil {
+ if r := findTypeParam(obj, named.TypeParams(), path, nil); r != nil {
// generic named type
return Path(r), nil
}
@@ -326,33 +313,20 @@ func (enc *Encoder) For(obj types.Object) (Path, error) {
}
// Inspect declared methods of defined types.
- if T, ok := o.Type().(*types.Named); ok {
+ if T, ok := aliases.Unalias(o.Type()).(*types.Named); ok {
path = append(path, opType)
- if !enc.skipMethodSorting {
- // Note that method index here is always with respect
- // to canonical ordering of methods, regardless of how
- // they appear in the underlying type.
- for i, m := range enc.namedMethods(T) {
- path2 := appendOpArg(path, opMethod, i)
- if m == obj {
- return Path(path2), nil // found declared method
- }
- if r := find(obj, m.Type(), append(path2, opType), nil); r != nil {
- return Path(r), nil
- }
+ // The method index here is always with respect
+ // to the underlying go/types data structures,
+ // which ultimately derives from source order
+ // and must be preserved by export data.
+ for i := 0; i < T.NumMethods(); i++ {
+ m := T.Method(i)
+ path2 := appendOpArg(path, opMethod, i)
+ if m == obj {
+ return Path(path2), nil // found declared method
}
- } else {
- // This branch must match the logic in the branch above, using go/types
- // APIs without sorting.
- for i := 0; i < T.NumMethods(); i++ {
- m := T.Method(i)
- path2 := appendOpArg(path, opMethod, i)
- if m == obj {
- return Path(path2), nil // found declared method
- }
- if r := find(obj, m.Type(), append(path2, opType), nil); r != nil {
- return Path(r), nil
- }
+ if r := find(obj, m.Type(), append(path2, opType), nil); r != nil {
+ return Path(r), nil
}
}
}
@@ -420,17 +394,12 @@ func (enc *Encoder) concreteMethod(meth *types.Func) (Path, bool) {
// of objectpath will only be giving us origin methods, anyway, as referring
// to instantiated methods is usually not useful.
- if typeparams.OriginMethod(meth) != meth {
+ if meth.Origin() != meth {
return "", false
}
- recvT := meth.Type().(*types.Signature).Recv().Type()
- if ptr, ok := recvT.(*types.Pointer); ok {
- recvT = ptr.Elem()
- }
-
- named, ok := recvT.(*types.Named)
- if !ok {
+ _, named := typesinternal.ReceiverNamed(meth.Type().(*types.Signature).Recv())
+ if named == nil {
return "", false
}
@@ -448,22 +417,13 @@ func (enc *Encoder) concreteMethod(meth *types.Func) (Path, bool) {
path = append(path, name...)
path = append(path, opType)
- if !enc.skipMethodSorting {
- for i, m := range enc.namedMethods(named) {
- if m == meth {
- path = appendOpArg(path, opMethod, i)
- return Path(path), true
- }
- }
- } else {
- // This branch must match the logic of the branch above, using go/types
- // APIs without sorting.
- for i := 0; i < named.NumMethods(); i++ {
- m := named.Method(i)
- if m == meth {
- path = appendOpArg(path, opMethod, i)
- return Path(path), true
- }
+ // Method indices are w.r.t. the go/types data structures,
+ // ultimately deriving from source order,
+ // which is preserved by export data.
+ for i := 0; i < named.NumMethods(); i++ {
+ if named.Method(i) == meth {
+ path = appendOpArg(path, opMethod, i)
+ return Path(path), true
}
}
@@ -482,6 +442,8 @@ func (enc *Encoder) concreteMethod(meth *types.Func) (Path, bool) {
// nil, it will be allocated as necessary.
func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName]bool) []byte {
switch T := T.(type) {
+ case *aliases.Alias:
+ return find(obj, aliases.Unalias(T), path, seen)
case *types.Basic, *types.Named:
// Named types belonging to pkg were handled already,
// so T must belong to another package. No path.
@@ -500,7 +462,7 @@ func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName]
}
return find(obj, T.Elem(), append(path, opElem), seen)
case *types.Signature:
- if r := findTypeParam(obj, typeparams.ForSignature(T), path, seen); r != nil {
+ if r := findTypeParam(obj, T.TypeParams(), path, seen); r != nil {
return r
}
if r := find(obj, T.Params(), append(path, opParams), seen); r != nil {
@@ -543,7 +505,7 @@ func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName]
}
}
return nil
- case *typeparams.TypeParam:
+ case *types.TypeParam:
name := T.Obj()
if name == obj {
return append(path, opObj)
@@ -563,7 +525,7 @@ func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName]
panic(T)
}
-func findTypeParam(obj types.Object, list *typeparams.TypeParamList, path []byte, seen map[*types.TypeName]bool) []byte {
+func findTypeParam(obj types.Object, list *types.TypeParamList, path []byte, seen map[*types.TypeName]bool) []byte {
for i := 0; i < list.Len(); i++ {
tparam := list.At(i)
path2 := appendOpArg(path, opTypeParam, i)
@@ -576,12 +538,7 @@ func findTypeParam(obj types.Object, list *typeparams.TypeParamList, path []byte
// Object returns the object denoted by path p within the package pkg.
func Object(pkg *types.Package, p Path) (types.Object, error) {
- return object(pkg, string(p), false)
-}
-
-// Note: the skipMethodSorting parameter must match the value of
-// Encoder.skipMethodSorting used during encoding.
-func object(pkg *types.Package, pathstr string, skipMethodSorting bool) (types.Object, error) {
+ pathstr := string(p)
if pathstr == "" {
return nil, fmt.Errorf("empty path")
}
@@ -605,7 +562,7 @@ func object(pkg *types.Package, pathstr string, skipMethodSorting bool) (types.O
}
// abstraction of *types.{Named,Signature}
type hasTypeParams interface {
- TypeParams() *typeparams.TypeParamList
+ TypeParams() *types.TypeParamList
}
// abstraction of *types.{Named,TypeParam}
type hasObj interface {
@@ -659,6 +616,7 @@ func object(pkg *types.Package, pathstr string, skipMethodSorting bool) (types.O
// Inv: t != nil, obj == nil
+ t = aliases.Unalias(t)
switch code {
case opElem:
hasElem, ok := t.(hasElem) // Pointer, Slice, Array, Chan, Map
@@ -707,7 +665,7 @@ func object(pkg *types.Package, pathstr string, skipMethodSorting bool) (types.O
t = tparams.At(index)
case opConstraint:
- tparam, ok := t.(*typeparams.TypeParam)
+ tparam, ok := t.(*types.TypeParam)
if !ok {
return nil, fmt.Errorf("cannot apply %q to %s (got %T, want type parameter)", code, t, t)
}
@@ -747,12 +705,7 @@ func object(pkg *types.Package, pathstr string, skipMethodSorting bool) (types.O
if index >= t.NumMethods() {
return nil, fmt.Errorf("method index %d out of range [0-%d)", index, t.NumMethods())
}
- if skipMethodSorting {
- obj = t.Method(index)
- } else {
- methods := namedMethods(t) // (unmemoized)
- obj = methods[index] // Id-ordered
- }
+ obj = t.Method(index)
default:
return nil, fmt.Errorf("cannot apply %q to %s (got %T, want interface or named)", code, t, t)
@@ -779,33 +732,6 @@ func object(pkg *types.Package, pathstr string, skipMethodSorting bool) (types.O
return obj, nil // success
}
-// namedMethods returns the methods of a Named type in ascending Id order.
-func namedMethods(named *types.Named) []*types.Func {
- methods := make([]*types.Func, named.NumMethods())
- for i := range methods {
- methods[i] = named.Method(i)
- }
- sort.Slice(methods, func(i, j int) bool {
- return methods[i].Id() < methods[j].Id()
- })
- return methods
-}
-
-// namedMethods is a memoization of the namedMethods function. Callers must not modify the result.
-func (enc *Encoder) namedMethods(named *types.Named) []*types.Func {
- m := enc.namedMethodsMemo
- if m == nil {
- m = make(map[*types.Named][]*types.Func)
- enc.namedMethodsMemo = m
- }
- methods, ok := m[named]
- if !ok {
- methods = namedMethods(named) // allocates and sorts
- m[named] = methods
- }
- return methods
-}
-
// scopeObjects is a memoization of scope objects.
// Callers must not modify the result.
func (enc *Encoder) scopeObjects(scope *types.Scope) []types.Object {
diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases.go b/vendor/golang.org/x/tools/internal/aliases/aliases.go
new file mode 100644
index 00000000..c24c2eee
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/aliases/aliases.go
@@ -0,0 +1,32 @@
+// Copyright 2024 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 aliases
+
+import (
+ "go/token"
+ "go/types"
+)
+
+// Package aliases defines backward compatible shims
+// for the types.Alias type representation added in 1.22.
+// This defines placeholders for x/tools until 1.26.
+
+// NewAlias creates a new TypeName in Package pkg that
+// is an alias for the type rhs.
+//
+// The enabled parameter determines whether the resulting [TypeName]'s
+// type is an [types.Alias]. Its value must be the result of a call to
+// [Enabled], which computes the effective value of
+// GODEBUG=gotypesalias=... by invoking the type checker. The Enabled
+// function is expensive and should be called once per task (e.g.
+// package import), not once per call to NewAlias.
+func NewAlias(enabled bool, pos token.Pos, pkg *types.Package, name string, rhs types.Type) *types.TypeName {
+ if enabled {
+ tname := types.NewTypeName(pos, pkg, name, nil)
+ newAlias(tname, rhs)
+ return tname
+ }
+ return types.NewTypeName(pos, pkg, name, rhs)
+}
diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go b/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go
new file mode 100644
index 00000000..c027b9f3
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go
@@ -0,0 +1,31 @@
+// Copyright 2024 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.
+
+//go:build !go1.22
+// +build !go1.22
+
+package aliases
+
+import (
+ "go/types"
+)
+
+// Alias is a placeholder for a go/types.Alias for <=1.21.
+// It will never be created by go/types.
+type Alias struct{}
+
+func (*Alias) String() string { panic("unreachable") }
+func (*Alias) Underlying() types.Type { panic("unreachable") }
+func (*Alias) Obj() *types.TypeName { panic("unreachable") }
+func Rhs(alias *Alias) types.Type { panic("unreachable") }
+
+// Unalias returns the type t for go <=1.21.
+func Unalias(t types.Type) types.Type { return t }
+
+func newAlias(name *types.TypeName, rhs types.Type) *Alias { panic("unreachable") }
+
+// Enabled reports whether [NewAlias] should create [types.Alias] types.
+//
+// Before go1.22, this function always returns false.
+func Enabled() bool { return false }
diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go b/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go
new file mode 100644
index 00000000..b3299548
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go
@@ -0,0 +1,63 @@
+// Copyright 2024 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.
+
+//go:build go1.22
+// +build go1.22
+
+package aliases
+
+import (
+ "go/ast"
+ "go/parser"
+ "go/token"
+ "go/types"
+)
+
+// Alias is an alias of types.Alias.
+type Alias = types.Alias
+
+// Rhs returns the type on the right-hand side of the alias declaration.
+func Rhs(alias *Alias) types.Type {
+ if alias, ok := any(alias).(interface{ Rhs() types.Type }); ok {
+ return alias.Rhs() // go1.23+
+ }
+
+ // go1.22's Alias didn't have the Rhs method,
+ // so Unalias is the best we can do.
+ return Unalias(alias)
+}
+
+// Unalias is a wrapper of types.Unalias.
+func Unalias(t types.Type) types.Type { return types.Unalias(t) }
+
+// newAlias is an internal alias around types.NewAlias.
+// Direct usage is discouraged as the moment.
+// Try to use NewAlias instead.
+func newAlias(tname *types.TypeName, rhs types.Type) *Alias {
+ a := types.NewAlias(tname, rhs)
+ // TODO(go.dev/issue/65455): Remove kludgy workaround to set a.actual as a side-effect.
+ Unalias(a)
+ return a
+}
+
+// Enabled reports whether [NewAlias] should create [types.Alias] types.
+//
+// This function is expensive! Call it sparingly.
+func Enabled() bool {
+ // The only reliable way to compute the answer is to invoke go/types.
+ // We don't parse the GODEBUG environment variable, because
+ // (a) it's tricky to do so in a manner that is consistent
+ // with the godebug package; in particular, a simple
+ // substring check is not good enough. The value is a
+ // rightmost-wins list of options. But more importantly:
+ // (b) it is impossible to detect changes to the effective
+ // setting caused by os.Setenv("GODEBUG"), as happens in
+ // many tests. Therefore any attempt to cache the result
+ // is just incorrect.
+ fset := token.NewFileSet()
+ f, _ := parser.ParseFile(fset, "a.go", "package p; type A = int", 0)
+ pkg, _ := new(types.Config).Check("p", fset, []*ast.File{f}, nil)
+ _, enabled := pkg.Scope().Lookup("A").Type().(*types.Alias)
+ return enabled
+}
diff --git a/vendor/golang.org/x/tools/internal/event/keys/util.go b/vendor/golang.org/x/tools/internal/event/keys/util.go
new file mode 100644
index 00000000..c0e8e731
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/event/keys/util.go
@@ -0,0 +1,21 @@
+// Copyright 2023 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 keys
+
+import (
+ "sort"
+ "strings"
+)
+
+// Join returns a canonical join of the keys in S:
+// a sorted comma-separated string list.
+func Join[S ~[]T, T ~string](s S) string {
+ strs := make([]string, 0, len(s))
+ for _, v := range s {
+ strs = append(strs, string(v))
+ }
+ sort.Strings(strs)
+ return strings.Join(strs, ",")
+}
diff --git a/vendor/golang.org/x/tools/internal/event/tag/tag.go b/vendor/golang.org/x/tools/internal/event/tag/tag.go
deleted file mode 100644
index 581b26c2..00000000
--- a/vendor/golang.org/x/tools/internal/event/tag/tag.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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 tag provides the labels used for telemetry throughout gopls.
-package tag
-
-import (
- "golang.org/x/tools/internal/event/keys"
-)
-
-var (
- // create the label keys we use
- Method = keys.NewString("method", "")
- StatusCode = keys.NewString("status.code", "")
- StatusMessage = keys.NewString("status.message", "")
- RPCID = keys.NewString("id", "")
- RPCDirection = keys.NewString("direction", "")
- File = keys.NewString("file", "")
- Directory = keys.New("directory", "")
- URI = keys.New("URI", "")
- Package = keys.NewString("package", "") // sorted comma-separated list of Package IDs
- PackagePath = keys.NewString("package_path", "")
- Query = keys.New("query", "")
- Snapshot = keys.NewUInt64("snapshot", "")
- Operation = keys.NewString("operation", "")
-
- Position = keys.New("position", "")
- Category = keys.NewString("category", "")
- PackageCount = keys.NewInt("packages", "")
- Files = keys.New("files", "")
- Port = keys.NewInt("port", "")
- Type = keys.New("type", "")
- HoverKind = keys.NewString("hoverkind", "")
-
- NewServer = keys.NewString("new_server", "A new server was added")
- EndServer = keys.NewString("end_server", "A server was shut down")
-
- ServerID = keys.NewString("server", "The server ID an event is related to")
- Logfile = keys.NewString("logfile", "")
- DebugAddress = keys.NewString("debug_address", "")
- GoplsPath = keys.NewString("gopls_path", "")
- ClientID = keys.NewString("client_id", "")
-
- Level = keys.NewInt("level", "The logging level")
-)
-
-var (
- // create the stats we measure
- Started = keys.NewInt64("started", "Count of started RPCs.")
- ReceivedBytes = keys.NewInt64("received_bytes", "Bytes received.") //, unit.Bytes)
- SentBytes = keys.NewInt64("sent_bytes", "Bytes sent.") //, unit.Bytes)
- Latency = keys.NewFloat64("latency_ms", "Elapsed time in milliseconds") //, unit.Milliseconds)
-)
-
-const (
- Inbound = "in"
- Outbound = "out"
-)
diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk.go
deleted file mode 100644
index c40c7e93..00000000
--- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk.go
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright 2016 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 fastwalk provides a faster version of [filepath.Walk] for file system
-// scanning tools.
-package fastwalk
-
-import (
- "errors"
- "os"
- "path/filepath"
- "runtime"
- "sync"
-)
-
-// ErrTraverseLink is used as a return value from WalkFuncs to indicate that the
-// symlink named in the call may be traversed.
-var ErrTraverseLink = errors.New("fastwalk: traverse symlink, assuming target is a directory")
-
-// ErrSkipFiles is a used as a return value from WalkFuncs to indicate that the
-// callback should not be called for any other files in the current directory.
-// Child directories will still be traversed.
-var ErrSkipFiles = errors.New("fastwalk: skip remaining files in directory")
-
-// Walk is a faster implementation of [filepath.Walk].
-//
-// [filepath.Walk]'s design necessarily calls [os.Lstat] on each file,
-// even if the caller needs less info.
-// Many tools need only the type of each file.
-// On some platforms, this information is provided directly by the readdir
-// system call, avoiding the need to stat each file individually.
-// fastwalk_unix.go contains a fork of the syscall routines.
-//
-// See golang.org/issue/16399.
-//
-// Walk walks the file tree rooted at root, calling walkFn for
-// each file or directory in the tree, including root.
-//
-// If Walk returns [filepath.SkipDir], the directory is skipped.
-//
-// Unlike [filepath.Walk]:
-// - file stat calls must be done by the user.
-// The only provided metadata is the file type, which does not include
-// any permission bits.
-// - multiple goroutines stat the filesystem concurrently. The provided
-// walkFn must be safe for concurrent use.
-// - Walk can follow symlinks if walkFn returns the TraverseLink
-// sentinel error. It is the walkFn's responsibility to prevent
-// Walk from going into symlink cycles.
-func Walk(root string, walkFn func(path string, typ os.FileMode) error) error {
- // TODO(bradfitz): make numWorkers configurable? We used a
- // minimum of 4 to give the kernel more info about multiple
- // things we want, in hopes its I/O scheduling can take
- // advantage of that. Hopefully most are in cache. Maybe 4 is
- // even too low of a minimum. Profile more.
- numWorkers := 4
- if n := runtime.NumCPU(); n > numWorkers {
- numWorkers = n
- }
-
- // Make sure to wait for all workers to finish, otherwise
- // walkFn could still be called after returning. This Wait call
- // runs after close(e.donec) below.
- var wg sync.WaitGroup
- defer wg.Wait()
-
- w := &walker{
- fn: walkFn,
- enqueuec: make(chan walkItem, numWorkers), // buffered for performance
- workc: make(chan walkItem, numWorkers), // buffered for performance
- donec: make(chan struct{}),
-
- // buffered for correctness & not leaking goroutines:
- resc: make(chan error, numWorkers),
- }
- defer close(w.donec)
-
- for i := 0; i < numWorkers; i++ {
- wg.Add(1)
- go w.doWork(&wg)
- }
- todo := []walkItem{{dir: root}}
- out := 0
- for {
- workc := w.workc
- var workItem walkItem
- if len(todo) == 0 {
- workc = nil
- } else {
- workItem = todo[len(todo)-1]
- }
- select {
- case workc <- workItem:
- todo = todo[:len(todo)-1]
- out++
- case it := <-w.enqueuec:
- todo = append(todo, it)
- case err := <-w.resc:
- out--
- if err != nil {
- return err
- }
- if out == 0 && len(todo) == 0 {
- // It's safe to quit here, as long as the buffered
- // enqueue channel isn't also readable, which might
- // happen if the worker sends both another unit of
- // work and its result before the other select was
- // scheduled and both w.resc and w.enqueuec were
- // readable.
- select {
- case it := <-w.enqueuec:
- todo = append(todo, it)
- default:
- return nil
- }
- }
- }
- }
-}
-
-// doWork reads directories as instructed (via workc) and runs the
-// user's callback function.
-func (w *walker) doWork(wg *sync.WaitGroup) {
- defer wg.Done()
- for {
- select {
- case <-w.donec:
- return
- case it := <-w.workc:
- select {
- case <-w.donec:
- return
- case w.resc <- w.walk(it.dir, !it.callbackDone):
- }
- }
- }
-}
-
-type walker struct {
- fn func(path string, typ os.FileMode) error
-
- donec chan struct{} // closed on fastWalk's return
- workc chan walkItem // to workers
- enqueuec chan walkItem // from workers
- resc chan error // from workers
-}
-
-type walkItem struct {
- dir string
- callbackDone bool // callback already called; don't do it again
-}
-
-func (w *walker) enqueue(it walkItem) {
- select {
- case w.enqueuec <- it:
- case <-w.donec:
- }
-}
-
-func (w *walker) onDirEnt(dirName, baseName string, typ os.FileMode) error {
- joined := dirName + string(os.PathSeparator) + baseName
- if typ == os.ModeDir {
- w.enqueue(walkItem{dir: joined})
- return nil
- }
-
- err := w.fn(joined, typ)
- if typ == os.ModeSymlink {
- if err == ErrTraverseLink {
- // Set callbackDone so we don't call it twice for both the
- // symlink-as-symlink and the symlink-as-directory later:
- w.enqueue(walkItem{dir: joined, callbackDone: true})
- return nil
- }
- if err == filepath.SkipDir {
- // Permit SkipDir on symlinks too.
- return nil
- }
- }
- return err
-}
-
-func (w *walker) walk(root string, runUserCallback bool) error {
- if runUserCallback {
- err := w.fn(root, os.ModeDir)
- if err == filepath.SkipDir {
- return nil
- }
- if err != nil {
- return err
- }
- }
-
- return readDir(root, w.onDirEnt)
-}
diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_darwin.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_darwin.go
deleted file mode 100644
index 0ca55e0d..00000000
--- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_darwin.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2022 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.
-
-//go:build darwin && cgo
-// +build darwin,cgo
-
-package fastwalk
-
-/*
-#include
-
-// fastwalk_readdir_r wraps readdir_r so that we don't have to pass a dirent**
-// result pointer which triggers CGO's "Go pointer to Go pointer" check unless
-// we allocat the result dirent* with malloc.
-//
-// fastwalk_readdir_r returns 0 on success, -1 upon reaching the end of the
-// directory, or a positive error number to indicate failure.
-static int fastwalk_readdir_r(DIR *fd, struct dirent *entry) {
- struct dirent *result;
- int ret = readdir_r(fd, entry, &result);
- if (ret == 0 && result == NULL) {
- ret = -1; // EOF
- }
- return ret;
-}
-*/
-import "C"
-
-import (
- "os"
- "syscall"
- "unsafe"
-)
-
-func readDir(dirName string, fn func(dirName, entName string, typ os.FileMode) error) error {
- fd, err := openDir(dirName)
- if err != nil {
- return &os.PathError{Op: "opendir", Path: dirName, Err: err}
- }
- defer C.closedir(fd)
-
- skipFiles := false
- var dirent syscall.Dirent
- for {
- ret := int(C.fastwalk_readdir_r(fd, (*C.struct_dirent)(unsafe.Pointer(&dirent))))
- if ret != 0 {
- if ret == -1 {
- break // EOF
- }
- if ret == int(syscall.EINTR) {
- continue
- }
- return &os.PathError{Op: "readdir", Path: dirName, Err: syscall.Errno(ret)}
- }
- if dirent.Ino == 0 {
- continue
- }
- typ := dtToType(dirent.Type)
- if skipFiles && typ.IsRegular() {
- continue
- }
- name := (*[len(syscall.Dirent{}.Name)]byte)(unsafe.Pointer(&dirent.Name))[:]
- name = name[:dirent.Namlen]
- for i, c := range name {
- if c == 0 {
- name = name[:i]
- break
- }
- }
- // Check for useless names before allocating a string.
- if string(name) == "." || string(name) == ".." {
- continue
- }
- if err := fn(dirName, string(name), typ); err != nil {
- if err != ErrSkipFiles {
- return err
- }
- skipFiles = true
- }
- }
-
- return nil
-}
-
-func dtToType(typ uint8) os.FileMode {
- switch typ {
- case syscall.DT_BLK:
- return os.ModeDevice
- case syscall.DT_CHR:
- return os.ModeDevice | os.ModeCharDevice
- case syscall.DT_DIR:
- return os.ModeDir
- case syscall.DT_FIFO:
- return os.ModeNamedPipe
- case syscall.DT_LNK:
- return os.ModeSymlink
- case syscall.DT_REG:
- return 0
- case syscall.DT_SOCK:
- return os.ModeSocket
- }
- return ^os.FileMode(0)
-}
-
-// openDir wraps opendir(3) and handles any EINTR errors. The returned *DIR
-// needs to be closed with closedir(3).
-func openDir(path string) (*C.DIR, error) {
- name, err := syscall.BytePtrFromString(path)
- if err != nil {
- return nil, err
- }
- for {
- fd, err := C.opendir((*C.char)(unsafe.Pointer(name)))
- if err != syscall.EINTR {
- return fd, err
- }
- }
-}
diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.go
deleted file mode 100644
index d58595db..00000000
--- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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.
-
-//go:build freebsd || openbsd || netbsd
-// +build freebsd openbsd netbsd
-
-package fastwalk
-
-import "syscall"
-
-func direntInode(dirent *syscall.Dirent) uint64 {
- return uint64(dirent.Fileno)
-}
diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.go
deleted file mode 100644
index d3922890..00000000
--- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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.
-
-//go:build (linux || (darwin && !cgo)) && !appengine
-// +build linux darwin,!cgo
-// +build !appengine
-
-package fastwalk
-
-import "syscall"
-
-func direntInode(dirent *syscall.Dirent) uint64 {
- return dirent.Ino
-}
diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_bsd.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_bsd.go
deleted file mode 100644
index 38a4db6a..00000000
--- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_bsd.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2018 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.
-
-//go:build (darwin && !cgo) || freebsd || openbsd || netbsd
-// +build darwin,!cgo freebsd openbsd netbsd
-
-package fastwalk
-
-import "syscall"
-
-func direntNamlen(dirent *syscall.Dirent) uint64 {
- return uint64(dirent.Namlen)
-}
diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_linux.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_linux.go
deleted file mode 100644
index c82e57df..00000000
--- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_linux.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018 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.
-
-//go:build linux && !appengine
-// +build linux,!appengine
-
-package fastwalk
-
-import (
- "bytes"
- "syscall"
- "unsafe"
-)
-
-func direntNamlen(dirent *syscall.Dirent) uint64 {
- const fixedHdr = uint16(unsafe.Offsetof(syscall.Dirent{}.Name))
- nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0]))
- const nameBufLen = uint16(len(nameBuf))
- limit := dirent.Reclen - fixedHdr
- if limit > nameBufLen {
- limit = nameBufLen
- }
- nameLen := bytes.IndexByte(nameBuf[:limit], 0)
- if nameLen < 0 {
- panic("failed to find terminating 0 byte in dirent")
- }
- return uint64(nameLen)
-}
diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go
deleted file mode 100644
index 085d3116..00000000
--- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2016 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.
-
-//go:build appengine || (!linux && !darwin && !freebsd && !openbsd && !netbsd)
-// +build appengine !linux,!darwin,!freebsd,!openbsd,!netbsd
-
-package fastwalk
-
-import (
- "io/ioutil"
- "os"
-)
-
-// readDir calls fn for each directory entry in dirName.
-// It does not descend into directories or follow symlinks.
-// If fn returns a non-nil error, readDir returns with that error
-// immediately.
-func readDir(dirName string, fn func(dirName, entName string, typ os.FileMode) error) error {
- fis, err := ioutil.ReadDir(dirName)
- if err != nil {
- return err
- }
- skipFiles := false
- for _, fi := range fis {
- if fi.Mode().IsRegular() && skipFiles {
- continue
- }
- if err := fn(dirName, fi.Name(), fi.Mode()&os.ModeType); err != nil {
- if err == ErrSkipFiles {
- skipFiles = true
- continue
- }
- return err
- }
- }
- return nil
-}
diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go
deleted file mode 100644
index f12f1a73..00000000
--- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright 2016 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.
-
-//go:build (linux || freebsd || openbsd || netbsd || (darwin && !cgo)) && !appengine
-// +build linux freebsd openbsd netbsd darwin,!cgo
-// +build !appengine
-
-package fastwalk
-
-import (
- "fmt"
- "os"
- "syscall"
- "unsafe"
-)
-
-const blockSize = 8 << 10
-
-// unknownFileMode is a sentinel (and bogus) os.FileMode
-// value used to represent a syscall.DT_UNKNOWN Dirent.Type.
-const unknownFileMode os.FileMode = os.ModeNamedPipe | os.ModeSocket | os.ModeDevice
-
-func readDir(dirName string, fn func(dirName, entName string, typ os.FileMode) error) error {
- fd, err := open(dirName, 0, 0)
- if err != nil {
- return &os.PathError{Op: "open", Path: dirName, Err: err}
- }
- defer syscall.Close(fd)
-
- // The buffer must be at least a block long.
- buf := make([]byte, blockSize) // stack-allocated; doesn't escape
- bufp := 0 // starting read position in buf
- nbuf := 0 // end valid data in buf
- skipFiles := false
- for {
- if bufp >= nbuf {
- bufp = 0
- nbuf, err = readDirent(fd, buf)
- if err != nil {
- return os.NewSyscallError("readdirent", err)
- }
- if nbuf <= 0 {
- return nil
- }
- }
- consumed, name, typ := parseDirEnt(buf[bufp:nbuf])
- bufp += consumed
- if name == "" || name == "." || name == ".." {
- continue
- }
- // Fallback for filesystems (like old XFS) that don't
- // support Dirent.Type and have DT_UNKNOWN (0) there
- // instead.
- if typ == unknownFileMode {
- fi, err := os.Lstat(dirName + "/" + name)
- if err != nil {
- // It got deleted in the meantime.
- if os.IsNotExist(err) {
- continue
- }
- return err
- }
- typ = fi.Mode() & os.ModeType
- }
- if skipFiles && typ.IsRegular() {
- continue
- }
- if err := fn(dirName, name, typ); err != nil {
- if err == ErrSkipFiles {
- skipFiles = true
- continue
- }
- return err
- }
- }
-}
-
-func parseDirEnt(buf []byte) (consumed int, name string, typ os.FileMode) {
- // golang.org/issue/37269
- dirent := &syscall.Dirent{}
- copy((*[unsafe.Sizeof(syscall.Dirent{})]byte)(unsafe.Pointer(dirent))[:], buf)
- if v := unsafe.Offsetof(dirent.Reclen) + unsafe.Sizeof(dirent.Reclen); uintptr(len(buf)) < v {
- panic(fmt.Sprintf("buf size of %d smaller than dirent header size %d", len(buf), v))
- }
- if len(buf) < int(dirent.Reclen) {
- panic(fmt.Sprintf("buf size %d < record length %d", len(buf), dirent.Reclen))
- }
- consumed = int(dirent.Reclen)
- if direntInode(dirent) == 0 { // File absent in directory.
- return
- }
- switch dirent.Type {
- case syscall.DT_REG:
- typ = 0
- case syscall.DT_DIR:
- typ = os.ModeDir
- case syscall.DT_LNK:
- typ = os.ModeSymlink
- case syscall.DT_BLK:
- typ = os.ModeDevice
- case syscall.DT_FIFO:
- typ = os.ModeNamedPipe
- case syscall.DT_SOCK:
- typ = os.ModeSocket
- case syscall.DT_UNKNOWN:
- typ = unknownFileMode
- default:
- // Skip weird things.
- // It's probably a DT_WHT (http://lwn.net/Articles/325369/)
- // or something. Revisit if/when this package is moved outside
- // of goimports. goimports only cares about regular files,
- // symlinks, and directories.
- return
- }
-
- nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0]))
- nameLen := direntNamlen(dirent)
-
- // Special cases for common things:
- if nameLen == 1 && nameBuf[0] == '.' {
- name = "."
- } else if nameLen == 2 && nameBuf[0] == '.' && nameBuf[1] == '.' {
- name = ".."
- } else {
- name = string(nameBuf[:nameLen])
- }
- return
-}
-
-// According to https://golang.org/doc/go1.14#runtime
-// A consequence of the implementation of preemption is that on Unix systems, including Linux and macOS
-// systems, programs built with Go 1.14 will receive more signals than programs built with earlier releases.
-//
-// This causes syscall.Open and syscall.ReadDirent sometimes fail with EINTR errors.
-// We need to retry in this case.
-func open(path string, mode int, perm uint32) (fd int, err error) {
- for {
- fd, err := syscall.Open(path, mode, perm)
- if err != syscall.EINTR {
- return fd, err
- }
- }
-}
-
-func readDirent(fd int, buf []byte) (n int, err error) {
- for {
- nbuf, err := syscall.ReadDirent(fd, buf)
- if err != syscall.EINTR {
- return nbuf, err
- }
- }
-}
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go
index b1223713..39df9112 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go
@@ -29,7 +29,6 @@ import (
"go/token"
"go/types"
"io"
- "io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -221,7 +220,7 @@ func Import(packages map[string]*types.Package, path, srcDir string, lookup func
switch hdr {
case "$$B\n":
var data []byte
- data, err = ioutil.ReadAll(buf)
+ data, err = io.ReadAll(buf)
if err != nil {
break
}
@@ -260,13 +259,6 @@ func Import(packages map[string]*types.Package, path, srcDir string, lookup func
return
}
-func deref(typ types.Type) types.Type {
- if p, _ := typ.(*types.Pointer); p != nil {
- return p.Elem()
- }
- return typ
-}
-
type byPath []*types.Package
func (a byPath) Len() int { return len(a) }
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go
index 6103dd71..deeb67f3 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go
@@ -23,8 +23,8 @@ import (
"strings"
"golang.org/x/tools/go/types/objectpath"
+ "golang.org/x/tools/internal/aliases"
"golang.org/x/tools/internal/tokeninternal"
- "golang.org/x/tools/internal/typeparams"
)
// IExportShallow encodes "shallow" export data for the specified package.
@@ -464,7 +464,7 @@ func (p *iexporter) doDecl(obj types.Object) {
switch obj := obj.(type) {
case *types.Var:
- w.tag('V')
+ w.tag(varTag)
w.pos(obj.Pos())
w.typ(obj.Type(), obj.Pkg())
@@ -481,10 +481,10 @@ func (p *iexporter) doDecl(obj types.Object) {
}
// Function.
- if typeparams.ForSignature(sig).Len() == 0 {
- w.tag('F')
+ if sig.TypeParams().Len() == 0 {
+ w.tag(funcTag)
} else {
- w.tag('G')
+ w.tag(genericFuncTag)
}
w.pos(obj.Pos())
// The tparam list of the function type is the declaration of the type
@@ -494,27 +494,27 @@ func (p *iexporter) doDecl(obj types.Object) {
//
// While importing the type parameters, tparamList computes and records
// their export name, so that it can be later used when writing the index.
- if tparams := typeparams.ForSignature(sig); tparams.Len() > 0 {
+ if tparams := sig.TypeParams(); tparams.Len() > 0 {
w.tparamList(obj.Name(), tparams, obj.Pkg())
}
w.signature(sig)
case *types.Const:
- w.tag('C')
+ w.tag(constTag)
w.pos(obj.Pos())
w.value(obj.Type(), obj.Val())
case *types.TypeName:
t := obj.Type()
- if tparam, ok := t.(*typeparams.TypeParam); ok {
- w.tag('P')
+ if tparam, ok := aliases.Unalias(t).(*types.TypeParam); ok {
+ w.tag(typeParamTag)
w.pos(obj.Pos())
constraint := tparam.Constraint()
if p.version >= iexportVersionGo1_18 {
implicit := false
- if iface, _ := constraint.(*types.Interface); iface != nil {
- implicit = typeparams.IsImplicit(iface)
+ if iface, _ := aliases.Unalias(constraint).(*types.Interface); iface != nil {
+ implicit = iface.IsImplicit()
}
w.bool(implicit)
}
@@ -523,8 +523,13 @@ func (p *iexporter) doDecl(obj types.Object) {
}
if obj.IsAlias() {
- w.tag('A')
+ w.tag(aliasTag)
w.pos(obj.Pos())
+ if alias, ok := t.(*aliases.Alias); ok {
+ // Preserve materialized aliases,
+ // even of non-exported types.
+ t = aliases.Rhs(alias)
+ }
w.typ(t, obj.Pkg())
break
}
@@ -535,20 +540,20 @@ func (p *iexporter) doDecl(obj types.Object) {
panic(internalErrorf("%s is not a defined type", t))
}
- if typeparams.ForNamed(named).Len() == 0 {
- w.tag('T')
+ if named.TypeParams().Len() == 0 {
+ w.tag(typeTag)
} else {
- w.tag('U')
+ w.tag(genericTypeTag)
}
w.pos(obj.Pos())
- if typeparams.ForNamed(named).Len() > 0 {
+ if named.TypeParams().Len() > 0 {
// While importing the type parameters, tparamList computes and records
// their export name, so that it can be later used when writing the index.
- w.tparamList(obj.Name(), typeparams.ForNamed(named), obj.Pkg())
+ w.tparamList(obj.Name(), named.TypeParams(), obj.Pkg())
}
- underlying := obj.Type().Underlying()
+ underlying := named.Underlying()
w.typ(underlying, obj.Pkg())
if types.IsInterface(t) {
@@ -565,7 +570,7 @@ func (p *iexporter) doDecl(obj types.Object) {
// Receiver type parameters are type arguments of the receiver type, so
// their name must be qualified before exporting recv.
- if rparams := typeparams.RecvTypeParams(sig); rparams.Len() > 0 {
+ if rparams := sig.RecvTypeParams(); rparams.Len() > 0 {
prefix := obj.Name() + "." + m.Name()
for i := 0; i < rparams.Len(); i++ {
rparam := rparams.At(i)
@@ -739,20 +744,25 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) {
}()
}
switch t := t.(type) {
+ case *aliases.Alias:
+ // TODO(adonovan): support parameterized aliases, following *types.Named.
+ w.startType(aliasType)
+ w.qualifiedType(t.Obj())
+
case *types.Named:
- if targs := typeparams.NamedTypeArgs(t); targs.Len() > 0 {
+ if targs := t.TypeArgs(); targs.Len() > 0 {
w.startType(instanceType)
// TODO(rfindley): investigate if this position is correct, and if it
// matters.
w.pos(t.Obj().Pos())
w.typeList(targs, pkg)
- w.typ(typeparams.NamedTypeOrigin(t), pkg)
+ w.typ(t.Origin(), pkg)
return
}
w.startType(definedType)
w.qualifiedType(t.Obj())
- case *typeparams.TypeParam:
+ case *types.TypeParam:
w.startType(typeParamType)
w.qualifiedType(t.Obj())
@@ -844,7 +854,7 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) {
for i := 0; i < n; i++ {
ft := t.EmbeddedType(i)
tPkg := pkg
- if named, _ := ft.(*types.Named); named != nil {
+ if named, _ := aliases.Unalias(ft).(*types.Named); named != nil {
w.pos(named.Obj().Pos())
} else {
w.pos(token.NoPos)
@@ -868,7 +878,7 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) {
w.signature(sig)
}
- case *typeparams.Union:
+ case *types.Union:
w.startType(unionType)
nt := t.Len()
w.uint64(uint64(nt))
@@ -948,14 +958,14 @@ func (w *exportWriter) signature(sig *types.Signature) {
}
}
-func (w *exportWriter) typeList(ts *typeparams.TypeList, pkg *types.Package) {
+func (w *exportWriter) typeList(ts *types.TypeList, pkg *types.Package) {
w.uint64(uint64(ts.Len()))
for i := 0; i < ts.Len(); i++ {
w.typ(ts.At(i), pkg)
}
}
-func (w *exportWriter) tparamList(prefix string, list *typeparams.TypeParamList, pkg *types.Package) {
+func (w *exportWriter) tparamList(prefix string, list *types.TypeParamList, pkg *types.Package) {
ll := uint64(list.Len())
w.uint64(ll)
for i := 0; i < list.Len(); i++ {
@@ -973,7 +983,7 @@ const blankMarker = "$"
// differs from its actual object name: it is prefixed with a qualifier, and
// blank type parameter names are disambiguated by their index in the type
// parameter list.
-func tparamExportName(prefix string, tparam *typeparams.TypeParam) string {
+func tparamExportName(prefix string, tparam *types.TypeParam) string {
assert(prefix != "")
name := tparam.Obj().Name()
if name == "_" {
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go
index 8e64cf64..136aa036 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go
@@ -22,7 +22,8 @@ import (
"strings"
"golang.org/x/tools/go/types/objectpath"
- "golang.org/x/tools/internal/typeparams"
+ "golang.org/x/tools/internal/aliases"
+ "golang.org/x/tools/internal/typesinternal"
)
type intReader struct {
@@ -79,6 +80,20 @@ const (
typeParamType
instanceType
unionType
+ aliasType
+)
+
+// Object tags
+const (
+ varTag = 'V'
+ funcTag = 'F'
+ genericFuncTag = 'G'
+ constTag = 'C'
+ aliasTag = 'A'
+ genericAliasTag = 'B'
+ typeParamTag = 'P'
+ typeTag = 'T'
+ genericTypeTag = 'U'
)
// IImportData imports a package from the serialized package data
@@ -195,6 +210,7 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte
p := iimporter{
version: int(version),
ipath: path,
+ aliases: aliases.Enabled(),
shallow: shallow,
reportf: reportf,
@@ -225,6 +241,7 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte
// Gather the relevant packages from the manifest.
items := make([]GetPackagesItem, r.uint64())
+ uniquePkgPaths := make(map[string]bool)
for i := range items {
pkgPathOff := r.uint64()
pkgPath := p.stringAt(pkgPathOff)
@@ -249,6 +266,12 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte
}
items[i].nameIndex = nameIndex
+
+ uniquePkgPaths[pkgPath] = true
+ }
+ // Debugging #63822; hypothesis: there are duplicate PkgPaths.
+ if len(uniquePkgPaths) != len(items) {
+ reportf("found duplicate PkgPaths while reading export data manifest: %v", items)
}
// Request packages all at once from the client,
@@ -316,12 +339,12 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte
}
// SetConstraint can't be called if the constraint type is not yet complete.
- // When type params are created in the 'P' case of (*importReader).obj(),
+ // When type params are created in the typeParamTag case of (*importReader).obj(),
// the associated constraint type may not be complete due to recursion.
// Therefore, we defer calling SetConstraint there, and call it here instead
// after all types are complete.
for _, d := range p.later {
- typeparams.SetTypeParamConstraint(d.t, d.constraint)
+ d.t.SetConstraint(d.constraint)
}
for _, typ := range p.interfaceList {
@@ -339,7 +362,7 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte
}
type setConstraintArgs struct {
- t *typeparams.TypeParam
+ t *types.TypeParam
constraint types.Type
}
@@ -347,6 +370,7 @@ type iimporter struct {
version int
ipath string
+ aliases bool
shallow bool
reportf ReportFunc // if non-nil, used to report bugs
@@ -516,7 +540,7 @@ func canReuse(def *types.Named, rhs types.Type) bool {
if def == nil {
return true
}
- iface, _ := rhs.(*types.Interface)
+ iface, _ := aliases.Unalias(rhs).(*types.Interface)
if iface == nil {
return true
}
@@ -538,25 +562,29 @@ func (r *importReader) obj(name string) {
pos := r.pos()
switch tag {
- case 'A':
+ case aliasTag:
typ := r.typ()
-
- r.declare(types.NewTypeName(pos, r.currPkg, name, typ))
-
- case 'C':
+ // TODO(adonovan): support generic aliases:
+ // if tag == genericAliasTag {
+ // tparams := r.tparamList()
+ // alias.SetTypeParams(tparams)
+ // }
+ r.declare(aliases.NewAlias(r.p.aliases, pos, r.currPkg, name, typ))
+
+ case constTag:
typ, val := r.value()
r.declare(types.NewConst(pos, r.currPkg, name, typ, val))
- case 'F', 'G':
- var tparams []*typeparams.TypeParam
- if tag == 'G' {
+ case funcTag, genericFuncTag:
+ var tparams []*types.TypeParam
+ if tag == genericFuncTag {
tparams = r.tparamList()
}
sig := r.signature(nil, nil, tparams)
r.declare(types.NewFunc(pos, r.currPkg, name, sig))
- case 'T', 'U':
+ case typeTag, genericTypeTag:
// Types can be recursive. We need to setup a stub
// declaration before recursing.
obj := types.NewTypeName(pos, r.currPkg, name, nil)
@@ -564,9 +592,9 @@ func (r *importReader) obj(name string) {
// Declare obj before calling r.tparamList, so the new type name is recognized
// if used in the constraint of one of its own typeparams (see #48280).
r.declare(obj)
- if tag == 'U' {
+ if tag == genericTypeTag {
tparams := r.tparamList()
- typeparams.SetForNamed(named, tparams)
+ named.SetTypeParams(tparams)
}
underlying := r.p.typAt(r.uint64(), named).Underlying()
@@ -581,14 +609,13 @@ func (r *importReader) obj(name string) {
// If the receiver has any targs, set those as the
// rparams of the method (since those are the
// typeparams being used in the method sig/body).
- base := baseType(recv.Type())
- assert(base != nil)
- targs := typeparams.NamedTypeArgs(base)
- var rparams []*typeparams.TypeParam
+ _, recvNamed := typesinternal.ReceiverNamed(recv)
+ targs := recvNamed.TypeArgs()
+ var rparams []*types.TypeParam
if targs.Len() > 0 {
- rparams = make([]*typeparams.TypeParam, targs.Len())
+ rparams = make([]*types.TypeParam, targs.Len())
for i := range rparams {
- rparams[i] = targs.At(i).(*typeparams.TypeParam)
+ rparams[i] = aliases.Unalias(targs.At(i)).(*types.TypeParam)
}
}
msig := r.signature(recv, rparams, nil)
@@ -597,7 +624,7 @@ func (r *importReader) obj(name string) {
}
}
- case 'P':
+ case typeParamTag:
// We need to "declare" a typeparam in order to have a name that
// can be referenced recursively (if needed) in the type param's
// bound.
@@ -606,7 +633,7 @@ func (r *importReader) obj(name string) {
}
name0 := tparamName(name)
tn := types.NewTypeName(pos, r.currPkg, name0, nil)
- t := typeparams.NewTypeParam(tn, nil)
+ t := types.NewTypeParam(tn, nil)
// To handle recursive references to the typeparam within its
// bound, save the partial type in tparamIndex before reading the bounds.
@@ -618,11 +645,11 @@ func (r *importReader) obj(name string) {
}
constraint := r.typ()
if implicit {
- iface, _ := constraint.(*types.Interface)
+ iface, _ := aliases.Unalias(constraint).(*types.Interface)
if iface == nil {
errorf("non-interface constraint marked implicit")
}
- typeparams.MarkImplicit(iface)
+ iface.MarkImplicit()
}
// The constraint type may not be complete, if we
// are in the middle of a type recursion involving type
@@ -630,7 +657,7 @@ func (r *importReader) obj(name string) {
// completely set up all types in ImportData.
r.p.later = append(r.p.later, setConstraintArgs{t: t, constraint: constraint})
- case 'V':
+ case varTag:
typ := r.typ()
r.declare(types.NewVar(pos, r.currPkg, name, typ))
@@ -825,7 +852,7 @@ func (r *importReader) typ() types.Type {
}
func isInterface(t types.Type) bool {
- _, ok := t.(*types.Interface)
+ _, ok := aliases.Unalias(t).(*types.Interface)
return ok
}
@@ -847,7 +874,7 @@ func (r *importReader) doType(base *types.Named) (res types.Type) {
errorf("unexpected kind tag in %q: %v", r.p.ipath, k)
return nil
- case definedType:
+ case aliasType, definedType:
pkg, name := r.qualifiedIdent()
r.p.doDecl(pkg, name)
return pkg.Scope().Lookup(name).(*types.TypeName).Type()
@@ -966,7 +993,7 @@ func (r *importReader) doType(base *types.Named) (res types.Type) {
// The imported instantiated type doesn't include any methods, so
// we must always use the methods of the base (orig) type.
// TODO provide a non-nil *Environment
- t, _ := typeparams.Instantiate(nil, baseType, targs, false)
+ t, _ := types.Instantiate(nil, baseType, targs, false)
// Workaround for golang/go#61561. See the doc for instanceList for details.
r.p.instanceList = append(r.p.instanceList, t)
@@ -976,11 +1003,11 @@ func (r *importReader) doType(base *types.Named) (res types.Type) {
if r.p.version < iexportVersionGenerics {
errorf("unexpected instantiation type")
}
- terms := make([]*typeparams.Term, r.uint64())
+ terms := make([]*types.Term, r.uint64())
for i := range terms {
- terms[i] = typeparams.NewTerm(r.bool(), r.typ())
+ terms[i] = types.NewTerm(r.bool(), r.typ())
}
- return typeparams.NewUnion(terms)
+ return types.NewUnion(terms)
}
}
@@ -1008,23 +1035,23 @@ func (r *importReader) objectPathObject() types.Object {
return obj
}
-func (r *importReader) signature(recv *types.Var, rparams []*typeparams.TypeParam, tparams []*typeparams.TypeParam) *types.Signature {
+func (r *importReader) signature(recv *types.Var, rparams []*types.TypeParam, tparams []*types.TypeParam) *types.Signature {
params := r.paramList()
results := r.paramList()
variadic := params.Len() > 0 && r.bool()
- return typeparams.NewSignatureType(recv, rparams, tparams, params, results, variadic)
+ return types.NewSignatureType(recv, rparams, tparams, params, results, variadic)
}
-func (r *importReader) tparamList() []*typeparams.TypeParam {
+func (r *importReader) tparamList() []*types.TypeParam {
n := r.uint64()
if n == 0 {
return nil
}
- xs := make([]*typeparams.TypeParam, n)
+ xs := make([]*types.TypeParam, n)
for i := range xs {
// Note: the standard library importer is tolerant of nil types here,
// though would panic in SetTypeParams.
- xs[i] = r.typ().(*typeparams.TypeParam)
+ xs[i] = aliases.Unalias(r.typ()).(*types.TypeParam)
}
return xs
}
@@ -1071,13 +1098,3 @@ func (r *importReader) byte() byte {
}
return x
}
-
-func baseType(typ types.Type) *types.Named {
- // pointer receivers are never types.Named types
- if p, _ := typ.(*types.Pointer); p != nil {
- typ = p.Elem()
- }
- // receiver base types are always (possibly generic) types.Named types
- n, _ := typ.(*types.Named)
- return n
-}
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/support_go117.go b/vendor/golang.org/x/tools/internal/gcimporter/support_go117.go
deleted file mode 100644
index d892273e..00000000
--- a/vendor/golang.org/x/tools/internal/gcimporter/support_go117.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2021 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.
-
-//go:build !go1.18
-// +build !go1.18
-
-package gcimporter
-
-import "go/types"
-
-const iexportVersion = iexportVersionGo1_11
-
-func additionalPredeclared() []types.Type {
- return nil
-}
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go b/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go
index edbe6ea7..0cd3b91b 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go
@@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build go1.18
-// +build go1.18
-
package gcimporter
import "go/types"
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go b/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go
index 286bf445..38b624ca 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !(go1.18 && goexperiment.unified)
-// +build !go1.18 !goexperiment.unified
+//go:build !goexperiment.unified
+// +build !goexperiment.unified
package gcimporter
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go b/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go
index b5d69ffb..b5118d0b 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build go1.18 && goexperiment.unified
-// +build go1.18,goexperiment.unified
+//go:build goexperiment.unified
+// +build goexperiment.unified
package gcimporter
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/ureader_no.go b/vendor/golang.org/x/tools/internal/gcimporter/ureader_no.go
deleted file mode 100644
index 8eb20729..00000000
--- a/vendor/golang.org/x/tools/internal/gcimporter/ureader_no.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2022 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.
-
-//go:build !go1.18
-// +build !go1.18
-
-package gcimporter
-
-import (
- "fmt"
- "go/token"
- "go/types"
-)
-
-func UImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) {
- err = fmt.Errorf("go/tools compiled with a Go version earlier than 1.18 cannot read unified IR export data")
- return
-}
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go b/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go
index b977435f..2c077068 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go
@@ -4,9 +4,6 @@
// Derived from go/internal/gcimporter/ureader.go
-//go:build go1.18
-// +build go1.18
-
package gcimporter
import (
@@ -16,6 +13,7 @@ import (
"sort"
"strings"
+ "golang.org/x/tools/internal/aliases"
"golang.org/x/tools/internal/pkgbits"
)
@@ -28,6 +26,7 @@ type pkgReader struct {
ctxt *types.Context
imports map[string]*types.Package // previously imported packages, indexed by path
+ aliases bool // create types.Alias nodes
// lazily initialized arrays corresponding to the unified IR
// PosBase, Pkg, and Type sections, respectively.
@@ -101,6 +100,7 @@ func readUnifiedPackage(fset *token.FileSet, ctxt *types.Context, imports map[st
ctxt: ctxt,
imports: imports,
+ aliases: aliases.Enabled(),
posBases: make([]string, input.NumElems(pkgbits.RelocPosBase)),
pkgs: make([]*types.Package, input.NumElems(pkgbits.RelocPkg)),
@@ -526,7 +526,7 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) {
case pkgbits.ObjAlias:
pos := r.pos()
typ := r.typ()
- declare(types.NewTypeName(pos, objPkg, objName, typ))
+ declare(aliases.NewAlias(r.p.aliases, pos, objPkg, objName, typ))
case pkgbits.ObjConst:
pos := r.pos()
@@ -553,7 +553,7 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) {
// If the underlying type is an interface, we need to
// duplicate its methods so we can replace the receiver
// parameter's type (#49906).
- if iface, ok := underlying.(*types.Interface); ok && iface.NumExplicitMethods() != 0 {
+ if iface, ok := aliases.Unalias(underlying).(*types.Interface); ok && iface.NumExplicitMethods() != 0 {
methods := make([]*types.Func, iface.NumExplicitMethods())
for i := range methods {
fn := iface.ExplicitMethod(i)
diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/vendor/golang.org/x/tools/internal/gocommand/invoke.go
index 53cf66da..eb7a8282 100644
--- a/vendor/golang.org/x/tools/internal/gocommand/invoke.go
+++ b/vendor/golang.org/x/tools/internal/gocommand/invoke.go
@@ -13,6 +13,7 @@ import (
"io"
"log"
"os"
+ "os/exec"
"reflect"
"regexp"
"runtime"
@@ -21,12 +22,9 @@ import (
"sync"
"time"
- exec "golang.org/x/sys/execabs"
-
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/event/keys"
"golang.org/x/tools/internal/event/label"
- "golang.org/x/tools/internal/event/tag"
)
// An Runner will run go command invocations and serialize
@@ -56,11 +54,14 @@ func (runner *Runner) initialize() {
// 1.14: go: updating go.mod: existing contents have changed since last read
var modConcurrencyError = regexp.MustCompile(`go:.*go.mod.*contents have changed`)
-// verb is an event label for the go command verb.
-var verb = keys.NewString("verb", "go command verb")
+// event keys for go command invocations
+var (
+ verb = keys.NewString("verb", "go command verb")
+ directory = keys.NewString("directory", "")
+)
func invLabels(inv Invocation) []label.Label {
- return []label.Label{verb.Of(inv.Verb), tag.Directory.Of(inv.WorkingDir)}
+ return []label.Label{verb.Of(inv.Verb), directory.Of(inv.WorkingDir)}
}
// Run is a convenience wrapper around RunRaw.
@@ -85,6 +86,7 @@ func (runner *Runner) RunPiped(ctx context.Context, inv Invocation, stdout, stde
// RunRaw runs the invocation, serializing requests only if they fight over
// go.mod changes.
+// Postcondition: both error results have same nilness.
func (runner *Runner) RunRaw(ctx context.Context, inv Invocation) (*bytes.Buffer, *bytes.Buffer, error, error) {
ctx, done := event.Start(ctx, "gocommand.Runner.RunRaw", invLabels(inv)...)
defer done()
@@ -95,23 +97,24 @@ func (runner *Runner) RunRaw(ctx context.Context, inv Invocation) (*bytes.Buffer
stdout, stderr, friendlyErr, err := runner.runConcurrent(ctx, inv)
// If we encounter a load concurrency error, we need to retry serially.
- if friendlyErr == nil || !modConcurrencyError.MatchString(friendlyErr.Error()) {
- return stdout, stderr, friendlyErr, err
+ if friendlyErr != nil && modConcurrencyError.MatchString(friendlyErr.Error()) {
+ event.Error(ctx, "Load concurrency error, will retry serially", err)
+
+ // Run serially by calling runPiped.
+ stdout.Reset()
+ stderr.Reset()
+ friendlyErr, err = runner.runPiped(ctx, inv, stdout, stderr)
}
- event.Error(ctx, "Load concurrency error, will retry serially", err)
- // Run serially by calling runPiped.
- stdout.Reset()
- stderr.Reset()
- friendlyErr, err = runner.runPiped(ctx, inv, stdout, stderr)
return stdout, stderr, friendlyErr, err
}
+// Postcondition: both error results have same nilness.
func (runner *Runner) runConcurrent(ctx context.Context, inv Invocation) (*bytes.Buffer, *bytes.Buffer, error, error) {
// Wait for 1 worker to become available.
select {
case <-ctx.Done():
- return nil, nil, nil, ctx.Err()
+ return nil, nil, ctx.Err(), ctx.Err()
case runner.inFlight <- struct{}{}:
defer func() { <-runner.inFlight }()
}
@@ -121,6 +124,7 @@ func (runner *Runner) runConcurrent(ctx context.Context, inv Invocation) (*bytes
return stdout, stderr, friendlyErr, err
}
+// Postcondition: both error results have same nilness.
func (runner *Runner) runPiped(ctx context.Context, inv Invocation, stdout, stderr io.Writer) (error, error) {
// Make sure the runner is always initialized.
runner.initialize()
@@ -129,7 +133,7 @@ func (runner *Runner) runPiped(ctx context.Context, inv Invocation, stdout, stde
// runPiped commands.
select {
case <-ctx.Done():
- return nil, ctx.Err()
+ return ctx.Err(), ctx.Err()
case runner.serialized <- struct{}{}:
defer func() { <-runner.serialized }()
}
@@ -139,7 +143,7 @@ func (runner *Runner) runPiped(ctx context.Context, inv Invocation, stdout, stde
for i := 0; i < maxInFlight; i++ {
select {
case <-ctx.Done():
- return nil, ctx.Err()
+ return ctx.Err(), ctx.Err()
case runner.inFlight <- struct{}{}:
// Make sure we always "return" any workers we took.
defer func() { <-runner.inFlight }()
@@ -156,12 +160,15 @@ type Invocation struct {
BuildFlags []string
// If ModFlag is set, the go command is invoked with -mod=ModFlag.
+ // TODO(rfindley): remove, in favor of Args.
ModFlag string
// If ModFile is set, the go command is invoked with -modfile=ModFile.
+ // TODO(rfindley): remove, in favor of Args.
ModFile string
// If Overlay is set, the go command is invoked with -overlay=Overlay.
+ // TODO(rfindley): remove, in favor of Args.
Overlay string
// If CleanEnv is set, the invocation will run only with the environment
@@ -172,6 +179,7 @@ type Invocation struct {
Logf func(format string, args ...interface{})
}
+// Postcondition: both error results have same nilness.
func (i *Invocation) runWithFriendlyError(ctx context.Context, stdout, stderr io.Writer) (friendlyError error, rawError error) {
rawError = i.run(ctx, stdout, stderr)
if rawError != nil {
diff --git a/vendor/golang.org/x/tools/internal/gocommand/vendor.go b/vendor/golang.org/x/tools/internal/gocommand/vendor.go
index 2d3d408c..e38d1fb4 100644
--- a/vendor/golang.org/x/tools/internal/gocommand/vendor.go
+++ b/vendor/golang.org/x/tools/internal/gocommand/vendor.go
@@ -107,3 +107,57 @@ func getMainModuleAnd114(ctx context.Context, inv Invocation, r *Runner) (*Modul
}
return mod, lines[4] == "go1.14", nil
}
+
+// WorkspaceVendorEnabled reports whether workspace vendoring is enabled. It takes a *Runner to execute Go commands
+// with the supplied context.Context and Invocation. The Invocation can contain pre-defined fields,
+// of which only Verb and Args are modified to run the appropriate Go command.
+// Inspired by setDefaultBuildMod in modload/init.go
+func WorkspaceVendorEnabled(ctx context.Context, inv Invocation, r *Runner) (bool, []*ModuleJSON, error) {
+ inv.Verb = "env"
+ inv.Args = []string{"GOWORK"}
+ stdout, err := r.Run(ctx, inv)
+ if err != nil {
+ return false, nil, err
+ }
+ goWork := string(bytes.TrimSpace(stdout.Bytes()))
+ if fi, err := os.Stat(filepath.Join(filepath.Dir(goWork), "vendor")); err == nil && fi.IsDir() {
+ mainMods, err := getWorkspaceMainModules(ctx, inv, r)
+ if err != nil {
+ return false, nil, err
+ }
+ return true, mainMods, nil
+ }
+ return false, nil, nil
+}
+
+// getWorkspaceMainModules gets the main modules' information.
+// This is the information needed to figure out if vendoring should be enabled.
+func getWorkspaceMainModules(ctx context.Context, inv Invocation, r *Runner) ([]*ModuleJSON, error) {
+ const format = `{{.Path}}
+{{.Dir}}
+{{.GoMod}}
+{{.GoVersion}}
+`
+ inv.Verb = "list"
+ inv.Args = []string{"-m", "-f", format}
+ stdout, err := r.Run(ctx, inv)
+ if err != nil {
+ return nil, err
+ }
+
+ lines := strings.Split(strings.TrimSuffix(stdout.String(), "\n"), "\n")
+ if len(lines) < 4 {
+ return nil, fmt.Errorf("unexpected stdout: %q", stdout.String())
+ }
+ mods := make([]*ModuleJSON, 0, len(lines)/4)
+ for i := 0; i < len(lines); i += 4 {
+ mods = append(mods, &ModuleJSON{
+ Path: lines[i],
+ Dir: lines[i+1],
+ GoMod: lines[i+2],
+ GoVersion: lines[i+3],
+ Main: true,
+ })
+ }
+ return mods, nil
+}
diff --git a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go
index 452e342c..83615155 100644
--- a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go
+++ b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go
@@ -9,21 +9,27 @@ package gopathwalk
import (
"bufio"
"bytes"
- "log"
+ "io"
+ "io/fs"
"os"
"path/filepath"
+ "runtime"
"strings"
+ "sync"
"time"
-
- "golang.org/x/tools/internal/fastwalk"
)
// Options controls the behavior of a Walk call.
type Options struct {
// If Logf is non-nil, debug logging is enabled through this function.
Logf func(format string, args ...interface{})
+
// Search module caches. Also disables legacy goimports ignore rules.
ModulesEnabled bool
+
+ // Maximum number of concurrent calls to user-provided callbacks,
+ // or 0 for GOMAXPROCS.
+ Concurrency int
}
// RootType indicates the type of a Root.
@@ -44,22 +50,28 @@ type Root struct {
Type RootType
}
-// Walk walks Go source directories ($GOROOT, $GOPATH, etc) to find packages.
-// For each package found, add will be called (concurrently) with the absolute
+// Walk concurrently walks Go source directories ($GOROOT, $GOPATH, etc) to find packages.
+//
+// For each package found, add will be called with the absolute
// paths of the containing source directory and the package directory.
-// add will be called concurrently.
+//
+// Unlike filepath.WalkDir, Walk follows symbolic links
+// (while guarding against cycles).
func Walk(roots []Root, add func(root Root, dir string), opts Options) {
WalkSkip(roots, add, func(Root, string) bool { return false }, opts)
}
-// WalkSkip walks Go source directories ($GOROOT, $GOPATH, etc) to find packages.
-// For each package found, add will be called (concurrently) with the absolute
+// WalkSkip concurrently walks Go source directories ($GOROOT, $GOPATH, etc) to
+// find packages.
+//
+// For each package found, add will be called with the absolute
// paths of the containing source directory and the package directory.
-// For each directory that will be scanned, skip will be called (concurrently)
+// For each directory that will be scanned, skip will be called
// with the absolute paths of the containing source directory and the directory.
// If skip returns false on a directory it will be processed.
-// add will be called concurrently.
-// skip will be called concurrently.
+//
+// Unlike filepath.WalkDir, WalkSkip follows symbolic links
+// (while guarding against cycles).
func WalkSkip(roots []Root, add func(root Root, dir string), skip func(root Root, dir string) bool, opts Options) {
for _, root := range roots {
walkDir(root, add, skip, opts)
@@ -68,34 +80,51 @@ func WalkSkip(roots []Root, add func(root Root, dir string), skip func(root Root
// walkDir creates a walker and starts fastwalk with this walker.
func walkDir(root Root, add func(Root, string), skip func(root Root, dir string) bool, opts Options) {
+ if opts.Logf == nil {
+ opts.Logf = func(format string, args ...interface{}) {}
+ }
if _, err := os.Stat(root.Path); os.IsNotExist(err) {
- if opts.Logf != nil {
- opts.Logf("skipping nonexistent directory: %v", root.Path)
- }
+ opts.Logf("skipping nonexistent directory: %v", root.Path)
return
}
start := time.Now()
- if opts.Logf != nil {
- opts.Logf("scanning %s", root.Path)
+ opts.Logf("scanning %s", root.Path)
+
+ concurrency := opts.Concurrency
+ if concurrency == 0 {
+ // The walk be either CPU-bound or I/O-bound, depending on what the
+ // caller-supplied add function does and the details of the user's platform
+ // and machine. Rather than trying to fine-tune the concurrency level for a
+ // specific environment, we default to GOMAXPROCS: it is likely to be a good
+ // choice for a CPU-bound add function, and if it is instead I/O-bound, then
+ // dealing with I/O saturation is arguably the job of the kernel and/or
+ // runtime. (Oversaturating I/O seems unlikely to harm performance as badly
+ // as failing to saturate would.)
+ concurrency = runtime.GOMAXPROCS(0)
}
w := &walker{
root: root,
add: add,
skip: skip,
opts: opts,
+ sem: make(chan struct{}, concurrency),
}
w.init()
- if err := fastwalk.Walk(root.Path, w.walk); err != nil {
- logf := opts.Logf
- if logf == nil {
- logf = log.Printf
- }
- logf("scanning directory %v: %v", root.Path, err)
- }
- if opts.Logf != nil {
- opts.Logf("scanned %s in %v", root.Path, time.Since(start))
+ w.sem <- struct{}{}
+ path := root.Path
+ if path == "" {
+ path = "."
}
+ if fi, err := os.Lstat(path); err == nil {
+ w.walk(path, nil, fs.FileInfoToDirEntry(fi))
+ } else {
+ w.opts.Logf("scanning directory %v: %v", root.Path, err)
+ }
+ <-w.sem
+ w.walking.Wait()
+
+ opts.Logf("scanned %s in %v", root.Path, time.Since(start))
}
// walker is the callback for fastwalk.Walk.
@@ -105,7 +134,18 @@ type walker struct {
skip func(Root, string) bool // The callback that will be invoked for every dir. dir is skipped if it returns true.
opts Options // Options passed to Walk by the user.
- ignoredDirs []os.FileInfo // The ignored directories, loaded from .goimportsignore files.
+ walking sync.WaitGroup
+ sem chan struct{} // Channel of semaphore tokens; send to acquire, receive to release.
+ ignoredDirs []string
+
+ added sync.Map // map[string]bool
+}
+
+// A symlinkList is a linked list of os.FileInfos for parent directories
+// reached via symlinks.
+type symlinkList struct {
+ info os.FileInfo
+ prev *symlinkList
}
// init initializes the walker based on its Options
@@ -121,14 +161,8 @@ func (w *walker) init() {
for _, p := range ignoredPaths {
full := filepath.Join(w.root.Path, p)
- if fi, err := os.Stat(full); err == nil {
- w.ignoredDirs = append(w.ignoredDirs, fi)
- if w.opts.Logf != nil {
- w.opts.Logf("Directory added to ignore list: %s", full)
- }
- } else if w.opts.Logf != nil {
- w.opts.Logf("Error statting ignored directory: %v", err)
- }
+ w.ignoredDirs = append(w.ignoredDirs, full)
+ w.opts.Logf("Directory added to ignore list: %s", full)
}
}
@@ -138,12 +172,10 @@ func (w *walker) init() {
func (w *walker) getIgnoredDirs(path string) []string {
file := filepath.Join(path, ".goimportsignore")
slurp, err := os.ReadFile(file)
- if w.opts.Logf != nil {
- if err != nil {
- w.opts.Logf("%v", err)
- } else {
- w.opts.Logf("Read %s", file)
- }
+ if err != nil {
+ w.opts.Logf("%v", err)
+ } else {
+ w.opts.Logf("Read %s", file)
}
if err != nil {
return nil
@@ -162,9 +194,9 @@ func (w *walker) getIgnoredDirs(path string) []string {
}
// shouldSkipDir reports whether the file should be skipped or not.
-func (w *walker) shouldSkipDir(fi os.FileInfo, dir string) bool {
+func (w *walker) shouldSkipDir(dir string) bool {
for _, ignoredDir := range w.ignoredDirs {
- if os.SameFile(fi, ignoredDir) {
+ if dir == ignoredDir {
return true
}
}
@@ -176,85 +208,130 @@ func (w *walker) shouldSkipDir(fi os.FileInfo, dir string) bool {
}
// walk walks through the given path.
-func (w *walker) walk(path string, typ os.FileMode) error {
- if typ.IsRegular() {
- dir := filepath.Dir(path)
- if dir == w.root.Path && (w.root.Type == RootGOROOT || w.root.Type == RootGOPATH) {
- // Doesn't make sense to have regular files
- // directly in your $GOPATH/src or $GOROOT/src.
- return fastwalk.ErrSkipFiles
- }
- if !strings.HasSuffix(path, ".go") {
- return nil
+//
+// Errors are logged if w.opts.Logf is non-nil, but otherwise ignored.
+func (w *walker) walk(path string, pathSymlinks *symlinkList, d fs.DirEntry) {
+ if d.Type()&os.ModeSymlink != 0 {
+ // Walk the symlink's target rather than the symlink itself.
+ //
+ // (Note that os.Stat, unlike the lower-lever os.Readlink,
+ // follows arbitrarily many layers of symlinks, so it will eventually
+ // reach either a non-symlink or a nonexistent target.)
+ //
+ // TODO(bcmills): 'go list all' itself ignores symlinks within GOROOT/src
+ // and GOPATH/src. Do we really need to traverse them here? If so, why?
+
+ fi, err := os.Stat(path)
+ if err != nil {
+ w.opts.Logf("%v", err)
+ return
}
- w.add(w.root, dir)
- return fastwalk.ErrSkipFiles
- }
- if typ == os.ModeDir {
- base := filepath.Base(path)
- if base == "" || base[0] == '.' || base[0] == '_' ||
- base == "testdata" ||
- (w.root.Type == RootGOROOT && w.opts.ModulesEnabled && base == "vendor") ||
- (!w.opts.ModulesEnabled && base == "node_modules") {
- return filepath.SkipDir
+ // Avoid walking symlink cycles: if we have already followed a symlink to
+ // this directory as a parent of itself, don't follow it again.
+ //
+ // This doesn't catch the first time through a cycle, but it also minimizes
+ // the number of extra stat calls we make if we *don't* encounter a cycle.
+ // Since we don't actually expect to encounter symlink cycles in practice,
+ // this seems like the right tradeoff.
+ for parent := pathSymlinks; parent != nil; parent = parent.prev {
+ if os.SameFile(fi, parent.info) {
+ return
+ }
}
- fi, err := os.Lstat(path)
- if err == nil && w.shouldSkipDir(fi, path) {
- return filepath.SkipDir
+
+ pathSymlinks = &symlinkList{
+ info: fi,
+ prev: pathSymlinks,
}
- return nil
+ d = fs.FileInfoToDirEntry(fi)
}
- if typ == os.ModeSymlink {
- base := filepath.Base(path)
- if strings.HasPrefix(base, ".#") {
- // Emacs noise.
- return nil
+
+ if d.Type().IsRegular() {
+ if !strings.HasSuffix(path, ".go") {
+ return
}
- if w.shouldTraverse(path) {
- return fastwalk.ErrTraverseLink
+
+ dir := filepath.Dir(path)
+ if dir == w.root.Path && (w.root.Type == RootGOROOT || w.root.Type == RootGOPATH) {
+ // Doesn't make sense to have regular files
+ // directly in your $GOPATH/src or $GOROOT/src.
+ //
+ // TODO(bcmills): there are many levels of directory within
+ // RootModuleCache where this also wouldn't make sense,
+ // Can we generalize this to any directory without a corresponding
+ // import path?
+ return
}
- }
- return nil
-}
-// shouldTraverse reports whether the symlink fi, found in dir,
-// should be followed. It makes sure symlinks were never visited
-// before to avoid symlink loops.
-func (w *walker) shouldTraverse(path string) bool {
- ts, err := os.Stat(path)
- if err != nil {
- logf := w.opts.Logf
- if logf == nil {
- logf = log.Printf
+ if _, dup := w.added.LoadOrStore(dir, true); !dup {
+ w.add(w.root, dir)
}
- logf("%v", err)
- return false
}
- if !ts.IsDir() {
- return false
+
+ if !d.IsDir() {
+ return
+ }
+
+ base := filepath.Base(path)
+ if base == "" || base[0] == '.' || base[0] == '_' ||
+ base == "testdata" ||
+ (w.root.Type == RootGOROOT && w.opts.ModulesEnabled && base == "vendor") ||
+ (!w.opts.ModulesEnabled && base == "node_modules") ||
+ w.shouldSkipDir(path) {
+ return
}
- if w.shouldSkipDir(ts, filepath.Dir(path)) {
- return false
+
+ // Read the directory and walk its entries.
+
+ f, err := os.Open(path)
+ if err != nil {
+ w.opts.Logf("%v", err)
+ return
}
- // Check for symlink loops by statting each directory component
- // and seeing if any are the same file as ts.
+ defer f.Close()
+
for {
- parent := filepath.Dir(path)
- if parent == path {
- // Made it to the root without seeing a cycle.
- // Use this symlink.
- return true
- }
- parentInfo, err := os.Stat(parent)
+ // We impose an arbitrary limit on the number of ReadDir results per
+ // directory to limit the amount of memory consumed for stale or upcoming
+ // directory entries. The limit trades off CPU (number of syscalls to read
+ // the whole directory) against RAM (reachable directory entries other than
+ // the one currently being processed).
+ //
+ // Since we process the directories recursively, we will end up maintaining
+ // a slice of entries for each level of the directory tree.
+ // (Compare https://go.dev/issue/36197.)
+ ents, err := f.ReadDir(1024)
if err != nil {
- return false
+ if err != io.EOF {
+ w.opts.Logf("%v", err)
+ }
+ break
}
- if os.SameFile(ts, parentInfo) {
- // Cycle. Don't traverse.
- return false
+
+ for _, d := range ents {
+ nextPath := filepath.Join(path, d.Name())
+ if d.IsDir() {
+ select {
+ case w.sem <- struct{}{}:
+ // Got a new semaphore token, so we can traverse the directory concurrently.
+ d := d
+ w.walking.Add(1)
+ go func() {
+ defer func() {
+ <-w.sem
+ w.walking.Done()
+ }()
+ w.walk(nextPath, pathSymlinks, d)
+ }()
+ continue
+
+ default:
+ // No tokens available, so traverse serially.
+ }
+ }
+
+ w.walk(nextPath, pathSymlinks, d)
}
- path = parent
}
-
}
diff --git a/vendor/golang.org/x/tools/internal/imports/fix.go b/vendor/golang.org/x/tools/internal/imports/fix.go
index d4f1b4e8..93d49a6e 100644
--- a/vendor/golang.org/x/tools/internal/imports/fix.go
+++ b/vendor/golang.org/x/tools/internal/imports/fix.go
@@ -13,6 +13,8 @@ import (
"go/build"
"go/parser"
"go/token"
+ "go/types"
+ "io/fs"
"io/ioutil"
"os"
"path"
@@ -29,6 +31,7 @@ import (
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
"golang.org/x/tools/internal/gopathwalk"
+ "golang.org/x/tools/internal/stdlib"
)
// importToGroup is a list of functions which map from an import path to
@@ -107,7 +110,7 @@ func parseOtherFiles(fset *token.FileSet, srcDir, filename string) []*ast.File {
considerTests := strings.HasSuffix(filename, "_test.go")
fileBase := filepath.Base(filename)
- packageFileInfos, err := ioutil.ReadDir(srcDir)
+ packageFileInfos, err := os.ReadDir(srcDir)
if err != nil {
return nil
}
@@ -253,7 +256,7 @@ type pass struct {
otherFiles []*ast.File // sibling files.
// Intermediate state, generated by load.
- existingImports map[string]*ImportInfo
+ existingImports map[string][]*ImportInfo
allRefs references
missingRefs references
@@ -298,6 +301,20 @@ func (p *pass) loadPackageNames(imports []*ImportInfo) error {
return nil
}
+// if there is a trailing major version, remove it
+func withoutVersion(nm string) string {
+ if v := path.Base(nm); len(v) > 0 && v[0] == 'v' {
+ if _, err := strconv.Atoi(v[1:]); err == nil {
+ // this is, for instance, called with rand/v2 and returns rand
+ if len(v) < len(nm) {
+ xnm := nm[:len(nm)-len(v)-1]
+ return path.Base(xnm)
+ }
+ }
+ }
+ return nm
+}
+
// importIdentifier returns the identifier that imp will introduce. It will
// guess if the package name has not been loaded, e.g. because the source
// is not available.
@@ -307,7 +324,7 @@ func (p *pass) importIdentifier(imp *ImportInfo) string {
}
known := p.knownPackages[imp.ImportPath]
if known != nil && known.name != "" {
- return known.name
+ return withoutVersion(known.name)
}
return ImportPathToAssumedName(imp.ImportPath)
}
@@ -318,7 +335,7 @@ func (p *pass) importIdentifier(imp *ImportInfo) string {
func (p *pass) load() ([]*ImportFix, bool) {
p.knownPackages = map[string]*packageInfo{}
p.missingRefs = references{}
- p.existingImports = map[string]*ImportInfo{}
+ p.existingImports = map[string][]*ImportInfo{}
// Load basic information about the file in question.
p.allRefs = collectReferences(p.f)
@@ -349,7 +366,7 @@ func (p *pass) load() ([]*ImportFix, bool) {
}
}
for _, imp := range imports {
- p.existingImports[p.importIdentifier(imp)] = imp
+ p.existingImports[p.importIdentifier(imp)] = append(p.existingImports[p.importIdentifier(imp)], imp)
}
// Find missing references.
@@ -388,31 +405,33 @@ func (p *pass) fix() ([]*ImportFix, bool) {
// Found everything, or giving up. Add the new imports and remove any unused.
var fixes []*ImportFix
- for _, imp := range p.existingImports {
- // We deliberately ignore globals here, because we can't be sure
- // they're in the same package. People do things like put multiple
- // main packages in the same directory, and we don't want to
- // remove imports if they happen to have the same name as a var in
- // a different package.
- if _, ok := p.allRefs[p.importIdentifier(imp)]; !ok {
- fixes = append(fixes, &ImportFix{
- StmtInfo: *imp,
- IdentName: p.importIdentifier(imp),
- FixType: DeleteImport,
- })
- continue
- }
+ for _, identifierImports := range p.existingImports {
+ for _, imp := range identifierImports {
+ // We deliberately ignore globals here, because we can't be sure
+ // they're in the same package. People do things like put multiple
+ // main packages in the same directory, and we don't want to
+ // remove imports if they happen to have the same name as a var in
+ // a different package.
+ if _, ok := p.allRefs[p.importIdentifier(imp)]; !ok {
+ fixes = append(fixes, &ImportFix{
+ StmtInfo: *imp,
+ IdentName: p.importIdentifier(imp),
+ FixType: DeleteImport,
+ })
+ continue
+ }
- // An existing import may need to update its import name to be correct.
- if name := p.importSpecName(imp); name != imp.Name {
- fixes = append(fixes, &ImportFix{
- StmtInfo: ImportInfo{
- Name: name,
- ImportPath: imp.ImportPath,
- },
- IdentName: p.importIdentifier(imp),
- FixType: SetImportName,
- })
+ // An existing import may need to update its import name to be correct.
+ if name := p.importSpecName(imp); name != imp.Name {
+ fixes = append(fixes, &ImportFix{
+ StmtInfo: ImportInfo{
+ Name: name,
+ ImportPath: imp.ImportPath,
+ },
+ IdentName: p.importIdentifier(imp),
+ FixType: SetImportName,
+ })
+ }
}
}
// Collecting fixes involved map iteration, so sort for stability. See
@@ -507,9 +526,9 @@ func (p *pass) assumeSiblingImportsValid() {
}
for left, rights := range refs {
if imp, ok := importsByName[left]; ok {
- if m, ok := stdlib[imp.ImportPath]; ok {
+ if m, ok := stdlib.PackageSymbols[imp.ImportPath]; ok {
// We have the stdlib in memory; no need to guess.
- rights = copyExports(m)
+ rights = symbolNameSet(m)
}
p.addCandidate(imp, &packageInfo{
// no name; we already know it.
@@ -637,7 +656,7 @@ func getCandidatePkgs(ctx context.Context, wrappedCallback *scanCallback, filena
dupCheck := map[string]struct{}{}
// Start off with the standard library.
- for importPath, exports := range stdlib {
+ for importPath, symbols := range stdlib.PackageSymbols {
p := &pkg{
dir: filepath.Join(goenv["GOROOT"], "src", importPath),
importPathShort: importPath,
@@ -646,6 +665,13 @@ func getCandidatePkgs(ctx context.Context, wrappedCallback *scanCallback, filena
}
dupCheck[importPath] = struct{}{}
if notSelf(p) && wrappedCallback.dirFound(p) && wrappedCallback.packageNameLoaded(p) {
+ var exports []stdlib.Symbol
+ for _, sym := range symbols {
+ switch sym.Kind {
+ case stdlib.Func, stdlib.Type, stdlib.Var, stdlib.Const:
+ exports = append(exports, sym)
+ }
+ }
wrappedCallback.exportsLoaded(p, exports)
}
}
@@ -666,7 +692,7 @@ func getCandidatePkgs(ctx context.Context, wrappedCallback *scanCallback, filena
dupCheck[pkg.importPathShort] = struct{}{}
return notSelf(pkg) && wrappedCallback.packageNameLoaded(pkg)
},
- exportsLoaded: func(pkg *pkg, exports []string) {
+ exportsLoaded: func(pkg *pkg, exports []stdlib.Symbol) {
// If we're an x_test, load the package under test's test variant.
if strings.HasSuffix(filePkg, "_test") && pkg.dir == filepath.Dir(filename) {
var err error
@@ -697,20 +723,21 @@ func ScoreImportPaths(ctx context.Context, env *ProcessEnv, paths []string) (map
return result, nil
}
-func PrimeCache(ctx context.Context, env *ProcessEnv) error {
+func PrimeCache(ctx context.Context, resolver Resolver) error {
// Fully scan the disk for directories, but don't actually read any Go files.
callback := &scanCallback{
- rootFound: func(gopathwalk.Root) bool {
- return true
+ rootFound: func(root gopathwalk.Root) bool {
+ // See getCandidatePkgs: walking GOROOT is apparently expensive and
+ // unnecessary.
+ return root.Type != gopathwalk.RootGOROOT
},
dirFound: func(pkg *pkg) bool {
return false
},
- packageNameLoaded: func(pkg *pkg) bool {
- return false
- },
+ // packageNameLoaded and exportsLoaded must never be called.
}
- return getCandidatePkgs(ctx, callback, "", "", env)
+
+ return resolver.scan(ctx, callback)
}
func candidateImportName(pkg *pkg) string {
@@ -790,7 +817,7 @@ func GetImportPaths(ctx context.Context, wrapped func(ImportFix), searchPrefix,
// A PackageExport is a package and its exports.
type PackageExport struct {
Fix *ImportFix
- Exports []string
+ Exports []stdlib.Symbol
}
// GetPackageExports returns all known packages with name pkg and their exports.
@@ -805,8 +832,8 @@ func GetPackageExports(ctx context.Context, wrapped func(PackageExport), searchP
packageNameLoaded: func(pkg *pkg) bool {
return pkg.packageName == searchPkg
},
- exportsLoaded: func(pkg *pkg, exports []string) {
- sort.Strings(exports)
+ exportsLoaded: func(pkg *pkg, exports []stdlib.Symbol) {
+ sortSymbols(exports)
wrapped(PackageExport{
Fix: &ImportFix{
StmtInfo: ImportInfo{
@@ -824,16 +851,45 @@ func GetPackageExports(ctx context.Context, wrapped func(PackageExport), searchP
return getCandidatePkgs(ctx, callback, filename, filePkg, env)
}
-var requiredGoEnvVars = []string{"GO111MODULE", "GOFLAGS", "GOINSECURE", "GOMOD", "GOMODCACHE", "GONOPROXY", "GONOSUMDB", "GOPATH", "GOPROXY", "GOROOT", "GOSUMDB", "GOWORK"}
+// TODO(rfindley): we should depend on GOOS and GOARCH, to provide accurate
+// imports when doing cross-platform development.
+var requiredGoEnvVars = []string{
+ "GO111MODULE",
+ "GOFLAGS",
+ "GOINSECURE",
+ "GOMOD",
+ "GOMODCACHE",
+ "GONOPROXY",
+ "GONOSUMDB",
+ "GOPATH",
+ "GOPROXY",
+ "GOROOT",
+ "GOSUMDB",
+ "GOWORK",
+}
// ProcessEnv contains environment variables and settings that affect the use of
// the go command, the go/build package, etc.
+//
+// ...a ProcessEnv *also* overwrites its Env along with derived state in the
+// form of the resolver. And because it is lazily initialized, an env may just
+// be broken and unusable, but there is no way for the caller to detect that:
+// all queries will just fail.
+//
+// TODO(rfindley): refactor this package so that this type (perhaps renamed to
+// just Env or Config) is an immutable configuration struct, to be exchanged
+// for an initialized object via a constructor that returns an error. Perhaps
+// the signature should be `func NewResolver(*Env) (*Resolver, error)`, where
+// resolver is a concrete type used for resolving imports. Via this
+// refactoring, we can avoid the need to call ProcessEnv.init and
+// ProcessEnv.GoEnv everywhere, and implicitly fix all the places where this
+// these are misused. Also, we'd delegate the caller the decision of how to
+// handle a broken environment.
type ProcessEnv struct {
GocmdRunner *gocommand.Runner
BuildFlags []string
ModFlag string
- ModFile string
// SkipPathInScan returns true if the path should be skipped from scans of
// the RootCurrentModule root type. The function argument is a clean,
@@ -843,7 +899,7 @@ type ProcessEnv struct {
// Env overrides the OS environment, and can be used to specify
// GOPROXY, GO111MODULE, etc. PATH cannot be set here, because
// exec.Command will not honor it.
- // Specifying all of RequiredGoEnvVars avoids a call to `go env`.
+ // Specifying all of requiredGoEnvVars avoids a call to `go env`.
Env map[string]string
WorkingDir string
@@ -851,9 +907,17 @@ type ProcessEnv struct {
// If Logf is non-nil, debug logging is enabled through this function.
Logf func(format string, args ...interface{})
- initialized bool
+ // If set, ModCache holds a shared cache of directory info to use across
+ // multiple ProcessEnvs.
+ ModCache *DirInfoCache
+
+ initialized bool // see TODO above
- resolver Resolver
+ // resolver and resolverErr are lazily evaluated (see GetResolver).
+ // This is unclean, but see the big TODO in the docstring for ProcessEnv
+ // above: for now, we can't be sure that the ProcessEnv is fully initialized.
+ resolver Resolver
+ resolverErr error
}
func (e *ProcessEnv) goEnv() (map[string]string, error) {
@@ -933,20 +997,33 @@ func (e *ProcessEnv) env() []string {
}
func (e *ProcessEnv) GetResolver() (Resolver, error) {
- if e.resolver != nil {
- return e.resolver, nil
- }
if err := e.init(); err != nil {
return nil, err
}
- if len(e.Env["GOMOD"]) == 0 && len(e.Env["GOWORK"]) == 0 {
- e.resolver = newGopathResolver(e)
- return e.resolver, nil
+
+ if e.resolver == nil && e.resolverErr == nil {
+ // TODO(rfindley): we should only use a gopathResolver here if the working
+ // directory is actually *in* GOPATH. (I seem to recall an open gopls issue
+ // for this behavior, but I can't find it).
+ //
+ // For gopls, we can optionally explicitly choose a resolver type, since we
+ // already know the view type.
+ if len(e.Env["GOMOD"]) == 0 && len(e.Env["GOWORK"]) == 0 {
+ e.resolver = newGopathResolver(e)
+ } else if r, err := newModuleResolver(e, e.ModCache); err != nil {
+ e.resolverErr = err
+ } else {
+ e.resolver = Resolver(r)
+ }
}
- e.resolver = newModuleResolver(e)
- return e.resolver, nil
+
+ return e.resolver, e.resolverErr
}
+// buildContext returns the build.Context to use for matching files.
+//
+// TODO(rfindley): support dynamic GOOS, GOARCH here, when doing cross-platform
+// development.
func (e *ProcessEnv) buildContext() (*build.Context, error) {
ctx := build.Default
goenv, err := e.goEnv()
@@ -996,24 +1073,40 @@ func addStdlibCandidates(pass *pass, refs references) error {
if err != nil {
return err
}
+ localbase := func(nm string) string {
+ ans := path.Base(nm)
+ if ans[0] == 'v' {
+ // this is called, for instance, with math/rand/v2 and returns rand/v2
+ if _, err := strconv.Atoi(ans[1:]); err == nil {
+ ix := strings.LastIndex(nm, ans)
+ more := path.Base(nm[:ix])
+ ans = path.Join(more, ans)
+ }
+ }
+ return ans
+ }
add := func(pkg string) {
// Prevent self-imports.
if path.Base(pkg) == pass.f.Name.Name && filepath.Join(goenv["GOROOT"], "src", pkg) == pass.srcDir {
return
}
- exports := copyExports(stdlib[pkg])
+ exports := symbolNameSet(stdlib.PackageSymbols[pkg])
pass.addCandidate(
&ImportInfo{ImportPath: pkg},
- &packageInfo{name: path.Base(pkg), exports: exports})
+ &packageInfo{name: localbase(pkg), exports: exports})
}
for left := range refs {
if left == "rand" {
- // Make sure we try crypto/rand before math/rand.
+ // Make sure we try crypto/rand before any version of math/rand as both have Int()
+ // and our policy is to recommend crypto
add("crypto/rand")
- add("math/rand")
+ // if the user's no later than go1.21, this should be "math/rand"
+ // but we have no way of figuring out what the user is using
+ // TODO: investigate using the toolchain version to disambiguate in the stdlib
+ add("math/rand/v2")
continue
}
- for importPath := range stdlib {
+ for importPath := range stdlib.PackageSymbols {
if path.Base(importPath) == left {
add(importPath)
}
@@ -1026,15 +1119,23 @@ func addStdlibCandidates(pass *pass, refs references) error {
type Resolver interface {
// loadPackageNames loads the package names in importPaths.
loadPackageNames(importPaths []string, srcDir string) (map[string]string, error)
+
// scan works with callback to search for packages. See scanCallback for details.
scan(ctx context.Context, callback *scanCallback) error
+
// loadExports returns the set of exported symbols in the package at dir.
// loadExports may be called concurrently.
- loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []string, error)
+ loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []stdlib.Symbol, error)
+
// scoreImportPath returns the relevance for an import path.
scoreImportPath(ctx context.Context, path string) float64
- ClearForNewScan()
+ // ClearForNewScan returns a new Resolver based on the receiver that has
+ // cleared its internal caches of directory contents.
+ //
+ // The new resolver should be primed and then set via
+ // [ProcessEnv.UpdateResolver].
+ ClearForNewScan() Resolver
}
// A scanCallback controls a call to scan and receives its results.
@@ -1053,7 +1154,7 @@ type scanCallback struct {
// If it returns true, the package's exports will be loaded.
packageNameLoaded func(pkg *pkg) bool
// exportsLoaded is called when a package's exports have been loaded.
- exportsLoaded func(pkg *pkg, exports []string)
+ exportsLoaded func(pkg *pkg, exports []stdlib.Symbol)
}
func addExternalCandidates(ctx context.Context, pass *pass, refs references, filename string) error {
@@ -1117,7 +1218,7 @@ func addExternalCandidates(ctx context.Context, pass *pass, refs references, fil
go func(pkgName string, symbols map[string]bool) {
defer wg.Done()
- found, err := findImport(ctx, pass, found[pkgName], pkgName, symbols, filename)
+ found, err := findImport(ctx, pass, found[pkgName], pkgName, symbols)
if err != nil {
firstErrOnce.Do(func() {
@@ -1148,6 +1249,17 @@ func addExternalCandidates(ctx context.Context, pass *pass, refs references, fil
}()
for result := range results {
+ // Don't offer completions that would shadow predeclared
+ // names, such as github.com/coreos/etcd/error.
+ if types.Universe.Lookup(result.pkg.name) != nil { // predeclared
+ // Ideally we would skip this candidate only
+ // if the predeclared name is actually
+ // referenced by the file, but that's a lot
+ // trickier to compute and would still create
+ // an import that is likely to surprise the
+ // user before long.
+ continue
+ }
pass.addCandidate(result.imp, result.pkg)
}
return firstErr
@@ -1190,31 +1302,22 @@ func ImportPathToAssumedName(importPath string) string {
type gopathResolver struct {
env *ProcessEnv
walked bool
- cache *dirInfoCache
+ cache *DirInfoCache
scanSema chan struct{} // scanSema prevents concurrent scans.
}
func newGopathResolver(env *ProcessEnv) *gopathResolver {
r := &gopathResolver{
- env: env,
- cache: &dirInfoCache{
- dirs: map[string]*directoryPackageInfo{},
- listeners: map[*int]cacheListener{},
- },
+ env: env,
+ cache: NewDirInfoCache(),
scanSema: make(chan struct{}, 1),
}
r.scanSema <- struct{}{}
return r
}
-func (r *gopathResolver) ClearForNewScan() {
- <-r.scanSema
- r.cache = &dirInfoCache{
- dirs: map[string]*directoryPackageInfo{},
- listeners: map[*int]cacheListener{},
- }
- r.walked = false
- r.scanSema <- struct{}{}
+func (r *gopathResolver) ClearForNewScan() Resolver {
+ return newGopathResolver(r.env)
}
func (r *gopathResolver) loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) {
@@ -1232,7 +1335,7 @@ func (r *gopathResolver) loadPackageNames(importPaths []string, srcDir string) (
// importPathToName finds out the actual package name, as declared in its .go files.
func importPathToName(bctx *build.Context, importPath, srcDir string) string {
// Fast path for standard library without going to disk.
- if _, ok := stdlib[importPath]; ok {
+ if stdlib.HasPackage(importPath) {
return path.Base(importPath) // stdlib packages always match their paths.
}
@@ -1430,7 +1533,7 @@ func (r *gopathResolver) scan(ctx context.Context, callback *scanCallback) error
}
func (r *gopathResolver) scoreImportPath(ctx context.Context, path string) float64 {
- if _, ok := stdlib[path]; ok {
+ if stdlib.HasPackage(path) {
return MaxRelevance
}
return MaxRelevance - 1
@@ -1447,7 +1550,7 @@ func filterRoots(roots []gopathwalk.Root, include func(gopathwalk.Root) bool) []
return result
}
-func (r *gopathResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []string, error) {
+func (r *gopathResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []stdlib.Symbol, error) {
if info, ok := r.cache.Load(pkg.dir); ok && !includeTest {
return r.cache.CacheExports(ctx, r.env, info)
}
@@ -1467,13 +1570,13 @@ func VendorlessPath(ipath string) string {
return ipath
}
-func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, includeTest bool) (string, []string, error) {
+func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, includeTest bool) (string, []stdlib.Symbol, error) {
// Look for non-test, buildable .go files which could provide exports.
- all, err := ioutil.ReadDir(dir)
+ all, err := os.ReadDir(dir)
if err != nil {
return "", nil, err
}
- var files []os.FileInfo
+ var files []fs.DirEntry
for _, fi := range all {
name := fi.Name()
if !strings.HasSuffix(name, ".go") || (!includeTest && strings.HasSuffix(name, "_test.go")) {
@@ -1491,7 +1594,7 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, incl
}
var pkgName string
- var exports []string
+ var exports []stdlib.Symbol
fset := token.NewFileSet()
for _, fi := range files {
select {
@@ -1518,24 +1621,44 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, incl
continue
}
pkgName = f.Name.Name
- for name := range f.Scope.Objects {
+ for name, obj := range f.Scope.Objects {
if ast.IsExported(name) {
- exports = append(exports, name)
+ var kind stdlib.Kind
+ switch obj.Kind {
+ case ast.Con:
+ kind = stdlib.Const
+ case ast.Typ:
+ kind = stdlib.Type
+ case ast.Var:
+ kind = stdlib.Var
+ case ast.Fun:
+ kind = stdlib.Func
+ }
+ exports = append(exports, stdlib.Symbol{
+ Name: name,
+ Kind: kind,
+ Version: 0, // unknown; be permissive
+ })
}
}
}
+ sortSymbols(exports)
if env.Logf != nil {
- sortedExports := append([]string(nil), exports...)
- sort.Strings(sortedExports)
- env.Logf("loaded exports in dir %v (package %v): %v", dir, pkgName, strings.Join(sortedExports, ", "))
+ env.Logf("loaded exports in dir %v (package %v): %v", dir, pkgName, exports)
}
return pkgName, exports, nil
}
+func sortSymbols(syms []stdlib.Symbol) {
+ sort.Slice(syms, func(i, j int) bool {
+ return syms[i].Name < syms[j].Name
+ })
+}
+
// findImport searches for a package with the given symbols.
// If no package is found, findImport returns ("", false, nil)
-func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgName string, symbols map[string]bool, filename string) (*pkg, error) {
+func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgName string, symbols map[string]bool) (*pkg, error) {
// Sort the candidates by their import package length,
// assuming that shorter package names are better than long
// ones. Note that this sorts by the de-vendored name, so
@@ -1599,7 +1722,7 @@ func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgNa
exportsMap := make(map[string]bool, len(exports))
for _, sym := range exports {
- exportsMap[sym] = true
+ exportsMap[sym.Name] = true
}
// If it doesn't have the right
@@ -1757,10 +1880,13 @@ func (fn visitFn) Visit(node ast.Node) ast.Visitor {
return fn(node)
}
-func copyExports(pkg []string) map[string]bool {
- m := make(map[string]bool, len(pkg))
- for _, v := range pkg {
- m[v] = true
+func symbolNameSet(symbols []stdlib.Symbol) map[string]bool {
+ names := make(map[string]bool)
+ for _, sym := range symbols {
+ switch sym.Kind {
+ case stdlib.Const, stdlib.Var, stdlib.Type, stdlib.Func:
+ names[sym.Name] = true
+ }
}
- return m
+ return names
}
diff --git a/vendor/golang.org/x/tools/internal/imports/imports.go b/vendor/golang.org/x/tools/internal/imports/imports.go
index 58e637b9..f8346552 100644
--- a/vendor/golang.org/x/tools/internal/imports/imports.go
+++ b/vendor/golang.org/x/tools/internal/imports/imports.go
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:generate go run mkstdlib.go
-
// Package imports implements a Go pretty-printer (like package "go/format")
// that also adds or removes import statements as necessary.
package imports
@@ -109,7 +107,7 @@ func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options, e
}
// formatFile formats the file syntax tree.
-// It may mutate the token.FileSet.
+// It may mutate the token.FileSet and the ast.File.
//
// If an adjust function is provided, it is called after formatting
// with the original source (formatFile's src parameter) and the
@@ -236,7 +234,7 @@ func parse(fset *token.FileSet, filename string, src []byte, opt *Options) (*ast
src = src[:len(src)-len("}\n")]
// Gofmt has also indented the function body one level.
// Remove that indent.
- src = bytes.Replace(src, []byte("\n\t"), []byte("\n"), -1)
+ src = bytes.ReplaceAll(src, []byte("\n\t"), []byte("\n"))
return matchSpace(orig, src)
}
return file, adjust, nil
diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go
index 977d2389..82fe644a 100644
--- a/vendor/golang.org/x/tools/internal/imports/mod.go
+++ b/vendor/golang.org/x/tools/internal/imports/mod.go
@@ -9,7 +9,6 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
"os"
"path"
"path/filepath"
@@ -22,78 +21,138 @@ import (
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
"golang.org/x/tools/internal/gopathwalk"
+ "golang.org/x/tools/internal/stdlib"
)
-// ModuleResolver implements resolver for modules using the go command as little
-// as feasible.
+// Notes(rfindley): ModuleResolver appears to be heavily optimized for scanning
+// as fast as possible, which is desirable for a call to goimports from the
+// command line, but it doesn't work as well for gopls, where it suffers from
+// slow startup (golang/go#44863) and intermittent hanging (golang/go#59216),
+// both caused by populating the cache, albeit in slightly different ways.
+//
+// A high level list of TODOs:
+// - Optimize the scan itself, as there is some redundancy statting and
+// reading go.mod files.
+// - Invert the relationship between ProcessEnv and Resolver (see the
+// docstring of ProcessEnv).
+// - Make it easier to use an external resolver implementation.
+//
+// Smaller TODOs are annotated in the code below.
+
+// ModuleResolver implements the Resolver interface for a workspace using
+// modules.
+//
+// A goal of the ModuleResolver is to invoke the Go command as little as
+// possible. To this end, it runs the Go command only for listing module
+// information (i.e. `go list -m -e -json ...`). Package scanning, the process
+// of loading package information for the modules, is implemented internally
+// via the scan method.
+//
+// It has two types of state: the state derived from the go command, which
+// is populated by init, and the state derived from scans, which is populated
+// via scan. A root is considered scanned if it has been walked to discover
+// directories. However, if the scan did not require additional information
+// from the directory (such as package name or exports), the directory
+// information itself may be partially populated. It will be lazily filled in
+// as needed by scans, using the scanCallback.
type ModuleResolver struct {
- env *ProcessEnv
- moduleCacheDir string
- dummyVendorMod *gocommand.ModuleJSON // If vendoring is enabled, the pseudo-module that represents the /vendor directory.
- roots []gopathwalk.Root
- scanSema chan struct{} // scanSema prevents concurrent scans and guards scannedRoots.
- scannedRoots map[gopathwalk.Root]bool
-
- initialized bool
- mains []*gocommand.ModuleJSON
- mainByDir map[string]*gocommand.ModuleJSON
- modsByModPath []*gocommand.ModuleJSON // All modules, ordered by # of path components in module Path...
- modsByDir []*gocommand.ModuleJSON // ...or number of path components in their Dir.
-
- // moduleCacheCache stores information about the module cache.
- moduleCacheCache *dirInfoCache
- otherCache *dirInfoCache
+ env *ProcessEnv
+
+ // Module state, populated during construction
+ dummyVendorMod *gocommand.ModuleJSON // if vendoring is enabled, a pseudo-module to represent the /vendor directory
+ moduleCacheDir string // GOMODCACHE, inferred from GOPATH if unset
+ roots []gopathwalk.Root // roots to scan, in approximate order of importance
+ mains []*gocommand.ModuleJSON // main modules
+ mainByDir map[string]*gocommand.ModuleJSON // module information by dir, to join with roots
+ modsByModPath []*gocommand.ModuleJSON // all modules, ordered by # of path components in their module path
+ modsByDir []*gocommand.ModuleJSON // ...or by the number of path components in their Dir.
+
+ // Scanning state, populated by scan
+
+ // scanSema prevents concurrent scans, and guards scannedRoots and the cache
+ // fields below (though the caches themselves are concurrency safe).
+ // Receive to acquire, send to release.
+ scanSema chan struct{}
+ scannedRoots map[gopathwalk.Root]bool // if true, root has been walked
+
+ // Caches of directory info, populated by scans and scan callbacks
+ //
+ // moduleCacheCache stores cached information about roots in the module
+ // cache, which are immutable and therefore do not need to be invalidated.
+ //
+ // otherCache stores information about all other roots (even GOROOT), which
+ // may change.
+ moduleCacheCache *DirInfoCache
+ otherCache *DirInfoCache
}
-func newModuleResolver(e *ProcessEnv) *ModuleResolver {
+// newModuleResolver returns a new module-aware goimports resolver.
+//
+// Note: use caution when modifying this constructor: changes must also be
+// reflected in ModuleResolver.ClearForNewScan.
+func newModuleResolver(e *ProcessEnv, moduleCacheCache *DirInfoCache) (*ModuleResolver, error) {
r := &ModuleResolver{
env: e,
scanSema: make(chan struct{}, 1),
}
- r.scanSema <- struct{}{}
- return r
-}
-
-func (r *ModuleResolver) init() error {
- if r.initialized {
- return nil
- }
+ r.scanSema <- struct{}{} // release
goenv, err := r.env.goEnv()
if err != nil {
- return err
+ return nil, err
}
+
+ // TODO(rfindley): can we refactor to share logic with r.env.invokeGo?
inv := gocommand.Invocation{
BuildFlags: r.env.BuildFlags,
ModFlag: r.env.ModFlag,
- ModFile: r.env.ModFile,
Env: r.env.env(),
Logf: r.env.Logf,
WorkingDir: r.env.WorkingDir,
}
vendorEnabled := false
- var mainModVendor *gocommand.ModuleJSON
-
- // Module vendor directories are ignored in workspace mode:
- // https://go.googlesource.com/proposal/+/master/design/45713-workspace.md
- if len(r.env.Env["GOWORK"]) == 0 {
+ var mainModVendor *gocommand.ModuleJSON // for module vendoring
+ var mainModsVendor []*gocommand.ModuleJSON // for workspace vendoring
+
+ goWork := r.env.Env["GOWORK"]
+ if len(goWork) == 0 {
+ // TODO(rfindley): VendorEnabled runs the go command to get GOFLAGS, but
+ // they should be available from the ProcessEnv. Can we avoid the redundant
+ // invocation?
vendorEnabled, mainModVendor, err = gocommand.VendorEnabled(context.TODO(), inv, r.env.GocmdRunner)
if err != nil {
- return err
+ return nil, err
+ }
+ } else {
+ vendorEnabled, mainModsVendor, err = gocommand.WorkspaceVendorEnabled(context.Background(), inv, r.env.GocmdRunner)
+ if err != nil {
+ return nil, err
}
}
- if mainModVendor != nil && vendorEnabled {
- // Vendor mode is on, so all the non-Main modules are irrelevant,
- // and we need to search /vendor for everything.
- r.mains = []*gocommand.ModuleJSON{mainModVendor}
- r.dummyVendorMod = &gocommand.ModuleJSON{
- Path: "",
- Dir: filepath.Join(mainModVendor.Dir, "vendor"),
+ if vendorEnabled {
+ if mainModVendor != nil {
+ // Module vendor mode is on, so all the non-Main modules are irrelevant,
+ // and we need to search /vendor for everything.
+ r.mains = []*gocommand.ModuleJSON{mainModVendor}
+ r.dummyVendorMod = &gocommand.ModuleJSON{
+ Path: "",
+ Dir: filepath.Join(mainModVendor.Dir, "vendor"),
+ }
+ r.modsByModPath = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod}
+ r.modsByDir = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod}
+ } else {
+ // Workspace vendor mode is on, so all the non-Main modules are irrelevant,
+ // and we need to search /vendor for everything.
+ r.mains = mainModsVendor
+ r.dummyVendorMod = &gocommand.ModuleJSON{
+ Path: "",
+ Dir: filepath.Join(filepath.Dir(goWork), "vendor"),
+ }
+ r.modsByModPath = append(append([]*gocommand.ModuleJSON{}, mainModsVendor...), r.dummyVendorMod)
+ r.modsByDir = append(append([]*gocommand.ModuleJSON{}, mainModsVendor...), r.dummyVendorMod)
}
- r.modsByModPath = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod}
- r.modsByDir = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod}
} else {
// Vendor mode is off, so run go list -m ... to find everything.
err := r.initAllMods()
@@ -101,19 +160,14 @@ func (r *ModuleResolver) init() error {
// GO111MODULE=on. Other errors are fatal.
if err != nil {
if errMsg := err.Error(); !strings.Contains(errMsg, "working directory is not part of a module") && !strings.Contains(errMsg, "go.mod file not found") {
- return err
+ return nil, err
}
}
}
- if gmc := r.env.Env["GOMODCACHE"]; gmc != "" {
- r.moduleCacheDir = gmc
- } else {
- gopaths := filepath.SplitList(goenv["GOPATH"])
- if len(gopaths) == 0 {
- return fmt.Errorf("empty GOPATH")
- }
- r.moduleCacheDir = filepath.Join(gopaths[0], "/pkg/mod")
+ r.moduleCacheDir = gomodcacheForEnv(goenv)
+ if r.moduleCacheDir == "" {
+ return nil, fmt.Errorf("cannot resolve GOMODCACHE")
}
sort.Slice(r.modsByModPath, func(i, j int) bool {
@@ -129,8 +183,9 @@ func (r *ModuleResolver) init() error {
return count(j) < count(i) // descending order
})
- r.roots = []gopathwalk.Root{
- {Path: filepath.Join(goenv["GOROOT"], "/src"), Type: gopathwalk.RootGOROOT},
+ r.roots = []gopathwalk.Root{}
+ if goenv["GOROOT"] != "" { // "" happens in tests
+ r.roots = append(r.roots, gopathwalk.Root{Path: filepath.Join(goenv["GOROOT"], "/src"), Type: gopathwalk.RootGOROOT})
}
r.mainByDir = make(map[string]*gocommand.ModuleJSON)
for _, main := range r.mains {
@@ -142,7 +197,11 @@ func (r *ModuleResolver) init() error {
} else {
addDep := func(mod *gocommand.ModuleJSON) {
if mod.Replace == nil {
- // This is redundant with the cache, but we'll skip it cheaply enough.
+ // This is redundant with the cache, but we'll skip it cheaply enough
+ // when we encounter it in the module cache scan.
+ //
+ // Including it at a lower index in r.roots than the module cache dir
+ // helps prioritize matches from within existing dependencies.
r.roots = append(r.roots, gopathwalk.Root{Path: mod.Dir, Type: gopathwalk.RootModuleCache})
} else {
r.roots = append(r.roots, gopathwalk.Root{Path: mod.Dir, Type: gopathwalk.RootOther})
@@ -159,24 +218,40 @@ func (r *ModuleResolver) init() error {
addDep(mod)
}
}
+ // If provided, share the moduleCacheCache.
+ //
+ // TODO(rfindley): The module cache is immutable. However, the loaded
+ // exports do depend on GOOS and GOARCH. Fortunately, the
+ // ProcessEnv.buildContext does not adjust these from build.DefaultContext
+ // (even though it should). So for now, this is OK to share, but we need to
+ // add logic for handling GOOS/GOARCH.
+ r.moduleCacheCache = moduleCacheCache
r.roots = append(r.roots, gopathwalk.Root{Path: r.moduleCacheDir, Type: gopathwalk.RootModuleCache})
}
r.scannedRoots = map[gopathwalk.Root]bool{}
if r.moduleCacheCache == nil {
- r.moduleCacheCache = &dirInfoCache{
- dirs: map[string]*directoryPackageInfo{},
- listeners: map[*int]cacheListener{},
- }
- }
- if r.otherCache == nil {
- r.otherCache = &dirInfoCache{
- dirs: map[string]*directoryPackageInfo{},
- listeners: map[*int]cacheListener{},
- }
+ r.moduleCacheCache = NewDirInfoCache()
}
- r.initialized = true
- return nil
+ r.otherCache = NewDirInfoCache()
+ return r, nil
+}
+
+// gomodcacheForEnv returns the GOMODCACHE value to use based on the given env
+// map, which must have GOMODCACHE and GOPATH populated.
+//
+// TODO(rfindley): this is defensive refactoring.
+// 1. Is this even relevant anymore? Can't we just read GOMODCACHE.
+// 2. Use this to separate module cache scanning from other scanning.
+func gomodcacheForEnv(goenv map[string]string) string {
+ if gmc := goenv["GOMODCACHE"]; gmc != "" {
+ return gmc
+ }
+ gopaths := filepath.SplitList(goenv["GOPATH"])
+ if len(gopaths) == 0 {
+ return ""
+ }
+ return filepath.Join(gopaths[0], "/pkg/mod")
}
func (r *ModuleResolver) initAllMods() error {
@@ -207,30 +282,86 @@ func (r *ModuleResolver) initAllMods() error {
return nil
}
-func (r *ModuleResolver) ClearForNewScan() {
- <-r.scanSema
- r.scannedRoots = map[gopathwalk.Root]bool{}
- r.otherCache = &dirInfoCache{
- dirs: map[string]*directoryPackageInfo{},
- listeners: map[*int]cacheListener{},
+// ClearForNewScan invalidates the last scan.
+//
+// It preserves the set of roots, but forgets about the set of directories.
+// Though it forgets the set of module cache directories, it remembers their
+// contents, since they are assumed to be immutable.
+func (r *ModuleResolver) ClearForNewScan() Resolver {
+ <-r.scanSema // acquire r, to guard scannedRoots
+ r2 := &ModuleResolver{
+ env: r.env,
+ dummyVendorMod: r.dummyVendorMod,
+ moduleCacheDir: r.moduleCacheDir,
+ roots: r.roots,
+ mains: r.mains,
+ mainByDir: r.mainByDir,
+ modsByModPath: r.modsByModPath,
+
+ scanSema: make(chan struct{}, 1),
+ scannedRoots: make(map[gopathwalk.Root]bool),
+ otherCache: NewDirInfoCache(),
+ moduleCacheCache: r.moduleCacheCache,
+ }
+ r2.scanSema <- struct{}{} // r2 must start released
+ // Invalidate root scans. We don't need to invalidate module cache roots,
+ // because they are immutable.
+ // (We don't support a use case where GOMODCACHE is cleaned in the middle of
+ // e.g. a gopls session: the user must restart gopls to get accurate
+ // imports.)
+ //
+ // Scanning for new directories in GOMODCACHE should be handled elsewhere,
+ // via a call to ScanModuleCache.
+ for _, root := range r.roots {
+ if root.Type == gopathwalk.RootModuleCache && r.scannedRoots[root] {
+ r2.scannedRoots[root] = true
+ }
}
- r.scanSema <- struct{}{}
+ r.scanSema <- struct{}{} // release r
+ return r2
}
-func (r *ModuleResolver) ClearForNewMod() {
- <-r.scanSema
- *r = ModuleResolver{
- env: r.env,
- moduleCacheCache: r.moduleCacheCache,
- otherCache: r.otherCache,
- scanSema: r.scanSema,
+// ClearModuleInfo invalidates resolver state that depends on go.mod file
+// contents (essentially, the output of go list -m -json ...).
+//
+// Notably, it does not forget directory contents, which are reset
+// asynchronously via ClearForNewScan.
+//
+// If the ProcessEnv is a GOPATH environment, ClearModuleInfo is a no op.
+//
+// TODO(rfindley): move this to a new env.go, consolidating ProcessEnv methods.
+func (e *ProcessEnv) ClearModuleInfo() {
+ if r, ok := e.resolver.(*ModuleResolver); ok {
+ resolver, err := newModuleResolver(e, e.ModCache)
+ if err != nil {
+ e.resolver = nil
+ e.resolverErr = err
+ return
+ }
+
+ <-r.scanSema // acquire (guards caches)
+ resolver.moduleCacheCache = r.moduleCacheCache
+ resolver.otherCache = r.otherCache
+ r.scanSema <- struct{}{} // release
+
+ e.UpdateResolver(resolver)
}
- r.init()
- r.scanSema <- struct{}{}
}
-// findPackage returns the module and directory that contains the package at
-// the given import path, or returns nil, "" if no module is in scope.
+// UpdateResolver sets the resolver for the ProcessEnv to use in imports
+// operations. Only for use with the result of [Resolver.ClearForNewScan].
+//
+// TODO(rfindley): this awkward API is a result of the (arguably) inverted
+// relationship between configuration and state described in the doc comment
+// for [ProcessEnv].
+func (e *ProcessEnv) UpdateResolver(r Resolver) {
+ e.resolver = r
+ e.resolverErr = nil
+}
+
+// findPackage returns the module and directory from within the main modules
+// and their dependencies that contains the package at the given import path,
+// or returns nil, "" if no module is in scope.
func (r *ModuleResolver) findPackage(importPath string) (*gocommand.ModuleJSON, string) {
// This can't find packages in the stdlib, but that's harmless for all
// the existing code paths.
@@ -265,7 +396,7 @@ func (r *ModuleResolver) findPackage(importPath string) (*gocommand.ModuleJSON,
}
// Not cached. Read the filesystem.
- pkgFiles, err := ioutil.ReadDir(pkgDir)
+ pkgFiles, err := os.ReadDir(pkgDir)
if err != nil {
continue
}
@@ -296,10 +427,6 @@ func (r *ModuleResolver) cacheStore(info directoryPackageInfo) {
}
}
-func (r *ModuleResolver) cacheKeys() []string {
- return append(r.moduleCacheCache.Keys(), r.otherCache.Keys()...)
-}
-
// cachePackageName caches the package name for a dir already in the cache.
func (r *ModuleResolver) cachePackageName(info directoryPackageInfo) (string, error) {
if info.rootType == gopathwalk.RootModuleCache {
@@ -308,7 +435,7 @@ func (r *ModuleResolver) cachePackageName(info directoryPackageInfo) (string, er
return r.otherCache.CachePackageName(info)
}
-func (r *ModuleResolver) cacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []string, error) {
+func (r *ModuleResolver) cacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []stdlib.Symbol, error) {
if info.rootType == gopathwalk.RootModuleCache {
return r.moduleCacheCache.CacheExports(ctx, env, info)
}
@@ -368,15 +495,15 @@ func (r *ModuleResolver) dirIsNestedModule(dir string, mod *gocommand.ModuleJSON
return modDir != mod.Dir
}
-func (r *ModuleResolver) modInfo(dir string) (modDir string, modName string) {
- readModName := func(modFile string) string {
- modBytes, err := ioutil.ReadFile(modFile)
- if err != nil {
- return ""
- }
- return modulePath(modBytes)
+func readModName(modFile string) string {
+ modBytes, err := os.ReadFile(modFile)
+ if err != nil {
+ return ""
}
+ return modulePath(modBytes)
+}
+func (r *ModuleResolver) modInfo(dir string) (modDir, modName string) {
if r.dirInModuleCache(dir) {
if matches := modCacheRegexp.FindStringSubmatch(dir); len(matches) == 3 {
index := strings.Index(dir, matches[1]+"@"+matches[2])
@@ -410,11 +537,9 @@ func (r *ModuleResolver) dirInModuleCache(dir string) bool {
}
func (r *ModuleResolver) loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) {
- if err := r.init(); err != nil {
- return nil, err
- }
names := map[string]string{}
for _, path := range importPaths {
+ // TODO(rfindley): shouldn't this use the dirInfoCache?
_, packageDir := r.findPackage(path)
if packageDir == "" {
continue
@@ -432,10 +557,6 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error
ctx, done := event.Start(ctx, "imports.ModuleResolver.scan")
defer done()
- if err := r.init(); err != nil {
- return err
- }
-
processDir := func(info directoryPackageInfo) {
// Skip this directory if we were not able to get the package information successfully.
if scanned, err := info.reachedStatus(directoryScanned); !scanned || err != nil {
@@ -445,18 +566,18 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error
if err != nil {
return
}
-
if !callback.dirFound(pkg) {
return
}
+
pkg.packageName, err = r.cachePackageName(info)
if err != nil {
return
}
-
if !callback.packageNameLoaded(pkg) {
return
}
+
_, exports, err := r.loadExports(ctx, pkg, false)
if err != nil {
return
@@ -495,7 +616,6 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error
return packageScanned
}
- // Add anything new to the cache, and process it if we're still listening.
add := func(root gopathwalk.Root, dir string) {
r.cacheStore(r.scanDirForPackage(root, dir))
}
@@ -510,9 +630,9 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error
select {
case <-ctx.Done():
return
- case <-r.scanSema:
+ case <-r.scanSema: // acquire
}
- defer func() { r.scanSema <- struct{}{} }()
+ defer func() { r.scanSema <- struct{}{} }() // release
// We have the lock on r.scannedRoots, and no other scans can run.
for _, root := range roots {
if ctx.Err() != nil {
@@ -535,7 +655,7 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error
}
func (r *ModuleResolver) scoreImportPath(ctx context.Context, path string) float64 {
- if _, ok := stdlib[path]; ok {
+ if stdlib.HasPackage(path) {
return MaxRelevance
}
mod, _ := r.findPackage(path)
@@ -613,10 +733,7 @@ func (r *ModuleResolver) canonicalize(info directoryPackageInfo) (*pkg, error) {
return res, nil
}
-func (r *ModuleResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []string, error) {
- if err := r.init(); err != nil {
- return "", nil, err
- }
+func (r *ModuleResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []stdlib.Symbol, error) {
if info, ok := r.cacheLoad(pkg.dir); ok && !includeTest {
return r.cacheExports(ctx, r.env, info)
}
diff --git a/vendor/golang.org/x/tools/internal/imports/mod_cache.go b/vendor/golang.org/x/tools/internal/imports/mod_cache.go
index 45690abb..b1192696 100644
--- a/vendor/golang.org/x/tools/internal/imports/mod_cache.go
+++ b/vendor/golang.org/x/tools/internal/imports/mod_cache.go
@@ -7,9 +7,14 @@ package imports
import (
"context"
"fmt"
+ "path"
+ "path/filepath"
+ "strings"
"sync"
+ "golang.org/x/mod/module"
"golang.org/x/tools/internal/gopathwalk"
+ "golang.org/x/tools/internal/stdlib"
)
// To find packages to import, the resolver needs to know about all of
@@ -39,6 +44,8 @@ const (
exportsLoaded
)
+// directoryPackageInfo holds (possibly incomplete) information about packages
+// contained in a given directory.
type directoryPackageInfo struct {
// status indicates the extent to which this struct has been filled in.
status directoryPackageStatus
@@ -63,8 +70,11 @@ type directoryPackageInfo struct {
packageName string // the package name, as declared in the source.
// Set when status >= exportsLoaded.
-
- exports []string
+ // TODO(rfindley): it's hard to see this, but exports depend implicitly on
+ // the default build context GOOS and GOARCH.
+ //
+ // We can make this explicit, and key exports by GOOS, GOARCH.
+ exports []stdlib.Symbol
}
// reachedStatus returns true when info has a status at least target and any error associated with
@@ -79,7 +89,7 @@ func (info *directoryPackageInfo) reachedStatus(target directoryPackageStatus) (
return true, nil
}
-// dirInfoCache is a concurrency safe map for storing information about
+// DirInfoCache is a concurrency-safe map for storing information about
// directories that may contain packages.
//
// The information in this cache is built incrementally. Entries are initialized in scan.
@@ -92,21 +102,26 @@ func (info *directoryPackageInfo) reachedStatus(target directoryPackageStatus) (
// The information in the cache is not expected to change for the cache's
// lifetime, so there is no protection against competing writes. Users should
// take care not to hold the cache across changes to the underlying files.
-//
-// TODO(suzmue): consider other concurrency strategies and data structures (RWLocks, sync.Map, etc)
-type dirInfoCache struct {
+type DirInfoCache struct {
mu sync.Mutex
// dirs stores information about packages in directories, keyed by absolute path.
dirs map[string]*directoryPackageInfo
listeners map[*int]cacheListener
}
+func NewDirInfoCache() *DirInfoCache {
+ return &DirInfoCache{
+ dirs: make(map[string]*directoryPackageInfo),
+ listeners: make(map[*int]cacheListener),
+ }
+}
+
type cacheListener func(directoryPackageInfo)
// ScanAndListen calls listener on all the items in the cache, and on anything
// newly added. The returned stop function waits for all in-flight callbacks to
// finish and blocks new ones.
-func (d *dirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener) func() {
+func (d *DirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener) func() {
ctx, cancel := context.WithCancel(ctx)
// Flushing out all the callbacks is tricky without knowing how many there
@@ -162,8 +177,10 @@ func (d *dirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener
}
// Store stores the package info for dir.
-func (d *dirInfoCache) Store(dir string, info directoryPackageInfo) {
+func (d *DirInfoCache) Store(dir string, info directoryPackageInfo) {
d.mu.Lock()
+ // TODO(rfindley, golang/go#59216): should we overwrite an existing entry?
+ // That seems incorrect as the cache should be idempotent.
_, old := d.dirs[dir]
d.dirs[dir] = &info
var listeners []cacheListener
@@ -180,7 +197,7 @@ func (d *dirInfoCache) Store(dir string, info directoryPackageInfo) {
}
// Load returns a copy of the directoryPackageInfo for absolute directory dir.
-func (d *dirInfoCache) Load(dir string) (directoryPackageInfo, bool) {
+func (d *DirInfoCache) Load(dir string) (directoryPackageInfo, bool) {
d.mu.Lock()
defer d.mu.Unlock()
info, ok := d.dirs[dir]
@@ -191,7 +208,7 @@ func (d *dirInfoCache) Load(dir string) (directoryPackageInfo, bool) {
}
// Keys returns the keys currently present in d.
-func (d *dirInfoCache) Keys() (keys []string) {
+func (d *DirInfoCache) Keys() (keys []string) {
d.mu.Lock()
defer d.mu.Unlock()
for key := range d.dirs {
@@ -200,7 +217,7 @@ func (d *dirInfoCache) Keys() (keys []string) {
return keys
}
-func (d *dirInfoCache) CachePackageName(info directoryPackageInfo) (string, error) {
+func (d *DirInfoCache) CachePackageName(info directoryPackageInfo) (string, error) {
if loaded, err := info.reachedStatus(nameLoaded); loaded {
return info.packageName, err
}
@@ -213,7 +230,7 @@ func (d *dirInfoCache) CachePackageName(info directoryPackageInfo) (string, erro
return info.packageName, info.err
}
-func (d *dirInfoCache) CacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []string, error) {
+func (d *DirInfoCache) CacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []stdlib.Symbol, error) {
if reached, _ := info.reachedStatus(exportsLoaded); reached {
return info.packageName, info.exports, info.err
}
@@ -234,3 +251,81 @@ func (d *dirInfoCache) CacheExports(ctx context.Context, env *ProcessEnv, info d
d.Store(info.dir, info)
return info.packageName, info.exports, info.err
}
+
+// ScanModuleCache walks the given directory, which must be a GOMODCACHE value,
+// for directory package information, storing the results in cache.
+func ScanModuleCache(dir string, cache *DirInfoCache, logf func(string, ...any)) {
+ // Note(rfindley): it's hard to see, but this function attempts to implement
+ // just the side effects on cache of calling PrimeCache with a ProcessEnv
+ // that has the given dir as its GOMODCACHE.
+ //
+ // Teasing out the control flow, we see that we can avoid any handling of
+ // vendor/ and can infer module info entirely from the path, simplifying the
+ // logic here.
+
+ root := gopathwalk.Root{
+ Path: filepath.Clean(dir),
+ Type: gopathwalk.RootModuleCache,
+ }
+
+ directoryInfo := func(root gopathwalk.Root, dir string) directoryPackageInfo {
+ // This is a copy of ModuleResolver.scanDirForPackage, trimmed down to
+ // logic that applies to a module cache directory.
+
+ subdir := ""
+ if dir != root.Path {
+ subdir = dir[len(root.Path)+len("/"):]
+ }
+
+ matches := modCacheRegexp.FindStringSubmatch(subdir)
+ if len(matches) == 0 {
+ return directoryPackageInfo{
+ status: directoryScanned,
+ err: fmt.Errorf("invalid module cache path: %v", subdir),
+ }
+ }
+ modPath, err := module.UnescapePath(filepath.ToSlash(matches[1]))
+ if err != nil {
+ if logf != nil {
+ logf("decoding module cache path %q: %v", subdir, err)
+ }
+ return directoryPackageInfo{
+ status: directoryScanned,
+ err: fmt.Errorf("decoding module cache path %q: %v", subdir, err),
+ }
+ }
+ importPath := path.Join(modPath, filepath.ToSlash(matches[3]))
+ index := strings.Index(dir, matches[1]+"@"+matches[2])
+ modDir := filepath.Join(dir[:index], matches[1]+"@"+matches[2])
+ modName := readModName(filepath.Join(modDir, "go.mod"))
+ return directoryPackageInfo{
+ status: directoryScanned,
+ dir: dir,
+ rootType: root.Type,
+ nonCanonicalImportPath: importPath,
+ moduleDir: modDir,
+ moduleName: modName,
+ }
+ }
+
+ add := func(root gopathwalk.Root, dir string) {
+ info := directoryInfo(root, dir)
+ cache.Store(info.dir, info)
+ }
+
+ skip := func(_ gopathwalk.Root, dir string) bool {
+ // Skip directories that have already been scanned.
+ //
+ // Note that gopathwalk only adds "package" directories, which must contain
+ // a .go file, and all such package directories in the module cache are
+ // immutable. So if we can load a dir, it can be skipped.
+ info, ok := cache.Load(dir)
+ if !ok {
+ return false
+ }
+ packageScanned, _ := info.reachedStatus(directoryScanned)
+ return packageScanned
+ }
+
+ gopathwalk.WalkSkip([]gopathwalk.Root{root}, add, skip, gopathwalk.Options{Logf: logf, ModulesEnabled: true})
+}
diff --git a/vendor/golang.org/x/tools/internal/imports/sortimports.go b/vendor/golang.org/x/tools/internal/imports/sortimports.go
index 1a0a7ebd..da8194fd 100644
--- a/vendor/golang.org/x/tools/internal/imports/sortimports.go
+++ b/vendor/golang.org/x/tools/internal/imports/sortimports.go
@@ -18,7 +18,7 @@ import (
// sortImports sorts runs of consecutive import lines in import blocks in f.
// It also removes duplicate imports when it is possible to do so without data loss.
//
-// It may mutate the token.File.
+// It may mutate the token.File and the ast.File.
func sortImports(localPrefix string, tokFile *token.File, f *ast.File) {
for i, d := range f.Decls {
d, ok := d.(*ast.GenDecl)
diff --git a/vendor/golang.org/x/tools/internal/imports/zstdlib.go b/vendor/golang.org/x/tools/internal/imports/zstdlib.go
deleted file mode 100644
index 9f992c2b..00000000
--- a/vendor/golang.org/x/tools/internal/imports/zstdlib.go
+++ /dev/null
@@ -1,11345 +0,0 @@
-// Copyright 2022 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.
-
-// Code generated by mkstdlib.go. DO NOT EDIT.
-
-package imports
-
-var stdlib = map[string][]string{
- "archive/tar": {
- "ErrFieldTooLong",
- "ErrHeader",
- "ErrInsecurePath",
- "ErrWriteAfterClose",
- "ErrWriteTooLong",
- "FileInfoHeader",
- "Format",
- "FormatGNU",
- "FormatPAX",
- "FormatUSTAR",
- "FormatUnknown",
- "Header",
- "NewReader",
- "NewWriter",
- "Reader",
- "TypeBlock",
- "TypeChar",
- "TypeCont",
- "TypeDir",
- "TypeFifo",
- "TypeGNULongLink",
- "TypeGNULongName",
- "TypeGNUSparse",
- "TypeLink",
- "TypeReg",
- "TypeRegA",
- "TypeSymlink",
- "TypeXGlobalHeader",
- "TypeXHeader",
- "Writer",
- },
- "archive/zip": {
- "Compressor",
- "Decompressor",
- "Deflate",
- "ErrAlgorithm",
- "ErrChecksum",
- "ErrFormat",
- "ErrInsecurePath",
- "File",
- "FileHeader",
- "FileInfoHeader",
- "NewReader",
- "NewWriter",
- "OpenReader",
- "ReadCloser",
- "Reader",
- "RegisterCompressor",
- "RegisterDecompressor",
- "Store",
- "Writer",
- },
- "bufio": {
- "ErrAdvanceTooFar",
- "ErrBadReadCount",
- "ErrBufferFull",
- "ErrFinalToken",
- "ErrInvalidUnreadByte",
- "ErrInvalidUnreadRune",
- "ErrNegativeAdvance",
- "ErrNegativeCount",
- "ErrTooLong",
- "MaxScanTokenSize",
- "NewReadWriter",
- "NewReader",
- "NewReaderSize",
- "NewScanner",
- "NewWriter",
- "NewWriterSize",
- "ReadWriter",
- "Reader",
- "ScanBytes",
- "ScanLines",
- "ScanRunes",
- "ScanWords",
- "Scanner",
- "SplitFunc",
- "Writer",
- },
- "bytes": {
- "Buffer",
- "Clone",
- "Compare",
- "Contains",
- "ContainsAny",
- "ContainsFunc",
- "ContainsRune",
- "Count",
- "Cut",
- "CutPrefix",
- "CutSuffix",
- "Equal",
- "EqualFold",
- "ErrTooLarge",
- "Fields",
- "FieldsFunc",
- "HasPrefix",
- "HasSuffix",
- "Index",
- "IndexAny",
- "IndexByte",
- "IndexFunc",
- "IndexRune",
- "Join",
- "LastIndex",
- "LastIndexAny",
- "LastIndexByte",
- "LastIndexFunc",
- "Map",
- "MinRead",
- "NewBuffer",
- "NewBufferString",
- "NewReader",
- "Reader",
- "Repeat",
- "Replace",
- "ReplaceAll",
- "Runes",
- "Split",
- "SplitAfter",
- "SplitAfterN",
- "SplitN",
- "Title",
- "ToLower",
- "ToLowerSpecial",
- "ToTitle",
- "ToTitleSpecial",
- "ToUpper",
- "ToUpperSpecial",
- "ToValidUTF8",
- "Trim",
- "TrimFunc",
- "TrimLeft",
- "TrimLeftFunc",
- "TrimPrefix",
- "TrimRight",
- "TrimRightFunc",
- "TrimSpace",
- "TrimSuffix",
- },
- "cmp": {
- "Compare",
- "Less",
- "Ordered",
- },
- "compress/bzip2": {
- "NewReader",
- "StructuralError",
- },
- "compress/flate": {
- "BestCompression",
- "BestSpeed",
- "CorruptInputError",
- "DefaultCompression",
- "HuffmanOnly",
- "InternalError",
- "NewReader",
- "NewReaderDict",
- "NewWriter",
- "NewWriterDict",
- "NoCompression",
- "ReadError",
- "Reader",
- "Resetter",
- "WriteError",
- "Writer",
- },
- "compress/gzip": {
- "BestCompression",
- "BestSpeed",
- "DefaultCompression",
- "ErrChecksum",
- "ErrHeader",
- "Header",
- "HuffmanOnly",
- "NewReader",
- "NewWriter",
- "NewWriterLevel",
- "NoCompression",
- "Reader",
- "Writer",
- },
- "compress/lzw": {
- "LSB",
- "MSB",
- "NewReader",
- "NewWriter",
- "Order",
- "Reader",
- "Writer",
- },
- "compress/zlib": {
- "BestCompression",
- "BestSpeed",
- "DefaultCompression",
- "ErrChecksum",
- "ErrDictionary",
- "ErrHeader",
- "HuffmanOnly",
- "NewReader",
- "NewReaderDict",
- "NewWriter",
- "NewWriterLevel",
- "NewWriterLevelDict",
- "NoCompression",
- "Resetter",
- "Writer",
- },
- "container/heap": {
- "Fix",
- "Init",
- "Interface",
- "Pop",
- "Push",
- "Remove",
- },
- "container/list": {
- "Element",
- "List",
- "New",
- },
- "container/ring": {
- "New",
- "Ring",
- },
- "context": {
- "AfterFunc",
- "Background",
- "CancelCauseFunc",
- "CancelFunc",
- "Canceled",
- "Cause",
- "Context",
- "DeadlineExceeded",
- "TODO",
- "WithCancel",
- "WithCancelCause",
- "WithDeadline",
- "WithDeadlineCause",
- "WithTimeout",
- "WithTimeoutCause",
- "WithValue",
- "WithoutCancel",
- },
- "crypto": {
- "BLAKE2b_256",
- "BLAKE2b_384",
- "BLAKE2b_512",
- "BLAKE2s_256",
- "Decrypter",
- "DecrypterOpts",
- "Hash",
- "MD4",
- "MD5",
- "MD5SHA1",
- "PrivateKey",
- "PublicKey",
- "RIPEMD160",
- "RegisterHash",
- "SHA1",
- "SHA224",
- "SHA256",
- "SHA384",
- "SHA3_224",
- "SHA3_256",
- "SHA3_384",
- "SHA3_512",
- "SHA512",
- "SHA512_224",
- "SHA512_256",
- "Signer",
- "SignerOpts",
- },
- "crypto/aes": {
- "BlockSize",
- "KeySizeError",
- "NewCipher",
- },
- "crypto/cipher": {
- "AEAD",
- "Block",
- "BlockMode",
- "NewCBCDecrypter",
- "NewCBCEncrypter",
- "NewCFBDecrypter",
- "NewCFBEncrypter",
- "NewCTR",
- "NewGCM",
- "NewGCMWithNonceSize",
- "NewGCMWithTagSize",
- "NewOFB",
- "Stream",
- "StreamReader",
- "StreamWriter",
- },
- "crypto/des": {
- "BlockSize",
- "KeySizeError",
- "NewCipher",
- "NewTripleDESCipher",
- },
- "crypto/dsa": {
- "ErrInvalidPublicKey",
- "GenerateKey",
- "GenerateParameters",
- "L1024N160",
- "L2048N224",
- "L2048N256",
- "L3072N256",
- "ParameterSizes",
- "Parameters",
- "PrivateKey",
- "PublicKey",
- "Sign",
- "Verify",
- },
- "crypto/ecdh": {
- "Curve",
- "P256",
- "P384",
- "P521",
- "PrivateKey",
- "PublicKey",
- "X25519",
- },
- "crypto/ecdsa": {
- "GenerateKey",
- "PrivateKey",
- "PublicKey",
- "Sign",
- "SignASN1",
- "Verify",
- "VerifyASN1",
- },
- "crypto/ed25519": {
- "GenerateKey",
- "NewKeyFromSeed",
- "Options",
- "PrivateKey",
- "PrivateKeySize",
- "PublicKey",
- "PublicKeySize",
- "SeedSize",
- "Sign",
- "SignatureSize",
- "Verify",
- "VerifyWithOptions",
- },
- "crypto/elliptic": {
- "Curve",
- "CurveParams",
- "GenerateKey",
- "Marshal",
- "MarshalCompressed",
- "P224",
- "P256",
- "P384",
- "P521",
- "Unmarshal",
- "UnmarshalCompressed",
- },
- "crypto/hmac": {
- "Equal",
- "New",
- },
- "crypto/md5": {
- "BlockSize",
- "New",
- "Size",
- "Sum",
- },
- "crypto/rand": {
- "Int",
- "Prime",
- "Read",
- "Reader",
- },
- "crypto/rc4": {
- "Cipher",
- "KeySizeError",
- "NewCipher",
- },
- "crypto/rsa": {
- "CRTValue",
- "DecryptOAEP",
- "DecryptPKCS1v15",
- "DecryptPKCS1v15SessionKey",
- "EncryptOAEP",
- "EncryptPKCS1v15",
- "ErrDecryption",
- "ErrMessageTooLong",
- "ErrVerification",
- "GenerateKey",
- "GenerateMultiPrimeKey",
- "OAEPOptions",
- "PKCS1v15DecryptOptions",
- "PSSOptions",
- "PSSSaltLengthAuto",
- "PSSSaltLengthEqualsHash",
- "PrecomputedValues",
- "PrivateKey",
- "PublicKey",
- "SignPKCS1v15",
- "SignPSS",
- "VerifyPKCS1v15",
- "VerifyPSS",
- },
- "crypto/sha1": {
- "BlockSize",
- "New",
- "Size",
- "Sum",
- },
- "crypto/sha256": {
- "BlockSize",
- "New",
- "New224",
- "Size",
- "Size224",
- "Sum224",
- "Sum256",
- },
- "crypto/sha512": {
- "BlockSize",
- "New",
- "New384",
- "New512_224",
- "New512_256",
- "Size",
- "Size224",
- "Size256",
- "Size384",
- "Sum384",
- "Sum512",
- "Sum512_224",
- "Sum512_256",
- },
- "crypto/subtle": {
- "ConstantTimeByteEq",
- "ConstantTimeCompare",
- "ConstantTimeCopy",
- "ConstantTimeEq",
- "ConstantTimeLessOrEq",
- "ConstantTimeSelect",
- "XORBytes",
- },
- "crypto/tls": {
- "AlertError",
- "Certificate",
- "CertificateRequestInfo",
- "CertificateVerificationError",
- "CipherSuite",
- "CipherSuiteName",
- "CipherSuites",
- "Client",
- "ClientAuthType",
- "ClientHelloInfo",
- "ClientSessionCache",
- "ClientSessionState",
- "Config",
- "Conn",
- "ConnectionState",
- "CurveID",
- "CurveP256",
- "CurveP384",
- "CurveP521",
- "Dial",
- "DialWithDialer",
- "Dialer",
- "ECDSAWithP256AndSHA256",
- "ECDSAWithP384AndSHA384",
- "ECDSAWithP521AndSHA512",
- "ECDSAWithSHA1",
- "Ed25519",
- "InsecureCipherSuites",
- "Listen",
- "LoadX509KeyPair",
- "NewLRUClientSessionCache",
- "NewListener",
- "NewResumptionState",
- "NoClientCert",
- "PKCS1WithSHA1",
- "PKCS1WithSHA256",
- "PKCS1WithSHA384",
- "PKCS1WithSHA512",
- "PSSWithSHA256",
- "PSSWithSHA384",
- "PSSWithSHA512",
- "ParseSessionState",
- "QUICClient",
- "QUICConfig",
- "QUICConn",
- "QUICEncryptionLevel",
- "QUICEncryptionLevelApplication",
- "QUICEncryptionLevelEarly",
- "QUICEncryptionLevelHandshake",
- "QUICEncryptionLevelInitial",
- "QUICEvent",
- "QUICEventKind",
- "QUICHandshakeDone",
- "QUICNoEvent",
- "QUICRejectedEarlyData",
- "QUICServer",
- "QUICSessionTicketOptions",
- "QUICSetReadSecret",
- "QUICSetWriteSecret",
- "QUICTransportParameters",
- "QUICTransportParametersRequired",
- "QUICWriteData",
- "RecordHeaderError",
- "RenegotiateFreelyAsClient",
- "RenegotiateNever",
- "RenegotiateOnceAsClient",
- "RenegotiationSupport",
- "RequestClientCert",
- "RequireAndVerifyClientCert",
- "RequireAnyClientCert",
- "Server",
- "SessionState",
- "SignatureScheme",
- "TLS_AES_128_GCM_SHA256",
- "TLS_AES_256_GCM_SHA384",
- "TLS_CHACHA20_POLY1305_SHA256",
- "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
- "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
- "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
- "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305",
- "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
- "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
- "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
- "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
- "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
- "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
- "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
- "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
- "TLS_FALLBACK_SCSV",
- "TLS_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_RSA_WITH_AES_128_CBC_SHA",
- "TLS_RSA_WITH_AES_128_CBC_SHA256",
- "TLS_RSA_WITH_AES_128_GCM_SHA256",
- "TLS_RSA_WITH_AES_256_CBC_SHA",
- "TLS_RSA_WITH_AES_256_GCM_SHA384",
- "TLS_RSA_WITH_RC4_128_SHA",
- "VerifyClientCertIfGiven",
- "VersionName",
- "VersionSSL30",
- "VersionTLS10",
- "VersionTLS11",
- "VersionTLS12",
- "VersionTLS13",
- "X25519",
- "X509KeyPair",
- },
- "crypto/x509": {
- "CANotAuthorizedForExtKeyUsage",
- "CANotAuthorizedForThisName",
- "CertPool",
- "Certificate",
- "CertificateInvalidError",
- "CertificateRequest",
- "ConstraintViolationError",
- "CreateCertificate",
- "CreateCertificateRequest",
- "CreateRevocationList",
- "DSA",
- "DSAWithSHA1",
- "DSAWithSHA256",
- "DecryptPEMBlock",
- "ECDSA",
- "ECDSAWithSHA1",
- "ECDSAWithSHA256",
- "ECDSAWithSHA384",
- "ECDSAWithSHA512",
- "Ed25519",
- "EncryptPEMBlock",
- "ErrUnsupportedAlgorithm",
- "Expired",
- "ExtKeyUsage",
- "ExtKeyUsageAny",
- "ExtKeyUsageClientAuth",
- "ExtKeyUsageCodeSigning",
- "ExtKeyUsageEmailProtection",
- "ExtKeyUsageIPSECEndSystem",
- "ExtKeyUsageIPSECTunnel",
- "ExtKeyUsageIPSECUser",
- "ExtKeyUsageMicrosoftCommercialCodeSigning",
- "ExtKeyUsageMicrosoftKernelCodeSigning",
- "ExtKeyUsageMicrosoftServerGatedCrypto",
- "ExtKeyUsageNetscapeServerGatedCrypto",
- "ExtKeyUsageOCSPSigning",
- "ExtKeyUsageServerAuth",
- "ExtKeyUsageTimeStamping",
- "HostnameError",
- "IncompatibleUsage",
- "IncorrectPasswordError",
- "InsecureAlgorithmError",
- "InvalidReason",
- "IsEncryptedPEMBlock",
- "KeyUsage",
- "KeyUsageCRLSign",
- "KeyUsageCertSign",
- "KeyUsageContentCommitment",
- "KeyUsageDataEncipherment",
- "KeyUsageDecipherOnly",
- "KeyUsageDigitalSignature",
- "KeyUsageEncipherOnly",
- "KeyUsageKeyAgreement",
- "KeyUsageKeyEncipherment",
- "MD2WithRSA",
- "MD5WithRSA",
- "MarshalECPrivateKey",
- "MarshalPKCS1PrivateKey",
- "MarshalPKCS1PublicKey",
- "MarshalPKCS8PrivateKey",
- "MarshalPKIXPublicKey",
- "NameConstraintsWithoutSANs",
- "NameMismatch",
- "NewCertPool",
- "NotAuthorizedToSign",
- "PEMCipher",
- "PEMCipher3DES",
- "PEMCipherAES128",
- "PEMCipherAES192",
- "PEMCipherAES256",
- "PEMCipherDES",
- "ParseCRL",
- "ParseCertificate",
- "ParseCertificateRequest",
- "ParseCertificates",
- "ParseDERCRL",
- "ParseECPrivateKey",
- "ParsePKCS1PrivateKey",
- "ParsePKCS1PublicKey",
- "ParsePKCS8PrivateKey",
- "ParsePKIXPublicKey",
- "ParseRevocationList",
- "PublicKeyAlgorithm",
- "PureEd25519",
- "RSA",
- "RevocationList",
- "RevocationListEntry",
- "SHA1WithRSA",
- "SHA256WithRSA",
- "SHA256WithRSAPSS",
- "SHA384WithRSA",
- "SHA384WithRSAPSS",
- "SHA512WithRSA",
- "SHA512WithRSAPSS",
- "SetFallbackRoots",
- "SignatureAlgorithm",
- "SystemCertPool",
- "SystemRootsError",
- "TooManyConstraints",
- "TooManyIntermediates",
- "UnconstrainedName",
- "UnhandledCriticalExtension",
- "UnknownAuthorityError",
- "UnknownPublicKeyAlgorithm",
- "UnknownSignatureAlgorithm",
- "VerifyOptions",
- },
- "crypto/x509/pkix": {
- "AlgorithmIdentifier",
- "AttributeTypeAndValue",
- "AttributeTypeAndValueSET",
- "CertificateList",
- "Extension",
- "Name",
- "RDNSequence",
- "RelativeDistinguishedNameSET",
- "RevokedCertificate",
- "TBSCertificateList",
- },
- "database/sql": {
- "ColumnType",
- "Conn",
- "DB",
- "DBStats",
- "Drivers",
- "ErrConnDone",
- "ErrNoRows",
- "ErrTxDone",
- "IsolationLevel",
- "LevelDefault",
- "LevelLinearizable",
- "LevelReadCommitted",
- "LevelReadUncommitted",
- "LevelRepeatableRead",
- "LevelSerializable",
- "LevelSnapshot",
- "LevelWriteCommitted",
- "Named",
- "NamedArg",
- "NullBool",
- "NullByte",
- "NullFloat64",
- "NullInt16",
- "NullInt32",
- "NullInt64",
- "NullString",
- "NullTime",
- "Open",
- "OpenDB",
- "Out",
- "RawBytes",
- "Register",
- "Result",
- "Row",
- "Rows",
- "Scanner",
- "Stmt",
- "Tx",
- "TxOptions",
- },
- "database/sql/driver": {
- "Bool",
- "ColumnConverter",
- "Conn",
- "ConnBeginTx",
- "ConnPrepareContext",
- "Connector",
- "DefaultParameterConverter",
- "Driver",
- "DriverContext",
- "ErrBadConn",
- "ErrRemoveArgument",
- "ErrSkip",
- "Execer",
- "ExecerContext",
- "Int32",
- "IsScanValue",
- "IsValue",
- "IsolationLevel",
- "NamedValue",
- "NamedValueChecker",
- "NotNull",
- "Null",
- "Pinger",
- "Queryer",
- "QueryerContext",
- "Result",
- "ResultNoRows",
- "Rows",
- "RowsAffected",
- "RowsColumnTypeDatabaseTypeName",
- "RowsColumnTypeLength",
- "RowsColumnTypeNullable",
- "RowsColumnTypePrecisionScale",
- "RowsColumnTypeScanType",
- "RowsNextResultSet",
- "SessionResetter",
- "Stmt",
- "StmtExecContext",
- "StmtQueryContext",
- "String",
- "Tx",
- "TxOptions",
- "Validator",
- "Value",
- "ValueConverter",
- "Valuer",
- },
- "debug/buildinfo": {
- "BuildInfo",
- "Read",
- "ReadFile",
- },
- "debug/dwarf": {
- "AddrType",
- "ArrayType",
- "Attr",
- "AttrAbstractOrigin",
- "AttrAccessibility",
- "AttrAddrBase",
- "AttrAddrClass",
- "AttrAlignment",
- "AttrAllocated",
- "AttrArtificial",
- "AttrAssociated",
- "AttrBaseTypes",
- "AttrBinaryScale",
- "AttrBitOffset",
- "AttrBitSize",
- "AttrByteSize",
- "AttrCallAllCalls",
- "AttrCallAllSourceCalls",
- "AttrCallAllTailCalls",
- "AttrCallColumn",
- "AttrCallDataLocation",
- "AttrCallDataValue",
- "AttrCallFile",
- "AttrCallLine",
- "AttrCallOrigin",
- "AttrCallPC",
- "AttrCallParameter",
- "AttrCallReturnPC",
- "AttrCallTailCall",
- "AttrCallTarget",
- "AttrCallTargetClobbered",
- "AttrCallValue",
- "AttrCalling",
- "AttrCommonRef",
- "AttrCompDir",
- "AttrConstExpr",
- "AttrConstValue",
- "AttrContainingType",
- "AttrCount",
- "AttrDataBitOffset",
- "AttrDataLocation",
- "AttrDataMemberLoc",
- "AttrDecimalScale",
- "AttrDecimalSign",
- "AttrDeclColumn",
- "AttrDeclFile",
- "AttrDeclLine",
- "AttrDeclaration",
- "AttrDefaultValue",
- "AttrDefaulted",
- "AttrDeleted",
- "AttrDescription",
- "AttrDigitCount",
- "AttrDiscr",
- "AttrDiscrList",
- "AttrDiscrValue",
- "AttrDwoName",
- "AttrElemental",
- "AttrEncoding",
- "AttrEndianity",
- "AttrEntrypc",
- "AttrEnumClass",
- "AttrExplicit",
- "AttrExportSymbols",
- "AttrExtension",
- "AttrExternal",
- "AttrFrameBase",
- "AttrFriend",
- "AttrHighpc",
- "AttrIdentifierCase",
- "AttrImport",
- "AttrInline",
- "AttrIsOptional",
- "AttrLanguage",
- "AttrLinkageName",
- "AttrLocation",
- "AttrLoclistsBase",
- "AttrLowerBound",
- "AttrLowpc",
- "AttrMacroInfo",
- "AttrMacros",
- "AttrMainSubprogram",
- "AttrMutable",
- "AttrName",
- "AttrNamelistItem",
- "AttrNoreturn",
- "AttrObjectPointer",
- "AttrOrdering",
- "AttrPictureString",
- "AttrPriority",
- "AttrProducer",
- "AttrPrototyped",
- "AttrPure",
- "AttrRanges",
- "AttrRank",
- "AttrRecursive",
- "AttrReference",
- "AttrReturnAddr",
- "AttrRnglistsBase",
- "AttrRvalueReference",
- "AttrSegment",
- "AttrSibling",
- "AttrSignature",
- "AttrSmall",
- "AttrSpecification",
- "AttrStartScope",
- "AttrStaticLink",
- "AttrStmtList",
- "AttrStrOffsetsBase",
- "AttrStride",
- "AttrStrideSize",
- "AttrStringLength",
- "AttrStringLengthBitSize",
- "AttrStringLengthByteSize",
- "AttrThreadsScaled",
- "AttrTrampoline",
- "AttrType",
- "AttrUpperBound",
- "AttrUseLocation",
- "AttrUseUTF8",
- "AttrVarParam",
- "AttrVirtuality",
- "AttrVisibility",
- "AttrVtableElemLoc",
- "BasicType",
- "BoolType",
- "CharType",
- "Class",
- "ClassAddrPtr",
- "ClassAddress",
- "ClassBlock",
- "ClassConstant",
- "ClassExprLoc",
- "ClassFlag",
- "ClassLinePtr",
- "ClassLocList",
- "ClassLocListPtr",
- "ClassMacPtr",
- "ClassRangeListPtr",
- "ClassReference",
- "ClassReferenceAlt",
- "ClassReferenceSig",
- "ClassRngList",
- "ClassRngListsPtr",
- "ClassStrOffsetsPtr",
- "ClassString",
- "ClassStringAlt",
- "ClassUnknown",
- "CommonType",
- "ComplexType",
- "Data",
- "DecodeError",
- "DotDotDotType",
- "Entry",
- "EnumType",
- "EnumValue",
- "ErrUnknownPC",
- "Field",
- "FloatType",
- "FuncType",
- "IntType",
- "LineEntry",
- "LineFile",
- "LineReader",
- "LineReaderPos",
- "New",
- "Offset",
- "PtrType",
- "QualType",
- "Reader",
- "StructField",
- "StructType",
- "Tag",
- "TagAccessDeclaration",
- "TagArrayType",
- "TagAtomicType",
- "TagBaseType",
- "TagCallSite",
- "TagCallSiteParameter",
- "TagCatchDwarfBlock",
- "TagClassType",
- "TagCoarrayType",
- "TagCommonDwarfBlock",
- "TagCommonInclusion",
- "TagCompileUnit",
- "TagCondition",
- "TagConstType",
- "TagConstant",
- "TagDwarfProcedure",
- "TagDynamicType",
- "TagEntryPoint",
- "TagEnumerationType",
- "TagEnumerator",
- "TagFileType",
- "TagFormalParameter",
- "TagFriend",
- "TagGenericSubrange",
- "TagImmutableType",
- "TagImportedDeclaration",
- "TagImportedModule",
- "TagImportedUnit",
- "TagInheritance",
- "TagInlinedSubroutine",
- "TagInterfaceType",
- "TagLabel",
- "TagLexDwarfBlock",
- "TagMember",
- "TagModule",
- "TagMutableType",
- "TagNamelist",
- "TagNamelistItem",
- "TagNamespace",
- "TagPackedType",
- "TagPartialUnit",
- "TagPointerType",
- "TagPtrToMemberType",
- "TagReferenceType",
- "TagRestrictType",
- "TagRvalueReferenceType",
- "TagSetType",
- "TagSharedType",
- "TagSkeletonUnit",
- "TagStringType",
- "TagStructType",
- "TagSubprogram",
- "TagSubrangeType",
- "TagSubroutineType",
- "TagTemplateAlias",
- "TagTemplateTypeParameter",
- "TagTemplateValueParameter",
- "TagThrownType",
- "TagTryDwarfBlock",
- "TagTypeUnit",
- "TagTypedef",
- "TagUnionType",
- "TagUnspecifiedParameters",
- "TagUnspecifiedType",
- "TagVariable",
- "TagVariant",
- "TagVariantPart",
- "TagVolatileType",
- "TagWithStmt",
- "Type",
- "TypedefType",
- "UcharType",
- "UintType",
- "UnspecifiedType",
- "UnsupportedType",
- "VoidType",
- },
- "debug/elf": {
- "ARM_MAGIC_TRAMP_NUMBER",
- "COMPRESS_HIOS",
- "COMPRESS_HIPROC",
- "COMPRESS_LOOS",
- "COMPRESS_LOPROC",
- "COMPRESS_ZLIB",
- "COMPRESS_ZSTD",
- "Chdr32",
- "Chdr64",
- "Class",
- "CompressionType",
- "DF_1_CONFALT",
- "DF_1_DIRECT",
- "DF_1_DISPRELDNE",
- "DF_1_DISPRELPND",
- "DF_1_EDITED",
- "DF_1_ENDFILTEE",
- "DF_1_GLOBAL",
- "DF_1_GLOBAUDIT",
- "DF_1_GROUP",
- "DF_1_IGNMULDEF",
- "DF_1_INITFIRST",
- "DF_1_INTERPOSE",
- "DF_1_KMOD",
- "DF_1_LOADFLTR",
- "DF_1_NOCOMMON",
- "DF_1_NODEFLIB",
- "DF_1_NODELETE",
- "DF_1_NODIRECT",
- "DF_1_NODUMP",
- "DF_1_NOHDR",
- "DF_1_NOKSYMS",
- "DF_1_NOOPEN",
- "DF_1_NORELOC",
- "DF_1_NOW",
- "DF_1_ORIGIN",
- "DF_1_PIE",
- "DF_1_SINGLETON",
- "DF_1_STUB",
- "DF_1_SYMINTPOSE",
- "DF_1_TRANS",
- "DF_1_WEAKFILTER",
- "DF_BIND_NOW",
- "DF_ORIGIN",
- "DF_STATIC_TLS",
- "DF_SYMBOLIC",
- "DF_TEXTREL",
- "DT_ADDRRNGHI",
- "DT_ADDRRNGLO",
- "DT_AUDIT",
- "DT_AUXILIARY",
- "DT_BIND_NOW",
- "DT_CHECKSUM",
- "DT_CONFIG",
- "DT_DEBUG",
- "DT_DEPAUDIT",
- "DT_ENCODING",
- "DT_FEATURE",
- "DT_FILTER",
- "DT_FINI",
- "DT_FINI_ARRAY",
- "DT_FINI_ARRAYSZ",
- "DT_FLAGS",
- "DT_FLAGS_1",
- "DT_GNU_CONFLICT",
- "DT_GNU_CONFLICTSZ",
- "DT_GNU_HASH",
- "DT_GNU_LIBLIST",
- "DT_GNU_LIBLISTSZ",
- "DT_GNU_PRELINKED",
- "DT_HASH",
- "DT_HIOS",
- "DT_HIPROC",
- "DT_INIT",
- "DT_INIT_ARRAY",
- "DT_INIT_ARRAYSZ",
- "DT_JMPREL",
- "DT_LOOS",
- "DT_LOPROC",
- "DT_MIPS_AUX_DYNAMIC",
- "DT_MIPS_BASE_ADDRESS",
- "DT_MIPS_COMPACT_SIZE",
- "DT_MIPS_CONFLICT",
- "DT_MIPS_CONFLICTNO",
- "DT_MIPS_CXX_FLAGS",
- "DT_MIPS_DELTA_CLASS",
- "DT_MIPS_DELTA_CLASSSYM",
- "DT_MIPS_DELTA_CLASSSYM_NO",
- "DT_MIPS_DELTA_CLASS_NO",
- "DT_MIPS_DELTA_INSTANCE",
- "DT_MIPS_DELTA_INSTANCE_NO",
- "DT_MIPS_DELTA_RELOC",
- "DT_MIPS_DELTA_RELOC_NO",
- "DT_MIPS_DELTA_SYM",
- "DT_MIPS_DELTA_SYM_NO",
- "DT_MIPS_DYNSTR_ALIGN",
- "DT_MIPS_FLAGS",
- "DT_MIPS_GOTSYM",
- "DT_MIPS_GP_VALUE",
- "DT_MIPS_HIDDEN_GOTIDX",
- "DT_MIPS_HIPAGENO",
- "DT_MIPS_ICHECKSUM",
- "DT_MIPS_INTERFACE",
- "DT_MIPS_INTERFACE_SIZE",
- "DT_MIPS_IVERSION",
- "DT_MIPS_LIBLIST",
- "DT_MIPS_LIBLISTNO",
- "DT_MIPS_LOCALPAGE_GOTIDX",
- "DT_MIPS_LOCAL_GOTIDX",
- "DT_MIPS_LOCAL_GOTNO",
- "DT_MIPS_MSYM",
- "DT_MIPS_OPTIONS",
- "DT_MIPS_PERF_SUFFIX",
- "DT_MIPS_PIXIE_INIT",
- "DT_MIPS_PLTGOT",
- "DT_MIPS_PROTECTED_GOTIDX",
- "DT_MIPS_RLD_MAP",
- "DT_MIPS_RLD_MAP_REL",
- "DT_MIPS_RLD_TEXT_RESOLVE_ADDR",
- "DT_MIPS_RLD_VERSION",
- "DT_MIPS_RWPLT",
- "DT_MIPS_SYMBOL_LIB",
- "DT_MIPS_SYMTABNO",
- "DT_MIPS_TIME_STAMP",
- "DT_MIPS_UNREFEXTNO",
- "DT_MOVEENT",
- "DT_MOVESZ",
- "DT_MOVETAB",
- "DT_NEEDED",
- "DT_NULL",
- "DT_PLTGOT",
- "DT_PLTPAD",
- "DT_PLTPADSZ",
- "DT_PLTREL",
- "DT_PLTRELSZ",
- "DT_POSFLAG_1",
- "DT_PPC64_GLINK",
- "DT_PPC64_OPD",
- "DT_PPC64_OPDSZ",
- "DT_PPC64_OPT",
- "DT_PPC_GOT",
- "DT_PPC_OPT",
- "DT_PREINIT_ARRAY",
- "DT_PREINIT_ARRAYSZ",
- "DT_REL",
- "DT_RELA",
- "DT_RELACOUNT",
- "DT_RELAENT",
- "DT_RELASZ",
- "DT_RELCOUNT",
- "DT_RELENT",
- "DT_RELSZ",
- "DT_RPATH",
- "DT_RUNPATH",
- "DT_SONAME",
- "DT_SPARC_REGISTER",
- "DT_STRSZ",
- "DT_STRTAB",
- "DT_SYMBOLIC",
- "DT_SYMENT",
- "DT_SYMINENT",
- "DT_SYMINFO",
- "DT_SYMINSZ",
- "DT_SYMTAB",
- "DT_SYMTAB_SHNDX",
- "DT_TEXTREL",
- "DT_TLSDESC_GOT",
- "DT_TLSDESC_PLT",
- "DT_USED",
- "DT_VALRNGHI",
- "DT_VALRNGLO",
- "DT_VERDEF",
- "DT_VERDEFNUM",
- "DT_VERNEED",
- "DT_VERNEEDNUM",
- "DT_VERSYM",
- "Data",
- "Dyn32",
- "Dyn64",
- "DynFlag",
- "DynFlag1",
- "DynTag",
- "EI_ABIVERSION",
- "EI_CLASS",
- "EI_DATA",
- "EI_NIDENT",
- "EI_OSABI",
- "EI_PAD",
- "EI_VERSION",
- "ELFCLASS32",
- "ELFCLASS64",
- "ELFCLASSNONE",
- "ELFDATA2LSB",
- "ELFDATA2MSB",
- "ELFDATANONE",
- "ELFMAG",
- "ELFOSABI_86OPEN",
- "ELFOSABI_AIX",
- "ELFOSABI_ARM",
- "ELFOSABI_AROS",
- "ELFOSABI_CLOUDABI",
- "ELFOSABI_FENIXOS",
- "ELFOSABI_FREEBSD",
- "ELFOSABI_HPUX",
- "ELFOSABI_HURD",
- "ELFOSABI_IRIX",
- "ELFOSABI_LINUX",
- "ELFOSABI_MODESTO",
- "ELFOSABI_NETBSD",
- "ELFOSABI_NONE",
- "ELFOSABI_NSK",
- "ELFOSABI_OPENBSD",
- "ELFOSABI_OPENVMS",
- "ELFOSABI_SOLARIS",
- "ELFOSABI_STANDALONE",
- "ELFOSABI_TRU64",
- "EM_386",
- "EM_486",
- "EM_56800EX",
- "EM_68HC05",
- "EM_68HC08",
- "EM_68HC11",
- "EM_68HC12",
- "EM_68HC16",
- "EM_68K",
- "EM_78KOR",
- "EM_8051",
- "EM_860",
- "EM_88K",
- "EM_960",
- "EM_AARCH64",
- "EM_ALPHA",
- "EM_ALPHA_STD",
- "EM_ALTERA_NIOS2",
- "EM_AMDGPU",
- "EM_ARC",
- "EM_ARCA",
- "EM_ARC_COMPACT",
- "EM_ARC_COMPACT2",
- "EM_ARM",
- "EM_AVR",
- "EM_AVR32",
- "EM_BA1",
- "EM_BA2",
- "EM_BLACKFIN",
- "EM_BPF",
- "EM_C166",
- "EM_CDP",
- "EM_CE",
- "EM_CLOUDSHIELD",
- "EM_COGE",
- "EM_COLDFIRE",
- "EM_COOL",
- "EM_COREA_1ST",
- "EM_COREA_2ND",
- "EM_CR",
- "EM_CR16",
- "EM_CRAYNV2",
- "EM_CRIS",
- "EM_CRX",
- "EM_CSR_KALIMBA",
- "EM_CUDA",
- "EM_CYPRESS_M8C",
- "EM_D10V",
- "EM_D30V",
- "EM_DSP24",
- "EM_DSPIC30F",
- "EM_DXP",
- "EM_ECOG1",
- "EM_ECOG16",
- "EM_ECOG1X",
- "EM_ECOG2",
- "EM_ETPU",
- "EM_EXCESS",
- "EM_F2MC16",
- "EM_FIREPATH",
- "EM_FR20",
- "EM_FR30",
- "EM_FT32",
- "EM_FX66",
- "EM_H8S",
- "EM_H8_300",
- "EM_H8_300H",
- "EM_H8_500",
- "EM_HUANY",
- "EM_IA_64",
- "EM_INTEL205",
- "EM_INTEL206",
- "EM_INTEL207",
- "EM_INTEL208",
- "EM_INTEL209",
- "EM_IP2K",
- "EM_JAVELIN",
- "EM_K10M",
- "EM_KM32",
- "EM_KMX16",
- "EM_KMX32",
- "EM_KMX8",
- "EM_KVARC",
- "EM_L10M",
- "EM_LANAI",
- "EM_LATTICEMICO32",
- "EM_LOONGARCH",
- "EM_M16C",
- "EM_M32",
- "EM_M32C",
- "EM_M32R",
- "EM_MANIK",
- "EM_MAX",
- "EM_MAXQ30",
- "EM_MCHP_PIC",
- "EM_MCST_ELBRUS",
- "EM_ME16",
- "EM_METAG",
- "EM_MICROBLAZE",
- "EM_MIPS",
- "EM_MIPS_RS3_LE",
- "EM_MIPS_RS4_BE",
- "EM_MIPS_X",
- "EM_MMA",
- "EM_MMDSP_PLUS",
- "EM_MMIX",
- "EM_MN10200",
- "EM_MN10300",
- "EM_MOXIE",
- "EM_MSP430",
- "EM_NCPU",
- "EM_NDR1",
- "EM_NDS32",
- "EM_NONE",
- "EM_NORC",
- "EM_NS32K",
- "EM_OPEN8",
- "EM_OPENRISC",
- "EM_PARISC",
- "EM_PCP",
- "EM_PDP10",
- "EM_PDP11",
- "EM_PDSP",
- "EM_PJ",
- "EM_PPC",
- "EM_PPC64",
- "EM_PRISM",
- "EM_QDSP6",
- "EM_R32C",
- "EM_RCE",
- "EM_RH32",
- "EM_RISCV",
- "EM_RL78",
- "EM_RS08",
- "EM_RX",
- "EM_S370",
- "EM_S390",
- "EM_SCORE7",
- "EM_SEP",
- "EM_SE_C17",
- "EM_SE_C33",
- "EM_SH",
- "EM_SHARC",
- "EM_SLE9X",
- "EM_SNP1K",
- "EM_SPARC",
- "EM_SPARC32PLUS",
- "EM_SPARCV9",
- "EM_ST100",
- "EM_ST19",
- "EM_ST200",
- "EM_ST7",
- "EM_ST9PLUS",
- "EM_STARCORE",
- "EM_STM8",
- "EM_STXP7X",
- "EM_SVX",
- "EM_TILE64",
- "EM_TILEGX",
- "EM_TILEPRO",
- "EM_TINYJ",
- "EM_TI_ARP32",
- "EM_TI_C2000",
- "EM_TI_C5500",
- "EM_TI_C6000",
- "EM_TI_PRU",
- "EM_TMM_GPP",
- "EM_TPC",
- "EM_TRICORE",
- "EM_TRIMEDIA",
- "EM_TSK3000",
- "EM_UNICORE",
- "EM_V800",
- "EM_V850",
- "EM_VAX",
- "EM_VIDEOCORE",
- "EM_VIDEOCORE3",
- "EM_VIDEOCORE5",
- "EM_VISIUM",
- "EM_VPP500",
- "EM_X86_64",
- "EM_XCORE",
- "EM_XGATE",
- "EM_XIMO16",
- "EM_XTENSA",
- "EM_Z80",
- "EM_ZSP",
- "ET_CORE",
- "ET_DYN",
- "ET_EXEC",
- "ET_HIOS",
- "ET_HIPROC",
- "ET_LOOS",
- "ET_LOPROC",
- "ET_NONE",
- "ET_REL",
- "EV_CURRENT",
- "EV_NONE",
- "ErrNoSymbols",
- "File",
- "FileHeader",
- "FormatError",
- "Header32",
- "Header64",
- "ImportedSymbol",
- "Machine",
- "NT_FPREGSET",
- "NT_PRPSINFO",
- "NT_PRSTATUS",
- "NType",
- "NewFile",
- "OSABI",
- "Open",
- "PF_MASKOS",
- "PF_MASKPROC",
- "PF_R",
- "PF_W",
- "PF_X",
- "PT_AARCH64_ARCHEXT",
- "PT_AARCH64_UNWIND",
- "PT_ARM_ARCHEXT",
- "PT_ARM_EXIDX",
- "PT_DYNAMIC",
- "PT_GNU_EH_FRAME",
- "PT_GNU_MBIND_HI",
- "PT_GNU_MBIND_LO",
- "PT_GNU_PROPERTY",
- "PT_GNU_RELRO",
- "PT_GNU_STACK",
- "PT_HIOS",
- "PT_HIPROC",
- "PT_INTERP",
- "PT_LOAD",
- "PT_LOOS",
- "PT_LOPROC",
- "PT_MIPS_ABIFLAGS",
- "PT_MIPS_OPTIONS",
- "PT_MIPS_REGINFO",
- "PT_MIPS_RTPROC",
- "PT_NOTE",
- "PT_NULL",
- "PT_OPENBSD_BOOTDATA",
- "PT_OPENBSD_RANDOMIZE",
- "PT_OPENBSD_WXNEEDED",
- "PT_PAX_FLAGS",
- "PT_PHDR",
- "PT_S390_PGSTE",
- "PT_SHLIB",
- "PT_SUNWSTACK",
- "PT_SUNW_EH_FRAME",
- "PT_TLS",
- "Prog",
- "Prog32",
- "Prog64",
- "ProgFlag",
- "ProgHeader",
- "ProgType",
- "R_386",
- "R_386_16",
- "R_386_32",
- "R_386_32PLT",
- "R_386_8",
- "R_386_COPY",
- "R_386_GLOB_DAT",
- "R_386_GOT32",
- "R_386_GOT32X",
- "R_386_GOTOFF",
- "R_386_GOTPC",
- "R_386_IRELATIVE",
- "R_386_JMP_SLOT",
- "R_386_NONE",
- "R_386_PC16",
- "R_386_PC32",
- "R_386_PC8",
- "R_386_PLT32",
- "R_386_RELATIVE",
- "R_386_SIZE32",
- "R_386_TLS_DESC",
- "R_386_TLS_DESC_CALL",
- "R_386_TLS_DTPMOD32",
- "R_386_TLS_DTPOFF32",
- "R_386_TLS_GD",
- "R_386_TLS_GD_32",
- "R_386_TLS_GD_CALL",
- "R_386_TLS_GD_POP",
- "R_386_TLS_GD_PUSH",
- "R_386_TLS_GOTDESC",
- "R_386_TLS_GOTIE",
- "R_386_TLS_IE",
- "R_386_TLS_IE_32",
- "R_386_TLS_LDM",
- "R_386_TLS_LDM_32",
- "R_386_TLS_LDM_CALL",
- "R_386_TLS_LDM_POP",
- "R_386_TLS_LDM_PUSH",
- "R_386_TLS_LDO_32",
- "R_386_TLS_LE",
- "R_386_TLS_LE_32",
- "R_386_TLS_TPOFF",
- "R_386_TLS_TPOFF32",
- "R_390",
- "R_390_12",
- "R_390_16",
- "R_390_20",
- "R_390_32",
- "R_390_64",
- "R_390_8",
- "R_390_COPY",
- "R_390_GLOB_DAT",
- "R_390_GOT12",
- "R_390_GOT16",
- "R_390_GOT20",
- "R_390_GOT32",
- "R_390_GOT64",
- "R_390_GOTENT",
- "R_390_GOTOFF",
- "R_390_GOTOFF16",
- "R_390_GOTOFF64",
- "R_390_GOTPC",
- "R_390_GOTPCDBL",
- "R_390_GOTPLT12",
- "R_390_GOTPLT16",
- "R_390_GOTPLT20",
- "R_390_GOTPLT32",
- "R_390_GOTPLT64",
- "R_390_GOTPLTENT",
- "R_390_GOTPLTOFF16",
- "R_390_GOTPLTOFF32",
- "R_390_GOTPLTOFF64",
- "R_390_JMP_SLOT",
- "R_390_NONE",
- "R_390_PC16",
- "R_390_PC16DBL",
- "R_390_PC32",
- "R_390_PC32DBL",
- "R_390_PC64",
- "R_390_PLT16DBL",
- "R_390_PLT32",
- "R_390_PLT32DBL",
- "R_390_PLT64",
- "R_390_RELATIVE",
- "R_390_TLS_DTPMOD",
- "R_390_TLS_DTPOFF",
- "R_390_TLS_GD32",
- "R_390_TLS_GD64",
- "R_390_TLS_GDCALL",
- "R_390_TLS_GOTIE12",
- "R_390_TLS_GOTIE20",
- "R_390_TLS_GOTIE32",
- "R_390_TLS_GOTIE64",
- "R_390_TLS_IE32",
- "R_390_TLS_IE64",
- "R_390_TLS_IEENT",
- "R_390_TLS_LDCALL",
- "R_390_TLS_LDM32",
- "R_390_TLS_LDM64",
- "R_390_TLS_LDO32",
- "R_390_TLS_LDO64",
- "R_390_TLS_LE32",
- "R_390_TLS_LE64",
- "R_390_TLS_LOAD",
- "R_390_TLS_TPOFF",
- "R_AARCH64",
- "R_AARCH64_ABS16",
- "R_AARCH64_ABS32",
- "R_AARCH64_ABS64",
- "R_AARCH64_ADD_ABS_LO12_NC",
- "R_AARCH64_ADR_GOT_PAGE",
- "R_AARCH64_ADR_PREL_LO21",
- "R_AARCH64_ADR_PREL_PG_HI21",
- "R_AARCH64_ADR_PREL_PG_HI21_NC",
- "R_AARCH64_CALL26",
- "R_AARCH64_CONDBR19",
- "R_AARCH64_COPY",
- "R_AARCH64_GLOB_DAT",
- "R_AARCH64_GOT_LD_PREL19",
- "R_AARCH64_IRELATIVE",
- "R_AARCH64_JUMP26",
- "R_AARCH64_JUMP_SLOT",
- "R_AARCH64_LD64_GOTOFF_LO15",
- "R_AARCH64_LD64_GOTPAGE_LO15",
- "R_AARCH64_LD64_GOT_LO12_NC",
- "R_AARCH64_LDST128_ABS_LO12_NC",
- "R_AARCH64_LDST16_ABS_LO12_NC",
- "R_AARCH64_LDST32_ABS_LO12_NC",
- "R_AARCH64_LDST64_ABS_LO12_NC",
- "R_AARCH64_LDST8_ABS_LO12_NC",
- "R_AARCH64_LD_PREL_LO19",
- "R_AARCH64_MOVW_SABS_G0",
- "R_AARCH64_MOVW_SABS_G1",
- "R_AARCH64_MOVW_SABS_G2",
- "R_AARCH64_MOVW_UABS_G0",
- "R_AARCH64_MOVW_UABS_G0_NC",
- "R_AARCH64_MOVW_UABS_G1",
- "R_AARCH64_MOVW_UABS_G1_NC",
- "R_AARCH64_MOVW_UABS_G2",
- "R_AARCH64_MOVW_UABS_G2_NC",
- "R_AARCH64_MOVW_UABS_G3",
- "R_AARCH64_NONE",
- "R_AARCH64_NULL",
- "R_AARCH64_P32_ABS16",
- "R_AARCH64_P32_ABS32",
- "R_AARCH64_P32_ADD_ABS_LO12_NC",
- "R_AARCH64_P32_ADR_GOT_PAGE",
- "R_AARCH64_P32_ADR_PREL_LO21",
- "R_AARCH64_P32_ADR_PREL_PG_HI21",
- "R_AARCH64_P32_CALL26",
- "R_AARCH64_P32_CONDBR19",
- "R_AARCH64_P32_COPY",
- "R_AARCH64_P32_GLOB_DAT",
- "R_AARCH64_P32_GOT_LD_PREL19",
- "R_AARCH64_P32_IRELATIVE",
- "R_AARCH64_P32_JUMP26",
- "R_AARCH64_P32_JUMP_SLOT",
- "R_AARCH64_P32_LD32_GOT_LO12_NC",
- "R_AARCH64_P32_LDST128_ABS_LO12_NC",
- "R_AARCH64_P32_LDST16_ABS_LO12_NC",
- "R_AARCH64_P32_LDST32_ABS_LO12_NC",
- "R_AARCH64_P32_LDST64_ABS_LO12_NC",
- "R_AARCH64_P32_LDST8_ABS_LO12_NC",
- "R_AARCH64_P32_LD_PREL_LO19",
- "R_AARCH64_P32_MOVW_SABS_G0",
- "R_AARCH64_P32_MOVW_UABS_G0",
- "R_AARCH64_P32_MOVW_UABS_G0_NC",
- "R_AARCH64_P32_MOVW_UABS_G1",
- "R_AARCH64_P32_PREL16",
- "R_AARCH64_P32_PREL32",
- "R_AARCH64_P32_RELATIVE",
- "R_AARCH64_P32_TLSDESC",
- "R_AARCH64_P32_TLSDESC_ADD_LO12_NC",
- "R_AARCH64_P32_TLSDESC_ADR_PAGE21",
- "R_AARCH64_P32_TLSDESC_ADR_PREL21",
- "R_AARCH64_P32_TLSDESC_CALL",
- "R_AARCH64_P32_TLSDESC_LD32_LO12_NC",
- "R_AARCH64_P32_TLSDESC_LD_PREL19",
- "R_AARCH64_P32_TLSGD_ADD_LO12_NC",
- "R_AARCH64_P32_TLSGD_ADR_PAGE21",
- "R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21",
- "R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC",
- "R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19",
- "R_AARCH64_P32_TLSLE_ADD_TPREL_HI12",
- "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12",
- "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC",
- "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0",
- "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC",
- "R_AARCH64_P32_TLSLE_MOVW_TPREL_G1",
- "R_AARCH64_P32_TLS_DTPMOD",
- "R_AARCH64_P32_TLS_DTPREL",
- "R_AARCH64_P32_TLS_TPREL",
- "R_AARCH64_P32_TSTBR14",
- "R_AARCH64_PREL16",
- "R_AARCH64_PREL32",
- "R_AARCH64_PREL64",
- "R_AARCH64_RELATIVE",
- "R_AARCH64_TLSDESC",
- "R_AARCH64_TLSDESC_ADD",
- "R_AARCH64_TLSDESC_ADD_LO12_NC",
- "R_AARCH64_TLSDESC_ADR_PAGE21",
- "R_AARCH64_TLSDESC_ADR_PREL21",
- "R_AARCH64_TLSDESC_CALL",
- "R_AARCH64_TLSDESC_LD64_LO12_NC",
- "R_AARCH64_TLSDESC_LDR",
- "R_AARCH64_TLSDESC_LD_PREL19",
- "R_AARCH64_TLSDESC_OFF_G0_NC",
- "R_AARCH64_TLSDESC_OFF_G1",
- "R_AARCH64_TLSGD_ADD_LO12_NC",
- "R_AARCH64_TLSGD_ADR_PAGE21",
- "R_AARCH64_TLSGD_ADR_PREL21",
- "R_AARCH64_TLSGD_MOVW_G0_NC",
- "R_AARCH64_TLSGD_MOVW_G1",
- "R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21",
- "R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC",
- "R_AARCH64_TLSIE_LD_GOTTPREL_PREL19",
- "R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC",
- "R_AARCH64_TLSIE_MOVW_GOTTPREL_G1",
- "R_AARCH64_TLSLD_ADR_PAGE21",
- "R_AARCH64_TLSLD_ADR_PREL21",
- "R_AARCH64_TLSLD_LDST128_DTPREL_LO12",
- "R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC",
- "R_AARCH64_TLSLE_ADD_TPREL_HI12",
- "R_AARCH64_TLSLE_ADD_TPREL_LO12",
- "R_AARCH64_TLSLE_ADD_TPREL_LO12_NC",
- "R_AARCH64_TLSLE_LDST128_TPREL_LO12",
- "R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC",
- "R_AARCH64_TLSLE_MOVW_TPREL_G0",
- "R_AARCH64_TLSLE_MOVW_TPREL_G0_NC",
- "R_AARCH64_TLSLE_MOVW_TPREL_G1",
- "R_AARCH64_TLSLE_MOVW_TPREL_G1_NC",
- "R_AARCH64_TLSLE_MOVW_TPREL_G2",
- "R_AARCH64_TLS_DTPMOD64",
- "R_AARCH64_TLS_DTPREL64",
- "R_AARCH64_TLS_TPREL64",
- "R_AARCH64_TSTBR14",
- "R_ALPHA",
- "R_ALPHA_BRADDR",
- "R_ALPHA_COPY",
- "R_ALPHA_GLOB_DAT",
- "R_ALPHA_GPDISP",
- "R_ALPHA_GPREL32",
- "R_ALPHA_GPRELHIGH",
- "R_ALPHA_GPRELLOW",
- "R_ALPHA_GPVALUE",
- "R_ALPHA_HINT",
- "R_ALPHA_IMMED_BR_HI32",
- "R_ALPHA_IMMED_GP_16",
- "R_ALPHA_IMMED_GP_HI32",
- "R_ALPHA_IMMED_LO32",
- "R_ALPHA_IMMED_SCN_HI32",
- "R_ALPHA_JMP_SLOT",
- "R_ALPHA_LITERAL",
- "R_ALPHA_LITUSE",
- "R_ALPHA_NONE",
- "R_ALPHA_OP_PRSHIFT",
- "R_ALPHA_OP_PSUB",
- "R_ALPHA_OP_PUSH",
- "R_ALPHA_OP_STORE",
- "R_ALPHA_REFLONG",
- "R_ALPHA_REFQUAD",
- "R_ALPHA_RELATIVE",
- "R_ALPHA_SREL16",
- "R_ALPHA_SREL32",
- "R_ALPHA_SREL64",
- "R_ARM",
- "R_ARM_ABS12",
- "R_ARM_ABS16",
- "R_ARM_ABS32",
- "R_ARM_ABS32_NOI",
- "R_ARM_ABS8",
- "R_ARM_ALU_PCREL_15_8",
- "R_ARM_ALU_PCREL_23_15",
- "R_ARM_ALU_PCREL_7_0",
- "R_ARM_ALU_PC_G0",
- "R_ARM_ALU_PC_G0_NC",
- "R_ARM_ALU_PC_G1",
- "R_ARM_ALU_PC_G1_NC",
- "R_ARM_ALU_PC_G2",
- "R_ARM_ALU_SBREL_19_12_NC",
- "R_ARM_ALU_SBREL_27_20_CK",
- "R_ARM_ALU_SB_G0",
- "R_ARM_ALU_SB_G0_NC",
- "R_ARM_ALU_SB_G1",
- "R_ARM_ALU_SB_G1_NC",
- "R_ARM_ALU_SB_G2",
- "R_ARM_AMP_VCALL9",
- "R_ARM_BASE_ABS",
- "R_ARM_CALL",
- "R_ARM_COPY",
- "R_ARM_GLOB_DAT",
- "R_ARM_GNU_VTENTRY",
- "R_ARM_GNU_VTINHERIT",
- "R_ARM_GOT32",
- "R_ARM_GOTOFF",
- "R_ARM_GOTOFF12",
- "R_ARM_GOTPC",
- "R_ARM_GOTRELAX",
- "R_ARM_GOT_ABS",
- "R_ARM_GOT_BREL12",
- "R_ARM_GOT_PREL",
- "R_ARM_IRELATIVE",
- "R_ARM_JUMP24",
- "R_ARM_JUMP_SLOT",
- "R_ARM_LDC_PC_G0",
- "R_ARM_LDC_PC_G1",
- "R_ARM_LDC_PC_G2",
- "R_ARM_LDC_SB_G0",
- "R_ARM_LDC_SB_G1",
- "R_ARM_LDC_SB_G2",
- "R_ARM_LDRS_PC_G0",
- "R_ARM_LDRS_PC_G1",
- "R_ARM_LDRS_PC_G2",
- "R_ARM_LDRS_SB_G0",
- "R_ARM_LDRS_SB_G1",
- "R_ARM_LDRS_SB_G2",
- "R_ARM_LDR_PC_G1",
- "R_ARM_LDR_PC_G2",
- "R_ARM_LDR_SBREL_11_10_NC",
- "R_ARM_LDR_SB_G0",
- "R_ARM_LDR_SB_G1",
- "R_ARM_LDR_SB_G2",
- "R_ARM_ME_TOO",
- "R_ARM_MOVT_ABS",
- "R_ARM_MOVT_BREL",
- "R_ARM_MOVT_PREL",
- "R_ARM_MOVW_ABS_NC",
- "R_ARM_MOVW_BREL",
- "R_ARM_MOVW_BREL_NC",
- "R_ARM_MOVW_PREL_NC",
- "R_ARM_NONE",
- "R_ARM_PC13",
- "R_ARM_PC24",
- "R_ARM_PLT32",
- "R_ARM_PLT32_ABS",
- "R_ARM_PREL31",
- "R_ARM_PRIVATE_0",
- "R_ARM_PRIVATE_1",
- "R_ARM_PRIVATE_10",
- "R_ARM_PRIVATE_11",
- "R_ARM_PRIVATE_12",
- "R_ARM_PRIVATE_13",
- "R_ARM_PRIVATE_14",
- "R_ARM_PRIVATE_15",
- "R_ARM_PRIVATE_2",
- "R_ARM_PRIVATE_3",
- "R_ARM_PRIVATE_4",
- "R_ARM_PRIVATE_5",
- "R_ARM_PRIVATE_6",
- "R_ARM_PRIVATE_7",
- "R_ARM_PRIVATE_8",
- "R_ARM_PRIVATE_9",
- "R_ARM_RABS32",
- "R_ARM_RBASE",
- "R_ARM_REL32",
- "R_ARM_REL32_NOI",
- "R_ARM_RELATIVE",
- "R_ARM_RPC24",
- "R_ARM_RREL32",
- "R_ARM_RSBREL32",
- "R_ARM_RXPC25",
- "R_ARM_SBREL31",
- "R_ARM_SBREL32",
- "R_ARM_SWI24",
- "R_ARM_TARGET1",
- "R_ARM_TARGET2",
- "R_ARM_THM_ABS5",
- "R_ARM_THM_ALU_ABS_G0_NC",
- "R_ARM_THM_ALU_ABS_G1_NC",
- "R_ARM_THM_ALU_ABS_G2_NC",
- "R_ARM_THM_ALU_ABS_G3",
- "R_ARM_THM_ALU_PREL_11_0",
- "R_ARM_THM_GOT_BREL12",
- "R_ARM_THM_JUMP11",
- "R_ARM_THM_JUMP19",
- "R_ARM_THM_JUMP24",
- "R_ARM_THM_JUMP6",
- "R_ARM_THM_JUMP8",
- "R_ARM_THM_MOVT_ABS",
- "R_ARM_THM_MOVT_BREL",
- "R_ARM_THM_MOVT_PREL",
- "R_ARM_THM_MOVW_ABS_NC",
- "R_ARM_THM_MOVW_BREL",
- "R_ARM_THM_MOVW_BREL_NC",
- "R_ARM_THM_MOVW_PREL_NC",
- "R_ARM_THM_PC12",
- "R_ARM_THM_PC22",
- "R_ARM_THM_PC8",
- "R_ARM_THM_RPC22",
- "R_ARM_THM_SWI8",
- "R_ARM_THM_TLS_CALL",
- "R_ARM_THM_TLS_DESCSEQ16",
- "R_ARM_THM_TLS_DESCSEQ32",
- "R_ARM_THM_XPC22",
- "R_ARM_TLS_CALL",
- "R_ARM_TLS_DESCSEQ",
- "R_ARM_TLS_DTPMOD32",
- "R_ARM_TLS_DTPOFF32",
- "R_ARM_TLS_GD32",
- "R_ARM_TLS_GOTDESC",
- "R_ARM_TLS_IE12GP",
- "R_ARM_TLS_IE32",
- "R_ARM_TLS_LDM32",
- "R_ARM_TLS_LDO12",
- "R_ARM_TLS_LDO32",
- "R_ARM_TLS_LE12",
- "R_ARM_TLS_LE32",
- "R_ARM_TLS_TPOFF32",
- "R_ARM_V4BX",
- "R_ARM_XPC25",
- "R_INFO",
- "R_INFO32",
- "R_LARCH",
- "R_LARCH_32",
- "R_LARCH_32_PCREL",
- "R_LARCH_64",
- "R_LARCH_ABS64_HI12",
- "R_LARCH_ABS64_LO20",
- "R_LARCH_ABS_HI20",
- "R_LARCH_ABS_LO12",
- "R_LARCH_ADD16",
- "R_LARCH_ADD24",
- "R_LARCH_ADD32",
- "R_LARCH_ADD64",
- "R_LARCH_ADD8",
- "R_LARCH_B16",
- "R_LARCH_B21",
- "R_LARCH_B26",
- "R_LARCH_COPY",
- "R_LARCH_GNU_VTENTRY",
- "R_LARCH_GNU_VTINHERIT",
- "R_LARCH_GOT64_HI12",
- "R_LARCH_GOT64_LO20",
- "R_LARCH_GOT64_PC_HI12",
- "R_LARCH_GOT64_PC_LO20",
- "R_LARCH_GOT_HI20",
- "R_LARCH_GOT_LO12",
- "R_LARCH_GOT_PC_HI20",
- "R_LARCH_GOT_PC_LO12",
- "R_LARCH_IRELATIVE",
- "R_LARCH_JUMP_SLOT",
- "R_LARCH_MARK_LA",
- "R_LARCH_MARK_PCREL",
- "R_LARCH_NONE",
- "R_LARCH_PCALA64_HI12",
- "R_LARCH_PCALA64_LO20",
- "R_LARCH_PCALA_HI20",
- "R_LARCH_PCALA_LO12",
- "R_LARCH_RELATIVE",
- "R_LARCH_RELAX",
- "R_LARCH_SOP_ADD",
- "R_LARCH_SOP_AND",
- "R_LARCH_SOP_ASSERT",
- "R_LARCH_SOP_IF_ELSE",
- "R_LARCH_SOP_NOT",
- "R_LARCH_SOP_POP_32_S_0_10_10_16_S2",
- "R_LARCH_SOP_POP_32_S_0_5_10_16_S2",
- "R_LARCH_SOP_POP_32_S_10_12",
- "R_LARCH_SOP_POP_32_S_10_16",
- "R_LARCH_SOP_POP_32_S_10_16_S2",
- "R_LARCH_SOP_POP_32_S_10_5",
- "R_LARCH_SOP_POP_32_S_5_20",
- "R_LARCH_SOP_POP_32_U",
- "R_LARCH_SOP_POP_32_U_10_12",
- "R_LARCH_SOP_PUSH_ABSOLUTE",
- "R_LARCH_SOP_PUSH_DUP",
- "R_LARCH_SOP_PUSH_GPREL",
- "R_LARCH_SOP_PUSH_PCREL",
- "R_LARCH_SOP_PUSH_PLT_PCREL",
- "R_LARCH_SOP_PUSH_TLS_GD",
- "R_LARCH_SOP_PUSH_TLS_GOT",
- "R_LARCH_SOP_PUSH_TLS_TPREL",
- "R_LARCH_SOP_SL",
- "R_LARCH_SOP_SR",
- "R_LARCH_SOP_SUB",
- "R_LARCH_SUB16",
- "R_LARCH_SUB24",
- "R_LARCH_SUB32",
- "R_LARCH_SUB64",
- "R_LARCH_SUB8",
- "R_LARCH_TLS_DTPMOD32",
- "R_LARCH_TLS_DTPMOD64",
- "R_LARCH_TLS_DTPREL32",
- "R_LARCH_TLS_DTPREL64",
- "R_LARCH_TLS_GD_HI20",
- "R_LARCH_TLS_GD_PC_HI20",
- "R_LARCH_TLS_IE64_HI12",
- "R_LARCH_TLS_IE64_LO20",
- "R_LARCH_TLS_IE64_PC_HI12",
- "R_LARCH_TLS_IE64_PC_LO20",
- "R_LARCH_TLS_IE_HI20",
- "R_LARCH_TLS_IE_LO12",
- "R_LARCH_TLS_IE_PC_HI20",
- "R_LARCH_TLS_IE_PC_LO12",
- "R_LARCH_TLS_LD_HI20",
- "R_LARCH_TLS_LD_PC_HI20",
- "R_LARCH_TLS_LE64_HI12",
- "R_LARCH_TLS_LE64_LO20",
- "R_LARCH_TLS_LE_HI20",
- "R_LARCH_TLS_LE_LO12",
- "R_LARCH_TLS_TPREL32",
- "R_LARCH_TLS_TPREL64",
- "R_MIPS",
- "R_MIPS_16",
- "R_MIPS_26",
- "R_MIPS_32",
- "R_MIPS_64",
- "R_MIPS_ADD_IMMEDIATE",
- "R_MIPS_CALL16",
- "R_MIPS_CALL_HI16",
- "R_MIPS_CALL_LO16",
- "R_MIPS_DELETE",
- "R_MIPS_GOT16",
- "R_MIPS_GOT_DISP",
- "R_MIPS_GOT_HI16",
- "R_MIPS_GOT_LO16",
- "R_MIPS_GOT_OFST",
- "R_MIPS_GOT_PAGE",
- "R_MIPS_GPREL16",
- "R_MIPS_GPREL32",
- "R_MIPS_HI16",
- "R_MIPS_HIGHER",
- "R_MIPS_HIGHEST",
- "R_MIPS_INSERT_A",
- "R_MIPS_INSERT_B",
- "R_MIPS_JALR",
- "R_MIPS_LITERAL",
- "R_MIPS_LO16",
- "R_MIPS_NONE",
- "R_MIPS_PC16",
- "R_MIPS_PJUMP",
- "R_MIPS_REL16",
- "R_MIPS_REL32",
- "R_MIPS_RELGOT",
- "R_MIPS_SCN_DISP",
- "R_MIPS_SHIFT5",
- "R_MIPS_SHIFT6",
- "R_MIPS_SUB",
- "R_MIPS_TLS_DTPMOD32",
- "R_MIPS_TLS_DTPMOD64",
- "R_MIPS_TLS_DTPREL32",
- "R_MIPS_TLS_DTPREL64",
- "R_MIPS_TLS_DTPREL_HI16",
- "R_MIPS_TLS_DTPREL_LO16",
- "R_MIPS_TLS_GD",
- "R_MIPS_TLS_GOTTPREL",
- "R_MIPS_TLS_LDM",
- "R_MIPS_TLS_TPREL32",
- "R_MIPS_TLS_TPREL64",
- "R_MIPS_TLS_TPREL_HI16",
- "R_MIPS_TLS_TPREL_LO16",
- "R_PPC",
- "R_PPC64",
- "R_PPC64_ADDR14",
- "R_PPC64_ADDR14_BRNTAKEN",
- "R_PPC64_ADDR14_BRTAKEN",
- "R_PPC64_ADDR16",
- "R_PPC64_ADDR16_DS",
- "R_PPC64_ADDR16_HA",
- "R_PPC64_ADDR16_HI",
- "R_PPC64_ADDR16_HIGH",
- "R_PPC64_ADDR16_HIGHA",
- "R_PPC64_ADDR16_HIGHER",
- "R_PPC64_ADDR16_HIGHER34",
- "R_PPC64_ADDR16_HIGHERA",
- "R_PPC64_ADDR16_HIGHERA34",
- "R_PPC64_ADDR16_HIGHEST",
- "R_PPC64_ADDR16_HIGHEST34",
- "R_PPC64_ADDR16_HIGHESTA",
- "R_PPC64_ADDR16_HIGHESTA34",
- "R_PPC64_ADDR16_LO",
- "R_PPC64_ADDR16_LO_DS",
- "R_PPC64_ADDR24",
- "R_PPC64_ADDR32",
- "R_PPC64_ADDR64",
- "R_PPC64_ADDR64_LOCAL",
- "R_PPC64_COPY",
- "R_PPC64_D28",
- "R_PPC64_D34",
- "R_PPC64_D34_HA30",
- "R_PPC64_D34_HI30",
- "R_PPC64_D34_LO",
- "R_PPC64_DTPMOD64",
- "R_PPC64_DTPREL16",
- "R_PPC64_DTPREL16_DS",
- "R_PPC64_DTPREL16_HA",
- "R_PPC64_DTPREL16_HI",
- "R_PPC64_DTPREL16_HIGH",
- "R_PPC64_DTPREL16_HIGHA",
- "R_PPC64_DTPREL16_HIGHER",
- "R_PPC64_DTPREL16_HIGHERA",
- "R_PPC64_DTPREL16_HIGHEST",
- "R_PPC64_DTPREL16_HIGHESTA",
- "R_PPC64_DTPREL16_LO",
- "R_PPC64_DTPREL16_LO_DS",
- "R_PPC64_DTPREL34",
- "R_PPC64_DTPREL64",
- "R_PPC64_ENTRY",
- "R_PPC64_GLOB_DAT",
- "R_PPC64_GNU_VTENTRY",
- "R_PPC64_GNU_VTINHERIT",
- "R_PPC64_GOT16",
- "R_PPC64_GOT16_DS",
- "R_PPC64_GOT16_HA",
- "R_PPC64_GOT16_HI",
- "R_PPC64_GOT16_LO",
- "R_PPC64_GOT16_LO_DS",
- "R_PPC64_GOT_DTPREL16_DS",
- "R_PPC64_GOT_DTPREL16_HA",
- "R_PPC64_GOT_DTPREL16_HI",
- "R_PPC64_GOT_DTPREL16_LO_DS",
- "R_PPC64_GOT_DTPREL_PCREL34",
- "R_PPC64_GOT_PCREL34",
- "R_PPC64_GOT_TLSGD16",
- "R_PPC64_GOT_TLSGD16_HA",
- "R_PPC64_GOT_TLSGD16_HI",
- "R_PPC64_GOT_TLSGD16_LO",
- "R_PPC64_GOT_TLSGD_PCREL34",
- "R_PPC64_GOT_TLSLD16",
- "R_PPC64_GOT_TLSLD16_HA",
- "R_PPC64_GOT_TLSLD16_HI",
- "R_PPC64_GOT_TLSLD16_LO",
- "R_PPC64_GOT_TLSLD_PCREL34",
- "R_PPC64_GOT_TPREL16_DS",
- "R_PPC64_GOT_TPREL16_HA",
- "R_PPC64_GOT_TPREL16_HI",
- "R_PPC64_GOT_TPREL16_LO_DS",
- "R_PPC64_GOT_TPREL_PCREL34",
- "R_PPC64_IRELATIVE",
- "R_PPC64_JMP_IREL",
- "R_PPC64_JMP_SLOT",
- "R_PPC64_NONE",
- "R_PPC64_PCREL28",
- "R_PPC64_PCREL34",
- "R_PPC64_PCREL_OPT",
- "R_PPC64_PLT16_HA",
- "R_PPC64_PLT16_HI",
- "R_PPC64_PLT16_LO",
- "R_PPC64_PLT16_LO_DS",
- "R_PPC64_PLT32",
- "R_PPC64_PLT64",
- "R_PPC64_PLTCALL",
- "R_PPC64_PLTCALL_NOTOC",
- "R_PPC64_PLTGOT16",
- "R_PPC64_PLTGOT16_DS",
- "R_PPC64_PLTGOT16_HA",
- "R_PPC64_PLTGOT16_HI",
- "R_PPC64_PLTGOT16_LO",
- "R_PPC64_PLTGOT_LO_DS",
- "R_PPC64_PLTREL32",
- "R_PPC64_PLTREL64",
- "R_PPC64_PLTSEQ",
- "R_PPC64_PLTSEQ_NOTOC",
- "R_PPC64_PLT_PCREL34",
- "R_PPC64_PLT_PCREL34_NOTOC",
- "R_PPC64_REL14",
- "R_PPC64_REL14_BRNTAKEN",
- "R_PPC64_REL14_BRTAKEN",
- "R_PPC64_REL16",
- "R_PPC64_REL16DX_HA",
- "R_PPC64_REL16_HA",
- "R_PPC64_REL16_HI",
- "R_PPC64_REL16_HIGH",
- "R_PPC64_REL16_HIGHA",
- "R_PPC64_REL16_HIGHER",
- "R_PPC64_REL16_HIGHER34",
- "R_PPC64_REL16_HIGHERA",
- "R_PPC64_REL16_HIGHERA34",
- "R_PPC64_REL16_HIGHEST",
- "R_PPC64_REL16_HIGHEST34",
- "R_PPC64_REL16_HIGHESTA",
- "R_PPC64_REL16_HIGHESTA34",
- "R_PPC64_REL16_LO",
- "R_PPC64_REL24",
- "R_PPC64_REL24_NOTOC",
- "R_PPC64_REL24_P9NOTOC",
- "R_PPC64_REL30",
- "R_PPC64_REL32",
- "R_PPC64_REL64",
- "R_PPC64_RELATIVE",
- "R_PPC64_SECTOFF",
- "R_PPC64_SECTOFF_DS",
- "R_PPC64_SECTOFF_HA",
- "R_PPC64_SECTOFF_HI",
- "R_PPC64_SECTOFF_LO",
- "R_PPC64_SECTOFF_LO_DS",
- "R_PPC64_TLS",
- "R_PPC64_TLSGD",
- "R_PPC64_TLSLD",
- "R_PPC64_TOC",
- "R_PPC64_TOC16",
- "R_PPC64_TOC16_DS",
- "R_PPC64_TOC16_HA",
- "R_PPC64_TOC16_HI",
- "R_PPC64_TOC16_LO",
- "R_PPC64_TOC16_LO_DS",
- "R_PPC64_TOCSAVE",
- "R_PPC64_TPREL16",
- "R_PPC64_TPREL16_DS",
- "R_PPC64_TPREL16_HA",
- "R_PPC64_TPREL16_HI",
- "R_PPC64_TPREL16_HIGH",
- "R_PPC64_TPREL16_HIGHA",
- "R_PPC64_TPREL16_HIGHER",
- "R_PPC64_TPREL16_HIGHERA",
- "R_PPC64_TPREL16_HIGHEST",
- "R_PPC64_TPREL16_HIGHESTA",
- "R_PPC64_TPREL16_LO",
- "R_PPC64_TPREL16_LO_DS",
- "R_PPC64_TPREL34",
- "R_PPC64_TPREL64",
- "R_PPC64_UADDR16",
- "R_PPC64_UADDR32",
- "R_PPC64_UADDR64",
- "R_PPC_ADDR14",
- "R_PPC_ADDR14_BRNTAKEN",
- "R_PPC_ADDR14_BRTAKEN",
- "R_PPC_ADDR16",
- "R_PPC_ADDR16_HA",
- "R_PPC_ADDR16_HI",
- "R_PPC_ADDR16_LO",
- "R_PPC_ADDR24",
- "R_PPC_ADDR32",
- "R_PPC_COPY",
- "R_PPC_DTPMOD32",
- "R_PPC_DTPREL16",
- "R_PPC_DTPREL16_HA",
- "R_PPC_DTPREL16_HI",
- "R_PPC_DTPREL16_LO",
- "R_PPC_DTPREL32",
- "R_PPC_EMB_BIT_FLD",
- "R_PPC_EMB_MRKREF",
- "R_PPC_EMB_NADDR16",
- "R_PPC_EMB_NADDR16_HA",
- "R_PPC_EMB_NADDR16_HI",
- "R_PPC_EMB_NADDR16_LO",
- "R_PPC_EMB_NADDR32",
- "R_PPC_EMB_RELSDA",
- "R_PPC_EMB_RELSEC16",
- "R_PPC_EMB_RELST_HA",
- "R_PPC_EMB_RELST_HI",
- "R_PPC_EMB_RELST_LO",
- "R_PPC_EMB_SDA21",
- "R_PPC_EMB_SDA2I16",
- "R_PPC_EMB_SDA2REL",
- "R_PPC_EMB_SDAI16",
- "R_PPC_GLOB_DAT",
- "R_PPC_GOT16",
- "R_PPC_GOT16_HA",
- "R_PPC_GOT16_HI",
- "R_PPC_GOT16_LO",
- "R_PPC_GOT_TLSGD16",
- "R_PPC_GOT_TLSGD16_HA",
- "R_PPC_GOT_TLSGD16_HI",
- "R_PPC_GOT_TLSGD16_LO",
- "R_PPC_GOT_TLSLD16",
- "R_PPC_GOT_TLSLD16_HA",
- "R_PPC_GOT_TLSLD16_HI",
- "R_PPC_GOT_TLSLD16_LO",
- "R_PPC_GOT_TPREL16",
- "R_PPC_GOT_TPREL16_HA",
- "R_PPC_GOT_TPREL16_HI",
- "R_PPC_GOT_TPREL16_LO",
- "R_PPC_JMP_SLOT",
- "R_PPC_LOCAL24PC",
- "R_PPC_NONE",
- "R_PPC_PLT16_HA",
- "R_PPC_PLT16_HI",
- "R_PPC_PLT16_LO",
- "R_PPC_PLT32",
- "R_PPC_PLTREL24",
- "R_PPC_PLTREL32",
- "R_PPC_REL14",
- "R_PPC_REL14_BRNTAKEN",
- "R_PPC_REL14_BRTAKEN",
- "R_PPC_REL24",
- "R_PPC_REL32",
- "R_PPC_RELATIVE",
- "R_PPC_SDAREL16",
- "R_PPC_SECTOFF",
- "R_PPC_SECTOFF_HA",
- "R_PPC_SECTOFF_HI",
- "R_PPC_SECTOFF_LO",
- "R_PPC_TLS",
- "R_PPC_TPREL16",
- "R_PPC_TPREL16_HA",
- "R_PPC_TPREL16_HI",
- "R_PPC_TPREL16_LO",
- "R_PPC_TPREL32",
- "R_PPC_UADDR16",
- "R_PPC_UADDR32",
- "R_RISCV",
- "R_RISCV_32",
- "R_RISCV_32_PCREL",
- "R_RISCV_64",
- "R_RISCV_ADD16",
- "R_RISCV_ADD32",
- "R_RISCV_ADD64",
- "R_RISCV_ADD8",
- "R_RISCV_ALIGN",
- "R_RISCV_BRANCH",
- "R_RISCV_CALL",
- "R_RISCV_CALL_PLT",
- "R_RISCV_COPY",
- "R_RISCV_GNU_VTENTRY",
- "R_RISCV_GNU_VTINHERIT",
- "R_RISCV_GOT_HI20",
- "R_RISCV_GPREL_I",
- "R_RISCV_GPREL_S",
- "R_RISCV_HI20",
- "R_RISCV_JAL",
- "R_RISCV_JUMP_SLOT",
- "R_RISCV_LO12_I",
- "R_RISCV_LO12_S",
- "R_RISCV_NONE",
- "R_RISCV_PCREL_HI20",
- "R_RISCV_PCREL_LO12_I",
- "R_RISCV_PCREL_LO12_S",
- "R_RISCV_RELATIVE",
- "R_RISCV_RELAX",
- "R_RISCV_RVC_BRANCH",
- "R_RISCV_RVC_JUMP",
- "R_RISCV_RVC_LUI",
- "R_RISCV_SET16",
- "R_RISCV_SET32",
- "R_RISCV_SET6",
- "R_RISCV_SET8",
- "R_RISCV_SUB16",
- "R_RISCV_SUB32",
- "R_RISCV_SUB6",
- "R_RISCV_SUB64",
- "R_RISCV_SUB8",
- "R_RISCV_TLS_DTPMOD32",
- "R_RISCV_TLS_DTPMOD64",
- "R_RISCV_TLS_DTPREL32",
- "R_RISCV_TLS_DTPREL64",
- "R_RISCV_TLS_GD_HI20",
- "R_RISCV_TLS_GOT_HI20",
- "R_RISCV_TLS_TPREL32",
- "R_RISCV_TLS_TPREL64",
- "R_RISCV_TPREL_ADD",
- "R_RISCV_TPREL_HI20",
- "R_RISCV_TPREL_I",
- "R_RISCV_TPREL_LO12_I",
- "R_RISCV_TPREL_LO12_S",
- "R_RISCV_TPREL_S",
- "R_SPARC",
- "R_SPARC_10",
- "R_SPARC_11",
- "R_SPARC_13",
- "R_SPARC_16",
- "R_SPARC_22",
- "R_SPARC_32",
- "R_SPARC_5",
- "R_SPARC_6",
- "R_SPARC_64",
- "R_SPARC_7",
- "R_SPARC_8",
- "R_SPARC_COPY",
- "R_SPARC_DISP16",
- "R_SPARC_DISP32",
- "R_SPARC_DISP64",
- "R_SPARC_DISP8",
- "R_SPARC_GLOB_DAT",
- "R_SPARC_GLOB_JMP",
- "R_SPARC_GOT10",
- "R_SPARC_GOT13",
- "R_SPARC_GOT22",
- "R_SPARC_H44",
- "R_SPARC_HH22",
- "R_SPARC_HI22",
- "R_SPARC_HIPLT22",
- "R_SPARC_HIX22",
- "R_SPARC_HM10",
- "R_SPARC_JMP_SLOT",
- "R_SPARC_L44",
- "R_SPARC_LM22",
- "R_SPARC_LO10",
- "R_SPARC_LOPLT10",
- "R_SPARC_LOX10",
- "R_SPARC_M44",
- "R_SPARC_NONE",
- "R_SPARC_OLO10",
- "R_SPARC_PC10",
- "R_SPARC_PC22",
- "R_SPARC_PCPLT10",
- "R_SPARC_PCPLT22",
- "R_SPARC_PCPLT32",
- "R_SPARC_PC_HH22",
- "R_SPARC_PC_HM10",
- "R_SPARC_PC_LM22",
- "R_SPARC_PLT32",
- "R_SPARC_PLT64",
- "R_SPARC_REGISTER",
- "R_SPARC_RELATIVE",
- "R_SPARC_UA16",
- "R_SPARC_UA32",
- "R_SPARC_UA64",
- "R_SPARC_WDISP16",
- "R_SPARC_WDISP19",
- "R_SPARC_WDISP22",
- "R_SPARC_WDISP30",
- "R_SPARC_WPLT30",
- "R_SYM32",
- "R_SYM64",
- "R_TYPE32",
- "R_TYPE64",
- "R_X86_64",
- "R_X86_64_16",
- "R_X86_64_32",
- "R_X86_64_32S",
- "R_X86_64_64",
- "R_X86_64_8",
- "R_X86_64_COPY",
- "R_X86_64_DTPMOD64",
- "R_X86_64_DTPOFF32",
- "R_X86_64_DTPOFF64",
- "R_X86_64_GLOB_DAT",
- "R_X86_64_GOT32",
- "R_X86_64_GOT64",
- "R_X86_64_GOTOFF64",
- "R_X86_64_GOTPC32",
- "R_X86_64_GOTPC32_TLSDESC",
- "R_X86_64_GOTPC64",
- "R_X86_64_GOTPCREL",
- "R_X86_64_GOTPCREL64",
- "R_X86_64_GOTPCRELX",
- "R_X86_64_GOTPLT64",
- "R_X86_64_GOTTPOFF",
- "R_X86_64_IRELATIVE",
- "R_X86_64_JMP_SLOT",
- "R_X86_64_NONE",
- "R_X86_64_PC16",
- "R_X86_64_PC32",
- "R_X86_64_PC32_BND",
- "R_X86_64_PC64",
- "R_X86_64_PC8",
- "R_X86_64_PLT32",
- "R_X86_64_PLT32_BND",
- "R_X86_64_PLTOFF64",
- "R_X86_64_RELATIVE",
- "R_X86_64_RELATIVE64",
- "R_X86_64_REX_GOTPCRELX",
- "R_X86_64_SIZE32",
- "R_X86_64_SIZE64",
- "R_X86_64_TLSDESC",
- "R_X86_64_TLSDESC_CALL",
- "R_X86_64_TLSGD",
- "R_X86_64_TLSLD",
- "R_X86_64_TPOFF32",
- "R_X86_64_TPOFF64",
- "Rel32",
- "Rel64",
- "Rela32",
- "Rela64",
- "SHF_ALLOC",
- "SHF_COMPRESSED",
- "SHF_EXECINSTR",
- "SHF_GROUP",
- "SHF_INFO_LINK",
- "SHF_LINK_ORDER",
- "SHF_MASKOS",
- "SHF_MASKPROC",
- "SHF_MERGE",
- "SHF_OS_NONCONFORMING",
- "SHF_STRINGS",
- "SHF_TLS",
- "SHF_WRITE",
- "SHN_ABS",
- "SHN_COMMON",
- "SHN_HIOS",
- "SHN_HIPROC",
- "SHN_HIRESERVE",
- "SHN_LOOS",
- "SHN_LOPROC",
- "SHN_LORESERVE",
- "SHN_UNDEF",
- "SHN_XINDEX",
- "SHT_DYNAMIC",
- "SHT_DYNSYM",
- "SHT_FINI_ARRAY",
- "SHT_GNU_ATTRIBUTES",
- "SHT_GNU_HASH",
- "SHT_GNU_LIBLIST",
- "SHT_GNU_VERDEF",
- "SHT_GNU_VERNEED",
- "SHT_GNU_VERSYM",
- "SHT_GROUP",
- "SHT_HASH",
- "SHT_HIOS",
- "SHT_HIPROC",
- "SHT_HIUSER",
- "SHT_INIT_ARRAY",
- "SHT_LOOS",
- "SHT_LOPROC",
- "SHT_LOUSER",
- "SHT_MIPS_ABIFLAGS",
- "SHT_NOBITS",
- "SHT_NOTE",
- "SHT_NULL",
- "SHT_PREINIT_ARRAY",
- "SHT_PROGBITS",
- "SHT_REL",
- "SHT_RELA",
- "SHT_SHLIB",
- "SHT_STRTAB",
- "SHT_SYMTAB",
- "SHT_SYMTAB_SHNDX",
- "STB_GLOBAL",
- "STB_HIOS",
- "STB_HIPROC",
- "STB_LOCAL",
- "STB_LOOS",
- "STB_LOPROC",
- "STB_WEAK",
- "STT_COMMON",
- "STT_FILE",
- "STT_FUNC",
- "STT_HIOS",
- "STT_HIPROC",
- "STT_LOOS",
- "STT_LOPROC",
- "STT_NOTYPE",
- "STT_OBJECT",
- "STT_SECTION",
- "STT_TLS",
- "STV_DEFAULT",
- "STV_HIDDEN",
- "STV_INTERNAL",
- "STV_PROTECTED",
- "ST_BIND",
- "ST_INFO",
- "ST_TYPE",
- "ST_VISIBILITY",
- "Section",
- "Section32",
- "Section64",
- "SectionFlag",
- "SectionHeader",
- "SectionIndex",
- "SectionType",
- "Sym32",
- "Sym32Size",
- "Sym64",
- "Sym64Size",
- "SymBind",
- "SymType",
- "SymVis",
- "Symbol",
- "Type",
- "Version",
- },
- "debug/gosym": {
- "DecodingError",
- "Func",
- "LineTable",
- "NewLineTable",
- "NewTable",
- "Obj",
- "Sym",
- "Table",
- "UnknownFileError",
- "UnknownLineError",
- },
- "debug/macho": {
- "ARM64_RELOC_ADDEND",
- "ARM64_RELOC_BRANCH26",
- "ARM64_RELOC_GOT_LOAD_PAGE21",
- "ARM64_RELOC_GOT_LOAD_PAGEOFF12",
- "ARM64_RELOC_PAGE21",
- "ARM64_RELOC_PAGEOFF12",
- "ARM64_RELOC_POINTER_TO_GOT",
- "ARM64_RELOC_SUBTRACTOR",
- "ARM64_RELOC_TLVP_LOAD_PAGE21",
- "ARM64_RELOC_TLVP_LOAD_PAGEOFF12",
- "ARM64_RELOC_UNSIGNED",
- "ARM_RELOC_BR24",
- "ARM_RELOC_HALF",
- "ARM_RELOC_HALF_SECTDIFF",
- "ARM_RELOC_LOCAL_SECTDIFF",
- "ARM_RELOC_PAIR",
- "ARM_RELOC_PB_LA_PTR",
- "ARM_RELOC_SECTDIFF",
- "ARM_RELOC_VANILLA",
- "ARM_THUMB_32BIT_BRANCH",
- "ARM_THUMB_RELOC_BR22",
- "Cpu",
- "Cpu386",
- "CpuAmd64",
- "CpuArm",
- "CpuArm64",
- "CpuPpc",
- "CpuPpc64",
- "Dylib",
- "DylibCmd",
- "Dysymtab",
- "DysymtabCmd",
- "ErrNotFat",
- "FatArch",
- "FatArchHeader",
- "FatFile",
- "File",
- "FileHeader",
- "FlagAllModsBound",
- "FlagAllowStackExecution",
- "FlagAppExtensionSafe",
- "FlagBindAtLoad",
- "FlagBindsToWeak",
- "FlagCanonical",
- "FlagDeadStrippableDylib",
- "FlagDyldLink",
- "FlagForceFlat",
- "FlagHasTLVDescriptors",
- "FlagIncrLink",
- "FlagLazyInit",
- "FlagNoFixPrebinding",
- "FlagNoHeapExecution",
- "FlagNoMultiDefs",
- "FlagNoReexportedDylibs",
- "FlagNoUndefs",
- "FlagPIE",
- "FlagPrebindable",
- "FlagPrebound",
- "FlagRootSafe",
- "FlagSetuidSafe",
- "FlagSplitSegs",
- "FlagSubsectionsViaSymbols",
- "FlagTwoLevel",
- "FlagWeakDefines",
- "FormatError",
- "GENERIC_RELOC_LOCAL_SECTDIFF",
- "GENERIC_RELOC_PAIR",
- "GENERIC_RELOC_PB_LA_PTR",
- "GENERIC_RELOC_SECTDIFF",
- "GENERIC_RELOC_TLV",
- "GENERIC_RELOC_VANILLA",
- "Load",
- "LoadBytes",
- "LoadCmd",
- "LoadCmdDylib",
- "LoadCmdDylinker",
- "LoadCmdDysymtab",
- "LoadCmdRpath",
- "LoadCmdSegment",
- "LoadCmdSegment64",
- "LoadCmdSymtab",
- "LoadCmdThread",
- "LoadCmdUnixThread",
- "Magic32",
- "Magic64",
- "MagicFat",
- "NewFatFile",
- "NewFile",
- "Nlist32",
- "Nlist64",
- "Open",
- "OpenFat",
- "Regs386",
- "RegsAMD64",
- "Reloc",
- "RelocTypeARM",
- "RelocTypeARM64",
- "RelocTypeGeneric",
- "RelocTypeX86_64",
- "Rpath",
- "RpathCmd",
- "Section",
- "Section32",
- "Section64",
- "SectionHeader",
- "Segment",
- "Segment32",
- "Segment64",
- "SegmentHeader",
- "Symbol",
- "Symtab",
- "SymtabCmd",
- "Thread",
- "Type",
- "TypeBundle",
- "TypeDylib",
- "TypeExec",
- "TypeObj",
- "X86_64_RELOC_BRANCH",
- "X86_64_RELOC_GOT",
- "X86_64_RELOC_GOT_LOAD",
- "X86_64_RELOC_SIGNED",
- "X86_64_RELOC_SIGNED_1",
- "X86_64_RELOC_SIGNED_2",
- "X86_64_RELOC_SIGNED_4",
- "X86_64_RELOC_SUBTRACTOR",
- "X86_64_RELOC_TLV",
- "X86_64_RELOC_UNSIGNED",
- },
- "debug/pe": {
- "COFFSymbol",
- "COFFSymbolAuxFormat5",
- "COFFSymbolSize",
- "DataDirectory",
- "File",
- "FileHeader",
- "FormatError",
- "IMAGE_COMDAT_SELECT_ANY",
- "IMAGE_COMDAT_SELECT_ASSOCIATIVE",
- "IMAGE_COMDAT_SELECT_EXACT_MATCH",
- "IMAGE_COMDAT_SELECT_LARGEST",
- "IMAGE_COMDAT_SELECT_NODUPLICATES",
- "IMAGE_COMDAT_SELECT_SAME_SIZE",
- "IMAGE_DIRECTORY_ENTRY_ARCHITECTURE",
- "IMAGE_DIRECTORY_ENTRY_BASERELOC",
- "IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT",
- "IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR",
- "IMAGE_DIRECTORY_ENTRY_DEBUG",
- "IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT",
- "IMAGE_DIRECTORY_ENTRY_EXCEPTION",
- "IMAGE_DIRECTORY_ENTRY_EXPORT",
- "IMAGE_DIRECTORY_ENTRY_GLOBALPTR",
- "IMAGE_DIRECTORY_ENTRY_IAT",
- "IMAGE_DIRECTORY_ENTRY_IMPORT",
- "IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG",
- "IMAGE_DIRECTORY_ENTRY_RESOURCE",
- "IMAGE_DIRECTORY_ENTRY_SECURITY",
- "IMAGE_DIRECTORY_ENTRY_TLS",
- "IMAGE_DLLCHARACTERISTICS_APPCONTAINER",
- "IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE",
- "IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY",
- "IMAGE_DLLCHARACTERISTICS_GUARD_CF",
- "IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA",
- "IMAGE_DLLCHARACTERISTICS_NO_BIND",
- "IMAGE_DLLCHARACTERISTICS_NO_ISOLATION",
- "IMAGE_DLLCHARACTERISTICS_NO_SEH",
- "IMAGE_DLLCHARACTERISTICS_NX_COMPAT",
- "IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE",
- "IMAGE_DLLCHARACTERISTICS_WDM_DRIVER",
- "IMAGE_FILE_32BIT_MACHINE",
- "IMAGE_FILE_AGGRESIVE_WS_TRIM",
- "IMAGE_FILE_BYTES_REVERSED_HI",
- "IMAGE_FILE_BYTES_REVERSED_LO",
- "IMAGE_FILE_DEBUG_STRIPPED",
- "IMAGE_FILE_DLL",
- "IMAGE_FILE_EXECUTABLE_IMAGE",
- "IMAGE_FILE_LARGE_ADDRESS_AWARE",
- "IMAGE_FILE_LINE_NUMS_STRIPPED",
- "IMAGE_FILE_LOCAL_SYMS_STRIPPED",
- "IMAGE_FILE_MACHINE_AM33",
- "IMAGE_FILE_MACHINE_AMD64",
- "IMAGE_FILE_MACHINE_ARM",
- "IMAGE_FILE_MACHINE_ARM64",
- "IMAGE_FILE_MACHINE_ARMNT",
- "IMAGE_FILE_MACHINE_EBC",
- "IMAGE_FILE_MACHINE_I386",
- "IMAGE_FILE_MACHINE_IA64",
- "IMAGE_FILE_MACHINE_LOONGARCH32",
- "IMAGE_FILE_MACHINE_LOONGARCH64",
- "IMAGE_FILE_MACHINE_M32R",
- "IMAGE_FILE_MACHINE_MIPS16",
- "IMAGE_FILE_MACHINE_MIPSFPU",
- "IMAGE_FILE_MACHINE_MIPSFPU16",
- "IMAGE_FILE_MACHINE_POWERPC",
- "IMAGE_FILE_MACHINE_POWERPCFP",
- "IMAGE_FILE_MACHINE_R4000",
- "IMAGE_FILE_MACHINE_RISCV128",
- "IMAGE_FILE_MACHINE_RISCV32",
- "IMAGE_FILE_MACHINE_RISCV64",
- "IMAGE_FILE_MACHINE_SH3",
- "IMAGE_FILE_MACHINE_SH3DSP",
- "IMAGE_FILE_MACHINE_SH4",
- "IMAGE_FILE_MACHINE_SH5",
- "IMAGE_FILE_MACHINE_THUMB",
- "IMAGE_FILE_MACHINE_UNKNOWN",
- "IMAGE_FILE_MACHINE_WCEMIPSV2",
- "IMAGE_FILE_NET_RUN_FROM_SWAP",
- "IMAGE_FILE_RELOCS_STRIPPED",
- "IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP",
- "IMAGE_FILE_SYSTEM",
- "IMAGE_FILE_UP_SYSTEM_ONLY",
- "IMAGE_SCN_CNT_CODE",
- "IMAGE_SCN_CNT_INITIALIZED_DATA",
- "IMAGE_SCN_CNT_UNINITIALIZED_DATA",
- "IMAGE_SCN_LNK_COMDAT",
- "IMAGE_SCN_MEM_DISCARDABLE",
- "IMAGE_SCN_MEM_EXECUTE",
- "IMAGE_SCN_MEM_READ",
- "IMAGE_SCN_MEM_WRITE",
- "IMAGE_SUBSYSTEM_EFI_APPLICATION",
- "IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER",
- "IMAGE_SUBSYSTEM_EFI_ROM",
- "IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER",
- "IMAGE_SUBSYSTEM_NATIVE",
- "IMAGE_SUBSYSTEM_NATIVE_WINDOWS",
- "IMAGE_SUBSYSTEM_OS2_CUI",
- "IMAGE_SUBSYSTEM_POSIX_CUI",
- "IMAGE_SUBSYSTEM_UNKNOWN",
- "IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION",
- "IMAGE_SUBSYSTEM_WINDOWS_CE_GUI",
- "IMAGE_SUBSYSTEM_WINDOWS_CUI",
- "IMAGE_SUBSYSTEM_WINDOWS_GUI",
- "IMAGE_SUBSYSTEM_XBOX",
- "ImportDirectory",
- "NewFile",
- "Open",
- "OptionalHeader32",
- "OptionalHeader64",
- "Reloc",
- "Section",
- "SectionHeader",
- "SectionHeader32",
- "StringTable",
- "Symbol",
- },
- "debug/plan9obj": {
- "ErrNoSymbols",
- "File",
- "FileHeader",
- "Magic386",
- "Magic64",
- "MagicAMD64",
- "MagicARM",
- "NewFile",
- "Open",
- "Section",
- "SectionHeader",
- "Sym",
- },
- "embed": {
- "FS",
- },
- "encoding": {
- "BinaryMarshaler",
- "BinaryUnmarshaler",
- "TextMarshaler",
- "TextUnmarshaler",
- },
- "encoding/ascii85": {
- "CorruptInputError",
- "Decode",
- "Encode",
- "MaxEncodedLen",
- "NewDecoder",
- "NewEncoder",
- },
- "encoding/asn1": {
- "BitString",
- "ClassApplication",
- "ClassContextSpecific",
- "ClassPrivate",
- "ClassUniversal",
- "Enumerated",
- "Flag",
- "Marshal",
- "MarshalWithParams",
- "NullBytes",
- "NullRawValue",
- "ObjectIdentifier",
- "RawContent",
- "RawValue",
- "StructuralError",
- "SyntaxError",
- "TagBMPString",
- "TagBitString",
- "TagBoolean",
- "TagEnum",
- "TagGeneralString",
- "TagGeneralizedTime",
- "TagIA5String",
- "TagInteger",
- "TagNull",
- "TagNumericString",
- "TagOID",
- "TagOctetString",
- "TagPrintableString",
- "TagSequence",
- "TagSet",
- "TagT61String",
- "TagUTCTime",
- "TagUTF8String",
- "Unmarshal",
- "UnmarshalWithParams",
- },
- "encoding/base32": {
- "CorruptInputError",
- "Encoding",
- "HexEncoding",
- "NewDecoder",
- "NewEncoder",
- "NewEncoding",
- "NoPadding",
- "StdEncoding",
- "StdPadding",
- },
- "encoding/base64": {
- "CorruptInputError",
- "Encoding",
- "NewDecoder",
- "NewEncoder",
- "NewEncoding",
- "NoPadding",
- "RawStdEncoding",
- "RawURLEncoding",
- "StdEncoding",
- "StdPadding",
- "URLEncoding",
- },
- "encoding/binary": {
- "AppendByteOrder",
- "AppendUvarint",
- "AppendVarint",
- "BigEndian",
- "ByteOrder",
- "LittleEndian",
- "MaxVarintLen16",
- "MaxVarintLen32",
- "MaxVarintLen64",
- "NativeEndian",
- "PutUvarint",
- "PutVarint",
- "Read",
- "ReadUvarint",
- "ReadVarint",
- "Size",
- "Uvarint",
- "Varint",
- "Write",
- },
- "encoding/csv": {
- "ErrBareQuote",
- "ErrFieldCount",
- "ErrQuote",
- "ErrTrailingComma",
- "NewReader",
- "NewWriter",
- "ParseError",
- "Reader",
- "Writer",
- },
- "encoding/gob": {
- "CommonType",
- "Decoder",
- "Encoder",
- "GobDecoder",
- "GobEncoder",
- "NewDecoder",
- "NewEncoder",
- "Register",
- "RegisterName",
- },
- "encoding/hex": {
- "Decode",
- "DecodeString",
- "DecodedLen",
- "Dump",
- "Dumper",
- "Encode",
- "EncodeToString",
- "EncodedLen",
- "ErrLength",
- "InvalidByteError",
- "NewDecoder",
- "NewEncoder",
- },
- "encoding/json": {
- "Compact",
- "Decoder",
- "Delim",
- "Encoder",
- "HTMLEscape",
- "Indent",
- "InvalidUTF8Error",
- "InvalidUnmarshalError",
- "Marshal",
- "MarshalIndent",
- "Marshaler",
- "MarshalerError",
- "NewDecoder",
- "NewEncoder",
- "Number",
- "RawMessage",
- "SyntaxError",
- "Token",
- "Unmarshal",
- "UnmarshalFieldError",
- "UnmarshalTypeError",
- "Unmarshaler",
- "UnsupportedTypeError",
- "UnsupportedValueError",
- "Valid",
- },
- "encoding/pem": {
- "Block",
- "Decode",
- "Encode",
- "EncodeToMemory",
- },
- "encoding/xml": {
- "Attr",
- "CharData",
- "Comment",
- "CopyToken",
- "Decoder",
- "Directive",
- "Encoder",
- "EndElement",
- "Escape",
- "EscapeText",
- "HTMLAutoClose",
- "HTMLEntity",
- "Header",
- "Marshal",
- "MarshalIndent",
- "Marshaler",
- "MarshalerAttr",
- "Name",
- "NewDecoder",
- "NewEncoder",
- "NewTokenDecoder",
- "ProcInst",
- "StartElement",
- "SyntaxError",
- "TagPathError",
- "Token",
- "TokenReader",
- "Unmarshal",
- "UnmarshalError",
- "Unmarshaler",
- "UnmarshalerAttr",
- "UnsupportedTypeError",
- },
- "errors": {
- "As",
- "ErrUnsupported",
- "Is",
- "Join",
- "New",
- "Unwrap",
- },
- "expvar": {
- "Do",
- "Float",
- "Func",
- "Get",
- "Handler",
- "Int",
- "KeyValue",
- "Map",
- "NewFloat",
- "NewInt",
- "NewMap",
- "NewString",
- "Publish",
- "String",
- "Var",
- },
- "flag": {
- "Arg",
- "Args",
- "Bool",
- "BoolFunc",
- "BoolVar",
- "CommandLine",
- "ContinueOnError",
- "Duration",
- "DurationVar",
- "ErrHelp",
- "ErrorHandling",
- "ExitOnError",
- "Flag",
- "FlagSet",
- "Float64",
- "Float64Var",
- "Func",
- "Getter",
- "Int",
- "Int64",
- "Int64Var",
- "IntVar",
- "Lookup",
- "NArg",
- "NFlag",
- "NewFlagSet",
- "PanicOnError",
- "Parse",
- "Parsed",
- "PrintDefaults",
- "Set",
- "String",
- "StringVar",
- "TextVar",
- "Uint",
- "Uint64",
- "Uint64Var",
- "UintVar",
- "UnquoteUsage",
- "Usage",
- "Value",
- "Var",
- "Visit",
- "VisitAll",
- },
- "fmt": {
- "Append",
- "Appendf",
- "Appendln",
- "Errorf",
- "FormatString",
- "Formatter",
- "Fprint",
- "Fprintf",
- "Fprintln",
- "Fscan",
- "Fscanf",
- "Fscanln",
- "GoStringer",
- "Print",
- "Printf",
- "Println",
- "Scan",
- "ScanState",
- "Scanf",
- "Scanln",
- "Scanner",
- "Sprint",
- "Sprintf",
- "Sprintln",
- "Sscan",
- "Sscanf",
- "Sscanln",
- "State",
- "Stringer",
- },
- "go/ast": {
- "ArrayType",
- "AssignStmt",
- "Bad",
- "BadDecl",
- "BadExpr",
- "BadStmt",
- "BasicLit",
- "BinaryExpr",
- "BlockStmt",
- "BranchStmt",
- "CallExpr",
- "CaseClause",
- "ChanDir",
- "ChanType",
- "CommClause",
- "Comment",
- "CommentGroup",
- "CommentMap",
- "CompositeLit",
- "Con",
- "Decl",
- "DeclStmt",
- "DeferStmt",
- "Ellipsis",
- "EmptyStmt",
- "Expr",
- "ExprStmt",
- "Field",
- "FieldFilter",
- "FieldList",
- "File",
- "FileExports",
- "Filter",
- "FilterDecl",
- "FilterFile",
- "FilterFuncDuplicates",
- "FilterImportDuplicates",
- "FilterPackage",
- "FilterUnassociatedComments",
- "ForStmt",
- "Fprint",
- "Fun",
- "FuncDecl",
- "FuncLit",
- "FuncType",
- "GenDecl",
- "GoStmt",
- "Ident",
- "IfStmt",
- "ImportSpec",
- "Importer",
- "IncDecStmt",
- "IndexExpr",
- "IndexListExpr",
- "Inspect",
- "InterfaceType",
- "IsExported",
- "IsGenerated",
- "KeyValueExpr",
- "LabeledStmt",
- "Lbl",
- "MapType",
- "MergeMode",
- "MergePackageFiles",
- "NewCommentMap",
- "NewIdent",
- "NewObj",
- "NewPackage",
- "NewScope",
- "Node",
- "NotNilFilter",
- "ObjKind",
- "Object",
- "Package",
- "PackageExports",
- "ParenExpr",
- "Pkg",
- "Print",
- "RECV",
- "RangeStmt",
- "ReturnStmt",
- "SEND",
- "Scope",
- "SelectStmt",
- "SelectorExpr",
- "SendStmt",
- "SliceExpr",
- "SortImports",
- "Spec",
- "StarExpr",
- "Stmt",
- "StructType",
- "SwitchStmt",
- "Typ",
- "TypeAssertExpr",
- "TypeSpec",
- "TypeSwitchStmt",
- "UnaryExpr",
- "ValueSpec",
- "Var",
- "Visitor",
- "Walk",
- },
- "go/build": {
- "AllowBinary",
- "ArchChar",
- "Context",
- "Default",
- "Directive",
- "FindOnly",
- "IgnoreVendor",
- "Import",
- "ImportComment",
- "ImportDir",
- "ImportMode",
- "IsLocalImport",
- "MultiplePackageError",
- "NoGoError",
- "Package",
- "ToolDir",
- },
- "go/build/constraint": {
- "AndExpr",
- "Expr",
- "GoVersion",
- "IsGoBuild",
- "IsPlusBuild",
- "NotExpr",
- "OrExpr",
- "Parse",
- "PlusBuildLines",
- "SyntaxError",
- "TagExpr",
- },
- "go/constant": {
- "BinaryOp",
- "BitLen",
- "Bool",
- "BoolVal",
- "Bytes",
- "Compare",
- "Complex",
- "Denom",
- "Float",
- "Float32Val",
- "Float64Val",
- "Imag",
- "Int",
- "Int64Val",
- "Kind",
- "Make",
- "MakeBool",
- "MakeFloat64",
- "MakeFromBytes",
- "MakeFromLiteral",
- "MakeImag",
- "MakeInt64",
- "MakeString",
- "MakeUint64",
- "MakeUnknown",
- "Num",
- "Real",
- "Shift",
- "Sign",
- "String",
- "StringVal",
- "ToComplex",
- "ToFloat",
- "ToInt",
- "Uint64Val",
- "UnaryOp",
- "Unknown",
- "Val",
- "Value",
- },
- "go/doc": {
- "AllDecls",
- "AllMethods",
- "Example",
- "Examples",
- "Filter",
- "Func",
- "IllegalPrefixes",
- "IsPredeclared",
- "Mode",
- "New",
- "NewFromFiles",
- "Note",
- "Package",
- "PreserveAST",
- "Synopsis",
- "ToHTML",
- "ToText",
- "Type",
- "Value",
- },
- "go/doc/comment": {
- "Block",
- "Code",
- "DefaultLookupPackage",
- "Doc",
- "DocLink",
- "Heading",
- "Italic",
- "Link",
- "LinkDef",
- "List",
- "ListItem",
- "Paragraph",
- "Parser",
- "Plain",
- "Printer",
- "Text",
- },
- "go/format": {
- "Node",
- "Source",
- },
- "go/importer": {
- "Default",
- "For",
- "ForCompiler",
- "Lookup",
- },
- "go/parser": {
- "AllErrors",
- "DeclarationErrors",
- "ImportsOnly",
- "Mode",
- "PackageClauseOnly",
- "ParseComments",
- "ParseDir",
- "ParseExpr",
- "ParseExprFrom",
- "ParseFile",
- "SkipObjectResolution",
- "SpuriousErrors",
- "Trace",
- },
- "go/printer": {
- "CommentedNode",
- "Config",
- "Fprint",
- "Mode",
- "RawFormat",
- "SourcePos",
- "TabIndent",
- "UseSpaces",
- },
- "go/scanner": {
- "Error",
- "ErrorHandler",
- "ErrorList",
- "Mode",
- "PrintError",
- "ScanComments",
- "Scanner",
- },
- "go/token": {
- "ADD",
- "ADD_ASSIGN",
- "AND",
- "AND_ASSIGN",
- "AND_NOT",
- "AND_NOT_ASSIGN",
- "ARROW",
- "ASSIGN",
- "BREAK",
- "CASE",
- "CHAN",
- "CHAR",
- "COLON",
- "COMMA",
- "COMMENT",
- "CONST",
- "CONTINUE",
- "DEC",
- "DEFAULT",
- "DEFER",
- "DEFINE",
- "ELLIPSIS",
- "ELSE",
- "EOF",
- "EQL",
- "FALLTHROUGH",
- "FLOAT",
- "FOR",
- "FUNC",
- "File",
- "FileSet",
- "GEQ",
- "GO",
- "GOTO",
- "GTR",
- "HighestPrec",
- "IDENT",
- "IF",
- "ILLEGAL",
- "IMAG",
- "IMPORT",
- "INC",
- "INT",
- "INTERFACE",
- "IsExported",
- "IsIdentifier",
- "IsKeyword",
- "LAND",
- "LBRACE",
- "LBRACK",
- "LEQ",
- "LOR",
- "LPAREN",
- "LSS",
- "Lookup",
- "LowestPrec",
- "MAP",
- "MUL",
- "MUL_ASSIGN",
- "NEQ",
- "NOT",
- "NewFileSet",
- "NoPos",
- "OR",
- "OR_ASSIGN",
- "PACKAGE",
- "PERIOD",
- "Pos",
- "Position",
- "QUO",
- "QUO_ASSIGN",
- "RANGE",
- "RBRACE",
- "RBRACK",
- "REM",
- "REM_ASSIGN",
- "RETURN",
- "RPAREN",
- "SELECT",
- "SEMICOLON",
- "SHL",
- "SHL_ASSIGN",
- "SHR",
- "SHR_ASSIGN",
- "STRING",
- "STRUCT",
- "SUB",
- "SUB_ASSIGN",
- "SWITCH",
- "TILDE",
- "TYPE",
- "Token",
- "UnaryPrec",
- "VAR",
- "XOR",
- "XOR_ASSIGN",
- },
- "go/types": {
- "ArgumentError",
- "Array",
- "AssertableTo",
- "AssignableTo",
- "Basic",
- "BasicInfo",
- "BasicKind",
- "Bool",
- "Builtin",
- "Byte",
- "Chan",
- "ChanDir",
- "CheckExpr",
- "Checker",
- "Comparable",
- "Complex128",
- "Complex64",
- "Config",
- "Const",
- "Context",
- "ConvertibleTo",
- "DefPredeclaredTestFuncs",
- "Default",
- "Error",
- "Eval",
- "ExprString",
- "FieldVal",
- "Float32",
- "Float64",
- "Func",
- "Id",
- "Identical",
- "IdenticalIgnoreTags",
- "Implements",
- "ImportMode",
- "Importer",
- "ImporterFrom",
- "Info",
- "Initializer",
- "Instance",
- "Instantiate",
- "Int",
- "Int16",
- "Int32",
- "Int64",
- "Int8",
- "Interface",
- "Invalid",
- "IsBoolean",
- "IsComplex",
- "IsConstType",
- "IsFloat",
- "IsInteger",
- "IsInterface",
- "IsNumeric",
- "IsOrdered",
- "IsString",
- "IsUnsigned",
- "IsUntyped",
- "Label",
- "LookupFieldOrMethod",
- "Map",
- "MethodExpr",
- "MethodSet",
- "MethodVal",
- "MissingMethod",
- "Named",
- "NewArray",
- "NewChan",
- "NewChecker",
- "NewConst",
- "NewContext",
- "NewField",
- "NewFunc",
- "NewInterface",
- "NewInterfaceType",
- "NewLabel",
- "NewMap",
- "NewMethodSet",
- "NewNamed",
- "NewPackage",
- "NewParam",
- "NewPkgName",
- "NewPointer",
- "NewScope",
- "NewSignature",
- "NewSignatureType",
- "NewSlice",
- "NewStruct",
- "NewTerm",
- "NewTuple",
- "NewTypeName",
- "NewTypeParam",
- "NewUnion",
- "NewVar",
- "Nil",
- "Object",
- "ObjectString",
- "Package",
- "PkgName",
- "Pointer",
- "Qualifier",
- "RecvOnly",
- "RelativeTo",
- "Rune",
- "Satisfies",
- "Scope",
- "Selection",
- "SelectionKind",
- "SelectionString",
- "SendOnly",
- "SendRecv",
- "Signature",
- "Sizes",
- "SizesFor",
- "Slice",
- "StdSizes",
- "String",
- "Struct",
- "Term",
- "Tuple",
- "Typ",
- "Type",
- "TypeAndValue",
- "TypeList",
- "TypeName",
- "TypeParam",
- "TypeParamList",
- "TypeString",
- "Uint",
- "Uint16",
- "Uint32",
- "Uint64",
- "Uint8",
- "Uintptr",
- "Union",
- "Universe",
- "Unsafe",
- "UnsafePointer",
- "UntypedBool",
- "UntypedComplex",
- "UntypedFloat",
- "UntypedInt",
- "UntypedNil",
- "UntypedRune",
- "UntypedString",
- "Var",
- "WriteExpr",
- "WriteSignature",
- "WriteType",
- },
- "hash": {
- "Hash",
- "Hash32",
- "Hash64",
- },
- "hash/adler32": {
- "Checksum",
- "New",
- "Size",
- },
- "hash/crc32": {
- "Castagnoli",
- "Checksum",
- "ChecksumIEEE",
- "IEEE",
- "IEEETable",
- "Koopman",
- "MakeTable",
- "New",
- "NewIEEE",
- "Size",
- "Table",
- "Update",
- },
- "hash/crc64": {
- "Checksum",
- "ECMA",
- "ISO",
- "MakeTable",
- "New",
- "Size",
- "Table",
- "Update",
- },
- "hash/fnv": {
- "New128",
- "New128a",
- "New32",
- "New32a",
- "New64",
- "New64a",
- },
- "hash/maphash": {
- "Bytes",
- "Hash",
- "MakeSeed",
- "Seed",
- "String",
- },
- "html": {
- "EscapeString",
- "UnescapeString",
- },
- "html/template": {
- "CSS",
- "ErrAmbigContext",
- "ErrBadHTML",
- "ErrBranchEnd",
- "ErrEndContext",
- "ErrJSTemplate",
- "ErrNoSuchTemplate",
- "ErrOutputContext",
- "ErrPartialCharset",
- "ErrPartialEscape",
- "ErrPredefinedEscaper",
- "ErrRangeLoopReentry",
- "ErrSlashAmbig",
- "Error",
- "ErrorCode",
- "FuncMap",
- "HTML",
- "HTMLAttr",
- "HTMLEscape",
- "HTMLEscapeString",
- "HTMLEscaper",
- "IsTrue",
- "JS",
- "JSEscape",
- "JSEscapeString",
- "JSEscaper",
- "JSStr",
- "Must",
- "New",
- "OK",
- "ParseFS",
- "ParseFiles",
- "ParseGlob",
- "Srcset",
- "Template",
- "URL",
- "URLQueryEscaper",
- },
- "image": {
- "Alpha",
- "Alpha16",
- "Black",
- "CMYK",
- "Config",
- "Decode",
- "DecodeConfig",
- "ErrFormat",
- "Gray",
- "Gray16",
- "Image",
- "NRGBA",
- "NRGBA64",
- "NYCbCrA",
- "NewAlpha",
- "NewAlpha16",
- "NewCMYK",
- "NewGray",
- "NewGray16",
- "NewNRGBA",
- "NewNRGBA64",
- "NewNYCbCrA",
- "NewPaletted",
- "NewRGBA",
- "NewRGBA64",
- "NewUniform",
- "NewYCbCr",
- "Opaque",
- "Paletted",
- "PalettedImage",
- "Point",
- "Pt",
- "RGBA",
- "RGBA64",
- "RGBA64Image",
- "Rect",
- "Rectangle",
- "RegisterFormat",
- "Transparent",
- "Uniform",
- "White",
- "YCbCr",
- "YCbCrSubsampleRatio",
- "YCbCrSubsampleRatio410",
- "YCbCrSubsampleRatio411",
- "YCbCrSubsampleRatio420",
- "YCbCrSubsampleRatio422",
- "YCbCrSubsampleRatio440",
- "YCbCrSubsampleRatio444",
- "ZP",
- "ZR",
- },
- "image/color": {
- "Alpha",
- "Alpha16",
- "Alpha16Model",
- "AlphaModel",
- "Black",
- "CMYK",
- "CMYKModel",
- "CMYKToRGB",
- "Color",
- "Gray",
- "Gray16",
- "Gray16Model",
- "GrayModel",
- "Model",
- "ModelFunc",
- "NRGBA",
- "NRGBA64",
- "NRGBA64Model",
- "NRGBAModel",
- "NYCbCrA",
- "NYCbCrAModel",
- "Opaque",
- "Palette",
- "RGBA",
- "RGBA64",
- "RGBA64Model",
- "RGBAModel",
- "RGBToCMYK",
- "RGBToYCbCr",
- "Transparent",
- "White",
- "YCbCr",
- "YCbCrModel",
- "YCbCrToRGB",
- },
- "image/color/palette": {
- "Plan9",
- "WebSafe",
- },
- "image/draw": {
- "Draw",
- "DrawMask",
- "Drawer",
- "FloydSteinberg",
- "Image",
- "Op",
- "Over",
- "Quantizer",
- "RGBA64Image",
- "Src",
- },
- "image/gif": {
- "Decode",
- "DecodeAll",
- "DecodeConfig",
- "DisposalBackground",
- "DisposalNone",
- "DisposalPrevious",
- "Encode",
- "EncodeAll",
- "GIF",
- "Options",
- },
- "image/jpeg": {
- "Decode",
- "DecodeConfig",
- "DefaultQuality",
- "Encode",
- "FormatError",
- "Options",
- "Reader",
- "UnsupportedError",
- },
- "image/png": {
- "BestCompression",
- "BestSpeed",
- "CompressionLevel",
- "Decode",
- "DecodeConfig",
- "DefaultCompression",
- "Encode",
- "Encoder",
- "EncoderBuffer",
- "EncoderBufferPool",
- "FormatError",
- "NoCompression",
- "UnsupportedError",
- },
- "index/suffixarray": {
- "Index",
- "New",
- },
- "io": {
- "ByteReader",
- "ByteScanner",
- "ByteWriter",
- "Closer",
- "Copy",
- "CopyBuffer",
- "CopyN",
- "Discard",
- "EOF",
- "ErrClosedPipe",
- "ErrNoProgress",
- "ErrShortBuffer",
- "ErrShortWrite",
- "ErrUnexpectedEOF",
- "LimitReader",
- "LimitedReader",
- "MultiReader",
- "MultiWriter",
- "NewOffsetWriter",
- "NewSectionReader",
- "NopCloser",
- "OffsetWriter",
- "Pipe",
- "PipeReader",
- "PipeWriter",
- "ReadAll",
- "ReadAtLeast",
- "ReadCloser",
- "ReadFull",
- "ReadSeekCloser",
- "ReadSeeker",
- "ReadWriteCloser",
- "ReadWriteSeeker",
- "ReadWriter",
- "Reader",
- "ReaderAt",
- "ReaderFrom",
- "RuneReader",
- "RuneScanner",
- "SectionReader",
- "SeekCurrent",
- "SeekEnd",
- "SeekStart",
- "Seeker",
- "StringWriter",
- "TeeReader",
- "WriteCloser",
- "WriteSeeker",
- "WriteString",
- "Writer",
- "WriterAt",
- "WriterTo",
- },
- "io/fs": {
- "DirEntry",
- "ErrClosed",
- "ErrExist",
- "ErrInvalid",
- "ErrNotExist",
- "ErrPermission",
- "FS",
- "File",
- "FileInfo",
- "FileInfoToDirEntry",
- "FileMode",
- "FormatDirEntry",
- "FormatFileInfo",
- "Glob",
- "GlobFS",
- "ModeAppend",
- "ModeCharDevice",
- "ModeDevice",
- "ModeDir",
- "ModeExclusive",
- "ModeIrregular",
- "ModeNamedPipe",
- "ModePerm",
- "ModeSetgid",
- "ModeSetuid",
- "ModeSocket",
- "ModeSticky",
- "ModeSymlink",
- "ModeTemporary",
- "ModeType",
- "PathError",
- "ReadDir",
- "ReadDirFS",
- "ReadDirFile",
- "ReadFile",
- "ReadFileFS",
- "SkipAll",
- "SkipDir",
- "Stat",
- "StatFS",
- "Sub",
- "SubFS",
- "ValidPath",
- "WalkDir",
- "WalkDirFunc",
- },
- "io/ioutil": {
- "Discard",
- "NopCloser",
- "ReadAll",
- "ReadDir",
- "ReadFile",
- "TempDir",
- "TempFile",
- "WriteFile",
- },
- "log": {
- "Default",
- "Fatal",
- "Fatalf",
- "Fatalln",
- "Flags",
- "LUTC",
- "Ldate",
- "Llongfile",
- "Lmicroseconds",
- "Lmsgprefix",
- "Logger",
- "Lshortfile",
- "LstdFlags",
- "Ltime",
- "New",
- "Output",
- "Panic",
- "Panicf",
- "Panicln",
- "Prefix",
- "Print",
- "Printf",
- "Println",
- "SetFlags",
- "SetOutput",
- "SetPrefix",
- "Writer",
- },
- "log/slog": {
- "Any",
- "AnyValue",
- "Attr",
- "Bool",
- "BoolValue",
- "Debug",
- "DebugContext",
- "Default",
- "Duration",
- "DurationValue",
- "Error",
- "ErrorContext",
- "Float64",
- "Float64Value",
- "Group",
- "GroupValue",
- "Handler",
- "HandlerOptions",
- "Info",
- "InfoContext",
- "Int",
- "Int64",
- "Int64Value",
- "IntValue",
- "JSONHandler",
- "Kind",
- "KindAny",
- "KindBool",
- "KindDuration",
- "KindFloat64",
- "KindGroup",
- "KindInt64",
- "KindLogValuer",
- "KindString",
- "KindTime",
- "KindUint64",
- "Level",
- "LevelDebug",
- "LevelError",
- "LevelInfo",
- "LevelKey",
- "LevelVar",
- "LevelWarn",
- "Leveler",
- "Log",
- "LogAttrs",
- "LogValuer",
- "Logger",
- "MessageKey",
- "New",
- "NewJSONHandler",
- "NewLogLogger",
- "NewRecord",
- "NewTextHandler",
- "Record",
- "SetDefault",
- "Source",
- "SourceKey",
- "String",
- "StringValue",
- "TextHandler",
- "Time",
- "TimeKey",
- "TimeValue",
- "Uint64",
- "Uint64Value",
- "Value",
- "Warn",
- "WarnContext",
- "With",
- },
- "log/syslog": {
- "Dial",
- "LOG_ALERT",
- "LOG_AUTH",
- "LOG_AUTHPRIV",
- "LOG_CRIT",
- "LOG_CRON",
- "LOG_DAEMON",
- "LOG_DEBUG",
- "LOG_EMERG",
- "LOG_ERR",
- "LOG_FTP",
- "LOG_INFO",
- "LOG_KERN",
- "LOG_LOCAL0",
- "LOG_LOCAL1",
- "LOG_LOCAL2",
- "LOG_LOCAL3",
- "LOG_LOCAL4",
- "LOG_LOCAL5",
- "LOG_LOCAL6",
- "LOG_LOCAL7",
- "LOG_LPR",
- "LOG_MAIL",
- "LOG_NEWS",
- "LOG_NOTICE",
- "LOG_SYSLOG",
- "LOG_USER",
- "LOG_UUCP",
- "LOG_WARNING",
- "New",
- "NewLogger",
- "Priority",
- "Writer",
- },
- "maps": {
- "Clone",
- "Copy",
- "DeleteFunc",
- "Equal",
- "EqualFunc",
- },
- "math": {
- "Abs",
- "Acos",
- "Acosh",
- "Asin",
- "Asinh",
- "Atan",
- "Atan2",
- "Atanh",
- "Cbrt",
- "Ceil",
- "Copysign",
- "Cos",
- "Cosh",
- "Dim",
- "E",
- "Erf",
- "Erfc",
- "Erfcinv",
- "Erfinv",
- "Exp",
- "Exp2",
- "Expm1",
- "FMA",
- "Float32bits",
- "Float32frombits",
- "Float64bits",
- "Float64frombits",
- "Floor",
- "Frexp",
- "Gamma",
- "Hypot",
- "Ilogb",
- "Inf",
- "IsInf",
- "IsNaN",
- "J0",
- "J1",
- "Jn",
- "Ldexp",
- "Lgamma",
- "Ln10",
- "Ln2",
- "Log",
- "Log10",
- "Log10E",
- "Log1p",
- "Log2",
- "Log2E",
- "Logb",
- "Max",
- "MaxFloat32",
- "MaxFloat64",
- "MaxInt",
- "MaxInt16",
- "MaxInt32",
- "MaxInt64",
- "MaxInt8",
- "MaxUint",
- "MaxUint16",
- "MaxUint32",
- "MaxUint64",
- "MaxUint8",
- "Min",
- "MinInt",
- "MinInt16",
- "MinInt32",
- "MinInt64",
- "MinInt8",
- "Mod",
- "Modf",
- "NaN",
- "Nextafter",
- "Nextafter32",
- "Phi",
- "Pi",
- "Pow",
- "Pow10",
- "Remainder",
- "Round",
- "RoundToEven",
- "Signbit",
- "Sin",
- "Sincos",
- "Sinh",
- "SmallestNonzeroFloat32",
- "SmallestNonzeroFloat64",
- "Sqrt",
- "Sqrt2",
- "SqrtE",
- "SqrtPhi",
- "SqrtPi",
- "Tan",
- "Tanh",
- "Trunc",
- "Y0",
- "Y1",
- "Yn",
- },
- "math/big": {
- "Above",
- "Accuracy",
- "AwayFromZero",
- "Below",
- "ErrNaN",
- "Exact",
- "Float",
- "Int",
- "Jacobi",
- "MaxBase",
- "MaxExp",
- "MaxPrec",
- "MinExp",
- "NewFloat",
- "NewInt",
- "NewRat",
- "ParseFloat",
- "Rat",
- "RoundingMode",
- "ToNearestAway",
- "ToNearestEven",
- "ToNegativeInf",
- "ToPositiveInf",
- "ToZero",
- "Word",
- },
- "math/bits": {
- "Add",
- "Add32",
- "Add64",
- "Div",
- "Div32",
- "Div64",
- "LeadingZeros",
- "LeadingZeros16",
- "LeadingZeros32",
- "LeadingZeros64",
- "LeadingZeros8",
- "Len",
- "Len16",
- "Len32",
- "Len64",
- "Len8",
- "Mul",
- "Mul32",
- "Mul64",
- "OnesCount",
- "OnesCount16",
- "OnesCount32",
- "OnesCount64",
- "OnesCount8",
- "Rem",
- "Rem32",
- "Rem64",
- "Reverse",
- "Reverse16",
- "Reverse32",
- "Reverse64",
- "Reverse8",
- "ReverseBytes",
- "ReverseBytes16",
- "ReverseBytes32",
- "ReverseBytes64",
- "RotateLeft",
- "RotateLeft16",
- "RotateLeft32",
- "RotateLeft64",
- "RotateLeft8",
- "Sub",
- "Sub32",
- "Sub64",
- "TrailingZeros",
- "TrailingZeros16",
- "TrailingZeros32",
- "TrailingZeros64",
- "TrailingZeros8",
- "UintSize",
- },
- "math/cmplx": {
- "Abs",
- "Acos",
- "Acosh",
- "Asin",
- "Asinh",
- "Atan",
- "Atanh",
- "Conj",
- "Cos",
- "Cosh",
- "Cot",
- "Exp",
- "Inf",
- "IsInf",
- "IsNaN",
- "Log",
- "Log10",
- "NaN",
- "Phase",
- "Polar",
- "Pow",
- "Rect",
- "Sin",
- "Sinh",
- "Sqrt",
- "Tan",
- "Tanh",
- },
- "math/rand": {
- "ExpFloat64",
- "Float32",
- "Float64",
- "Int",
- "Int31",
- "Int31n",
- "Int63",
- "Int63n",
- "Intn",
- "New",
- "NewSource",
- "NewZipf",
- "NormFloat64",
- "Perm",
- "Rand",
- "Read",
- "Seed",
- "Shuffle",
- "Source",
- "Source64",
- "Uint32",
- "Uint64",
- "Zipf",
- },
- "mime": {
- "AddExtensionType",
- "BEncoding",
- "ErrInvalidMediaParameter",
- "ExtensionsByType",
- "FormatMediaType",
- "ParseMediaType",
- "QEncoding",
- "TypeByExtension",
- "WordDecoder",
- "WordEncoder",
- },
- "mime/multipart": {
- "ErrMessageTooLarge",
- "File",
- "FileHeader",
- "Form",
- "NewReader",
- "NewWriter",
- "Part",
- "Reader",
- "Writer",
- },
- "mime/quotedprintable": {
- "NewReader",
- "NewWriter",
- "Reader",
- "Writer",
- },
- "net": {
- "Addr",
- "AddrError",
- "Buffers",
- "CIDRMask",
- "Conn",
- "DNSConfigError",
- "DNSError",
- "DefaultResolver",
- "Dial",
- "DialIP",
- "DialTCP",
- "DialTimeout",
- "DialUDP",
- "DialUnix",
- "Dialer",
- "ErrClosed",
- "ErrWriteToConnected",
- "Error",
- "FileConn",
- "FileListener",
- "FilePacketConn",
- "FlagBroadcast",
- "FlagLoopback",
- "FlagMulticast",
- "FlagPointToPoint",
- "FlagRunning",
- "FlagUp",
- "Flags",
- "HardwareAddr",
- "IP",
- "IPAddr",
- "IPConn",
- "IPMask",
- "IPNet",
- "IPv4",
- "IPv4Mask",
- "IPv4allrouter",
- "IPv4allsys",
- "IPv4bcast",
- "IPv4len",
- "IPv4zero",
- "IPv6interfacelocalallnodes",
- "IPv6len",
- "IPv6linklocalallnodes",
- "IPv6linklocalallrouters",
- "IPv6loopback",
- "IPv6unspecified",
- "IPv6zero",
- "Interface",
- "InterfaceAddrs",
- "InterfaceByIndex",
- "InterfaceByName",
- "Interfaces",
- "InvalidAddrError",
- "JoinHostPort",
- "Listen",
- "ListenConfig",
- "ListenIP",
- "ListenMulticastUDP",
- "ListenPacket",
- "ListenTCP",
- "ListenUDP",
- "ListenUnix",
- "ListenUnixgram",
- "Listener",
- "LookupAddr",
- "LookupCNAME",
- "LookupHost",
- "LookupIP",
- "LookupMX",
- "LookupNS",
- "LookupPort",
- "LookupSRV",
- "LookupTXT",
- "MX",
- "NS",
- "OpError",
- "PacketConn",
- "ParseCIDR",
- "ParseError",
- "ParseIP",
- "ParseMAC",
- "Pipe",
- "ResolveIPAddr",
- "ResolveTCPAddr",
- "ResolveUDPAddr",
- "ResolveUnixAddr",
- "Resolver",
- "SRV",
- "SplitHostPort",
- "TCPAddr",
- "TCPAddrFromAddrPort",
- "TCPConn",
- "TCPListener",
- "UDPAddr",
- "UDPAddrFromAddrPort",
- "UDPConn",
- "UnixAddr",
- "UnixConn",
- "UnixListener",
- "UnknownNetworkError",
- },
- "net/http": {
- "AllowQuerySemicolons",
- "CanonicalHeaderKey",
- "Client",
- "CloseNotifier",
- "ConnState",
- "Cookie",
- "CookieJar",
- "DefaultClient",
- "DefaultMaxHeaderBytes",
- "DefaultMaxIdleConnsPerHost",
- "DefaultServeMux",
- "DefaultTransport",
- "DetectContentType",
- "Dir",
- "ErrAbortHandler",
- "ErrBodyNotAllowed",
- "ErrBodyReadAfterClose",
- "ErrContentLength",
- "ErrHandlerTimeout",
- "ErrHeaderTooLong",
- "ErrHijacked",
- "ErrLineTooLong",
- "ErrMissingBoundary",
- "ErrMissingContentLength",
- "ErrMissingFile",
- "ErrNoCookie",
- "ErrNoLocation",
- "ErrNotMultipart",
- "ErrNotSupported",
- "ErrSchemeMismatch",
- "ErrServerClosed",
- "ErrShortBody",
- "ErrSkipAltProtocol",
- "ErrUnexpectedTrailer",
- "ErrUseLastResponse",
- "ErrWriteAfterFlush",
- "Error",
- "FS",
- "File",
- "FileServer",
- "FileSystem",
- "Flusher",
- "Get",
- "Handle",
- "HandleFunc",
- "Handler",
- "HandlerFunc",
- "Head",
- "Header",
- "Hijacker",
- "ListenAndServe",
- "ListenAndServeTLS",
- "LocalAddrContextKey",
- "MaxBytesError",
- "MaxBytesHandler",
- "MaxBytesReader",
- "MethodConnect",
- "MethodDelete",
- "MethodGet",
- "MethodHead",
- "MethodOptions",
- "MethodPatch",
- "MethodPost",
- "MethodPut",
- "MethodTrace",
- "NewFileTransport",
- "NewRequest",
- "NewRequestWithContext",
- "NewResponseController",
- "NewServeMux",
- "NoBody",
- "NotFound",
- "NotFoundHandler",
- "ParseHTTPVersion",
- "ParseTime",
- "Post",
- "PostForm",
- "ProtocolError",
- "ProxyFromEnvironment",
- "ProxyURL",
- "PushOptions",
- "Pusher",
- "ReadRequest",
- "ReadResponse",
- "Redirect",
- "RedirectHandler",
- "Request",
- "Response",
- "ResponseController",
- "ResponseWriter",
- "RoundTripper",
- "SameSite",
- "SameSiteDefaultMode",
- "SameSiteLaxMode",
- "SameSiteNoneMode",
- "SameSiteStrictMode",
- "Serve",
- "ServeContent",
- "ServeFile",
- "ServeMux",
- "ServeTLS",
- "Server",
- "ServerContextKey",
- "SetCookie",
- "StateActive",
- "StateClosed",
- "StateHijacked",
- "StateIdle",
- "StateNew",
- "StatusAccepted",
- "StatusAlreadyReported",
- "StatusBadGateway",
- "StatusBadRequest",
- "StatusConflict",
- "StatusContinue",
- "StatusCreated",
- "StatusEarlyHints",
- "StatusExpectationFailed",
- "StatusFailedDependency",
- "StatusForbidden",
- "StatusFound",
- "StatusGatewayTimeout",
- "StatusGone",
- "StatusHTTPVersionNotSupported",
- "StatusIMUsed",
- "StatusInsufficientStorage",
- "StatusInternalServerError",
- "StatusLengthRequired",
- "StatusLocked",
- "StatusLoopDetected",
- "StatusMethodNotAllowed",
- "StatusMisdirectedRequest",
- "StatusMovedPermanently",
- "StatusMultiStatus",
- "StatusMultipleChoices",
- "StatusNetworkAuthenticationRequired",
- "StatusNoContent",
- "StatusNonAuthoritativeInfo",
- "StatusNotAcceptable",
- "StatusNotExtended",
- "StatusNotFound",
- "StatusNotImplemented",
- "StatusNotModified",
- "StatusOK",
- "StatusPartialContent",
- "StatusPaymentRequired",
- "StatusPermanentRedirect",
- "StatusPreconditionFailed",
- "StatusPreconditionRequired",
- "StatusProcessing",
- "StatusProxyAuthRequired",
- "StatusRequestEntityTooLarge",
- "StatusRequestHeaderFieldsTooLarge",
- "StatusRequestTimeout",
- "StatusRequestURITooLong",
- "StatusRequestedRangeNotSatisfiable",
- "StatusResetContent",
- "StatusSeeOther",
- "StatusServiceUnavailable",
- "StatusSwitchingProtocols",
- "StatusTeapot",
- "StatusTemporaryRedirect",
- "StatusText",
- "StatusTooEarly",
- "StatusTooManyRequests",
- "StatusUnauthorized",
- "StatusUnavailableForLegalReasons",
- "StatusUnprocessableEntity",
- "StatusUnsupportedMediaType",
- "StatusUpgradeRequired",
- "StatusUseProxy",
- "StatusVariantAlsoNegotiates",
- "StripPrefix",
- "TimeFormat",
- "TimeoutHandler",
- "TrailerPrefix",
- "Transport",
- },
- "net/http/cgi": {
- "Handler",
- "Request",
- "RequestFromMap",
- "Serve",
- },
- "net/http/cookiejar": {
- "Jar",
- "New",
- "Options",
- "PublicSuffixList",
- },
- "net/http/fcgi": {
- "ErrConnClosed",
- "ErrRequestAborted",
- "ProcessEnv",
- "Serve",
- },
- "net/http/httptest": {
- "DefaultRemoteAddr",
- "NewRecorder",
- "NewRequest",
- "NewServer",
- "NewTLSServer",
- "NewUnstartedServer",
- "ResponseRecorder",
- "Server",
- },
- "net/http/httptrace": {
- "ClientTrace",
- "ContextClientTrace",
- "DNSDoneInfo",
- "DNSStartInfo",
- "GotConnInfo",
- "WithClientTrace",
- "WroteRequestInfo",
- },
- "net/http/httputil": {
- "BufferPool",
- "ClientConn",
- "DumpRequest",
- "DumpRequestOut",
- "DumpResponse",
- "ErrClosed",
- "ErrLineTooLong",
- "ErrPersistEOF",
- "ErrPipeline",
- "NewChunkedReader",
- "NewChunkedWriter",
- "NewClientConn",
- "NewProxyClientConn",
- "NewServerConn",
- "NewSingleHostReverseProxy",
- "ProxyRequest",
- "ReverseProxy",
- "ServerConn",
- },
- "net/http/pprof": {
- "Cmdline",
- "Handler",
- "Index",
- "Profile",
- "Symbol",
- "Trace",
- },
- "net/mail": {
- "Address",
- "AddressParser",
- "ErrHeaderNotPresent",
- "Header",
- "Message",
- "ParseAddress",
- "ParseAddressList",
- "ParseDate",
- "ReadMessage",
- },
- "net/netip": {
- "Addr",
- "AddrFrom16",
- "AddrFrom4",
- "AddrFromSlice",
- "AddrPort",
- "AddrPortFrom",
- "IPv4Unspecified",
- "IPv6LinkLocalAllNodes",
- "IPv6LinkLocalAllRouters",
- "IPv6Loopback",
- "IPv6Unspecified",
- "MustParseAddr",
- "MustParseAddrPort",
- "MustParsePrefix",
- "ParseAddr",
- "ParseAddrPort",
- "ParsePrefix",
- "Prefix",
- "PrefixFrom",
- },
- "net/rpc": {
- "Accept",
- "Call",
- "Client",
- "ClientCodec",
- "DefaultDebugPath",
- "DefaultRPCPath",
- "DefaultServer",
- "Dial",
- "DialHTTP",
- "DialHTTPPath",
- "ErrShutdown",
- "HandleHTTP",
- "NewClient",
- "NewClientWithCodec",
- "NewServer",
- "Register",
- "RegisterName",
- "Request",
- "Response",
- "ServeCodec",
- "ServeConn",
- "ServeRequest",
- "Server",
- "ServerCodec",
- "ServerError",
- },
- "net/rpc/jsonrpc": {
- "Dial",
- "NewClient",
- "NewClientCodec",
- "NewServerCodec",
- "ServeConn",
- },
- "net/smtp": {
- "Auth",
- "CRAMMD5Auth",
- "Client",
- "Dial",
- "NewClient",
- "PlainAuth",
- "SendMail",
- "ServerInfo",
- },
- "net/textproto": {
- "CanonicalMIMEHeaderKey",
- "Conn",
- "Dial",
- "Error",
- "MIMEHeader",
- "NewConn",
- "NewReader",
- "NewWriter",
- "Pipeline",
- "ProtocolError",
- "Reader",
- "TrimBytes",
- "TrimString",
- "Writer",
- },
- "net/url": {
- "Error",
- "EscapeError",
- "InvalidHostError",
- "JoinPath",
- "Parse",
- "ParseQuery",
- "ParseRequestURI",
- "PathEscape",
- "PathUnescape",
- "QueryEscape",
- "QueryUnescape",
- "URL",
- "User",
- "UserPassword",
- "Userinfo",
- "Values",
- },
- "os": {
- "Args",
- "Chdir",
- "Chmod",
- "Chown",
- "Chtimes",
- "Clearenv",
- "Create",
- "CreateTemp",
- "DevNull",
- "DirEntry",
- "DirFS",
- "Environ",
- "ErrClosed",
- "ErrDeadlineExceeded",
- "ErrExist",
- "ErrInvalid",
- "ErrNoDeadline",
- "ErrNotExist",
- "ErrPermission",
- "ErrProcessDone",
- "Executable",
- "Exit",
- "Expand",
- "ExpandEnv",
- "File",
- "FileInfo",
- "FileMode",
- "FindProcess",
- "Getegid",
- "Getenv",
- "Geteuid",
- "Getgid",
- "Getgroups",
- "Getpagesize",
- "Getpid",
- "Getppid",
- "Getuid",
- "Getwd",
- "Hostname",
- "Interrupt",
- "IsExist",
- "IsNotExist",
- "IsPathSeparator",
- "IsPermission",
- "IsTimeout",
- "Kill",
- "Lchown",
- "Link",
- "LinkError",
- "LookupEnv",
- "Lstat",
- "Mkdir",
- "MkdirAll",
- "MkdirTemp",
- "ModeAppend",
- "ModeCharDevice",
- "ModeDevice",
- "ModeDir",
- "ModeExclusive",
- "ModeIrregular",
- "ModeNamedPipe",
- "ModePerm",
- "ModeSetgid",
- "ModeSetuid",
- "ModeSocket",
- "ModeSticky",
- "ModeSymlink",
- "ModeTemporary",
- "ModeType",
- "NewFile",
- "NewSyscallError",
- "O_APPEND",
- "O_CREATE",
- "O_EXCL",
- "O_RDONLY",
- "O_RDWR",
- "O_SYNC",
- "O_TRUNC",
- "O_WRONLY",
- "Open",
- "OpenFile",
- "PathError",
- "PathListSeparator",
- "PathSeparator",
- "Pipe",
- "ProcAttr",
- "Process",
- "ProcessState",
- "ReadDir",
- "ReadFile",
- "Readlink",
- "Remove",
- "RemoveAll",
- "Rename",
- "SEEK_CUR",
- "SEEK_END",
- "SEEK_SET",
- "SameFile",
- "Setenv",
- "Signal",
- "StartProcess",
- "Stat",
- "Stderr",
- "Stdin",
- "Stdout",
- "Symlink",
- "SyscallError",
- "TempDir",
- "Truncate",
- "Unsetenv",
- "UserCacheDir",
- "UserConfigDir",
- "UserHomeDir",
- "WriteFile",
- },
- "os/exec": {
- "Cmd",
- "Command",
- "CommandContext",
- "ErrDot",
- "ErrNotFound",
- "ErrWaitDelay",
- "Error",
- "ExitError",
- "LookPath",
- },
- "os/signal": {
- "Ignore",
- "Ignored",
- "Notify",
- "NotifyContext",
- "Reset",
- "Stop",
- },
- "os/user": {
- "Current",
- "Group",
- "Lookup",
- "LookupGroup",
- "LookupGroupId",
- "LookupId",
- "UnknownGroupError",
- "UnknownGroupIdError",
- "UnknownUserError",
- "UnknownUserIdError",
- "User",
- },
- "path": {
- "Base",
- "Clean",
- "Dir",
- "ErrBadPattern",
- "Ext",
- "IsAbs",
- "Join",
- "Match",
- "Split",
- },
- "path/filepath": {
- "Abs",
- "Base",
- "Clean",
- "Dir",
- "ErrBadPattern",
- "EvalSymlinks",
- "Ext",
- "FromSlash",
- "Glob",
- "HasPrefix",
- "IsAbs",
- "IsLocal",
- "Join",
- "ListSeparator",
- "Match",
- "Rel",
- "Separator",
- "SkipAll",
- "SkipDir",
- "Split",
- "SplitList",
- "ToSlash",
- "VolumeName",
- "Walk",
- "WalkDir",
- "WalkFunc",
- },
- "plugin": {
- "Open",
- "Plugin",
- "Symbol",
- },
- "reflect": {
- "Append",
- "AppendSlice",
- "Array",
- "ArrayOf",
- "Bool",
- "BothDir",
- "Chan",
- "ChanDir",
- "ChanOf",
- "Complex128",
- "Complex64",
- "Copy",
- "DeepEqual",
- "Float32",
- "Float64",
- "Func",
- "FuncOf",
- "Indirect",
- "Int",
- "Int16",
- "Int32",
- "Int64",
- "Int8",
- "Interface",
- "Invalid",
- "Kind",
- "MakeChan",
- "MakeFunc",
- "MakeMap",
- "MakeMapWithSize",
- "MakeSlice",
- "Map",
- "MapIter",
- "MapOf",
- "Method",
- "New",
- "NewAt",
- "Pointer",
- "PointerTo",
- "Ptr",
- "PtrTo",
- "RecvDir",
- "Select",
- "SelectCase",
- "SelectDefault",
- "SelectDir",
- "SelectRecv",
- "SelectSend",
- "SendDir",
- "Slice",
- "SliceHeader",
- "SliceOf",
- "String",
- "StringHeader",
- "Struct",
- "StructField",
- "StructOf",
- "StructTag",
- "Swapper",
- "Type",
- "TypeOf",
- "Uint",
- "Uint16",
- "Uint32",
- "Uint64",
- "Uint8",
- "Uintptr",
- "UnsafePointer",
- "Value",
- "ValueError",
- "ValueOf",
- "VisibleFields",
- "Zero",
- },
- "regexp": {
- "Compile",
- "CompilePOSIX",
- "Match",
- "MatchReader",
- "MatchString",
- "MustCompile",
- "MustCompilePOSIX",
- "QuoteMeta",
- "Regexp",
- },
- "regexp/syntax": {
- "ClassNL",
- "Compile",
- "DotNL",
- "EmptyBeginLine",
- "EmptyBeginText",
- "EmptyEndLine",
- "EmptyEndText",
- "EmptyNoWordBoundary",
- "EmptyOp",
- "EmptyOpContext",
- "EmptyWordBoundary",
- "ErrInternalError",
- "ErrInvalidCharClass",
- "ErrInvalidCharRange",
- "ErrInvalidEscape",
- "ErrInvalidNamedCapture",
- "ErrInvalidPerlOp",
- "ErrInvalidRepeatOp",
- "ErrInvalidRepeatSize",
- "ErrInvalidUTF8",
- "ErrLarge",
- "ErrMissingBracket",
- "ErrMissingParen",
- "ErrMissingRepeatArgument",
- "ErrNestingDepth",
- "ErrTrailingBackslash",
- "ErrUnexpectedParen",
- "Error",
- "ErrorCode",
- "Flags",
- "FoldCase",
- "Inst",
- "InstAlt",
- "InstAltMatch",
- "InstCapture",
- "InstEmptyWidth",
- "InstFail",
- "InstMatch",
- "InstNop",
- "InstOp",
- "InstRune",
- "InstRune1",
- "InstRuneAny",
- "InstRuneAnyNotNL",
- "IsWordChar",
- "Literal",
- "MatchNL",
- "NonGreedy",
- "OneLine",
- "Op",
- "OpAlternate",
- "OpAnyChar",
- "OpAnyCharNotNL",
- "OpBeginLine",
- "OpBeginText",
- "OpCapture",
- "OpCharClass",
- "OpConcat",
- "OpEmptyMatch",
- "OpEndLine",
- "OpEndText",
- "OpLiteral",
- "OpNoMatch",
- "OpNoWordBoundary",
- "OpPlus",
- "OpQuest",
- "OpRepeat",
- "OpStar",
- "OpWordBoundary",
- "POSIX",
- "Parse",
- "Perl",
- "PerlX",
- "Prog",
- "Regexp",
- "Simple",
- "UnicodeGroups",
- "WasDollar",
- },
- "runtime": {
- "BlockProfile",
- "BlockProfileRecord",
- "Breakpoint",
- "CPUProfile",
- "Caller",
- "Callers",
- "CallersFrames",
- "Compiler",
- "Error",
- "Frame",
- "Frames",
- "Func",
- "FuncForPC",
- "GC",
- "GOARCH",
- "GOMAXPROCS",
- "GOOS",
- "GOROOT",
- "Goexit",
- "GoroutineProfile",
- "Gosched",
- "KeepAlive",
- "LockOSThread",
- "MemProfile",
- "MemProfileRate",
- "MemProfileRecord",
- "MemStats",
- "MutexProfile",
- "NumCPU",
- "NumCgoCall",
- "NumGoroutine",
- "PanicNilError",
- "Pinner",
- "ReadMemStats",
- "ReadTrace",
- "SetBlockProfileRate",
- "SetCPUProfileRate",
- "SetCgoTraceback",
- "SetFinalizer",
- "SetMutexProfileFraction",
- "Stack",
- "StackRecord",
- "StartTrace",
- "StopTrace",
- "ThreadCreateProfile",
- "TypeAssertionError",
- "UnlockOSThread",
- "Version",
- },
- "runtime/cgo": {
- "Handle",
- "Incomplete",
- "NewHandle",
- },
- "runtime/coverage": {
- "ClearCounters",
- "WriteCounters",
- "WriteCountersDir",
- "WriteMeta",
- "WriteMetaDir",
- },
- "runtime/debug": {
- "BuildInfo",
- "BuildSetting",
- "FreeOSMemory",
- "GCStats",
- "Module",
- "ParseBuildInfo",
- "PrintStack",
- "ReadBuildInfo",
- "ReadGCStats",
- "SetGCPercent",
- "SetMaxStack",
- "SetMaxThreads",
- "SetMemoryLimit",
- "SetPanicOnFault",
- "SetTraceback",
- "Stack",
- "WriteHeapDump",
- },
- "runtime/metrics": {
- "All",
- "Description",
- "Float64Histogram",
- "KindBad",
- "KindFloat64",
- "KindFloat64Histogram",
- "KindUint64",
- "Read",
- "Sample",
- "Value",
- "ValueKind",
- },
- "runtime/pprof": {
- "Do",
- "ForLabels",
- "Label",
- "LabelSet",
- "Labels",
- "Lookup",
- "NewProfile",
- "Profile",
- "Profiles",
- "SetGoroutineLabels",
- "StartCPUProfile",
- "StopCPUProfile",
- "WithLabels",
- "WriteHeapProfile",
- },
- "runtime/trace": {
- "IsEnabled",
- "Log",
- "Logf",
- "NewTask",
- "Region",
- "Start",
- "StartRegion",
- "Stop",
- "Task",
- "WithRegion",
- },
- "slices": {
- "BinarySearch",
- "BinarySearchFunc",
- "Clip",
- "Clone",
- "Compact",
- "CompactFunc",
- "Compare",
- "CompareFunc",
- "Contains",
- "ContainsFunc",
- "Delete",
- "DeleteFunc",
- "Equal",
- "EqualFunc",
- "Grow",
- "Index",
- "IndexFunc",
- "Insert",
- "IsSorted",
- "IsSortedFunc",
- "Max",
- "MaxFunc",
- "Min",
- "MinFunc",
- "Replace",
- "Reverse",
- "Sort",
- "SortFunc",
- "SortStableFunc",
- },
- "sort": {
- "Find",
- "Float64Slice",
- "Float64s",
- "Float64sAreSorted",
- "IntSlice",
- "Interface",
- "Ints",
- "IntsAreSorted",
- "IsSorted",
- "Reverse",
- "Search",
- "SearchFloat64s",
- "SearchInts",
- "SearchStrings",
- "Slice",
- "SliceIsSorted",
- "SliceStable",
- "Sort",
- "Stable",
- "StringSlice",
- "Strings",
- "StringsAreSorted",
- },
- "strconv": {
- "AppendBool",
- "AppendFloat",
- "AppendInt",
- "AppendQuote",
- "AppendQuoteRune",
- "AppendQuoteRuneToASCII",
- "AppendQuoteRuneToGraphic",
- "AppendQuoteToASCII",
- "AppendQuoteToGraphic",
- "AppendUint",
- "Atoi",
- "CanBackquote",
- "ErrRange",
- "ErrSyntax",
- "FormatBool",
- "FormatComplex",
- "FormatFloat",
- "FormatInt",
- "FormatUint",
- "IntSize",
- "IsGraphic",
- "IsPrint",
- "Itoa",
- "NumError",
- "ParseBool",
- "ParseComplex",
- "ParseFloat",
- "ParseInt",
- "ParseUint",
- "Quote",
- "QuoteRune",
- "QuoteRuneToASCII",
- "QuoteRuneToGraphic",
- "QuoteToASCII",
- "QuoteToGraphic",
- "QuotedPrefix",
- "Unquote",
- "UnquoteChar",
- },
- "strings": {
- "Builder",
- "Clone",
- "Compare",
- "Contains",
- "ContainsAny",
- "ContainsFunc",
- "ContainsRune",
- "Count",
- "Cut",
- "CutPrefix",
- "CutSuffix",
- "EqualFold",
- "Fields",
- "FieldsFunc",
- "HasPrefix",
- "HasSuffix",
- "Index",
- "IndexAny",
- "IndexByte",
- "IndexFunc",
- "IndexRune",
- "Join",
- "LastIndex",
- "LastIndexAny",
- "LastIndexByte",
- "LastIndexFunc",
- "Map",
- "NewReader",
- "NewReplacer",
- "Reader",
- "Repeat",
- "Replace",
- "ReplaceAll",
- "Replacer",
- "Split",
- "SplitAfter",
- "SplitAfterN",
- "SplitN",
- "Title",
- "ToLower",
- "ToLowerSpecial",
- "ToTitle",
- "ToTitleSpecial",
- "ToUpper",
- "ToUpperSpecial",
- "ToValidUTF8",
- "Trim",
- "TrimFunc",
- "TrimLeft",
- "TrimLeftFunc",
- "TrimPrefix",
- "TrimRight",
- "TrimRightFunc",
- "TrimSpace",
- "TrimSuffix",
- },
- "sync": {
- "Cond",
- "Locker",
- "Map",
- "Mutex",
- "NewCond",
- "Once",
- "OnceFunc",
- "OnceValue",
- "OnceValues",
- "Pool",
- "RWMutex",
- "WaitGroup",
- },
- "sync/atomic": {
- "AddInt32",
- "AddInt64",
- "AddUint32",
- "AddUint64",
- "AddUintptr",
- "Bool",
- "CompareAndSwapInt32",
- "CompareAndSwapInt64",
- "CompareAndSwapPointer",
- "CompareAndSwapUint32",
- "CompareAndSwapUint64",
- "CompareAndSwapUintptr",
- "Int32",
- "Int64",
- "LoadInt32",
- "LoadInt64",
- "LoadPointer",
- "LoadUint32",
- "LoadUint64",
- "LoadUintptr",
- "Pointer",
- "StoreInt32",
- "StoreInt64",
- "StorePointer",
- "StoreUint32",
- "StoreUint64",
- "StoreUintptr",
- "SwapInt32",
- "SwapInt64",
- "SwapPointer",
- "SwapUint32",
- "SwapUint64",
- "SwapUintptr",
- "Uint32",
- "Uint64",
- "Uintptr",
- "Value",
- },
- "syscall": {
- "AF_ALG",
- "AF_APPLETALK",
- "AF_ARP",
- "AF_ASH",
- "AF_ATM",
- "AF_ATMPVC",
- "AF_ATMSVC",
- "AF_AX25",
- "AF_BLUETOOTH",
- "AF_BRIDGE",
- "AF_CAIF",
- "AF_CAN",
- "AF_CCITT",
- "AF_CHAOS",
- "AF_CNT",
- "AF_COIP",
- "AF_DATAKIT",
- "AF_DECnet",
- "AF_DLI",
- "AF_E164",
- "AF_ECMA",
- "AF_ECONET",
- "AF_ENCAP",
- "AF_FILE",
- "AF_HYLINK",
- "AF_IEEE80211",
- "AF_IEEE802154",
- "AF_IMPLINK",
- "AF_INET",
- "AF_INET6",
- "AF_INET6_SDP",
- "AF_INET_SDP",
- "AF_IPX",
- "AF_IRDA",
- "AF_ISDN",
- "AF_ISO",
- "AF_IUCV",
- "AF_KEY",
- "AF_LAT",
- "AF_LINK",
- "AF_LLC",
- "AF_LOCAL",
- "AF_MAX",
- "AF_MPLS",
- "AF_NATM",
- "AF_NDRV",
- "AF_NETBEUI",
- "AF_NETBIOS",
- "AF_NETGRAPH",
- "AF_NETLINK",
- "AF_NETROM",
- "AF_NS",
- "AF_OROUTE",
- "AF_OSI",
- "AF_PACKET",
- "AF_PHONET",
- "AF_PPP",
- "AF_PPPOX",
- "AF_PUP",
- "AF_RDS",
- "AF_RESERVED_36",
- "AF_ROSE",
- "AF_ROUTE",
- "AF_RXRPC",
- "AF_SCLUSTER",
- "AF_SECURITY",
- "AF_SIP",
- "AF_SLOW",
- "AF_SNA",
- "AF_SYSTEM",
- "AF_TIPC",
- "AF_UNIX",
- "AF_UNSPEC",
- "AF_UTUN",
- "AF_VENDOR00",
- "AF_VENDOR01",
- "AF_VENDOR02",
- "AF_VENDOR03",
- "AF_VENDOR04",
- "AF_VENDOR05",
- "AF_VENDOR06",
- "AF_VENDOR07",
- "AF_VENDOR08",
- "AF_VENDOR09",
- "AF_VENDOR10",
- "AF_VENDOR11",
- "AF_VENDOR12",
- "AF_VENDOR13",
- "AF_VENDOR14",
- "AF_VENDOR15",
- "AF_VENDOR16",
- "AF_VENDOR17",
- "AF_VENDOR18",
- "AF_VENDOR19",
- "AF_VENDOR20",
- "AF_VENDOR21",
- "AF_VENDOR22",
- "AF_VENDOR23",
- "AF_VENDOR24",
- "AF_VENDOR25",
- "AF_VENDOR26",
- "AF_VENDOR27",
- "AF_VENDOR28",
- "AF_VENDOR29",
- "AF_VENDOR30",
- "AF_VENDOR31",
- "AF_VENDOR32",
- "AF_VENDOR33",
- "AF_VENDOR34",
- "AF_VENDOR35",
- "AF_VENDOR36",
- "AF_VENDOR37",
- "AF_VENDOR38",
- "AF_VENDOR39",
- "AF_VENDOR40",
- "AF_VENDOR41",
- "AF_VENDOR42",
- "AF_VENDOR43",
- "AF_VENDOR44",
- "AF_VENDOR45",
- "AF_VENDOR46",
- "AF_VENDOR47",
- "AF_WANPIPE",
- "AF_X25",
- "AI_CANONNAME",
- "AI_NUMERICHOST",
- "AI_PASSIVE",
- "APPLICATION_ERROR",
- "ARPHRD_ADAPT",
- "ARPHRD_APPLETLK",
- "ARPHRD_ARCNET",
- "ARPHRD_ASH",
- "ARPHRD_ATM",
- "ARPHRD_AX25",
- "ARPHRD_BIF",
- "ARPHRD_CHAOS",
- "ARPHRD_CISCO",
- "ARPHRD_CSLIP",
- "ARPHRD_CSLIP6",
- "ARPHRD_DDCMP",
- "ARPHRD_DLCI",
- "ARPHRD_ECONET",
- "ARPHRD_EETHER",
- "ARPHRD_ETHER",
- "ARPHRD_EUI64",
- "ARPHRD_FCAL",
- "ARPHRD_FCFABRIC",
- "ARPHRD_FCPL",
- "ARPHRD_FCPP",
- "ARPHRD_FDDI",
- "ARPHRD_FRAD",
- "ARPHRD_FRELAY",
- "ARPHRD_HDLC",
- "ARPHRD_HIPPI",
- "ARPHRD_HWX25",
- "ARPHRD_IEEE1394",
- "ARPHRD_IEEE802",
- "ARPHRD_IEEE80211",
- "ARPHRD_IEEE80211_PRISM",
- "ARPHRD_IEEE80211_RADIOTAP",
- "ARPHRD_IEEE802154",
- "ARPHRD_IEEE802154_PHY",
- "ARPHRD_IEEE802_TR",
- "ARPHRD_INFINIBAND",
- "ARPHRD_IPDDP",
- "ARPHRD_IPGRE",
- "ARPHRD_IRDA",
- "ARPHRD_LAPB",
- "ARPHRD_LOCALTLK",
- "ARPHRD_LOOPBACK",
- "ARPHRD_METRICOM",
- "ARPHRD_NETROM",
- "ARPHRD_NONE",
- "ARPHRD_PIMREG",
- "ARPHRD_PPP",
- "ARPHRD_PRONET",
- "ARPHRD_RAWHDLC",
- "ARPHRD_ROSE",
- "ARPHRD_RSRVD",
- "ARPHRD_SIT",
- "ARPHRD_SKIP",
- "ARPHRD_SLIP",
- "ARPHRD_SLIP6",
- "ARPHRD_STRIP",
- "ARPHRD_TUNNEL",
- "ARPHRD_TUNNEL6",
- "ARPHRD_VOID",
- "ARPHRD_X25",
- "AUTHTYPE_CLIENT",
- "AUTHTYPE_SERVER",
- "Accept",
- "Accept4",
- "AcceptEx",
- "Access",
- "Acct",
- "AddrinfoW",
- "Adjtime",
- "Adjtimex",
- "AllThreadsSyscall",
- "AllThreadsSyscall6",
- "AttachLsf",
- "B0",
- "B1000000",
- "B110",
- "B115200",
- "B1152000",
- "B1200",
- "B134",
- "B14400",
- "B150",
- "B1500000",
- "B1800",
- "B19200",
- "B200",
- "B2000000",
- "B230400",
- "B2400",
- "B2500000",
- "B28800",
- "B300",
- "B3000000",
- "B3500000",
- "B38400",
- "B4000000",
- "B460800",
- "B4800",
- "B50",
- "B500000",
- "B57600",
- "B576000",
- "B600",
- "B7200",
- "B75",
- "B76800",
- "B921600",
- "B9600",
- "BASE_PROTOCOL",
- "BIOCFEEDBACK",
- "BIOCFLUSH",
- "BIOCGBLEN",
- "BIOCGDIRECTION",
- "BIOCGDIRFILT",
- "BIOCGDLT",
- "BIOCGDLTLIST",
- "BIOCGETBUFMODE",
- "BIOCGETIF",
- "BIOCGETZMAX",
- "BIOCGFEEDBACK",
- "BIOCGFILDROP",
- "BIOCGHDRCMPLT",
- "BIOCGRSIG",
- "BIOCGRTIMEOUT",
- "BIOCGSEESENT",
- "BIOCGSTATS",
- "BIOCGSTATSOLD",
- "BIOCGTSTAMP",
- "BIOCIMMEDIATE",
- "BIOCLOCK",
- "BIOCPROMISC",
- "BIOCROTZBUF",
- "BIOCSBLEN",
- "BIOCSDIRECTION",
- "BIOCSDIRFILT",
- "BIOCSDLT",
- "BIOCSETBUFMODE",
- "BIOCSETF",
- "BIOCSETFNR",
- "BIOCSETIF",
- "BIOCSETWF",
- "BIOCSETZBUF",
- "BIOCSFEEDBACK",
- "BIOCSFILDROP",
- "BIOCSHDRCMPLT",
- "BIOCSRSIG",
- "BIOCSRTIMEOUT",
- "BIOCSSEESENT",
- "BIOCSTCPF",
- "BIOCSTSTAMP",
- "BIOCSUDPF",
- "BIOCVERSION",
- "BPF_A",
- "BPF_ABS",
- "BPF_ADD",
- "BPF_ALIGNMENT",
- "BPF_ALIGNMENT32",
- "BPF_ALU",
- "BPF_AND",
- "BPF_B",
- "BPF_BUFMODE_BUFFER",
- "BPF_BUFMODE_ZBUF",
- "BPF_DFLTBUFSIZE",
- "BPF_DIRECTION_IN",
- "BPF_DIRECTION_OUT",
- "BPF_DIV",
- "BPF_H",
- "BPF_IMM",
- "BPF_IND",
- "BPF_JA",
- "BPF_JEQ",
- "BPF_JGE",
- "BPF_JGT",
- "BPF_JMP",
- "BPF_JSET",
- "BPF_K",
- "BPF_LD",
- "BPF_LDX",
- "BPF_LEN",
- "BPF_LSH",
- "BPF_MAJOR_VERSION",
- "BPF_MAXBUFSIZE",
- "BPF_MAXINSNS",
- "BPF_MEM",
- "BPF_MEMWORDS",
- "BPF_MINBUFSIZE",
- "BPF_MINOR_VERSION",
- "BPF_MISC",
- "BPF_MSH",
- "BPF_MUL",
- "BPF_NEG",
- "BPF_OR",
- "BPF_RELEASE",
- "BPF_RET",
- "BPF_RSH",
- "BPF_ST",
- "BPF_STX",
- "BPF_SUB",
- "BPF_TAX",
- "BPF_TXA",
- "BPF_T_BINTIME",
- "BPF_T_BINTIME_FAST",
- "BPF_T_BINTIME_MONOTONIC",
- "BPF_T_BINTIME_MONOTONIC_FAST",
- "BPF_T_FAST",
- "BPF_T_FLAG_MASK",
- "BPF_T_FORMAT_MASK",
- "BPF_T_MICROTIME",
- "BPF_T_MICROTIME_FAST",
- "BPF_T_MICROTIME_MONOTONIC",
- "BPF_T_MICROTIME_MONOTONIC_FAST",
- "BPF_T_MONOTONIC",
- "BPF_T_MONOTONIC_FAST",
- "BPF_T_NANOTIME",
- "BPF_T_NANOTIME_FAST",
- "BPF_T_NANOTIME_MONOTONIC",
- "BPF_T_NANOTIME_MONOTONIC_FAST",
- "BPF_T_NONE",
- "BPF_T_NORMAL",
- "BPF_W",
- "BPF_X",
- "BRKINT",
- "Bind",
- "BindToDevice",
- "BpfBuflen",
- "BpfDatalink",
- "BpfHdr",
- "BpfHeadercmpl",
- "BpfInsn",
- "BpfInterface",
- "BpfJump",
- "BpfProgram",
- "BpfStat",
- "BpfStats",
- "BpfStmt",
- "BpfTimeout",
- "BpfTimeval",
- "BpfVersion",
- "BpfZbuf",
- "BpfZbufHeader",
- "ByHandleFileInformation",
- "BytePtrFromString",
- "ByteSliceFromString",
- "CCR0_FLUSH",
- "CERT_CHAIN_POLICY_AUTHENTICODE",
- "CERT_CHAIN_POLICY_AUTHENTICODE_TS",
- "CERT_CHAIN_POLICY_BASE",
- "CERT_CHAIN_POLICY_BASIC_CONSTRAINTS",
- "CERT_CHAIN_POLICY_EV",
- "CERT_CHAIN_POLICY_MICROSOFT_ROOT",
- "CERT_CHAIN_POLICY_NT_AUTH",
- "CERT_CHAIN_POLICY_SSL",
- "CERT_E_CN_NO_MATCH",
- "CERT_E_EXPIRED",
- "CERT_E_PURPOSE",
- "CERT_E_ROLE",
- "CERT_E_UNTRUSTEDROOT",
- "CERT_STORE_ADD_ALWAYS",
- "CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG",
- "CERT_STORE_PROV_MEMORY",
- "CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT",
- "CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT",
- "CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT",
- "CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT",
- "CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT",
- "CERT_TRUST_INVALID_BASIC_CONSTRAINTS",
- "CERT_TRUST_INVALID_EXTENSION",
- "CERT_TRUST_INVALID_NAME_CONSTRAINTS",
- "CERT_TRUST_INVALID_POLICY_CONSTRAINTS",
- "CERT_TRUST_IS_CYCLIC",
- "CERT_TRUST_IS_EXPLICIT_DISTRUST",
- "CERT_TRUST_IS_NOT_SIGNATURE_VALID",
- "CERT_TRUST_IS_NOT_TIME_VALID",
- "CERT_TRUST_IS_NOT_VALID_FOR_USAGE",
- "CERT_TRUST_IS_OFFLINE_REVOCATION",
- "CERT_TRUST_IS_REVOKED",
- "CERT_TRUST_IS_UNTRUSTED_ROOT",
- "CERT_TRUST_NO_ERROR",
- "CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY",
- "CERT_TRUST_REVOCATION_STATUS_UNKNOWN",
- "CFLUSH",
- "CLOCAL",
- "CLONE_CHILD_CLEARTID",
- "CLONE_CHILD_SETTID",
- "CLONE_CLEAR_SIGHAND",
- "CLONE_CSIGNAL",
- "CLONE_DETACHED",
- "CLONE_FILES",
- "CLONE_FS",
- "CLONE_INTO_CGROUP",
- "CLONE_IO",
- "CLONE_NEWCGROUP",
- "CLONE_NEWIPC",
- "CLONE_NEWNET",
- "CLONE_NEWNS",
- "CLONE_NEWPID",
- "CLONE_NEWTIME",
- "CLONE_NEWUSER",
- "CLONE_NEWUTS",
- "CLONE_PARENT",
- "CLONE_PARENT_SETTID",
- "CLONE_PID",
- "CLONE_PIDFD",
- "CLONE_PTRACE",
- "CLONE_SETTLS",
- "CLONE_SIGHAND",
- "CLONE_SYSVSEM",
- "CLONE_THREAD",
- "CLONE_UNTRACED",
- "CLONE_VFORK",
- "CLONE_VM",
- "CPUID_CFLUSH",
- "CREAD",
- "CREATE_ALWAYS",
- "CREATE_NEW",
- "CREATE_NEW_PROCESS_GROUP",
- "CREATE_UNICODE_ENVIRONMENT",
- "CRYPT_DEFAULT_CONTAINER_OPTIONAL",
- "CRYPT_DELETEKEYSET",
- "CRYPT_MACHINE_KEYSET",
- "CRYPT_NEWKEYSET",
- "CRYPT_SILENT",
- "CRYPT_VERIFYCONTEXT",
- "CS5",
- "CS6",
- "CS7",
- "CS8",
- "CSIZE",
- "CSTART",
- "CSTATUS",
- "CSTOP",
- "CSTOPB",
- "CSUSP",
- "CTL_MAXNAME",
- "CTL_NET",
- "CTL_QUERY",
- "CTRL_BREAK_EVENT",
- "CTRL_CLOSE_EVENT",
- "CTRL_C_EVENT",
- "CTRL_LOGOFF_EVENT",
- "CTRL_SHUTDOWN_EVENT",
- "CancelIo",
- "CancelIoEx",
- "CertAddCertificateContextToStore",
- "CertChainContext",
- "CertChainElement",
- "CertChainPara",
- "CertChainPolicyPara",
- "CertChainPolicyStatus",
- "CertCloseStore",
- "CertContext",
- "CertCreateCertificateContext",
- "CertEnhKeyUsage",
- "CertEnumCertificatesInStore",
- "CertFreeCertificateChain",
- "CertFreeCertificateContext",
- "CertGetCertificateChain",
- "CertInfo",
- "CertOpenStore",
- "CertOpenSystemStore",
- "CertRevocationCrlInfo",
- "CertRevocationInfo",
- "CertSimpleChain",
- "CertTrustListInfo",
- "CertTrustStatus",
- "CertUsageMatch",
- "CertVerifyCertificateChainPolicy",
- "Chdir",
- "CheckBpfVersion",
- "Chflags",
- "Chmod",
- "Chown",
- "Chroot",
- "Clearenv",
- "Close",
- "CloseHandle",
- "CloseOnExec",
- "Closesocket",
- "CmsgLen",
- "CmsgSpace",
- "Cmsghdr",
- "CommandLineToArgv",
- "ComputerName",
- "Conn",
- "Connect",
- "ConnectEx",
- "ConvertSidToStringSid",
- "ConvertStringSidToSid",
- "CopySid",
- "Creat",
- "CreateDirectory",
- "CreateFile",
- "CreateFileMapping",
- "CreateHardLink",
- "CreateIoCompletionPort",
- "CreatePipe",
- "CreateProcess",
- "CreateProcessAsUser",
- "CreateSymbolicLink",
- "CreateToolhelp32Snapshot",
- "Credential",
- "CryptAcquireContext",
- "CryptGenRandom",
- "CryptReleaseContext",
- "DIOCBSFLUSH",
- "DIOCOSFPFLUSH",
- "DLL",
- "DLLError",
- "DLT_A429",
- "DLT_A653_ICM",
- "DLT_AIRONET_HEADER",
- "DLT_AOS",
- "DLT_APPLE_IP_OVER_IEEE1394",
- "DLT_ARCNET",
- "DLT_ARCNET_LINUX",
- "DLT_ATM_CLIP",
- "DLT_ATM_RFC1483",
- "DLT_AURORA",
- "DLT_AX25",
- "DLT_AX25_KISS",
- "DLT_BACNET_MS_TP",
- "DLT_BLUETOOTH_HCI_H4",
- "DLT_BLUETOOTH_HCI_H4_WITH_PHDR",
- "DLT_CAN20B",
- "DLT_CAN_SOCKETCAN",
- "DLT_CHAOS",
- "DLT_CHDLC",
- "DLT_CISCO_IOS",
- "DLT_C_HDLC",
- "DLT_C_HDLC_WITH_DIR",
- "DLT_DBUS",
- "DLT_DECT",
- "DLT_DOCSIS",
- "DLT_DVB_CI",
- "DLT_ECONET",
- "DLT_EN10MB",
- "DLT_EN3MB",
- "DLT_ENC",
- "DLT_ERF",
- "DLT_ERF_ETH",
- "DLT_ERF_POS",
- "DLT_FC_2",
- "DLT_FC_2_WITH_FRAME_DELIMS",
- "DLT_FDDI",
- "DLT_FLEXRAY",
- "DLT_FRELAY",
- "DLT_FRELAY_WITH_DIR",
- "DLT_GCOM_SERIAL",
- "DLT_GCOM_T1E1",
- "DLT_GPF_F",
- "DLT_GPF_T",
- "DLT_GPRS_LLC",
- "DLT_GSMTAP_ABIS",
- "DLT_GSMTAP_UM",
- "DLT_HDLC",
- "DLT_HHDLC",
- "DLT_HIPPI",
- "DLT_IBM_SN",
- "DLT_IBM_SP",
- "DLT_IEEE802",
- "DLT_IEEE802_11",
- "DLT_IEEE802_11_RADIO",
- "DLT_IEEE802_11_RADIO_AVS",
- "DLT_IEEE802_15_4",
- "DLT_IEEE802_15_4_LINUX",
- "DLT_IEEE802_15_4_NOFCS",
- "DLT_IEEE802_15_4_NONASK_PHY",
- "DLT_IEEE802_16_MAC_CPS",
- "DLT_IEEE802_16_MAC_CPS_RADIO",
- "DLT_IPFILTER",
- "DLT_IPMB",
- "DLT_IPMB_LINUX",
- "DLT_IPNET",
- "DLT_IPOIB",
- "DLT_IPV4",
- "DLT_IPV6",
- "DLT_IP_OVER_FC",
- "DLT_JUNIPER_ATM1",
- "DLT_JUNIPER_ATM2",
- "DLT_JUNIPER_ATM_CEMIC",
- "DLT_JUNIPER_CHDLC",
- "DLT_JUNIPER_ES",
- "DLT_JUNIPER_ETHER",
- "DLT_JUNIPER_FIBRECHANNEL",
- "DLT_JUNIPER_FRELAY",
- "DLT_JUNIPER_GGSN",
- "DLT_JUNIPER_ISM",
- "DLT_JUNIPER_MFR",
- "DLT_JUNIPER_MLFR",
- "DLT_JUNIPER_MLPPP",
- "DLT_JUNIPER_MONITOR",
- "DLT_JUNIPER_PIC_PEER",
- "DLT_JUNIPER_PPP",
- "DLT_JUNIPER_PPPOE",
- "DLT_JUNIPER_PPPOE_ATM",
- "DLT_JUNIPER_SERVICES",
- "DLT_JUNIPER_SRX_E2E",
- "DLT_JUNIPER_ST",
- "DLT_JUNIPER_VP",
- "DLT_JUNIPER_VS",
- "DLT_LAPB_WITH_DIR",
- "DLT_LAPD",
- "DLT_LIN",
- "DLT_LINUX_EVDEV",
- "DLT_LINUX_IRDA",
- "DLT_LINUX_LAPD",
- "DLT_LINUX_PPP_WITHDIRECTION",
- "DLT_LINUX_SLL",
- "DLT_LOOP",
- "DLT_LTALK",
- "DLT_MATCHING_MAX",
- "DLT_MATCHING_MIN",
- "DLT_MFR",
- "DLT_MOST",
- "DLT_MPEG_2_TS",
- "DLT_MPLS",
- "DLT_MTP2",
- "DLT_MTP2_WITH_PHDR",
- "DLT_MTP3",
- "DLT_MUX27010",
- "DLT_NETANALYZER",
- "DLT_NETANALYZER_TRANSPARENT",
- "DLT_NFC_LLCP",
- "DLT_NFLOG",
- "DLT_NG40",
- "DLT_NULL",
- "DLT_PCI_EXP",
- "DLT_PFLOG",
- "DLT_PFSYNC",
- "DLT_PPI",
- "DLT_PPP",
- "DLT_PPP_BSDOS",
- "DLT_PPP_ETHER",
- "DLT_PPP_PPPD",
- "DLT_PPP_SERIAL",
- "DLT_PPP_WITH_DIR",
- "DLT_PPP_WITH_DIRECTION",
- "DLT_PRISM_HEADER",
- "DLT_PRONET",
- "DLT_RAIF1",
- "DLT_RAW",
- "DLT_RAWAF_MASK",
- "DLT_RIO",
- "DLT_SCCP",
- "DLT_SITA",
- "DLT_SLIP",
- "DLT_SLIP_BSDOS",
- "DLT_STANAG_5066_D_PDU",
- "DLT_SUNATM",
- "DLT_SYMANTEC_FIREWALL",
- "DLT_TZSP",
- "DLT_USB",
- "DLT_USB_LINUX",
- "DLT_USB_LINUX_MMAPPED",
- "DLT_USER0",
- "DLT_USER1",
- "DLT_USER10",
- "DLT_USER11",
- "DLT_USER12",
- "DLT_USER13",
- "DLT_USER14",
- "DLT_USER15",
- "DLT_USER2",
- "DLT_USER3",
- "DLT_USER4",
- "DLT_USER5",
- "DLT_USER6",
- "DLT_USER7",
- "DLT_USER8",
- "DLT_USER9",
- "DLT_WIHART",
- "DLT_X2E_SERIAL",
- "DLT_X2E_XORAYA",
- "DNSMXData",
- "DNSPTRData",
- "DNSRecord",
- "DNSSRVData",
- "DNSTXTData",
- "DNS_INFO_NO_RECORDS",
- "DNS_TYPE_A",
- "DNS_TYPE_A6",
- "DNS_TYPE_AAAA",
- "DNS_TYPE_ADDRS",
- "DNS_TYPE_AFSDB",
- "DNS_TYPE_ALL",
- "DNS_TYPE_ANY",
- "DNS_TYPE_ATMA",
- "DNS_TYPE_AXFR",
- "DNS_TYPE_CERT",
- "DNS_TYPE_CNAME",
- "DNS_TYPE_DHCID",
- "DNS_TYPE_DNAME",
- "DNS_TYPE_DNSKEY",
- "DNS_TYPE_DS",
- "DNS_TYPE_EID",
- "DNS_TYPE_GID",
- "DNS_TYPE_GPOS",
- "DNS_TYPE_HINFO",
- "DNS_TYPE_ISDN",
- "DNS_TYPE_IXFR",
- "DNS_TYPE_KEY",
- "DNS_TYPE_KX",
- "DNS_TYPE_LOC",
- "DNS_TYPE_MAILA",
- "DNS_TYPE_MAILB",
- "DNS_TYPE_MB",
- "DNS_TYPE_MD",
- "DNS_TYPE_MF",
- "DNS_TYPE_MG",
- "DNS_TYPE_MINFO",
- "DNS_TYPE_MR",
- "DNS_TYPE_MX",
- "DNS_TYPE_NAPTR",
- "DNS_TYPE_NBSTAT",
- "DNS_TYPE_NIMLOC",
- "DNS_TYPE_NS",
- "DNS_TYPE_NSAP",
- "DNS_TYPE_NSAPPTR",
- "DNS_TYPE_NSEC",
- "DNS_TYPE_NULL",
- "DNS_TYPE_NXT",
- "DNS_TYPE_OPT",
- "DNS_TYPE_PTR",
- "DNS_TYPE_PX",
- "DNS_TYPE_RP",
- "DNS_TYPE_RRSIG",
- "DNS_TYPE_RT",
- "DNS_TYPE_SIG",
- "DNS_TYPE_SINK",
- "DNS_TYPE_SOA",
- "DNS_TYPE_SRV",
- "DNS_TYPE_TEXT",
- "DNS_TYPE_TKEY",
- "DNS_TYPE_TSIG",
- "DNS_TYPE_UID",
- "DNS_TYPE_UINFO",
- "DNS_TYPE_UNSPEC",
- "DNS_TYPE_WINS",
- "DNS_TYPE_WINSR",
- "DNS_TYPE_WKS",
- "DNS_TYPE_X25",
- "DT_BLK",
- "DT_CHR",
- "DT_DIR",
- "DT_FIFO",
- "DT_LNK",
- "DT_REG",
- "DT_SOCK",
- "DT_UNKNOWN",
- "DT_WHT",
- "DUPLICATE_CLOSE_SOURCE",
- "DUPLICATE_SAME_ACCESS",
- "DeleteFile",
- "DetachLsf",
- "DeviceIoControl",
- "Dirent",
- "DnsNameCompare",
- "DnsQuery",
- "DnsRecordListFree",
- "DnsSectionAdditional",
- "DnsSectionAnswer",
- "DnsSectionAuthority",
- "DnsSectionQuestion",
- "Dup",
- "Dup2",
- "Dup3",
- "DuplicateHandle",
- "E2BIG",
- "EACCES",
- "EADDRINUSE",
- "EADDRNOTAVAIL",
- "EADV",
- "EAFNOSUPPORT",
- "EAGAIN",
- "EALREADY",
- "EAUTH",
- "EBADARCH",
- "EBADE",
- "EBADEXEC",
- "EBADF",
- "EBADFD",
- "EBADMACHO",
- "EBADMSG",
- "EBADR",
- "EBADRPC",
- "EBADRQC",
- "EBADSLT",
- "EBFONT",
- "EBUSY",
- "ECANCELED",
- "ECAPMODE",
- "ECHILD",
- "ECHO",
- "ECHOCTL",
- "ECHOE",
- "ECHOK",
- "ECHOKE",
- "ECHONL",
- "ECHOPRT",
- "ECHRNG",
- "ECOMM",
- "ECONNABORTED",
- "ECONNREFUSED",
- "ECONNRESET",
- "EDEADLK",
- "EDEADLOCK",
- "EDESTADDRREQ",
- "EDEVERR",
- "EDOM",
- "EDOOFUS",
- "EDOTDOT",
- "EDQUOT",
- "EEXIST",
- "EFAULT",
- "EFBIG",
- "EFER_LMA",
- "EFER_LME",
- "EFER_NXE",
- "EFER_SCE",
- "EFTYPE",
- "EHOSTDOWN",
- "EHOSTUNREACH",
- "EHWPOISON",
- "EIDRM",
- "EILSEQ",
- "EINPROGRESS",
- "EINTR",
- "EINVAL",
- "EIO",
- "EIPSEC",
- "EISCONN",
- "EISDIR",
- "EISNAM",
- "EKEYEXPIRED",
- "EKEYREJECTED",
- "EKEYREVOKED",
- "EL2HLT",
- "EL2NSYNC",
- "EL3HLT",
- "EL3RST",
- "ELAST",
- "ELF_NGREG",
- "ELF_PRARGSZ",
- "ELIBACC",
- "ELIBBAD",
- "ELIBEXEC",
- "ELIBMAX",
- "ELIBSCN",
- "ELNRNG",
- "ELOOP",
- "EMEDIUMTYPE",
- "EMFILE",
- "EMLINK",
- "EMSGSIZE",
- "EMT_TAGOVF",
- "EMULTIHOP",
- "EMUL_ENABLED",
- "EMUL_LINUX",
- "EMUL_LINUX32",
- "EMUL_MAXID",
- "EMUL_NATIVE",
- "ENAMETOOLONG",
- "ENAVAIL",
- "ENDRUNDISC",
- "ENEEDAUTH",
- "ENETDOWN",
- "ENETRESET",
- "ENETUNREACH",
- "ENFILE",
- "ENOANO",
- "ENOATTR",
- "ENOBUFS",
- "ENOCSI",
- "ENODATA",
- "ENODEV",
- "ENOENT",
- "ENOEXEC",
- "ENOKEY",
- "ENOLCK",
- "ENOLINK",
- "ENOMEDIUM",
- "ENOMEM",
- "ENOMSG",
- "ENONET",
- "ENOPKG",
- "ENOPOLICY",
- "ENOPROTOOPT",
- "ENOSPC",
- "ENOSR",
- "ENOSTR",
- "ENOSYS",
- "ENOTBLK",
- "ENOTCAPABLE",
- "ENOTCONN",
- "ENOTDIR",
- "ENOTEMPTY",
- "ENOTNAM",
- "ENOTRECOVERABLE",
- "ENOTSOCK",
- "ENOTSUP",
- "ENOTTY",
- "ENOTUNIQ",
- "ENXIO",
- "EN_SW_CTL_INF",
- "EN_SW_CTL_PREC",
- "EN_SW_CTL_ROUND",
- "EN_SW_DATACHAIN",
- "EN_SW_DENORM",
- "EN_SW_INVOP",
- "EN_SW_OVERFLOW",
- "EN_SW_PRECLOSS",
- "EN_SW_UNDERFLOW",
- "EN_SW_ZERODIV",
- "EOPNOTSUPP",
- "EOVERFLOW",
- "EOWNERDEAD",
- "EPERM",
- "EPFNOSUPPORT",
- "EPIPE",
- "EPOLLERR",
- "EPOLLET",
- "EPOLLHUP",
- "EPOLLIN",
- "EPOLLMSG",
- "EPOLLONESHOT",
- "EPOLLOUT",
- "EPOLLPRI",
- "EPOLLRDBAND",
- "EPOLLRDHUP",
- "EPOLLRDNORM",
- "EPOLLWRBAND",
- "EPOLLWRNORM",
- "EPOLL_CLOEXEC",
- "EPOLL_CTL_ADD",
- "EPOLL_CTL_DEL",
- "EPOLL_CTL_MOD",
- "EPOLL_NONBLOCK",
- "EPROCLIM",
- "EPROCUNAVAIL",
- "EPROGMISMATCH",
- "EPROGUNAVAIL",
- "EPROTO",
- "EPROTONOSUPPORT",
- "EPROTOTYPE",
- "EPWROFF",
- "EQFULL",
- "ERANGE",
- "EREMCHG",
- "EREMOTE",
- "EREMOTEIO",
- "ERESTART",
- "ERFKILL",
- "EROFS",
- "ERPCMISMATCH",
- "ERROR_ACCESS_DENIED",
- "ERROR_ALREADY_EXISTS",
- "ERROR_BROKEN_PIPE",
- "ERROR_BUFFER_OVERFLOW",
- "ERROR_DIR_NOT_EMPTY",
- "ERROR_ENVVAR_NOT_FOUND",
- "ERROR_FILE_EXISTS",
- "ERROR_FILE_NOT_FOUND",
- "ERROR_HANDLE_EOF",
- "ERROR_INSUFFICIENT_BUFFER",
- "ERROR_IO_PENDING",
- "ERROR_MOD_NOT_FOUND",
- "ERROR_MORE_DATA",
- "ERROR_NETNAME_DELETED",
- "ERROR_NOT_FOUND",
- "ERROR_NO_MORE_FILES",
- "ERROR_OPERATION_ABORTED",
- "ERROR_PATH_NOT_FOUND",
- "ERROR_PRIVILEGE_NOT_HELD",
- "ERROR_PROC_NOT_FOUND",
- "ESHLIBVERS",
- "ESHUTDOWN",
- "ESOCKTNOSUPPORT",
- "ESPIPE",
- "ESRCH",
- "ESRMNT",
- "ESTALE",
- "ESTRPIPE",
- "ETHERCAP_JUMBO_MTU",
- "ETHERCAP_VLAN_HWTAGGING",
- "ETHERCAP_VLAN_MTU",
- "ETHERMIN",
- "ETHERMTU",
- "ETHERMTU_JUMBO",
- "ETHERTYPE_8023",
- "ETHERTYPE_AARP",
- "ETHERTYPE_ACCTON",
- "ETHERTYPE_AEONIC",
- "ETHERTYPE_ALPHA",
- "ETHERTYPE_AMBER",
- "ETHERTYPE_AMOEBA",
- "ETHERTYPE_AOE",
- "ETHERTYPE_APOLLO",
- "ETHERTYPE_APOLLODOMAIN",
- "ETHERTYPE_APPLETALK",
- "ETHERTYPE_APPLITEK",
- "ETHERTYPE_ARGONAUT",
- "ETHERTYPE_ARP",
- "ETHERTYPE_AT",
- "ETHERTYPE_ATALK",
- "ETHERTYPE_ATOMIC",
- "ETHERTYPE_ATT",
- "ETHERTYPE_ATTSTANFORD",
- "ETHERTYPE_AUTOPHON",
- "ETHERTYPE_AXIS",
- "ETHERTYPE_BCLOOP",
- "ETHERTYPE_BOFL",
- "ETHERTYPE_CABLETRON",
- "ETHERTYPE_CHAOS",
- "ETHERTYPE_COMDESIGN",
- "ETHERTYPE_COMPUGRAPHIC",
- "ETHERTYPE_COUNTERPOINT",
- "ETHERTYPE_CRONUS",
- "ETHERTYPE_CRONUSVLN",
- "ETHERTYPE_DCA",
- "ETHERTYPE_DDE",
- "ETHERTYPE_DEBNI",
- "ETHERTYPE_DECAM",
- "ETHERTYPE_DECCUST",
- "ETHERTYPE_DECDIAG",
- "ETHERTYPE_DECDNS",
- "ETHERTYPE_DECDTS",
- "ETHERTYPE_DECEXPER",
- "ETHERTYPE_DECLAST",
- "ETHERTYPE_DECLTM",
- "ETHERTYPE_DECMUMPS",
- "ETHERTYPE_DECNETBIOS",
- "ETHERTYPE_DELTACON",
- "ETHERTYPE_DIDDLE",
- "ETHERTYPE_DLOG1",
- "ETHERTYPE_DLOG2",
- "ETHERTYPE_DN",
- "ETHERTYPE_DOGFIGHT",
- "ETHERTYPE_DSMD",
- "ETHERTYPE_ECMA",
- "ETHERTYPE_ENCRYPT",
- "ETHERTYPE_ES",
- "ETHERTYPE_EXCELAN",
- "ETHERTYPE_EXPERDATA",
- "ETHERTYPE_FLIP",
- "ETHERTYPE_FLOWCONTROL",
- "ETHERTYPE_FRARP",
- "ETHERTYPE_GENDYN",
- "ETHERTYPE_HAYES",
- "ETHERTYPE_HIPPI_FP",
- "ETHERTYPE_HITACHI",
- "ETHERTYPE_HP",
- "ETHERTYPE_IEEEPUP",
- "ETHERTYPE_IEEEPUPAT",
- "ETHERTYPE_IMLBL",
- "ETHERTYPE_IMLBLDIAG",
- "ETHERTYPE_IP",
- "ETHERTYPE_IPAS",
- "ETHERTYPE_IPV6",
- "ETHERTYPE_IPX",
- "ETHERTYPE_IPXNEW",
- "ETHERTYPE_KALPANA",
- "ETHERTYPE_LANBRIDGE",
- "ETHERTYPE_LANPROBE",
- "ETHERTYPE_LAT",
- "ETHERTYPE_LBACK",
- "ETHERTYPE_LITTLE",
- "ETHERTYPE_LLDP",
- "ETHERTYPE_LOGICRAFT",
- "ETHERTYPE_LOOPBACK",
- "ETHERTYPE_MATRA",
- "ETHERTYPE_MAX",
- "ETHERTYPE_MERIT",
- "ETHERTYPE_MICP",
- "ETHERTYPE_MOPDL",
- "ETHERTYPE_MOPRC",
- "ETHERTYPE_MOTOROLA",
- "ETHERTYPE_MPLS",
- "ETHERTYPE_MPLS_MCAST",
- "ETHERTYPE_MUMPS",
- "ETHERTYPE_NBPCC",
- "ETHERTYPE_NBPCLAIM",
- "ETHERTYPE_NBPCLREQ",
- "ETHERTYPE_NBPCLRSP",
- "ETHERTYPE_NBPCREQ",
- "ETHERTYPE_NBPCRSP",
- "ETHERTYPE_NBPDG",
- "ETHERTYPE_NBPDGB",
- "ETHERTYPE_NBPDLTE",
- "ETHERTYPE_NBPRAR",
- "ETHERTYPE_NBPRAS",
- "ETHERTYPE_NBPRST",
- "ETHERTYPE_NBPSCD",
- "ETHERTYPE_NBPVCD",
- "ETHERTYPE_NBS",
- "ETHERTYPE_NCD",
- "ETHERTYPE_NESTAR",
- "ETHERTYPE_NETBEUI",
- "ETHERTYPE_NOVELL",
- "ETHERTYPE_NS",
- "ETHERTYPE_NSAT",
- "ETHERTYPE_NSCOMPAT",
- "ETHERTYPE_NTRAILER",
- "ETHERTYPE_OS9",
- "ETHERTYPE_OS9NET",
- "ETHERTYPE_PACER",
- "ETHERTYPE_PAE",
- "ETHERTYPE_PCS",
- "ETHERTYPE_PLANNING",
- "ETHERTYPE_PPP",
- "ETHERTYPE_PPPOE",
- "ETHERTYPE_PPPOEDISC",
- "ETHERTYPE_PRIMENTS",
- "ETHERTYPE_PUP",
- "ETHERTYPE_PUPAT",
- "ETHERTYPE_QINQ",
- "ETHERTYPE_RACAL",
- "ETHERTYPE_RATIONAL",
- "ETHERTYPE_RAWFR",
- "ETHERTYPE_RCL",
- "ETHERTYPE_RDP",
- "ETHERTYPE_RETIX",
- "ETHERTYPE_REVARP",
- "ETHERTYPE_SCA",
- "ETHERTYPE_SECTRA",
- "ETHERTYPE_SECUREDATA",
- "ETHERTYPE_SGITW",
- "ETHERTYPE_SG_BOUNCE",
- "ETHERTYPE_SG_DIAG",
- "ETHERTYPE_SG_NETGAMES",
- "ETHERTYPE_SG_RESV",
- "ETHERTYPE_SIMNET",
- "ETHERTYPE_SLOW",
- "ETHERTYPE_SLOWPROTOCOLS",
- "ETHERTYPE_SNA",
- "ETHERTYPE_SNMP",
- "ETHERTYPE_SONIX",
- "ETHERTYPE_SPIDER",
- "ETHERTYPE_SPRITE",
- "ETHERTYPE_STP",
- "ETHERTYPE_TALARIS",
- "ETHERTYPE_TALARISMC",
- "ETHERTYPE_TCPCOMP",
- "ETHERTYPE_TCPSM",
- "ETHERTYPE_TEC",
- "ETHERTYPE_TIGAN",
- "ETHERTYPE_TRAIL",
- "ETHERTYPE_TRANSETHER",
- "ETHERTYPE_TYMSHARE",
- "ETHERTYPE_UBBST",
- "ETHERTYPE_UBDEBUG",
- "ETHERTYPE_UBDIAGLOOP",
- "ETHERTYPE_UBDL",
- "ETHERTYPE_UBNIU",
- "ETHERTYPE_UBNMC",
- "ETHERTYPE_VALID",
- "ETHERTYPE_VARIAN",
- "ETHERTYPE_VAXELN",
- "ETHERTYPE_VEECO",
- "ETHERTYPE_VEXP",
- "ETHERTYPE_VGLAB",
- "ETHERTYPE_VINES",
- "ETHERTYPE_VINESECHO",
- "ETHERTYPE_VINESLOOP",
- "ETHERTYPE_VITAL",
- "ETHERTYPE_VLAN",
- "ETHERTYPE_VLTLMAN",
- "ETHERTYPE_VPROD",
- "ETHERTYPE_VURESERVED",
- "ETHERTYPE_WATERLOO",
- "ETHERTYPE_WELLFLEET",
- "ETHERTYPE_X25",
- "ETHERTYPE_X75",
- "ETHERTYPE_XNSSM",
- "ETHERTYPE_XTP",
- "ETHER_ADDR_LEN",
- "ETHER_ALIGN",
- "ETHER_CRC_LEN",
- "ETHER_CRC_POLY_BE",
- "ETHER_CRC_POLY_LE",
- "ETHER_HDR_LEN",
- "ETHER_MAX_DIX_LEN",
- "ETHER_MAX_LEN",
- "ETHER_MAX_LEN_JUMBO",
- "ETHER_MIN_LEN",
- "ETHER_PPPOE_ENCAP_LEN",
- "ETHER_TYPE_LEN",
- "ETHER_VLAN_ENCAP_LEN",
- "ETH_P_1588",
- "ETH_P_8021Q",
- "ETH_P_802_2",
- "ETH_P_802_3",
- "ETH_P_AARP",
- "ETH_P_ALL",
- "ETH_P_AOE",
- "ETH_P_ARCNET",
- "ETH_P_ARP",
- "ETH_P_ATALK",
- "ETH_P_ATMFATE",
- "ETH_P_ATMMPOA",
- "ETH_P_AX25",
- "ETH_P_BPQ",
- "ETH_P_CAIF",
- "ETH_P_CAN",
- "ETH_P_CONTROL",
- "ETH_P_CUST",
- "ETH_P_DDCMP",
- "ETH_P_DEC",
- "ETH_P_DIAG",
- "ETH_P_DNA_DL",
- "ETH_P_DNA_RC",
- "ETH_P_DNA_RT",
- "ETH_P_DSA",
- "ETH_P_ECONET",
- "ETH_P_EDSA",
- "ETH_P_FCOE",
- "ETH_P_FIP",
- "ETH_P_HDLC",
- "ETH_P_IEEE802154",
- "ETH_P_IEEEPUP",
- "ETH_P_IEEEPUPAT",
- "ETH_P_IP",
- "ETH_P_IPV6",
- "ETH_P_IPX",
- "ETH_P_IRDA",
- "ETH_P_LAT",
- "ETH_P_LINK_CTL",
- "ETH_P_LOCALTALK",
- "ETH_P_LOOP",
- "ETH_P_MOBITEX",
- "ETH_P_MPLS_MC",
- "ETH_P_MPLS_UC",
- "ETH_P_PAE",
- "ETH_P_PAUSE",
- "ETH_P_PHONET",
- "ETH_P_PPPTALK",
- "ETH_P_PPP_DISC",
- "ETH_P_PPP_MP",
- "ETH_P_PPP_SES",
- "ETH_P_PUP",
- "ETH_P_PUPAT",
- "ETH_P_RARP",
- "ETH_P_SCA",
- "ETH_P_SLOW",
- "ETH_P_SNAP",
- "ETH_P_TEB",
- "ETH_P_TIPC",
- "ETH_P_TRAILER",
- "ETH_P_TR_802_2",
- "ETH_P_WAN_PPP",
- "ETH_P_WCCP",
- "ETH_P_X25",
- "ETIME",
- "ETIMEDOUT",
- "ETOOMANYREFS",
- "ETXTBSY",
- "EUCLEAN",
- "EUNATCH",
- "EUSERS",
- "EVFILT_AIO",
- "EVFILT_FS",
- "EVFILT_LIO",
- "EVFILT_MACHPORT",
- "EVFILT_PROC",
- "EVFILT_READ",
- "EVFILT_SIGNAL",
- "EVFILT_SYSCOUNT",
- "EVFILT_THREADMARKER",
- "EVFILT_TIMER",
- "EVFILT_USER",
- "EVFILT_VM",
- "EVFILT_VNODE",
- "EVFILT_WRITE",
- "EV_ADD",
- "EV_CLEAR",
- "EV_DELETE",
- "EV_DISABLE",
- "EV_DISPATCH",
- "EV_DROP",
- "EV_ENABLE",
- "EV_EOF",
- "EV_ERROR",
- "EV_FLAG0",
- "EV_FLAG1",
- "EV_ONESHOT",
- "EV_OOBAND",
- "EV_POLL",
- "EV_RECEIPT",
- "EV_SYSFLAGS",
- "EWINDOWS",
- "EWOULDBLOCK",
- "EXDEV",
- "EXFULL",
- "EXTA",
- "EXTB",
- "EXTPROC",
- "Environ",
- "EpollCreate",
- "EpollCreate1",
- "EpollCtl",
- "EpollEvent",
- "EpollWait",
- "Errno",
- "EscapeArg",
- "Exchangedata",
- "Exec",
- "Exit",
- "ExitProcess",
- "FD_CLOEXEC",
- "FD_SETSIZE",
- "FILE_ACTION_ADDED",
- "FILE_ACTION_MODIFIED",
- "FILE_ACTION_REMOVED",
- "FILE_ACTION_RENAMED_NEW_NAME",
- "FILE_ACTION_RENAMED_OLD_NAME",
- "FILE_APPEND_DATA",
- "FILE_ATTRIBUTE_ARCHIVE",
- "FILE_ATTRIBUTE_DIRECTORY",
- "FILE_ATTRIBUTE_HIDDEN",
- "FILE_ATTRIBUTE_NORMAL",
- "FILE_ATTRIBUTE_READONLY",
- "FILE_ATTRIBUTE_REPARSE_POINT",
- "FILE_ATTRIBUTE_SYSTEM",
- "FILE_BEGIN",
- "FILE_CURRENT",
- "FILE_END",
- "FILE_FLAG_BACKUP_SEMANTICS",
- "FILE_FLAG_OPEN_REPARSE_POINT",
- "FILE_FLAG_OVERLAPPED",
- "FILE_LIST_DIRECTORY",
- "FILE_MAP_COPY",
- "FILE_MAP_EXECUTE",
- "FILE_MAP_READ",
- "FILE_MAP_WRITE",
- "FILE_NOTIFY_CHANGE_ATTRIBUTES",
- "FILE_NOTIFY_CHANGE_CREATION",
- "FILE_NOTIFY_CHANGE_DIR_NAME",
- "FILE_NOTIFY_CHANGE_FILE_NAME",
- "FILE_NOTIFY_CHANGE_LAST_ACCESS",
- "FILE_NOTIFY_CHANGE_LAST_WRITE",
- "FILE_NOTIFY_CHANGE_SIZE",
- "FILE_SHARE_DELETE",
- "FILE_SHARE_READ",
- "FILE_SHARE_WRITE",
- "FILE_SKIP_COMPLETION_PORT_ON_SUCCESS",
- "FILE_SKIP_SET_EVENT_ON_HANDLE",
- "FILE_TYPE_CHAR",
- "FILE_TYPE_DISK",
- "FILE_TYPE_PIPE",
- "FILE_TYPE_REMOTE",
- "FILE_TYPE_UNKNOWN",
- "FILE_WRITE_ATTRIBUTES",
- "FLUSHO",
- "FORMAT_MESSAGE_ALLOCATE_BUFFER",
- "FORMAT_MESSAGE_ARGUMENT_ARRAY",
- "FORMAT_MESSAGE_FROM_HMODULE",
- "FORMAT_MESSAGE_FROM_STRING",
- "FORMAT_MESSAGE_FROM_SYSTEM",
- "FORMAT_MESSAGE_IGNORE_INSERTS",
- "FORMAT_MESSAGE_MAX_WIDTH_MASK",
- "FSCTL_GET_REPARSE_POINT",
- "F_ADDFILESIGS",
- "F_ADDSIGS",
- "F_ALLOCATEALL",
- "F_ALLOCATECONTIG",
- "F_CANCEL",
- "F_CHKCLEAN",
- "F_CLOSEM",
- "F_DUP2FD",
- "F_DUP2FD_CLOEXEC",
- "F_DUPFD",
- "F_DUPFD_CLOEXEC",
- "F_EXLCK",
- "F_FINDSIGS",
- "F_FLUSH_DATA",
- "F_FREEZE_FS",
- "F_FSCTL",
- "F_FSDIRMASK",
- "F_FSIN",
- "F_FSINOUT",
- "F_FSOUT",
- "F_FSPRIV",
- "F_FSVOID",
- "F_FULLFSYNC",
- "F_GETCODEDIR",
- "F_GETFD",
- "F_GETFL",
- "F_GETLEASE",
- "F_GETLK",
- "F_GETLK64",
- "F_GETLKPID",
- "F_GETNOSIGPIPE",
- "F_GETOWN",
- "F_GETOWN_EX",
- "F_GETPATH",
- "F_GETPATH_MTMINFO",
- "F_GETPIPE_SZ",
- "F_GETPROTECTIONCLASS",
- "F_GETPROTECTIONLEVEL",
- "F_GETSIG",
- "F_GLOBAL_NOCACHE",
- "F_LOCK",
- "F_LOG2PHYS",
- "F_LOG2PHYS_EXT",
- "F_MARKDEPENDENCY",
- "F_MAXFD",
- "F_NOCACHE",
- "F_NODIRECT",
- "F_NOTIFY",
- "F_OGETLK",
- "F_OK",
- "F_OSETLK",
- "F_OSETLKW",
- "F_PARAM_MASK",
- "F_PARAM_MAX",
- "F_PATHPKG_CHECK",
- "F_PEOFPOSMODE",
- "F_PREALLOCATE",
- "F_RDADVISE",
- "F_RDAHEAD",
- "F_RDLCK",
- "F_READAHEAD",
- "F_READBOOTSTRAP",
- "F_SETBACKINGSTORE",
- "F_SETFD",
- "F_SETFL",
- "F_SETLEASE",
- "F_SETLK",
- "F_SETLK64",
- "F_SETLKW",
- "F_SETLKW64",
- "F_SETLKWTIMEOUT",
- "F_SETLK_REMOTE",
- "F_SETNOSIGPIPE",
- "F_SETOWN",
- "F_SETOWN_EX",
- "F_SETPIPE_SZ",
- "F_SETPROTECTIONCLASS",
- "F_SETSIG",
- "F_SETSIZE",
- "F_SHLCK",
- "F_SINGLE_WRITER",
- "F_TEST",
- "F_THAW_FS",
- "F_TLOCK",
- "F_TRANSCODEKEY",
- "F_ULOCK",
- "F_UNLCK",
- "F_UNLCKSYS",
- "F_VOLPOSMODE",
- "F_WRITEBOOTSTRAP",
- "F_WRLCK",
- "Faccessat",
- "Fallocate",
- "Fbootstraptransfer_t",
- "Fchdir",
- "Fchflags",
- "Fchmod",
- "Fchmodat",
- "Fchown",
- "Fchownat",
- "FcntlFlock",
- "FdSet",
- "Fdatasync",
- "FileNotifyInformation",
- "Filetime",
- "FindClose",
- "FindFirstFile",
- "FindNextFile",
- "Flock",
- "Flock_t",
- "FlushBpf",
- "FlushFileBuffers",
- "FlushViewOfFile",
- "ForkExec",
- "ForkLock",
- "FormatMessage",
- "Fpathconf",
- "FreeAddrInfoW",
- "FreeEnvironmentStrings",
- "FreeLibrary",
- "Fsid",
- "Fstat",
- "Fstatat",
- "Fstatfs",
- "Fstore_t",
- "Fsync",
- "Ftruncate",
- "FullPath",
- "Futimes",
- "Futimesat",
- "GENERIC_ALL",
- "GENERIC_EXECUTE",
- "GENERIC_READ",
- "GENERIC_WRITE",
- "GUID",
- "GetAcceptExSockaddrs",
- "GetAdaptersInfo",
- "GetAddrInfoW",
- "GetCommandLine",
- "GetComputerName",
- "GetConsoleMode",
- "GetCurrentDirectory",
- "GetCurrentProcess",
- "GetEnvironmentStrings",
- "GetEnvironmentVariable",
- "GetExitCodeProcess",
- "GetFileAttributes",
- "GetFileAttributesEx",
- "GetFileExInfoStandard",
- "GetFileExMaxInfoLevel",
- "GetFileInformationByHandle",
- "GetFileType",
- "GetFullPathName",
- "GetHostByName",
- "GetIfEntry",
- "GetLastError",
- "GetLengthSid",
- "GetLongPathName",
- "GetProcAddress",
- "GetProcessTimes",
- "GetProtoByName",
- "GetQueuedCompletionStatus",
- "GetServByName",
- "GetShortPathName",
- "GetStartupInfo",
- "GetStdHandle",
- "GetSystemTimeAsFileTime",
- "GetTempPath",
- "GetTimeZoneInformation",
- "GetTokenInformation",
- "GetUserNameEx",
- "GetUserProfileDirectory",
- "GetVersion",
- "Getcwd",
- "Getdents",
- "Getdirentries",
- "Getdtablesize",
- "Getegid",
- "Getenv",
- "Geteuid",
- "Getfsstat",
- "Getgid",
- "Getgroups",
- "Getpagesize",
- "Getpeername",
- "Getpgid",
- "Getpgrp",
- "Getpid",
- "Getppid",
- "Getpriority",
- "Getrlimit",
- "Getrusage",
- "Getsid",
- "Getsockname",
- "Getsockopt",
- "GetsockoptByte",
- "GetsockoptICMPv6Filter",
- "GetsockoptIPMreq",
- "GetsockoptIPMreqn",
- "GetsockoptIPv6MTUInfo",
- "GetsockoptIPv6Mreq",
- "GetsockoptInet4Addr",
- "GetsockoptInt",
- "GetsockoptUcred",
- "Gettid",
- "Gettimeofday",
- "Getuid",
- "Getwd",
- "Getxattr",
- "HANDLE_FLAG_INHERIT",
- "HKEY_CLASSES_ROOT",
- "HKEY_CURRENT_CONFIG",
- "HKEY_CURRENT_USER",
- "HKEY_DYN_DATA",
- "HKEY_LOCAL_MACHINE",
- "HKEY_PERFORMANCE_DATA",
- "HKEY_USERS",
- "HUPCL",
- "Handle",
- "Hostent",
- "ICANON",
- "ICMP6_FILTER",
- "ICMPV6_FILTER",
- "ICMPv6Filter",
- "ICRNL",
- "IEXTEN",
- "IFAN_ARRIVAL",
- "IFAN_DEPARTURE",
- "IFA_ADDRESS",
- "IFA_ANYCAST",
- "IFA_BROADCAST",
- "IFA_CACHEINFO",
- "IFA_F_DADFAILED",
- "IFA_F_DEPRECATED",
- "IFA_F_HOMEADDRESS",
- "IFA_F_NODAD",
- "IFA_F_OPTIMISTIC",
- "IFA_F_PERMANENT",
- "IFA_F_SECONDARY",
- "IFA_F_TEMPORARY",
- "IFA_F_TENTATIVE",
- "IFA_LABEL",
- "IFA_LOCAL",
- "IFA_MAX",
- "IFA_MULTICAST",
- "IFA_ROUTE",
- "IFA_UNSPEC",
- "IFF_ALLMULTI",
- "IFF_ALTPHYS",
- "IFF_AUTOMEDIA",
- "IFF_BROADCAST",
- "IFF_CANTCHANGE",
- "IFF_CANTCONFIG",
- "IFF_DEBUG",
- "IFF_DRV_OACTIVE",
- "IFF_DRV_RUNNING",
- "IFF_DYING",
- "IFF_DYNAMIC",
- "IFF_LINK0",
- "IFF_LINK1",
- "IFF_LINK2",
- "IFF_LOOPBACK",
- "IFF_MASTER",
- "IFF_MONITOR",
- "IFF_MULTICAST",
- "IFF_NOARP",
- "IFF_NOTRAILERS",
- "IFF_NO_PI",
- "IFF_OACTIVE",
- "IFF_ONE_QUEUE",
- "IFF_POINTOPOINT",
- "IFF_POINTTOPOINT",
- "IFF_PORTSEL",
- "IFF_PPROMISC",
- "IFF_PROMISC",
- "IFF_RENAMING",
- "IFF_RUNNING",
- "IFF_SIMPLEX",
- "IFF_SLAVE",
- "IFF_SMART",
- "IFF_STATICARP",
- "IFF_TAP",
- "IFF_TUN",
- "IFF_TUN_EXCL",
- "IFF_UP",
- "IFF_VNET_HDR",
- "IFLA_ADDRESS",
- "IFLA_BROADCAST",
- "IFLA_COST",
- "IFLA_IFALIAS",
- "IFLA_IFNAME",
- "IFLA_LINK",
- "IFLA_LINKINFO",
- "IFLA_LINKMODE",
- "IFLA_MAP",
- "IFLA_MASTER",
- "IFLA_MAX",
- "IFLA_MTU",
- "IFLA_NET_NS_PID",
- "IFLA_OPERSTATE",
- "IFLA_PRIORITY",
- "IFLA_PROTINFO",
- "IFLA_QDISC",
- "IFLA_STATS",
- "IFLA_TXQLEN",
- "IFLA_UNSPEC",
- "IFLA_WEIGHT",
- "IFLA_WIRELESS",
- "IFNAMSIZ",
- "IFT_1822",
- "IFT_A12MPPSWITCH",
- "IFT_AAL2",
- "IFT_AAL5",
- "IFT_ADSL",
- "IFT_AFLANE8023",
- "IFT_AFLANE8025",
- "IFT_ARAP",
- "IFT_ARCNET",
- "IFT_ARCNETPLUS",
- "IFT_ASYNC",
- "IFT_ATM",
- "IFT_ATMDXI",
- "IFT_ATMFUNI",
- "IFT_ATMIMA",
- "IFT_ATMLOGICAL",
- "IFT_ATMRADIO",
- "IFT_ATMSUBINTERFACE",
- "IFT_ATMVCIENDPT",
- "IFT_ATMVIRTUAL",
- "IFT_BGPPOLICYACCOUNTING",
- "IFT_BLUETOOTH",
- "IFT_BRIDGE",
- "IFT_BSC",
- "IFT_CARP",
- "IFT_CCTEMUL",
- "IFT_CELLULAR",
- "IFT_CEPT",
- "IFT_CES",
- "IFT_CHANNEL",
- "IFT_CNR",
- "IFT_COFFEE",
- "IFT_COMPOSITELINK",
- "IFT_DCN",
- "IFT_DIGITALPOWERLINE",
- "IFT_DIGITALWRAPPEROVERHEADCHANNEL",
- "IFT_DLSW",
- "IFT_DOCSCABLEDOWNSTREAM",
- "IFT_DOCSCABLEMACLAYER",
- "IFT_DOCSCABLEUPSTREAM",
- "IFT_DOCSCABLEUPSTREAMCHANNEL",
- "IFT_DS0",
- "IFT_DS0BUNDLE",
- "IFT_DS1FDL",
- "IFT_DS3",
- "IFT_DTM",
- "IFT_DUMMY",
- "IFT_DVBASILN",
- "IFT_DVBASIOUT",
- "IFT_DVBRCCDOWNSTREAM",
- "IFT_DVBRCCMACLAYER",
- "IFT_DVBRCCUPSTREAM",
- "IFT_ECONET",
- "IFT_ENC",
- "IFT_EON",
- "IFT_EPLRS",
- "IFT_ESCON",
- "IFT_ETHER",
- "IFT_FAITH",
- "IFT_FAST",
- "IFT_FASTETHER",
- "IFT_FASTETHERFX",
- "IFT_FDDI",
- "IFT_FIBRECHANNEL",
- "IFT_FRAMERELAYINTERCONNECT",
- "IFT_FRAMERELAYMPI",
- "IFT_FRDLCIENDPT",
- "IFT_FRELAY",
- "IFT_FRELAYDCE",
- "IFT_FRF16MFRBUNDLE",
- "IFT_FRFORWARD",
- "IFT_G703AT2MB",
- "IFT_G703AT64K",
- "IFT_GIF",
- "IFT_GIGABITETHERNET",
- "IFT_GR303IDT",
- "IFT_GR303RDT",
- "IFT_H323GATEKEEPER",
- "IFT_H323PROXY",
- "IFT_HDH1822",
- "IFT_HDLC",
- "IFT_HDSL2",
- "IFT_HIPERLAN2",
- "IFT_HIPPI",
- "IFT_HIPPIINTERFACE",
- "IFT_HOSTPAD",
- "IFT_HSSI",
- "IFT_HY",
- "IFT_IBM370PARCHAN",
- "IFT_IDSL",
- "IFT_IEEE1394",
- "IFT_IEEE80211",
- "IFT_IEEE80212",
- "IFT_IEEE8023ADLAG",
- "IFT_IFGSN",
- "IFT_IMT",
- "IFT_INFINIBAND",
- "IFT_INTERLEAVE",
- "IFT_IP",
- "IFT_IPFORWARD",
- "IFT_IPOVERATM",
- "IFT_IPOVERCDLC",
- "IFT_IPOVERCLAW",
- "IFT_IPSWITCH",
- "IFT_IPXIP",
- "IFT_ISDN",
- "IFT_ISDNBASIC",
- "IFT_ISDNPRIMARY",
- "IFT_ISDNS",
- "IFT_ISDNU",
- "IFT_ISO88022LLC",
- "IFT_ISO88023",
- "IFT_ISO88024",
- "IFT_ISO88025",
- "IFT_ISO88025CRFPINT",
- "IFT_ISO88025DTR",
- "IFT_ISO88025FIBER",
- "IFT_ISO88026",
- "IFT_ISUP",
- "IFT_L2VLAN",
- "IFT_L3IPVLAN",
- "IFT_L3IPXVLAN",
- "IFT_LAPB",
- "IFT_LAPD",
- "IFT_LAPF",
- "IFT_LINEGROUP",
- "IFT_LOCALTALK",
- "IFT_LOOP",
- "IFT_MEDIAMAILOVERIP",
- "IFT_MFSIGLINK",
- "IFT_MIOX25",
- "IFT_MODEM",
- "IFT_MPC",
- "IFT_MPLS",
- "IFT_MPLSTUNNEL",
- "IFT_MSDSL",
- "IFT_MVL",
- "IFT_MYRINET",
- "IFT_NFAS",
- "IFT_NSIP",
- "IFT_OPTICALCHANNEL",
- "IFT_OPTICALTRANSPORT",
- "IFT_OTHER",
- "IFT_P10",
- "IFT_P80",
- "IFT_PARA",
- "IFT_PDP",
- "IFT_PFLOG",
- "IFT_PFLOW",
- "IFT_PFSYNC",
- "IFT_PLC",
- "IFT_PON155",
- "IFT_PON622",
- "IFT_POS",
- "IFT_PPP",
- "IFT_PPPMULTILINKBUNDLE",
- "IFT_PROPATM",
- "IFT_PROPBWAP2MP",
- "IFT_PROPCNLS",
- "IFT_PROPDOCSWIRELESSDOWNSTREAM",
- "IFT_PROPDOCSWIRELESSMACLAYER",
- "IFT_PROPDOCSWIRELESSUPSTREAM",
- "IFT_PROPMUX",
- "IFT_PROPVIRTUAL",
- "IFT_PROPWIRELESSP2P",
- "IFT_PTPSERIAL",
- "IFT_PVC",
- "IFT_Q2931",
- "IFT_QLLC",
- "IFT_RADIOMAC",
- "IFT_RADSL",
- "IFT_REACHDSL",
- "IFT_RFC1483",
- "IFT_RS232",
- "IFT_RSRB",
- "IFT_SDLC",
- "IFT_SDSL",
- "IFT_SHDSL",
- "IFT_SIP",
- "IFT_SIPSIG",
- "IFT_SIPTG",
- "IFT_SLIP",
- "IFT_SMDSDXI",
- "IFT_SMDSICIP",
- "IFT_SONET",
- "IFT_SONETOVERHEADCHANNEL",
- "IFT_SONETPATH",
- "IFT_SONETVT",
- "IFT_SRP",
- "IFT_SS7SIGLINK",
- "IFT_STACKTOSTACK",
- "IFT_STARLAN",
- "IFT_STF",
- "IFT_T1",
- "IFT_TDLC",
- "IFT_TELINK",
- "IFT_TERMPAD",
- "IFT_TR008",
- "IFT_TRANSPHDLC",
- "IFT_TUNNEL",
- "IFT_ULTRA",
- "IFT_USB",
- "IFT_V11",
- "IFT_V35",
- "IFT_V36",
- "IFT_V37",
- "IFT_VDSL",
- "IFT_VIRTUALIPADDRESS",
- "IFT_VIRTUALTG",
- "IFT_VOICEDID",
- "IFT_VOICEEM",
- "IFT_VOICEEMFGD",
- "IFT_VOICEENCAP",
- "IFT_VOICEFGDEANA",
- "IFT_VOICEFXO",
- "IFT_VOICEFXS",
- "IFT_VOICEOVERATM",
- "IFT_VOICEOVERCABLE",
- "IFT_VOICEOVERFRAMERELAY",
- "IFT_VOICEOVERIP",
- "IFT_X213",
- "IFT_X25",
- "IFT_X25DDN",
- "IFT_X25HUNTGROUP",
- "IFT_X25MLP",
- "IFT_X25PLE",
- "IFT_XETHER",
- "IGNBRK",
- "IGNCR",
- "IGNORE",
- "IGNPAR",
- "IMAXBEL",
- "INFINITE",
- "INLCR",
- "INPCK",
- "INVALID_FILE_ATTRIBUTES",
- "IN_ACCESS",
- "IN_ALL_EVENTS",
- "IN_ATTRIB",
- "IN_CLASSA_HOST",
- "IN_CLASSA_MAX",
- "IN_CLASSA_NET",
- "IN_CLASSA_NSHIFT",
- "IN_CLASSB_HOST",
- "IN_CLASSB_MAX",
- "IN_CLASSB_NET",
- "IN_CLASSB_NSHIFT",
- "IN_CLASSC_HOST",
- "IN_CLASSC_NET",
- "IN_CLASSC_NSHIFT",
- "IN_CLASSD_HOST",
- "IN_CLASSD_NET",
- "IN_CLASSD_NSHIFT",
- "IN_CLOEXEC",
- "IN_CLOSE",
- "IN_CLOSE_NOWRITE",
- "IN_CLOSE_WRITE",
- "IN_CREATE",
- "IN_DELETE",
- "IN_DELETE_SELF",
- "IN_DONT_FOLLOW",
- "IN_EXCL_UNLINK",
- "IN_IGNORED",
- "IN_ISDIR",
- "IN_LINKLOCALNETNUM",
- "IN_LOOPBACKNET",
- "IN_MASK_ADD",
- "IN_MODIFY",
- "IN_MOVE",
- "IN_MOVED_FROM",
- "IN_MOVED_TO",
- "IN_MOVE_SELF",
- "IN_NONBLOCK",
- "IN_ONESHOT",
- "IN_ONLYDIR",
- "IN_OPEN",
- "IN_Q_OVERFLOW",
- "IN_RFC3021_HOST",
- "IN_RFC3021_MASK",
- "IN_RFC3021_NET",
- "IN_RFC3021_NSHIFT",
- "IN_UNMOUNT",
- "IOC_IN",
- "IOC_INOUT",
- "IOC_OUT",
- "IOC_VENDOR",
- "IOC_WS2",
- "IO_REPARSE_TAG_SYMLINK",
- "IPMreq",
- "IPMreqn",
- "IPPROTO_3PC",
- "IPPROTO_ADFS",
- "IPPROTO_AH",
- "IPPROTO_AHIP",
- "IPPROTO_APES",
- "IPPROTO_ARGUS",
- "IPPROTO_AX25",
- "IPPROTO_BHA",
- "IPPROTO_BLT",
- "IPPROTO_BRSATMON",
- "IPPROTO_CARP",
- "IPPROTO_CFTP",
- "IPPROTO_CHAOS",
- "IPPROTO_CMTP",
- "IPPROTO_COMP",
- "IPPROTO_CPHB",
- "IPPROTO_CPNX",
- "IPPROTO_DCCP",
- "IPPROTO_DDP",
- "IPPROTO_DGP",
- "IPPROTO_DIVERT",
- "IPPROTO_DIVERT_INIT",
- "IPPROTO_DIVERT_RESP",
- "IPPROTO_DONE",
- "IPPROTO_DSTOPTS",
- "IPPROTO_EGP",
- "IPPROTO_EMCON",
- "IPPROTO_ENCAP",
- "IPPROTO_EON",
- "IPPROTO_ESP",
- "IPPROTO_ETHERIP",
- "IPPROTO_FRAGMENT",
- "IPPROTO_GGP",
- "IPPROTO_GMTP",
- "IPPROTO_GRE",
- "IPPROTO_HELLO",
- "IPPROTO_HMP",
- "IPPROTO_HOPOPTS",
- "IPPROTO_ICMP",
- "IPPROTO_ICMPV6",
- "IPPROTO_IDP",
- "IPPROTO_IDPR",
- "IPPROTO_IDRP",
- "IPPROTO_IGMP",
- "IPPROTO_IGP",
- "IPPROTO_IGRP",
- "IPPROTO_IL",
- "IPPROTO_INLSP",
- "IPPROTO_INP",
- "IPPROTO_IP",
- "IPPROTO_IPCOMP",
- "IPPROTO_IPCV",
- "IPPROTO_IPEIP",
- "IPPROTO_IPIP",
- "IPPROTO_IPPC",
- "IPPROTO_IPV4",
- "IPPROTO_IPV6",
- "IPPROTO_IPV6_ICMP",
- "IPPROTO_IRTP",
- "IPPROTO_KRYPTOLAN",
- "IPPROTO_LARP",
- "IPPROTO_LEAF1",
- "IPPROTO_LEAF2",
- "IPPROTO_MAX",
- "IPPROTO_MAXID",
- "IPPROTO_MEAS",
- "IPPROTO_MH",
- "IPPROTO_MHRP",
- "IPPROTO_MICP",
- "IPPROTO_MOBILE",
- "IPPROTO_MPLS",
- "IPPROTO_MTP",
- "IPPROTO_MUX",
- "IPPROTO_ND",
- "IPPROTO_NHRP",
- "IPPROTO_NONE",
- "IPPROTO_NSP",
- "IPPROTO_NVPII",
- "IPPROTO_OLD_DIVERT",
- "IPPROTO_OSPFIGP",
- "IPPROTO_PFSYNC",
- "IPPROTO_PGM",
- "IPPROTO_PIGP",
- "IPPROTO_PIM",
- "IPPROTO_PRM",
- "IPPROTO_PUP",
- "IPPROTO_PVP",
- "IPPROTO_RAW",
- "IPPROTO_RCCMON",
- "IPPROTO_RDP",
- "IPPROTO_ROUTING",
- "IPPROTO_RSVP",
- "IPPROTO_RVD",
- "IPPROTO_SATEXPAK",
- "IPPROTO_SATMON",
- "IPPROTO_SCCSP",
- "IPPROTO_SCTP",
- "IPPROTO_SDRP",
- "IPPROTO_SEND",
- "IPPROTO_SEP",
- "IPPROTO_SKIP",
- "IPPROTO_SPACER",
- "IPPROTO_SRPC",
- "IPPROTO_ST",
- "IPPROTO_SVMTP",
- "IPPROTO_SWIPE",
- "IPPROTO_TCF",
- "IPPROTO_TCP",
- "IPPROTO_TLSP",
- "IPPROTO_TP",
- "IPPROTO_TPXX",
- "IPPROTO_TRUNK1",
- "IPPROTO_TRUNK2",
- "IPPROTO_TTP",
- "IPPROTO_UDP",
- "IPPROTO_UDPLITE",
- "IPPROTO_VINES",
- "IPPROTO_VISA",
- "IPPROTO_VMTP",
- "IPPROTO_VRRP",
- "IPPROTO_WBEXPAK",
- "IPPROTO_WBMON",
- "IPPROTO_WSN",
- "IPPROTO_XNET",
- "IPPROTO_XTP",
- "IPV6_2292DSTOPTS",
- "IPV6_2292HOPLIMIT",
- "IPV6_2292HOPOPTS",
- "IPV6_2292NEXTHOP",
- "IPV6_2292PKTINFO",
- "IPV6_2292PKTOPTIONS",
- "IPV6_2292RTHDR",
- "IPV6_ADDRFORM",
- "IPV6_ADD_MEMBERSHIP",
- "IPV6_AUTHHDR",
- "IPV6_AUTH_LEVEL",
- "IPV6_AUTOFLOWLABEL",
- "IPV6_BINDANY",
- "IPV6_BINDV6ONLY",
- "IPV6_BOUND_IF",
- "IPV6_CHECKSUM",
- "IPV6_DEFAULT_MULTICAST_HOPS",
- "IPV6_DEFAULT_MULTICAST_LOOP",
- "IPV6_DEFHLIM",
- "IPV6_DONTFRAG",
- "IPV6_DROP_MEMBERSHIP",
- "IPV6_DSTOPTS",
- "IPV6_ESP_NETWORK_LEVEL",
- "IPV6_ESP_TRANS_LEVEL",
- "IPV6_FAITH",
- "IPV6_FLOWINFO_MASK",
- "IPV6_FLOWLABEL_MASK",
- "IPV6_FRAGTTL",
- "IPV6_FW_ADD",
- "IPV6_FW_DEL",
- "IPV6_FW_FLUSH",
- "IPV6_FW_GET",
- "IPV6_FW_ZERO",
- "IPV6_HLIMDEC",
- "IPV6_HOPLIMIT",
- "IPV6_HOPOPTS",
- "IPV6_IPCOMP_LEVEL",
- "IPV6_IPSEC_POLICY",
- "IPV6_JOIN_ANYCAST",
- "IPV6_JOIN_GROUP",
- "IPV6_LEAVE_ANYCAST",
- "IPV6_LEAVE_GROUP",
- "IPV6_MAXHLIM",
- "IPV6_MAXOPTHDR",
- "IPV6_MAXPACKET",
- "IPV6_MAX_GROUP_SRC_FILTER",
- "IPV6_MAX_MEMBERSHIPS",
- "IPV6_MAX_SOCK_SRC_FILTER",
- "IPV6_MIN_MEMBERSHIPS",
- "IPV6_MMTU",
- "IPV6_MSFILTER",
- "IPV6_MTU",
- "IPV6_MTU_DISCOVER",
- "IPV6_MULTICAST_HOPS",
- "IPV6_MULTICAST_IF",
- "IPV6_MULTICAST_LOOP",
- "IPV6_NEXTHOP",
- "IPV6_OPTIONS",
- "IPV6_PATHMTU",
- "IPV6_PIPEX",
- "IPV6_PKTINFO",
- "IPV6_PMTUDISC_DO",
- "IPV6_PMTUDISC_DONT",
- "IPV6_PMTUDISC_PROBE",
- "IPV6_PMTUDISC_WANT",
- "IPV6_PORTRANGE",
- "IPV6_PORTRANGE_DEFAULT",
- "IPV6_PORTRANGE_HIGH",
- "IPV6_PORTRANGE_LOW",
- "IPV6_PREFER_TEMPADDR",
- "IPV6_RECVDSTOPTS",
- "IPV6_RECVDSTPORT",
- "IPV6_RECVERR",
- "IPV6_RECVHOPLIMIT",
- "IPV6_RECVHOPOPTS",
- "IPV6_RECVPATHMTU",
- "IPV6_RECVPKTINFO",
- "IPV6_RECVRTHDR",
- "IPV6_RECVTCLASS",
- "IPV6_ROUTER_ALERT",
- "IPV6_RTABLE",
- "IPV6_RTHDR",
- "IPV6_RTHDRDSTOPTS",
- "IPV6_RTHDR_LOOSE",
- "IPV6_RTHDR_STRICT",
- "IPV6_RTHDR_TYPE_0",
- "IPV6_RXDSTOPTS",
- "IPV6_RXHOPOPTS",
- "IPV6_SOCKOPT_RESERVED1",
- "IPV6_TCLASS",
- "IPV6_UNICAST_HOPS",
- "IPV6_USE_MIN_MTU",
- "IPV6_V6ONLY",
- "IPV6_VERSION",
- "IPV6_VERSION_MASK",
- "IPV6_XFRM_POLICY",
- "IP_ADD_MEMBERSHIP",
- "IP_ADD_SOURCE_MEMBERSHIP",
- "IP_AUTH_LEVEL",
- "IP_BINDANY",
- "IP_BLOCK_SOURCE",
- "IP_BOUND_IF",
- "IP_DEFAULT_MULTICAST_LOOP",
- "IP_DEFAULT_MULTICAST_TTL",
- "IP_DF",
- "IP_DIVERTFL",
- "IP_DONTFRAG",
- "IP_DROP_MEMBERSHIP",
- "IP_DROP_SOURCE_MEMBERSHIP",
- "IP_DUMMYNET3",
- "IP_DUMMYNET_CONFIGURE",
- "IP_DUMMYNET_DEL",
- "IP_DUMMYNET_FLUSH",
- "IP_DUMMYNET_GET",
- "IP_EF",
- "IP_ERRORMTU",
- "IP_ESP_NETWORK_LEVEL",
- "IP_ESP_TRANS_LEVEL",
- "IP_FAITH",
- "IP_FREEBIND",
- "IP_FW3",
- "IP_FW_ADD",
- "IP_FW_DEL",
- "IP_FW_FLUSH",
- "IP_FW_GET",
- "IP_FW_NAT_CFG",
- "IP_FW_NAT_DEL",
- "IP_FW_NAT_GET_CONFIG",
- "IP_FW_NAT_GET_LOG",
- "IP_FW_RESETLOG",
- "IP_FW_TABLE_ADD",
- "IP_FW_TABLE_DEL",
- "IP_FW_TABLE_FLUSH",
- "IP_FW_TABLE_GETSIZE",
- "IP_FW_TABLE_LIST",
- "IP_FW_ZERO",
- "IP_HDRINCL",
- "IP_IPCOMP_LEVEL",
- "IP_IPSECFLOWINFO",
- "IP_IPSEC_LOCAL_AUTH",
- "IP_IPSEC_LOCAL_CRED",
- "IP_IPSEC_LOCAL_ID",
- "IP_IPSEC_POLICY",
- "IP_IPSEC_REMOTE_AUTH",
- "IP_IPSEC_REMOTE_CRED",
- "IP_IPSEC_REMOTE_ID",
- "IP_MAXPACKET",
- "IP_MAX_GROUP_SRC_FILTER",
- "IP_MAX_MEMBERSHIPS",
- "IP_MAX_SOCK_MUTE_FILTER",
- "IP_MAX_SOCK_SRC_FILTER",
- "IP_MAX_SOURCE_FILTER",
- "IP_MF",
- "IP_MINFRAGSIZE",
- "IP_MINTTL",
- "IP_MIN_MEMBERSHIPS",
- "IP_MSFILTER",
- "IP_MSS",
- "IP_MTU",
- "IP_MTU_DISCOVER",
- "IP_MULTICAST_IF",
- "IP_MULTICAST_IFINDEX",
- "IP_MULTICAST_LOOP",
- "IP_MULTICAST_TTL",
- "IP_MULTICAST_VIF",
- "IP_NAT__XXX",
- "IP_OFFMASK",
- "IP_OLD_FW_ADD",
- "IP_OLD_FW_DEL",
- "IP_OLD_FW_FLUSH",
- "IP_OLD_FW_GET",
- "IP_OLD_FW_RESETLOG",
- "IP_OLD_FW_ZERO",
- "IP_ONESBCAST",
- "IP_OPTIONS",
- "IP_ORIGDSTADDR",
- "IP_PASSSEC",
- "IP_PIPEX",
- "IP_PKTINFO",
- "IP_PKTOPTIONS",
- "IP_PMTUDISC",
- "IP_PMTUDISC_DO",
- "IP_PMTUDISC_DONT",
- "IP_PMTUDISC_PROBE",
- "IP_PMTUDISC_WANT",
- "IP_PORTRANGE",
- "IP_PORTRANGE_DEFAULT",
- "IP_PORTRANGE_HIGH",
- "IP_PORTRANGE_LOW",
- "IP_RECVDSTADDR",
- "IP_RECVDSTPORT",
- "IP_RECVERR",
- "IP_RECVIF",
- "IP_RECVOPTS",
- "IP_RECVORIGDSTADDR",
- "IP_RECVPKTINFO",
- "IP_RECVRETOPTS",
- "IP_RECVRTABLE",
- "IP_RECVTOS",
- "IP_RECVTTL",
- "IP_RETOPTS",
- "IP_RF",
- "IP_ROUTER_ALERT",
- "IP_RSVP_OFF",
- "IP_RSVP_ON",
- "IP_RSVP_VIF_OFF",
- "IP_RSVP_VIF_ON",
- "IP_RTABLE",
- "IP_SENDSRCADDR",
- "IP_STRIPHDR",
- "IP_TOS",
- "IP_TRAFFIC_MGT_BACKGROUND",
- "IP_TRANSPARENT",
- "IP_TTL",
- "IP_UNBLOCK_SOURCE",
- "IP_XFRM_POLICY",
- "IPv6MTUInfo",
- "IPv6Mreq",
- "ISIG",
- "ISTRIP",
- "IUCLC",
- "IUTF8",
- "IXANY",
- "IXOFF",
- "IXON",
- "IfAddrmsg",
- "IfAnnounceMsghdr",
- "IfData",
- "IfInfomsg",
- "IfMsghdr",
- "IfaMsghdr",
- "IfmaMsghdr",
- "IfmaMsghdr2",
- "ImplementsGetwd",
- "Inet4Pktinfo",
- "Inet6Pktinfo",
- "InotifyAddWatch",
- "InotifyEvent",
- "InotifyInit",
- "InotifyInit1",
- "InotifyRmWatch",
- "InterfaceAddrMessage",
- "InterfaceAnnounceMessage",
- "InterfaceInfo",
- "InterfaceMessage",
- "InterfaceMulticastAddrMessage",
- "InvalidHandle",
- "Ioperm",
- "Iopl",
- "Iovec",
- "IpAdapterInfo",
- "IpAddrString",
- "IpAddressString",
- "IpMaskString",
- "Issetugid",
- "KEY_ALL_ACCESS",
- "KEY_CREATE_LINK",
- "KEY_CREATE_SUB_KEY",
- "KEY_ENUMERATE_SUB_KEYS",
- "KEY_EXECUTE",
- "KEY_NOTIFY",
- "KEY_QUERY_VALUE",
- "KEY_READ",
- "KEY_SET_VALUE",
- "KEY_WOW64_32KEY",
- "KEY_WOW64_64KEY",
- "KEY_WRITE",
- "Kevent",
- "Kevent_t",
- "Kill",
- "Klogctl",
- "Kqueue",
- "LANG_ENGLISH",
- "LAYERED_PROTOCOL",
- "LCNT_OVERLOAD_FLUSH",
- "LINUX_REBOOT_CMD_CAD_OFF",
- "LINUX_REBOOT_CMD_CAD_ON",
- "LINUX_REBOOT_CMD_HALT",
- "LINUX_REBOOT_CMD_KEXEC",
- "LINUX_REBOOT_CMD_POWER_OFF",
- "LINUX_REBOOT_CMD_RESTART",
- "LINUX_REBOOT_CMD_RESTART2",
- "LINUX_REBOOT_CMD_SW_SUSPEND",
- "LINUX_REBOOT_MAGIC1",
- "LINUX_REBOOT_MAGIC2",
- "LOCK_EX",
- "LOCK_NB",
- "LOCK_SH",
- "LOCK_UN",
- "LazyDLL",
- "LazyProc",
- "Lchown",
- "Linger",
- "Link",
- "Listen",
- "Listxattr",
- "LoadCancelIoEx",
- "LoadConnectEx",
- "LoadCreateSymbolicLink",
- "LoadDLL",
- "LoadGetAddrInfo",
- "LoadLibrary",
- "LoadSetFileCompletionNotificationModes",
- "LocalFree",
- "Log2phys_t",
- "LookupAccountName",
- "LookupAccountSid",
- "LookupSID",
- "LsfJump",
- "LsfSocket",
- "LsfStmt",
- "Lstat",
- "MADV_AUTOSYNC",
- "MADV_CAN_REUSE",
- "MADV_CORE",
- "MADV_DOFORK",
- "MADV_DONTFORK",
- "MADV_DONTNEED",
- "MADV_FREE",
- "MADV_FREE_REUSABLE",
- "MADV_FREE_REUSE",
- "MADV_HUGEPAGE",
- "MADV_HWPOISON",
- "MADV_MERGEABLE",
- "MADV_NOCORE",
- "MADV_NOHUGEPAGE",
- "MADV_NORMAL",
- "MADV_NOSYNC",
- "MADV_PROTECT",
- "MADV_RANDOM",
- "MADV_REMOVE",
- "MADV_SEQUENTIAL",
- "MADV_SPACEAVAIL",
- "MADV_UNMERGEABLE",
- "MADV_WILLNEED",
- "MADV_ZERO_WIRED_PAGES",
- "MAP_32BIT",
- "MAP_ALIGNED_SUPER",
- "MAP_ALIGNMENT_16MB",
- "MAP_ALIGNMENT_1TB",
- "MAP_ALIGNMENT_256TB",
- "MAP_ALIGNMENT_4GB",
- "MAP_ALIGNMENT_64KB",
- "MAP_ALIGNMENT_64PB",
- "MAP_ALIGNMENT_MASK",
- "MAP_ALIGNMENT_SHIFT",
- "MAP_ANON",
- "MAP_ANONYMOUS",
- "MAP_COPY",
- "MAP_DENYWRITE",
- "MAP_EXECUTABLE",
- "MAP_FILE",
- "MAP_FIXED",
- "MAP_FLAGMASK",
- "MAP_GROWSDOWN",
- "MAP_HASSEMAPHORE",
- "MAP_HUGETLB",
- "MAP_INHERIT",
- "MAP_INHERIT_COPY",
- "MAP_INHERIT_DEFAULT",
- "MAP_INHERIT_DONATE_COPY",
- "MAP_INHERIT_NONE",
- "MAP_INHERIT_SHARE",
- "MAP_JIT",
- "MAP_LOCKED",
- "MAP_NOCACHE",
- "MAP_NOCORE",
- "MAP_NOEXTEND",
- "MAP_NONBLOCK",
- "MAP_NORESERVE",
- "MAP_NOSYNC",
- "MAP_POPULATE",
- "MAP_PREFAULT_READ",
- "MAP_PRIVATE",
- "MAP_RENAME",
- "MAP_RESERVED0080",
- "MAP_RESERVED0100",
- "MAP_SHARED",
- "MAP_STACK",
- "MAP_TRYFIXED",
- "MAP_TYPE",
- "MAP_WIRED",
- "MAXIMUM_REPARSE_DATA_BUFFER_SIZE",
- "MAXLEN_IFDESCR",
- "MAXLEN_PHYSADDR",
- "MAX_ADAPTER_ADDRESS_LENGTH",
- "MAX_ADAPTER_DESCRIPTION_LENGTH",
- "MAX_ADAPTER_NAME_LENGTH",
- "MAX_COMPUTERNAME_LENGTH",
- "MAX_INTERFACE_NAME_LEN",
- "MAX_LONG_PATH",
- "MAX_PATH",
- "MAX_PROTOCOL_CHAIN",
- "MCL_CURRENT",
- "MCL_FUTURE",
- "MNT_DETACH",
- "MNT_EXPIRE",
- "MNT_FORCE",
- "MSG_BCAST",
- "MSG_CMSG_CLOEXEC",
- "MSG_COMPAT",
- "MSG_CONFIRM",
- "MSG_CONTROLMBUF",
- "MSG_CTRUNC",
- "MSG_DONTROUTE",
- "MSG_DONTWAIT",
- "MSG_EOF",
- "MSG_EOR",
- "MSG_ERRQUEUE",
- "MSG_FASTOPEN",
- "MSG_FIN",
- "MSG_FLUSH",
- "MSG_HAVEMORE",
- "MSG_HOLD",
- "MSG_IOVUSRSPACE",
- "MSG_LENUSRSPACE",
- "MSG_MCAST",
- "MSG_MORE",
- "MSG_NAMEMBUF",
- "MSG_NBIO",
- "MSG_NEEDSA",
- "MSG_NOSIGNAL",
- "MSG_NOTIFICATION",
- "MSG_OOB",
- "MSG_PEEK",
- "MSG_PROXY",
- "MSG_RCVMORE",
- "MSG_RST",
- "MSG_SEND",
- "MSG_SYN",
- "MSG_TRUNC",
- "MSG_TRYHARD",
- "MSG_USERFLAGS",
- "MSG_WAITALL",
- "MSG_WAITFORONE",
- "MSG_WAITSTREAM",
- "MS_ACTIVE",
- "MS_ASYNC",
- "MS_BIND",
- "MS_DEACTIVATE",
- "MS_DIRSYNC",
- "MS_INVALIDATE",
- "MS_I_VERSION",
- "MS_KERNMOUNT",
- "MS_KILLPAGES",
- "MS_MANDLOCK",
- "MS_MGC_MSK",
- "MS_MGC_VAL",
- "MS_MOVE",
- "MS_NOATIME",
- "MS_NODEV",
- "MS_NODIRATIME",
- "MS_NOEXEC",
- "MS_NOSUID",
- "MS_NOUSER",
- "MS_POSIXACL",
- "MS_PRIVATE",
- "MS_RDONLY",
- "MS_REC",
- "MS_RELATIME",
- "MS_REMOUNT",
- "MS_RMT_MASK",
- "MS_SHARED",
- "MS_SILENT",
- "MS_SLAVE",
- "MS_STRICTATIME",
- "MS_SYNC",
- "MS_SYNCHRONOUS",
- "MS_UNBINDABLE",
- "Madvise",
- "MapViewOfFile",
- "MaxTokenInfoClass",
- "Mclpool",
- "MibIfRow",
- "Mkdir",
- "Mkdirat",
- "Mkfifo",
- "Mknod",
- "Mknodat",
- "Mlock",
- "Mlockall",
- "Mmap",
- "Mount",
- "MoveFile",
- "Mprotect",
- "Msghdr",
- "Munlock",
- "Munlockall",
- "Munmap",
- "MustLoadDLL",
- "NAME_MAX",
- "NETLINK_ADD_MEMBERSHIP",
- "NETLINK_AUDIT",
- "NETLINK_BROADCAST_ERROR",
- "NETLINK_CONNECTOR",
- "NETLINK_DNRTMSG",
- "NETLINK_DROP_MEMBERSHIP",
- "NETLINK_ECRYPTFS",
- "NETLINK_FIB_LOOKUP",
- "NETLINK_FIREWALL",
- "NETLINK_GENERIC",
- "NETLINK_INET_DIAG",
- "NETLINK_IP6_FW",
- "NETLINK_ISCSI",
- "NETLINK_KOBJECT_UEVENT",
- "NETLINK_NETFILTER",
- "NETLINK_NFLOG",
- "NETLINK_NO_ENOBUFS",
- "NETLINK_PKTINFO",
- "NETLINK_RDMA",
- "NETLINK_ROUTE",
- "NETLINK_SCSITRANSPORT",
- "NETLINK_SELINUX",
- "NETLINK_UNUSED",
- "NETLINK_USERSOCK",
- "NETLINK_XFRM",
- "NET_RT_DUMP",
- "NET_RT_DUMP2",
- "NET_RT_FLAGS",
- "NET_RT_IFLIST",
- "NET_RT_IFLIST2",
- "NET_RT_IFLISTL",
- "NET_RT_IFMALIST",
- "NET_RT_MAXID",
- "NET_RT_OIFLIST",
- "NET_RT_OOIFLIST",
- "NET_RT_STAT",
- "NET_RT_STATS",
- "NET_RT_TABLE",
- "NET_RT_TRASH",
- "NLA_ALIGNTO",
- "NLA_F_NESTED",
- "NLA_F_NET_BYTEORDER",
- "NLA_HDRLEN",
- "NLMSG_ALIGNTO",
- "NLMSG_DONE",
- "NLMSG_ERROR",
- "NLMSG_HDRLEN",
- "NLMSG_MIN_TYPE",
- "NLMSG_NOOP",
- "NLMSG_OVERRUN",
- "NLM_F_ACK",
- "NLM_F_APPEND",
- "NLM_F_ATOMIC",
- "NLM_F_CREATE",
- "NLM_F_DUMP",
- "NLM_F_ECHO",
- "NLM_F_EXCL",
- "NLM_F_MATCH",
- "NLM_F_MULTI",
- "NLM_F_REPLACE",
- "NLM_F_REQUEST",
- "NLM_F_ROOT",
- "NOFLSH",
- "NOTE_ABSOLUTE",
- "NOTE_ATTRIB",
- "NOTE_BACKGROUND",
- "NOTE_CHILD",
- "NOTE_CRITICAL",
- "NOTE_DELETE",
- "NOTE_EOF",
- "NOTE_EXEC",
- "NOTE_EXIT",
- "NOTE_EXITSTATUS",
- "NOTE_EXIT_CSERROR",
- "NOTE_EXIT_DECRYPTFAIL",
- "NOTE_EXIT_DETAIL",
- "NOTE_EXIT_DETAIL_MASK",
- "NOTE_EXIT_MEMORY",
- "NOTE_EXIT_REPARENTED",
- "NOTE_EXTEND",
- "NOTE_FFAND",
- "NOTE_FFCOPY",
- "NOTE_FFCTRLMASK",
- "NOTE_FFLAGSMASK",
- "NOTE_FFNOP",
- "NOTE_FFOR",
- "NOTE_FORK",
- "NOTE_LEEWAY",
- "NOTE_LINK",
- "NOTE_LOWAT",
- "NOTE_NONE",
- "NOTE_NSECONDS",
- "NOTE_PCTRLMASK",
- "NOTE_PDATAMASK",
- "NOTE_REAP",
- "NOTE_RENAME",
- "NOTE_RESOURCEEND",
- "NOTE_REVOKE",
- "NOTE_SECONDS",
- "NOTE_SIGNAL",
- "NOTE_TRACK",
- "NOTE_TRACKERR",
- "NOTE_TRIGGER",
- "NOTE_TRUNCATE",
- "NOTE_USECONDS",
- "NOTE_VM_ERROR",
- "NOTE_VM_PRESSURE",
- "NOTE_VM_PRESSURE_SUDDEN_TERMINATE",
- "NOTE_VM_PRESSURE_TERMINATE",
- "NOTE_WRITE",
- "NameCanonical",
- "NameCanonicalEx",
- "NameDisplay",
- "NameDnsDomain",
- "NameFullyQualifiedDN",
- "NameSamCompatible",
- "NameServicePrincipal",
- "NameUniqueId",
- "NameUnknown",
- "NameUserPrincipal",
- "Nanosleep",
- "NetApiBufferFree",
- "NetGetJoinInformation",
- "NetSetupDomainName",
- "NetSetupUnjoined",
- "NetSetupUnknownStatus",
- "NetSetupWorkgroupName",
- "NetUserGetInfo",
- "NetlinkMessage",
- "NetlinkRIB",
- "NetlinkRouteAttr",
- "NetlinkRouteRequest",
- "NewCallback",
- "NewCallbackCDecl",
- "NewLazyDLL",
- "NlAttr",
- "NlMsgerr",
- "NlMsghdr",
- "NsecToFiletime",
- "NsecToTimespec",
- "NsecToTimeval",
- "Ntohs",
- "OCRNL",
- "OFDEL",
- "OFILL",
- "OFIOGETBMAP",
- "OID_PKIX_KP_SERVER_AUTH",
- "OID_SERVER_GATED_CRYPTO",
- "OID_SGC_NETSCAPE",
- "OLCUC",
- "ONLCR",
- "ONLRET",
- "ONOCR",
- "ONOEOT",
- "OPEN_ALWAYS",
- "OPEN_EXISTING",
- "OPOST",
- "O_ACCMODE",
- "O_ALERT",
- "O_ALT_IO",
- "O_APPEND",
- "O_ASYNC",
- "O_CLOEXEC",
- "O_CREAT",
- "O_DIRECT",
- "O_DIRECTORY",
- "O_DP_GETRAWENCRYPTED",
- "O_DSYNC",
- "O_EVTONLY",
- "O_EXCL",
- "O_EXEC",
- "O_EXLOCK",
- "O_FSYNC",
- "O_LARGEFILE",
- "O_NDELAY",
- "O_NOATIME",
- "O_NOCTTY",
- "O_NOFOLLOW",
- "O_NONBLOCK",
- "O_NOSIGPIPE",
- "O_POPUP",
- "O_RDONLY",
- "O_RDWR",
- "O_RSYNC",
- "O_SHLOCK",
- "O_SYMLINK",
- "O_SYNC",
- "O_TRUNC",
- "O_TTY_INIT",
- "O_WRONLY",
- "Open",
- "OpenCurrentProcessToken",
- "OpenProcess",
- "OpenProcessToken",
- "Openat",
- "Overlapped",
- "PACKET_ADD_MEMBERSHIP",
- "PACKET_BROADCAST",
- "PACKET_DROP_MEMBERSHIP",
- "PACKET_FASTROUTE",
- "PACKET_HOST",
- "PACKET_LOOPBACK",
- "PACKET_MR_ALLMULTI",
- "PACKET_MR_MULTICAST",
- "PACKET_MR_PROMISC",
- "PACKET_MULTICAST",
- "PACKET_OTHERHOST",
- "PACKET_OUTGOING",
- "PACKET_RECV_OUTPUT",
- "PACKET_RX_RING",
- "PACKET_STATISTICS",
- "PAGE_EXECUTE_READ",
- "PAGE_EXECUTE_READWRITE",
- "PAGE_EXECUTE_WRITECOPY",
- "PAGE_READONLY",
- "PAGE_READWRITE",
- "PAGE_WRITECOPY",
- "PARENB",
- "PARMRK",
- "PARODD",
- "PENDIN",
- "PFL_HIDDEN",
- "PFL_MATCHES_PROTOCOL_ZERO",
- "PFL_MULTIPLE_PROTO_ENTRIES",
- "PFL_NETWORKDIRECT_PROVIDER",
- "PFL_RECOMMENDED_PROTO_ENTRY",
- "PF_FLUSH",
- "PKCS_7_ASN_ENCODING",
- "PMC5_PIPELINE_FLUSH",
- "PRIO_PGRP",
- "PRIO_PROCESS",
- "PRIO_USER",
- "PRI_IOFLUSH",
- "PROCESS_QUERY_INFORMATION",
- "PROCESS_TERMINATE",
- "PROT_EXEC",
- "PROT_GROWSDOWN",
- "PROT_GROWSUP",
- "PROT_NONE",
- "PROT_READ",
- "PROT_WRITE",
- "PROV_DH_SCHANNEL",
- "PROV_DSS",
- "PROV_DSS_DH",
- "PROV_EC_ECDSA_FULL",
- "PROV_EC_ECDSA_SIG",
- "PROV_EC_ECNRA_FULL",
- "PROV_EC_ECNRA_SIG",
- "PROV_FORTEZZA",
- "PROV_INTEL_SEC",
- "PROV_MS_EXCHANGE",
- "PROV_REPLACE_OWF",
- "PROV_RNG",
- "PROV_RSA_AES",
- "PROV_RSA_FULL",
- "PROV_RSA_SCHANNEL",
- "PROV_RSA_SIG",
- "PROV_SPYRUS_LYNKS",
- "PROV_SSL",
- "PR_CAPBSET_DROP",
- "PR_CAPBSET_READ",
- "PR_CLEAR_SECCOMP_FILTER",
- "PR_ENDIAN_BIG",
- "PR_ENDIAN_LITTLE",
- "PR_ENDIAN_PPC_LITTLE",
- "PR_FPEMU_NOPRINT",
- "PR_FPEMU_SIGFPE",
- "PR_FP_EXC_ASYNC",
- "PR_FP_EXC_DISABLED",
- "PR_FP_EXC_DIV",
- "PR_FP_EXC_INV",
- "PR_FP_EXC_NONRECOV",
- "PR_FP_EXC_OVF",
- "PR_FP_EXC_PRECISE",
- "PR_FP_EXC_RES",
- "PR_FP_EXC_SW_ENABLE",
- "PR_FP_EXC_UND",
- "PR_GET_DUMPABLE",
- "PR_GET_ENDIAN",
- "PR_GET_FPEMU",
- "PR_GET_FPEXC",
- "PR_GET_KEEPCAPS",
- "PR_GET_NAME",
- "PR_GET_PDEATHSIG",
- "PR_GET_SECCOMP",
- "PR_GET_SECCOMP_FILTER",
- "PR_GET_SECUREBITS",
- "PR_GET_TIMERSLACK",
- "PR_GET_TIMING",
- "PR_GET_TSC",
- "PR_GET_UNALIGN",
- "PR_MCE_KILL",
- "PR_MCE_KILL_CLEAR",
- "PR_MCE_KILL_DEFAULT",
- "PR_MCE_KILL_EARLY",
- "PR_MCE_KILL_GET",
- "PR_MCE_KILL_LATE",
- "PR_MCE_KILL_SET",
- "PR_SECCOMP_FILTER_EVENT",
- "PR_SECCOMP_FILTER_SYSCALL",
- "PR_SET_DUMPABLE",
- "PR_SET_ENDIAN",
- "PR_SET_FPEMU",
- "PR_SET_FPEXC",
- "PR_SET_KEEPCAPS",
- "PR_SET_NAME",
- "PR_SET_PDEATHSIG",
- "PR_SET_PTRACER",
- "PR_SET_SECCOMP",
- "PR_SET_SECCOMP_FILTER",
- "PR_SET_SECUREBITS",
- "PR_SET_TIMERSLACK",
- "PR_SET_TIMING",
- "PR_SET_TSC",
- "PR_SET_UNALIGN",
- "PR_TASK_PERF_EVENTS_DISABLE",
- "PR_TASK_PERF_EVENTS_ENABLE",
- "PR_TIMING_STATISTICAL",
- "PR_TIMING_TIMESTAMP",
- "PR_TSC_ENABLE",
- "PR_TSC_SIGSEGV",
- "PR_UNALIGN_NOPRINT",
- "PR_UNALIGN_SIGBUS",
- "PTRACE_ARCH_PRCTL",
- "PTRACE_ATTACH",
- "PTRACE_CONT",
- "PTRACE_DETACH",
- "PTRACE_EVENT_CLONE",
- "PTRACE_EVENT_EXEC",
- "PTRACE_EVENT_EXIT",
- "PTRACE_EVENT_FORK",
- "PTRACE_EVENT_VFORK",
- "PTRACE_EVENT_VFORK_DONE",
- "PTRACE_GETCRUNCHREGS",
- "PTRACE_GETEVENTMSG",
- "PTRACE_GETFPREGS",
- "PTRACE_GETFPXREGS",
- "PTRACE_GETHBPREGS",
- "PTRACE_GETREGS",
- "PTRACE_GETREGSET",
- "PTRACE_GETSIGINFO",
- "PTRACE_GETVFPREGS",
- "PTRACE_GETWMMXREGS",
- "PTRACE_GET_THREAD_AREA",
- "PTRACE_KILL",
- "PTRACE_OLDSETOPTIONS",
- "PTRACE_O_MASK",
- "PTRACE_O_TRACECLONE",
- "PTRACE_O_TRACEEXEC",
- "PTRACE_O_TRACEEXIT",
- "PTRACE_O_TRACEFORK",
- "PTRACE_O_TRACESYSGOOD",
- "PTRACE_O_TRACEVFORK",
- "PTRACE_O_TRACEVFORKDONE",
- "PTRACE_PEEKDATA",
- "PTRACE_PEEKTEXT",
- "PTRACE_PEEKUSR",
- "PTRACE_POKEDATA",
- "PTRACE_POKETEXT",
- "PTRACE_POKEUSR",
- "PTRACE_SETCRUNCHREGS",
- "PTRACE_SETFPREGS",
- "PTRACE_SETFPXREGS",
- "PTRACE_SETHBPREGS",
- "PTRACE_SETOPTIONS",
- "PTRACE_SETREGS",
- "PTRACE_SETREGSET",
- "PTRACE_SETSIGINFO",
- "PTRACE_SETVFPREGS",
- "PTRACE_SETWMMXREGS",
- "PTRACE_SET_SYSCALL",
- "PTRACE_SET_THREAD_AREA",
- "PTRACE_SINGLEBLOCK",
- "PTRACE_SINGLESTEP",
- "PTRACE_SYSCALL",
- "PTRACE_SYSEMU",
- "PTRACE_SYSEMU_SINGLESTEP",
- "PTRACE_TRACEME",
- "PT_ATTACH",
- "PT_ATTACHEXC",
- "PT_CONTINUE",
- "PT_DATA_ADDR",
- "PT_DENY_ATTACH",
- "PT_DETACH",
- "PT_FIRSTMACH",
- "PT_FORCEQUOTA",
- "PT_KILL",
- "PT_MASK",
- "PT_READ_D",
- "PT_READ_I",
- "PT_READ_U",
- "PT_SIGEXC",
- "PT_STEP",
- "PT_TEXT_ADDR",
- "PT_TEXT_END_ADDR",
- "PT_THUPDATE",
- "PT_TRACE_ME",
- "PT_WRITE_D",
- "PT_WRITE_I",
- "PT_WRITE_U",
- "ParseDirent",
- "ParseNetlinkMessage",
- "ParseNetlinkRouteAttr",
- "ParseRoutingMessage",
- "ParseRoutingSockaddr",
- "ParseSocketControlMessage",
- "ParseUnixCredentials",
- "ParseUnixRights",
- "PathMax",
- "Pathconf",
- "Pause",
- "Pipe",
- "Pipe2",
- "PivotRoot",
- "Pointer",
- "PostQueuedCompletionStatus",
- "Pread",
- "Proc",
- "ProcAttr",
- "Process32First",
- "Process32Next",
- "ProcessEntry32",
- "ProcessInformation",
- "Protoent",
- "PtraceAttach",
- "PtraceCont",
- "PtraceDetach",
- "PtraceGetEventMsg",
- "PtraceGetRegs",
- "PtracePeekData",
- "PtracePeekText",
- "PtracePokeData",
- "PtracePokeText",
- "PtraceRegs",
- "PtraceSetOptions",
- "PtraceSetRegs",
- "PtraceSingleStep",
- "PtraceSyscall",
- "Pwrite",
- "REG_BINARY",
- "REG_DWORD",
- "REG_DWORD_BIG_ENDIAN",
- "REG_DWORD_LITTLE_ENDIAN",
- "REG_EXPAND_SZ",
- "REG_FULL_RESOURCE_DESCRIPTOR",
- "REG_LINK",
- "REG_MULTI_SZ",
- "REG_NONE",
- "REG_QWORD",
- "REG_QWORD_LITTLE_ENDIAN",
- "REG_RESOURCE_LIST",
- "REG_RESOURCE_REQUIREMENTS_LIST",
- "REG_SZ",
- "RLIMIT_AS",
- "RLIMIT_CORE",
- "RLIMIT_CPU",
- "RLIMIT_CPU_USAGE_MONITOR",
- "RLIMIT_DATA",
- "RLIMIT_FSIZE",
- "RLIMIT_NOFILE",
- "RLIMIT_STACK",
- "RLIM_INFINITY",
- "RTAX_ADVMSS",
- "RTAX_AUTHOR",
- "RTAX_BRD",
- "RTAX_CWND",
- "RTAX_DST",
- "RTAX_FEATURES",
- "RTAX_FEATURE_ALLFRAG",
- "RTAX_FEATURE_ECN",
- "RTAX_FEATURE_SACK",
- "RTAX_FEATURE_TIMESTAMP",
- "RTAX_GATEWAY",
- "RTAX_GENMASK",
- "RTAX_HOPLIMIT",
- "RTAX_IFA",
- "RTAX_IFP",
- "RTAX_INITCWND",
- "RTAX_INITRWND",
- "RTAX_LABEL",
- "RTAX_LOCK",
- "RTAX_MAX",
- "RTAX_MTU",
- "RTAX_NETMASK",
- "RTAX_REORDERING",
- "RTAX_RTO_MIN",
- "RTAX_RTT",
- "RTAX_RTTVAR",
- "RTAX_SRC",
- "RTAX_SRCMASK",
- "RTAX_SSTHRESH",
- "RTAX_TAG",
- "RTAX_UNSPEC",
- "RTAX_WINDOW",
- "RTA_ALIGNTO",
- "RTA_AUTHOR",
- "RTA_BRD",
- "RTA_CACHEINFO",
- "RTA_DST",
- "RTA_FLOW",
- "RTA_GATEWAY",
- "RTA_GENMASK",
- "RTA_IFA",
- "RTA_IFP",
- "RTA_IIF",
- "RTA_LABEL",
- "RTA_MAX",
- "RTA_METRICS",
- "RTA_MULTIPATH",
- "RTA_NETMASK",
- "RTA_OIF",
- "RTA_PREFSRC",
- "RTA_PRIORITY",
- "RTA_SRC",
- "RTA_SRCMASK",
- "RTA_TABLE",
- "RTA_TAG",
- "RTA_UNSPEC",
- "RTCF_DIRECTSRC",
- "RTCF_DOREDIRECT",
- "RTCF_LOG",
- "RTCF_MASQ",
- "RTCF_NAT",
- "RTCF_VALVE",
- "RTF_ADDRCLASSMASK",
- "RTF_ADDRCONF",
- "RTF_ALLONLINK",
- "RTF_ANNOUNCE",
- "RTF_BLACKHOLE",
- "RTF_BROADCAST",
- "RTF_CACHE",
- "RTF_CLONED",
- "RTF_CLONING",
- "RTF_CONDEMNED",
- "RTF_DEFAULT",
- "RTF_DELCLONE",
- "RTF_DONE",
- "RTF_DYNAMIC",
- "RTF_FLOW",
- "RTF_FMASK",
- "RTF_GATEWAY",
- "RTF_GWFLAG_COMPAT",
- "RTF_HOST",
- "RTF_IFREF",
- "RTF_IFSCOPE",
- "RTF_INTERFACE",
- "RTF_IRTT",
- "RTF_LINKRT",
- "RTF_LLDATA",
- "RTF_LLINFO",
- "RTF_LOCAL",
- "RTF_MASK",
- "RTF_MODIFIED",
- "RTF_MPATH",
- "RTF_MPLS",
- "RTF_MSS",
- "RTF_MTU",
- "RTF_MULTICAST",
- "RTF_NAT",
- "RTF_NOFORWARD",
- "RTF_NONEXTHOP",
- "RTF_NOPMTUDISC",
- "RTF_PERMANENT_ARP",
- "RTF_PINNED",
- "RTF_POLICY",
- "RTF_PRCLONING",
- "RTF_PROTO1",
- "RTF_PROTO2",
- "RTF_PROTO3",
- "RTF_PROXY",
- "RTF_REINSTATE",
- "RTF_REJECT",
- "RTF_RNH_LOCKED",
- "RTF_ROUTER",
- "RTF_SOURCE",
- "RTF_SRC",
- "RTF_STATIC",
- "RTF_STICKY",
- "RTF_THROW",
- "RTF_TUNNEL",
- "RTF_UP",
- "RTF_USETRAILERS",
- "RTF_WASCLONED",
- "RTF_WINDOW",
- "RTF_XRESOLVE",
- "RTM_ADD",
- "RTM_BASE",
- "RTM_CHANGE",
- "RTM_CHGADDR",
- "RTM_DELACTION",
- "RTM_DELADDR",
- "RTM_DELADDRLABEL",
- "RTM_DELETE",
- "RTM_DELLINK",
- "RTM_DELMADDR",
- "RTM_DELNEIGH",
- "RTM_DELQDISC",
- "RTM_DELROUTE",
- "RTM_DELRULE",
- "RTM_DELTCLASS",
- "RTM_DELTFILTER",
- "RTM_DESYNC",
- "RTM_F_CLONED",
- "RTM_F_EQUALIZE",
- "RTM_F_NOTIFY",
- "RTM_F_PREFIX",
- "RTM_GET",
- "RTM_GET2",
- "RTM_GETACTION",
- "RTM_GETADDR",
- "RTM_GETADDRLABEL",
- "RTM_GETANYCAST",
- "RTM_GETDCB",
- "RTM_GETLINK",
- "RTM_GETMULTICAST",
- "RTM_GETNEIGH",
- "RTM_GETNEIGHTBL",
- "RTM_GETQDISC",
- "RTM_GETROUTE",
- "RTM_GETRULE",
- "RTM_GETTCLASS",
- "RTM_GETTFILTER",
- "RTM_IEEE80211",
- "RTM_IFANNOUNCE",
- "RTM_IFINFO",
- "RTM_IFINFO2",
- "RTM_LLINFO_UPD",
- "RTM_LOCK",
- "RTM_LOSING",
- "RTM_MAX",
- "RTM_MAXSIZE",
- "RTM_MISS",
- "RTM_NEWACTION",
- "RTM_NEWADDR",
- "RTM_NEWADDRLABEL",
- "RTM_NEWLINK",
- "RTM_NEWMADDR",
- "RTM_NEWMADDR2",
- "RTM_NEWNDUSEROPT",
- "RTM_NEWNEIGH",
- "RTM_NEWNEIGHTBL",
- "RTM_NEWPREFIX",
- "RTM_NEWQDISC",
- "RTM_NEWROUTE",
- "RTM_NEWRULE",
- "RTM_NEWTCLASS",
- "RTM_NEWTFILTER",
- "RTM_NR_FAMILIES",
- "RTM_NR_MSGTYPES",
- "RTM_OIFINFO",
- "RTM_OLDADD",
- "RTM_OLDDEL",
- "RTM_OOIFINFO",
- "RTM_REDIRECT",
- "RTM_RESOLVE",
- "RTM_RTTUNIT",
- "RTM_SETDCB",
- "RTM_SETGATE",
- "RTM_SETLINK",
- "RTM_SETNEIGHTBL",
- "RTM_VERSION",
- "RTNH_ALIGNTO",
- "RTNH_F_DEAD",
- "RTNH_F_ONLINK",
- "RTNH_F_PERVASIVE",
- "RTNLGRP_IPV4_IFADDR",
- "RTNLGRP_IPV4_MROUTE",
- "RTNLGRP_IPV4_ROUTE",
- "RTNLGRP_IPV4_RULE",
- "RTNLGRP_IPV6_IFADDR",
- "RTNLGRP_IPV6_IFINFO",
- "RTNLGRP_IPV6_MROUTE",
- "RTNLGRP_IPV6_PREFIX",
- "RTNLGRP_IPV6_ROUTE",
- "RTNLGRP_IPV6_RULE",
- "RTNLGRP_LINK",
- "RTNLGRP_ND_USEROPT",
- "RTNLGRP_NEIGH",
- "RTNLGRP_NONE",
- "RTNLGRP_NOTIFY",
- "RTNLGRP_TC",
- "RTN_ANYCAST",
- "RTN_BLACKHOLE",
- "RTN_BROADCAST",
- "RTN_LOCAL",
- "RTN_MAX",
- "RTN_MULTICAST",
- "RTN_NAT",
- "RTN_PROHIBIT",
- "RTN_THROW",
- "RTN_UNICAST",
- "RTN_UNREACHABLE",
- "RTN_UNSPEC",
- "RTN_XRESOLVE",
- "RTPROT_BIRD",
- "RTPROT_BOOT",
- "RTPROT_DHCP",
- "RTPROT_DNROUTED",
- "RTPROT_GATED",
- "RTPROT_KERNEL",
- "RTPROT_MRT",
- "RTPROT_NTK",
- "RTPROT_RA",
- "RTPROT_REDIRECT",
- "RTPROT_STATIC",
- "RTPROT_UNSPEC",
- "RTPROT_XORP",
- "RTPROT_ZEBRA",
- "RTV_EXPIRE",
- "RTV_HOPCOUNT",
- "RTV_MTU",
- "RTV_RPIPE",
- "RTV_RTT",
- "RTV_RTTVAR",
- "RTV_SPIPE",
- "RTV_SSTHRESH",
- "RTV_WEIGHT",
- "RT_CACHING_CONTEXT",
- "RT_CLASS_DEFAULT",
- "RT_CLASS_LOCAL",
- "RT_CLASS_MAIN",
- "RT_CLASS_MAX",
- "RT_CLASS_UNSPEC",
- "RT_DEFAULT_FIB",
- "RT_NORTREF",
- "RT_SCOPE_HOST",
- "RT_SCOPE_LINK",
- "RT_SCOPE_NOWHERE",
- "RT_SCOPE_SITE",
- "RT_SCOPE_UNIVERSE",
- "RT_TABLEID_MAX",
- "RT_TABLE_COMPAT",
- "RT_TABLE_DEFAULT",
- "RT_TABLE_LOCAL",
- "RT_TABLE_MAIN",
- "RT_TABLE_MAX",
- "RT_TABLE_UNSPEC",
- "RUSAGE_CHILDREN",
- "RUSAGE_SELF",
- "RUSAGE_THREAD",
- "Radvisory_t",
- "RawConn",
- "RawSockaddr",
- "RawSockaddrAny",
- "RawSockaddrDatalink",
- "RawSockaddrInet4",
- "RawSockaddrInet6",
- "RawSockaddrLinklayer",
- "RawSockaddrNetlink",
- "RawSockaddrUnix",
- "RawSyscall",
- "RawSyscall6",
- "Read",
- "ReadConsole",
- "ReadDirectoryChanges",
- "ReadDirent",
- "ReadFile",
- "Readlink",
- "Reboot",
- "Recvfrom",
- "Recvmsg",
- "RegCloseKey",
- "RegEnumKeyEx",
- "RegOpenKeyEx",
- "RegQueryInfoKey",
- "RegQueryValueEx",
- "RemoveDirectory",
- "Removexattr",
- "Rename",
- "Renameat",
- "Revoke",
- "Rlimit",
- "Rmdir",
- "RouteMessage",
- "RouteRIB",
- "RoutingMessage",
- "RtAttr",
- "RtGenmsg",
- "RtMetrics",
- "RtMsg",
- "RtMsghdr",
- "RtNexthop",
- "Rusage",
- "SCM_BINTIME",
- "SCM_CREDENTIALS",
- "SCM_CREDS",
- "SCM_RIGHTS",
- "SCM_TIMESTAMP",
- "SCM_TIMESTAMPING",
- "SCM_TIMESTAMPNS",
- "SCM_TIMESTAMP_MONOTONIC",
- "SHUT_RD",
- "SHUT_RDWR",
- "SHUT_WR",
- "SID",
- "SIDAndAttributes",
- "SIGABRT",
- "SIGALRM",
- "SIGBUS",
- "SIGCHLD",
- "SIGCLD",
- "SIGCONT",
- "SIGEMT",
- "SIGFPE",
- "SIGHUP",
- "SIGILL",
- "SIGINFO",
- "SIGINT",
- "SIGIO",
- "SIGIOT",
- "SIGKILL",
- "SIGLIBRT",
- "SIGLWP",
- "SIGPIPE",
- "SIGPOLL",
- "SIGPROF",
- "SIGPWR",
- "SIGQUIT",
- "SIGSEGV",
- "SIGSTKFLT",
- "SIGSTOP",
- "SIGSYS",
- "SIGTERM",
- "SIGTHR",
- "SIGTRAP",
- "SIGTSTP",
- "SIGTTIN",
- "SIGTTOU",
- "SIGUNUSED",
- "SIGURG",
- "SIGUSR1",
- "SIGUSR2",
- "SIGVTALRM",
- "SIGWINCH",
- "SIGXCPU",
- "SIGXFSZ",
- "SIOCADDDLCI",
- "SIOCADDMULTI",
- "SIOCADDRT",
- "SIOCAIFADDR",
- "SIOCAIFGROUP",
- "SIOCALIFADDR",
- "SIOCARPIPLL",
- "SIOCATMARK",
- "SIOCAUTOADDR",
- "SIOCAUTONETMASK",
- "SIOCBRDGADD",
- "SIOCBRDGADDS",
- "SIOCBRDGARL",
- "SIOCBRDGDADDR",
- "SIOCBRDGDEL",
- "SIOCBRDGDELS",
- "SIOCBRDGFLUSH",
- "SIOCBRDGFRL",
- "SIOCBRDGGCACHE",
- "SIOCBRDGGFD",
- "SIOCBRDGGHT",
- "SIOCBRDGGIFFLGS",
- "SIOCBRDGGMA",
- "SIOCBRDGGPARAM",
- "SIOCBRDGGPRI",
- "SIOCBRDGGRL",
- "SIOCBRDGGSIFS",
- "SIOCBRDGGTO",
- "SIOCBRDGIFS",
- "SIOCBRDGRTS",
- "SIOCBRDGSADDR",
- "SIOCBRDGSCACHE",
- "SIOCBRDGSFD",
- "SIOCBRDGSHT",
- "SIOCBRDGSIFCOST",
- "SIOCBRDGSIFFLGS",
- "SIOCBRDGSIFPRIO",
- "SIOCBRDGSMA",
- "SIOCBRDGSPRI",
- "SIOCBRDGSPROTO",
- "SIOCBRDGSTO",
- "SIOCBRDGSTXHC",
- "SIOCDARP",
- "SIOCDELDLCI",
- "SIOCDELMULTI",
- "SIOCDELRT",
- "SIOCDEVPRIVATE",
- "SIOCDIFADDR",
- "SIOCDIFGROUP",
- "SIOCDIFPHYADDR",
- "SIOCDLIFADDR",
- "SIOCDRARP",
- "SIOCGARP",
- "SIOCGDRVSPEC",
- "SIOCGETKALIVE",
- "SIOCGETLABEL",
- "SIOCGETPFLOW",
- "SIOCGETPFSYNC",
- "SIOCGETSGCNT",
- "SIOCGETVIFCNT",
- "SIOCGETVLAN",
- "SIOCGHIWAT",
- "SIOCGIFADDR",
- "SIOCGIFADDRPREF",
- "SIOCGIFALIAS",
- "SIOCGIFALTMTU",
- "SIOCGIFASYNCMAP",
- "SIOCGIFBOND",
- "SIOCGIFBR",
- "SIOCGIFBRDADDR",
- "SIOCGIFCAP",
- "SIOCGIFCONF",
- "SIOCGIFCOUNT",
- "SIOCGIFDATA",
- "SIOCGIFDESCR",
- "SIOCGIFDEVMTU",
- "SIOCGIFDLT",
- "SIOCGIFDSTADDR",
- "SIOCGIFENCAP",
- "SIOCGIFFIB",
- "SIOCGIFFLAGS",
- "SIOCGIFGATTR",
- "SIOCGIFGENERIC",
- "SIOCGIFGMEMB",
- "SIOCGIFGROUP",
- "SIOCGIFHARDMTU",
- "SIOCGIFHWADDR",
- "SIOCGIFINDEX",
- "SIOCGIFKPI",
- "SIOCGIFMAC",
- "SIOCGIFMAP",
- "SIOCGIFMEDIA",
- "SIOCGIFMEM",
- "SIOCGIFMETRIC",
- "SIOCGIFMTU",
- "SIOCGIFNAME",
- "SIOCGIFNETMASK",
- "SIOCGIFPDSTADDR",
- "SIOCGIFPFLAGS",
- "SIOCGIFPHYS",
- "SIOCGIFPRIORITY",
- "SIOCGIFPSRCADDR",
- "SIOCGIFRDOMAIN",
- "SIOCGIFRTLABEL",
- "SIOCGIFSLAVE",
- "SIOCGIFSTATUS",
- "SIOCGIFTIMESLOT",
- "SIOCGIFTXQLEN",
- "SIOCGIFVLAN",
- "SIOCGIFWAKEFLAGS",
- "SIOCGIFXFLAGS",
- "SIOCGLIFADDR",
- "SIOCGLIFPHYADDR",
- "SIOCGLIFPHYRTABLE",
- "SIOCGLIFPHYTTL",
- "SIOCGLINKSTR",
- "SIOCGLOWAT",
- "SIOCGPGRP",
- "SIOCGPRIVATE_0",
- "SIOCGPRIVATE_1",
- "SIOCGRARP",
- "SIOCGSPPPPARAMS",
- "SIOCGSTAMP",
- "SIOCGSTAMPNS",
- "SIOCGVH",
- "SIOCGVNETID",
- "SIOCIFCREATE",
- "SIOCIFCREATE2",
- "SIOCIFDESTROY",
- "SIOCIFGCLONERS",
- "SIOCINITIFADDR",
- "SIOCPROTOPRIVATE",
- "SIOCRSLVMULTI",
- "SIOCRTMSG",
- "SIOCSARP",
- "SIOCSDRVSPEC",
- "SIOCSETKALIVE",
- "SIOCSETLABEL",
- "SIOCSETPFLOW",
- "SIOCSETPFSYNC",
- "SIOCSETVLAN",
- "SIOCSHIWAT",
- "SIOCSIFADDR",
- "SIOCSIFADDRPREF",
- "SIOCSIFALTMTU",
- "SIOCSIFASYNCMAP",
- "SIOCSIFBOND",
- "SIOCSIFBR",
- "SIOCSIFBRDADDR",
- "SIOCSIFCAP",
- "SIOCSIFDESCR",
- "SIOCSIFDSTADDR",
- "SIOCSIFENCAP",
- "SIOCSIFFIB",
- "SIOCSIFFLAGS",
- "SIOCSIFGATTR",
- "SIOCSIFGENERIC",
- "SIOCSIFHWADDR",
- "SIOCSIFHWBROADCAST",
- "SIOCSIFKPI",
- "SIOCSIFLINK",
- "SIOCSIFLLADDR",
- "SIOCSIFMAC",
- "SIOCSIFMAP",
- "SIOCSIFMEDIA",
- "SIOCSIFMEM",
- "SIOCSIFMETRIC",
- "SIOCSIFMTU",
- "SIOCSIFNAME",
- "SIOCSIFNETMASK",
- "SIOCSIFPFLAGS",
- "SIOCSIFPHYADDR",
- "SIOCSIFPHYS",
- "SIOCSIFPRIORITY",
- "SIOCSIFRDOMAIN",
- "SIOCSIFRTLABEL",
- "SIOCSIFRVNET",
- "SIOCSIFSLAVE",
- "SIOCSIFTIMESLOT",
- "SIOCSIFTXQLEN",
- "SIOCSIFVLAN",
- "SIOCSIFVNET",
- "SIOCSIFXFLAGS",
- "SIOCSLIFPHYADDR",
- "SIOCSLIFPHYRTABLE",
- "SIOCSLIFPHYTTL",
- "SIOCSLINKSTR",
- "SIOCSLOWAT",
- "SIOCSPGRP",
- "SIOCSRARP",
- "SIOCSSPPPPARAMS",
- "SIOCSVH",
- "SIOCSVNETID",
- "SIOCZIFDATA",
- "SIO_GET_EXTENSION_FUNCTION_POINTER",
- "SIO_GET_INTERFACE_LIST",
- "SIO_KEEPALIVE_VALS",
- "SIO_UDP_CONNRESET",
- "SOCK_CLOEXEC",
- "SOCK_DCCP",
- "SOCK_DGRAM",
- "SOCK_FLAGS_MASK",
- "SOCK_MAXADDRLEN",
- "SOCK_NONBLOCK",
- "SOCK_NOSIGPIPE",
- "SOCK_PACKET",
- "SOCK_RAW",
- "SOCK_RDM",
- "SOCK_SEQPACKET",
- "SOCK_STREAM",
- "SOL_AAL",
- "SOL_ATM",
- "SOL_DECNET",
- "SOL_ICMPV6",
- "SOL_IP",
- "SOL_IPV6",
- "SOL_IRDA",
- "SOL_PACKET",
- "SOL_RAW",
- "SOL_SOCKET",
- "SOL_TCP",
- "SOL_X25",
- "SOMAXCONN",
- "SO_ACCEPTCONN",
- "SO_ACCEPTFILTER",
- "SO_ATTACH_FILTER",
- "SO_BINDANY",
- "SO_BINDTODEVICE",
- "SO_BINTIME",
- "SO_BROADCAST",
- "SO_BSDCOMPAT",
- "SO_DEBUG",
- "SO_DETACH_FILTER",
- "SO_DOMAIN",
- "SO_DONTROUTE",
- "SO_DONTTRUNC",
- "SO_ERROR",
- "SO_KEEPALIVE",
- "SO_LABEL",
- "SO_LINGER",
- "SO_LINGER_SEC",
- "SO_LISTENINCQLEN",
- "SO_LISTENQLEN",
- "SO_LISTENQLIMIT",
- "SO_MARK",
- "SO_NETPROC",
- "SO_NKE",
- "SO_NOADDRERR",
- "SO_NOHEADER",
- "SO_NOSIGPIPE",
- "SO_NOTIFYCONFLICT",
- "SO_NO_CHECK",
- "SO_NO_DDP",
- "SO_NO_OFFLOAD",
- "SO_NP_EXTENSIONS",
- "SO_NREAD",
- "SO_NUMRCVPKT",
- "SO_NWRITE",
- "SO_OOBINLINE",
- "SO_OVERFLOWED",
- "SO_PASSCRED",
- "SO_PASSSEC",
- "SO_PEERCRED",
- "SO_PEERLABEL",
- "SO_PEERNAME",
- "SO_PEERSEC",
- "SO_PRIORITY",
- "SO_PROTOCOL",
- "SO_PROTOTYPE",
- "SO_RANDOMPORT",
- "SO_RCVBUF",
- "SO_RCVBUFFORCE",
- "SO_RCVLOWAT",
- "SO_RCVTIMEO",
- "SO_RESTRICTIONS",
- "SO_RESTRICT_DENYIN",
- "SO_RESTRICT_DENYOUT",
- "SO_RESTRICT_DENYSET",
- "SO_REUSEADDR",
- "SO_REUSEPORT",
- "SO_REUSESHAREUID",
- "SO_RTABLE",
- "SO_RXQ_OVFL",
- "SO_SECURITY_AUTHENTICATION",
- "SO_SECURITY_ENCRYPTION_NETWORK",
- "SO_SECURITY_ENCRYPTION_TRANSPORT",
- "SO_SETFIB",
- "SO_SNDBUF",
- "SO_SNDBUFFORCE",
- "SO_SNDLOWAT",
- "SO_SNDTIMEO",
- "SO_SPLICE",
- "SO_TIMESTAMP",
- "SO_TIMESTAMPING",
- "SO_TIMESTAMPNS",
- "SO_TIMESTAMP_MONOTONIC",
- "SO_TYPE",
- "SO_UPCALLCLOSEWAIT",
- "SO_UPDATE_ACCEPT_CONTEXT",
- "SO_UPDATE_CONNECT_CONTEXT",
- "SO_USELOOPBACK",
- "SO_USER_COOKIE",
- "SO_VENDOR",
- "SO_WANTMORE",
- "SO_WANTOOBFLAG",
- "SSLExtraCertChainPolicyPara",
- "STANDARD_RIGHTS_ALL",
- "STANDARD_RIGHTS_EXECUTE",
- "STANDARD_RIGHTS_READ",
- "STANDARD_RIGHTS_REQUIRED",
- "STANDARD_RIGHTS_WRITE",
- "STARTF_USESHOWWINDOW",
- "STARTF_USESTDHANDLES",
- "STD_ERROR_HANDLE",
- "STD_INPUT_HANDLE",
- "STD_OUTPUT_HANDLE",
- "SUBLANG_ENGLISH_US",
- "SW_FORCEMINIMIZE",
- "SW_HIDE",
- "SW_MAXIMIZE",
- "SW_MINIMIZE",
- "SW_NORMAL",
- "SW_RESTORE",
- "SW_SHOW",
- "SW_SHOWDEFAULT",
- "SW_SHOWMAXIMIZED",
- "SW_SHOWMINIMIZED",
- "SW_SHOWMINNOACTIVE",
- "SW_SHOWNA",
- "SW_SHOWNOACTIVATE",
- "SW_SHOWNORMAL",
- "SYMBOLIC_LINK_FLAG_DIRECTORY",
- "SYNCHRONIZE",
- "SYSCTL_VERSION",
- "SYSCTL_VERS_0",
- "SYSCTL_VERS_1",
- "SYSCTL_VERS_MASK",
- "SYS_ABORT2",
- "SYS_ACCEPT",
- "SYS_ACCEPT4",
- "SYS_ACCEPT_NOCANCEL",
- "SYS_ACCESS",
- "SYS_ACCESS_EXTENDED",
- "SYS_ACCT",
- "SYS_ADD_KEY",
- "SYS_ADD_PROFIL",
- "SYS_ADJFREQ",
- "SYS_ADJTIME",
- "SYS_ADJTIMEX",
- "SYS_AFS_SYSCALL",
- "SYS_AIO_CANCEL",
- "SYS_AIO_ERROR",
- "SYS_AIO_FSYNC",
- "SYS_AIO_MLOCK",
- "SYS_AIO_READ",
- "SYS_AIO_RETURN",
- "SYS_AIO_SUSPEND",
- "SYS_AIO_SUSPEND_NOCANCEL",
- "SYS_AIO_WAITCOMPLETE",
- "SYS_AIO_WRITE",
- "SYS_ALARM",
- "SYS_ARCH_PRCTL",
- "SYS_ARM_FADVISE64_64",
- "SYS_ARM_SYNC_FILE_RANGE",
- "SYS_ATGETMSG",
- "SYS_ATPGETREQ",
- "SYS_ATPGETRSP",
- "SYS_ATPSNDREQ",
- "SYS_ATPSNDRSP",
- "SYS_ATPUTMSG",
- "SYS_ATSOCKET",
- "SYS_AUDIT",
- "SYS_AUDITCTL",
- "SYS_AUDITON",
- "SYS_AUDIT_SESSION_JOIN",
- "SYS_AUDIT_SESSION_PORT",
- "SYS_AUDIT_SESSION_SELF",
- "SYS_BDFLUSH",
- "SYS_BIND",
- "SYS_BINDAT",
- "SYS_BREAK",
- "SYS_BRK",
- "SYS_BSDTHREAD_CREATE",
- "SYS_BSDTHREAD_REGISTER",
- "SYS_BSDTHREAD_TERMINATE",
- "SYS_CAPGET",
- "SYS_CAPSET",
- "SYS_CAP_ENTER",
- "SYS_CAP_FCNTLS_GET",
- "SYS_CAP_FCNTLS_LIMIT",
- "SYS_CAP_GETMODE",
- "SYS_CAP_GETRIGHTS",
- "SYS_CAP_IOCTLS_GET",
- "SYS_CAP_IOCTLS_LIMIT",
- "SYS_CAP_NEW",
- "SYS_CAP_RIGHTS_GET",
- "SYS_CAP_RIGHTS_LIMIT",
- "SYS_CHDIR",
- "SYS_CHFLAGS",
- "SYS_CHFLAGSAT",
- "SYS_CHMOD",
- "SYS_CHMOD_EXTENDED",
- "SYS_CHOWN",
- "SYS_CHOWN32",
- "SYS_CHROOT",
- "SYS_CHUD",
- "SYS_CLOCK_ADJTIME",
- "SYS_CLOCK_GETCPUCLOCKID2",
- "SYS_CLOCK_GETRES",
- "SYS_CLOCK_GETTIME",
- "SYS_CLOCK_NANOSLEEP",
- "SYS_CLOCK_SETTIME",
- "SYS_CLONE",
- "SYS_CLOSE",
- "SYS_CLOSEFROM",
- "SYS_CLOSE_NOCANCEL",
- "SYS_CONNECT",
- "SYS_CONNECTAT",
- "SYS_CONNECT_NOCANCEL",
- "SYS_COPYFILE",
- "SYS_CPUSET",
- "SYS_CPUSET_GETAFFINITY",
- "SYS_CPUSET_GETID",
- "SYS_CPUSET_SETAFFINITY",
- "SYS_CPUSET_SETID",
- "SYS_CREAT",
- "SYS_CREATE_MODULE",
- "SYS_CSOPS",
- "SYS_CSOPS_AUDITTOKEN",
- "SYS_DELETE",
- "SYS_DELETE_MODULE",
- "SYS_DUP",
- "SYS_DUP2",
- "SYS_DUP3",
- "SYS_EACCESS",
- "SYS_EPOLL_CREATE",
- "SYS_EPOLL_CREATE1",
- "SYS_EPOLL_CTL",
- "SYS_EPOLL_CTL_OLD",
- "SYS_EPOLL_PWAIT",
- "SYS_EPOLL_WAIT",
- "SYS_EPOLL_WAIT_OLD",
- "SYS_EVENTFD",
- "SYS_EVENTFD2",
- "SYS_EXCHANGEDATA",
- "SYS_EXECVE",
- "SYS_EXIT",
- "SYS_EXIT_GROUP",
- "SYS_EXTATTRCTL",
- "SYS_EXTATTR_DELETE_FD",
- "SYS_EXTATTR_DELETE_FILE",
- "SYS_EXTATTR_DELETE_LINK",
- "SYS_EXTATTR_GET_FD",
- "SYS_EXTATTR_GET_FILE",
- "SYS_EXTATTR_GET_LINK",
- "SYS_EXTATTR_LIST_FD",
- "SYS_EXTATTR_LIST_FILE",
- "SYS_EXTATTR_LIST_LINK",
- "SYS_EXTATTR_SET_FD",
- "SYS_EXTATTR_SET_FILE",
- "SYS_EXTATTR_SET_LINK",
- "SYS_FACCESSAT",
- "SYS_FADVISE64",
- "SYS_FADVISE64_64",
- "SYS_FALLOCATE",
- "SYS_FANOTIFY_INIT",
- "SYS_FANOTIFY_MARK",
- "SYS_FCHDIR",
- "SYS_FCHFLAGS",
- "SYS_FCHMOD",
- "SYS_FCHMODAT",
- "SYS_FCHMOD_EXTENDED",
- "SYS_FCHOWN",
- "SYS_FCHOWN32",
- "SYS_FCHOWNAT",
- "SYS_FCHROOT",
- "SYS_FCNTL",
- "SYS_FCNTL64",
- "SYS_FCNTL_NOCANCEL",
- "SYS_FDATASYNC",
- "SYS_FEXECVE",
- "SYS_FFCLOCK_GETCOUNTER",
- "SYS_FFCLOCK_GETESTIMATE",
- "SYS_FFCLOCK_SETESTIMATE",
- "SYS_FFSCTL",
- "SYS_FGETATTRLIST",
- "SYS_FGETXATTR",
- "SYS_FHOPEN",
- "SYS_FHSTAT",
- "SYS_FHSTATFS",
- "SYS_FILEPORT_MAKEFD",
- "SYS_FILEPORT_MAKEPORT",
- "SYS_FKTRACE",
- "SYS_FLISTXATTR",
- "SYS_FLOCK",
- "SYS_FORK",
- "SYS_FPATHCONF",
- "SYS_FREEBSD6_FTRUNCATE",
- "SYS_FREEBSD6_LSEEK",
- "SYS_FREEBSD6_MMAP",
- "SYS_FREEBSD6_PREAD",
- "SYS_FREEBSD6_PWRITE",
- "SYS_FREEBSD6_TRUNCATE",
- "SYS_FREMOVEXATTR",
- "SYS_FSCTL",
- "SYS_FSETATTRLIST",
- "SYS_FSETXATTR",
- "SYS_FSGETPATH",
- "SYS_FSTAT",
- "SYS_FSTAT64",
- "SYS_FSTAT64_EXTENDED",
- "SYS_FSTATAT",
- "SYS_FSTATAT64",
- "SYS_FSTATFS",
- "SYS_FSTATFS64",
- "SYS_FSTATV",
- "SYS_FSTATVFS1",
- "SYS_FSTAT_EXTENDED",
- "SYS_FSYNC",
- "SYS_FSYNC_NOCANCEL",
- "SYS_FSYNC_RANGE",
- "SYS_FTIME",
- "SYS_FTRUNCATE",
- "SYS_FTRUNCATE64",
- "SYS_FUTEX",
- "SYS_FUTIMENS",
- "SYS_FUTIMES",
- "SYS_FUTIMESAT",
- "SYS_GETATTRLIST",
- "SYS_GETAUDIT",
- "SYS_GETAUDIT_ADDR",
- "SYS_GETAUID",
- "SYS_GETCONTEXT",
- "SYS_GETCPU",
- "SYS_GETCWD",
- "SYS_GETDENTS",
- "SYS_GETDENTS64",
- "SYS_GETDIRENTRIES",
- "SYS_GETDIRENTRIES64",
- "SYS_GETDIRENTRIESATTR",
- "SYS_GETDTABLECOUNT",
- "SYS_GETDTABLESIZE",
- "SYS_GETEGID",
- "SYS_GETEGID32",
- "SYS_GETEUID",
- "SYS_GETEUID32",
- "SYS_GETFH",
- "SYS_GETFSSTAT",
- "SYS_GETFSSTAT64",
- "SYS_GETGID",
- "SYS_GETGID32",
- "SYS_GETGROUPS",
- "SYS_GETGROUPS32",
- "SYS_GETHOSTUUID",
- "SYS_GETITIMER",
- "SYS_GETLCID",
- "SYS_GETLOGIN",
- "SYS_GETLOGINCLASS",
- "SYS_GETPEERNAME",
- "SYS_GETPGID",
- "SYS_GETPGRP",
- "SYS_GETPID",
- "SYS_GETPMSG",
- "SYS_GETPPID",
- "SYS_GETPRIORITY",
- "SYS_GETRESGID",
- "SYS_GETRESGID32",
- "SYS_GETRESUID",
- "SYS_GETRESUID32",
- "SYS_GETRLIMIT",
- "SYS_GETRTABLE",
- "SYS_GETRUSAGE",
- "SYS_GETSGROUPS",
- "SYS_GETSID",
- "SYS_GETSOCKNAME",
- "SYS_GETSOCKOPT",
- "SYS_GETTHRID",
- "SYS_GETTID",
- "SYS_GETTIMEOFDAY",
- "SYS_GETUID",
- "SYS_GETUID32",
- "SYS_GETVFSSTAT",
- "SYS_GETWGROUPS",
- "SYS_GETXATTR",
- "SYS_GET_KERNEL_SYMS",
- "SYS_GET_MEMPOLICY",
- "SYS_GET_ROBUST_LIST",
- "SYS_GET_THREAD_AREA",
- "SYS_GSSD_SYSCALL",
- "SYS_GTTY",
- "SYS_IDENTITYSVC",
- "SYS_IDLE",
- "SYS_INITGROUPS",
- "SYS_INIT_MODULE",
- "SYS_INOTIFY_ADD_WATCH",
- "SYS_INOTIFY_INIT",
- "SYS_INOTIFY_INIT1",
- "SYS_INOTIFY_RM_WATCH",
- "SYS_IOCTL",
- "SYS_IOPERM",
- "SYS_IOPL",
- "SYS_IOPOLICYSYS",
- "SYS_IOPRIO_GET",
- "SYS_IOPRIO_SET",
- "SYS_IO_CANCEL",
- "SYS_IO_DESTROY",
- "SYS_IO_GETEVENTS",
- "SYS_IO_SETUP",
- "SYS_IO_SUBMIT",
- "SYS_IPC",
- "SYS_ISSETUGID",
- "SYS_JAIL",
- "SYS_JAIL_ATTACH",
- "SYS_JAIL_GET",
- "SYS_JAIL_REMOVE",
- "SYS_JAIL_SET",
- "SYS_KAS_INFO",
- "SYS_KDEBUG_TRACE",
- "SYS_KENV",
- "SYS_KEVENT",
- "SYS_KEVENT64",
- "SYS_KEXEC_LOAD",
- "SYS_KEYCTL",
- "SYS_KILL",
- "SYS_KLDFIND",
- "SYS_KLDFIRSTMOD",
- "SYS_KLDLOAD",
- "SYS_KLDNEXT",
- "SYS_KLDSTAT",
- "SYS_KLDSYM",
- "SYS_KLDUNLOAD",
- "SYS_KLDUNLOADF",
- "SYS_KMQ_NOTIFY",
- "SYS_KMQ_OPEN",
- "SYS_KMQ_SETATTR",
- "SYS_KMQ_TIMEDRECEIVE",
- "SYS_KMQ_TIMEDSEND",
- "SYS_KMQ_UNLINK",
- "SYS_KQUEUE",
- "SYS_KQUEUE1",
- "SYS_KSEM_CLOSE",
- "SYS_KSEM_DESTROY",
- "SYS_KSEM_GETVALUE",
- "SYS_KSEM_INIT",
- "SYS_KSEM_OPEN",
- "SYS_KSEM_POST",
- "SYS_KSEM_TIMEDWAIT",
- "SYS_KSEM_TRYWAIT",
- "SYS_KSEM_UNLINK",
- "SYS_KSEM_WAIT",
- "SYS_KTIMER_CREATE",
- "SYS_KTIMER_DELETE",
- "SYS_KTIMER_GETOVERRUN",
- "SYS_KTIMER_GETTIME",
- "SYS_KTIMER_SETTIME",
- "SYS_KTRACE",
- "SYS_LCHFLAGS",
- "SYS_LCHMOD",
- "SYS_LCHOWN",
- "SYS_LCHOWN32",
- "SYS_LEDGER",
- "SYS_LGETFH",
- "SYS_LGETXATTR",
- "SYS_LINK",
- "SYS_LINKAT",
- "SYS_LIO_LISTIO",
- "SYS_LISTEN",
- "SYS_LISTXATTR",
- "SYS_LLISTXATTR",
- "SYS_LOCK",
- "SYS_LOOKUP_DCOOKIE",
- "SYS_LPATHCONF",
- "SYS_LREMOVEXATTR",
- "SYS_LSEEK",
- "SYS_LSETXATTR",
- "SYS_LSTAT",
- "SYS_LSTAT64",
- "SYS_LSTAT64_EXTENDED",
- "SYS_LSTATV",
- "SYS_LSTAT_EXTENDED",
- "SYS_LUTIMES",
- "SYS_MAC_SYSCALL",
- "SYS_MADVISE",
- "SYS_MADVISE1",
- "SYS_MAXSYSCALL",
- "SYS_MBIND",
- "SYS_MIGRATE_PAGES",
- "SYS_MINCORE",
- "SYS_MINHERIT",
- "SYS_MKCOMPLEX",
- "SYS_MKDIR",
- "SYS_MKDIRAT",
- "SYS_MKDIR_EXTENDED",
- "SYS_MKFIFO",
- "SYS_MKFIFOAT",
- "SYS_MKFIFO_EXTENDED",
- "SYS_MKNOD",
- "SYS_MKNODAT",
- "SYS_MLOCK",
- "SYS_MLOCKALL",
- "SYS_MMAP",
- "SYS_MMAP2",
- "SYS_MODCTL",
- "SYS_MODFIND",
- "SYS_MODFNEXT",
- "SYS_MODIFY_LDT",
- "SYS_MODNEXT",
- "SYS_MODSTAT",
- "SYS_MODWATCH",
- "SYS_MOUNT",
- "SYS_MOVE_PAGES",
- "SYS_MPROTECT",
- "SYS_MPX",
- "SYS_MQUERY",
- "SYS_MQ_GETSETATTR",
- "SYS_MQ_NOTIFY",
- "SYS_MQ_OPEN",
- "SYS_MQ_TIMEDRECEIVE",
- "SYS_MQ_TIMEDSEND",
- "SYS_MQ_UNLINK",
- "SYS_MREMAP",
- "SYS_MSGCTL",
- "SYS_MSGGET",
- "SYS_MSGRCV",
- "SYS_MSGRCV_NOCANCEL",
- "SYS_MSGSND",
- "SYS_MSGSND_NOCANCEL",
- "SYS_MSGSYS",
- "SYS_MSYNC",
- "SYS_MSYNC_NOCANCEL",
- "SYS_MUNLOCK",
- "SYS_MUNLOCKALL",
- "SYS_MUNMAP",
- "SYS_NAME_TO_HANDLE_AT",
- "SYS_NANOSLEEP",
- "SYS_NEWFSTATAT",
- "SYS_NFSCLNT",
- "SYS_NFSSERVCTL",
- "SYS_NFSSVC",
- "SYS_NFSTAT",
- "SYS_NICE",
- "SYS_NLM_SYSCALL",
- "SYS_NLSTAT",
- "SYS_NMOUNT",
- "SYS_NSTAT",
- "SYS_NTP_ADJTIME",
- "SYS_NTP_GETTIME",
- "SYS_NUMA_GETAFFINITY",
- "SYS_NUMA_SETAFFINITY",
- "SYS_OABI_SYSCALL_BASE",
- "SYS_OBREAK",
- "SYS_OLDFSTAT",
- "SYS_OLDLSTAT",
- "SYS_OLDOLDUNAME",
- "SYS_OLDSTAT",
- "SYS_OLDUNAME",
- "SYS_OPEN",
- "SYS_OPENAT",
- "SYS_OPENBSD_POLL",
- "SYS_OPEN_BY_HANDLE_AT",
- "SYS_OPEN_DPROTECTED_NP",
- "SYS_OPEN_EXTENDED",
- "SYS_OPEN_NOCANCEL",
- "SYS_OVADVISE",
- "SYS_PACCEPT",
- "SYS_PATHCONF",
- "SYS_PAUSE",
- "SYS_PCICONFIG_IOBASE",
- "SYS_PCICONFIG_READ",
- "SYS_PCICONFIG_WRITE",
- "SYS_PDFORK",
- "SYS_PDGETPID",
- "SYS_PDKILL",
- "SYS_PERF_EVENT_OPEN",
- "SYS_PERSONALITY",
- "SYS_PID_HIBERNATE",
- "SYS_PID_RESUME",
- "SYS_PID_SHUTDOWN_SOCKETS",
- "SYS_PID_SUSPEND",
- "SYS_PIPE",
- "SYS_PIPE2",
- "SYS_PIVOT_ROOT",
- "SYS_PMC_CONTROL",
- "SYS_PMC_GET_INFO",
- "SYS_POLL",
- "SYS_POLLTS",
- "SYS_POLL_NOCANCEL",
- "SYS_POSIX_FADVISE",
- "SYS_POSIX_FALLOCATE",
- "SYS_POSIX_OPENPT",
- "SYS_POSIX_SPAWN",
- "SYS_PPOLL",
- "SYS_PRCTL",
- "SYS_PREAD",
- "SYS_PREAD64",
- "SYS_PREADV",
- "SYS_PREAD_NOCANCEL",
- "SYS_PRLIMIT64",
- "SYS_PROCCTL",
- "SYS_PROCESS_POLICY",
- "SYS_PROCESS_VM_READV",
- "SYS_PROCESS_VM_WRITEV",
- "SYS_PROC_INFO",
- "SYS_PROF",
- "SYS_PROFIL",
- "SYS_PSELECT",
- "SYS_PSELECT6",
- "SYS_PSET_ASSIGN",
- "SYS_PSET_CREATE",
- "SYS_PSET_DESTROY",
- "SYS_PSYNCH_CVBROAD",
- "SYS_PSYNCH_CVCLRPREPOST",
- "SYS_PSYNCH_CVSIGNAL",
- "SYS_PSYNCH_CVWAIT",
- "SYS_PSYNCH_MUTEXDROP",
- "SYS_PSYNCH_MUTEXWAIT",
- "SYS_PSYNCH_RW_DOWNGRADE",
- "SYS_PSYNCH_RW_LONGRDLOCK",
- "SYS_PSYNCH_RW_RDLOCK",
- "SYS_PSYNCH_RW_UNLOCK",
- "SYS_PSYNCH_RW_UNLOCK2",
- "SYS_PSYNCH_RW_UPGRADE",
- "SYS_PSYNCH_RW_WRLOCK",
- "SYS_PSYNCH_RW_YIELDWRLOCK",
- "SYS_PTRACE",
- "SYS_PUTPMSG",
- "SYS_PWRITE",
- "SYS_PWRITE64",
- "SYS_PWRITEV",
- "SYS_PWRITE_NOCANCEL",
- "SYS_QUERY_MODULE",
- "SYS_QUOTACTL",
- "SYS_RASCTL",
- "SYS_RCTL_ADD_RULE",
- "SYS_RCTL_GET_LIMITS",
- "SYS_RCTL_GET_RACCT",
- "SYS_RCTL_GET_RULES",
- "SYS_RCTL_REMOVE_RULE",
- "SYS_READ",
- "SYS_READAHEAD",
- "SYS_READDIR",
- "SYS_READLINK",
- "SYS_READLINKAT",
- "SYS_READV",
- "SYS_READV_NOCANCEL",
- "SYS_READ_NOCANCEL",
- "SYS_REBOOT",
- "SYS_RECV",
- "SYS_RECVFROM",
- "SYS_RECVFROM_NOCANCEL",
- "SYS_RECVMMSG",
- "SYS_RECVMSG",
- "SYS_RECVMSG_NOCANCEL",
- "SYS_REMAP_FILE_PAGES",
- "SYS_REMOVEXATTR",
- "SYS_RENAME",
- "SYS_RENAMEAT",
- "SYS_REQUEST_KEY",
- "SYS_RESTART_SYSCALL",
- "SYS_REVOKE",
- "SYS_RFORK",
- "SYS_RMDIR",
- "SYS_RTPRIO",
- "SYS_RTPRIO_THREAD",
- "SYS_RT_SIGACTION",
- "SYS_RT_SIGPENDING",
- "SYS_RT_SIGPROCMASK",
- "SYS_RT_SIGQUEUEINFO",
- "SYS_RT_SIGRETURN",
- "SYS_RT_SIGSUSPEND",
- "SYS_RT_SIGTIMEDWAIT",
- "SYS_RT_TGSIGQUEUEINFO",
- "SYS_SBRK",
- "SYS_SCHED_GETAFFINITY",
- "SYS_SCHED_GETPARAM",
- "SYS_SCHED_GETSCHEDULER",
- "SYS_SCHED_GET_PRIORITY_MAX",
- "SYS_SCHED_GET_PRIORITY_MIN",
- "SYS_SCHED_RR_GET_INTERVAL",
- "SYS_SCHED_SETAFFINITY",
- "SYS_SCHED_SETPARAM",
- "SYS_SCHED_SETSCHEDULER",
- "SYS_SCHED_YIELD",
- "SYS_SCTP_GENERIC_RECVMSG",
- "SYS_SCTP_GENERIC_SENDMSG",
- "SYS_SCTP_GENERIC_SENDMSG_IOV",
- "SYS_SCTP_PEELOFF",
- "SYS_SEARCHFS",
- "SYS_SECURITY",
- "SYS_SELECT",
- "SYS_SELECT_NOCANCEL",
- "SYS_SEMCONFIG",
- "SYS_SEMCTL",
- "SYS_SEMGET",
- "SYS_SEMOP",
- "SYS_SEMSYS",
- "SYS_SEMTIMEDOP",
- "SYS_SEM_CLOSE",
- "SYS_SEM_DESTROY",
- "SYS_SEM_GETVALUE",
- "SYS_SEM_INIT",
- "SYS_SEM_OPEN",
- "SYS_SEM_POST",
- "SYS_SEM_TRYWAIT",
- "SYS_SEM_UNLINK",
- "SYS_SEM_WAIT",
- "SYS_SEM_WAIT_NOCANCEL",
- "SYS_SEND",
- "SYS_SENDFILE",
- "SYS_SENDFILE64",
- "SYS_SENDMMSG",
- "SYS_SENDMSG",
- "SYS_SENDMSG_NOCANCEL",
- "SYS_SENDTO",
- "SYS_SENDTO_NOCANCEL",
- "SYS_SETATTRLIST",
- "SYS_SETAUDIT",
- "SYS_SETAUDIT_ADDR",
- "SYS_SETAUID",
- "SYS_SETCONTEXT",
- "SYS_SETDOMAINNAME",
- "SYS_SETEGID",
- "SYS_SETEUID",
- "SYS_SETFIB",
- "SYS_SETFSGID",
- "SYS_SETFSGID32",
- "SYS_SETFSUID",
- "SYS_SETFSUID32",
- "SYS_SETGID",
- "SYS_SETGID32",
- "SYS_SETGROUPS",
- "SYS_SETGROUPS32",
- "SYS_SETHOSTNAME",
- "SYS_SETITIMER",
- "SYS_SETLCID",
- "SYS_SETLOGIN",
- "SYS_SETLOGINCLASS",
- "SYS_SETNS",
- "SYS_SETPGID",
- "SYS_SETPRIORITY",
- "SYS_SETPRIVEXEC",
- "SYS_SETREGID",
- "SYS_SETREGID32",
- "SYS_SETRESGID",
- "SYS_SETRESGID32",
- "SYS_SETRESUID",
- "SYS_SETRESUID32",
- "SYS_SETREUID",
- "SYS_SETREUID32",
- "SYS_SETRLIMIT",
- "SYS_SETRTABLE",
- "SYS_SETSGROUPS",
- "SYS_SETSID",
- "SYS_SETSOCKOPT",
- "SYS_SETTID",
- "SYS_SETTID_WITH_PID",
- "SYS_SETTIMEOFDAY",
- "SYS_SETUID",
- "SYS_SETUID32",
- "SYS_SETWGROUPS",
- "SYS_SETXATTR",
- "SYS_SET_MEMPOLICY",
- "SYS_SET_ROBUST_LIST",
- "SYS_SET_THREAD_AREA",
- "SYS_SET_TID_ADDRESS",
- "SYS_SGETMASK",
- "SYS_SHARED_REGION_CHECK_NP",
- "SYS_SHARED_REGION_MAP_AND_SLIDE_NP",
- "SYS_SHMAT",
- "SYS_SHMCTL",
- "SYS_SHMDT",
- "SYS_SHMGET",
- "SYS_SHMSYS",
- "SYS_SHM_OPEN",
- "SYS_SHM_UNLINK",
- "SYS_SHUTDOWN",
- "SYS_SIGACTION",
- "SYS_SIGALTSTACK",
- "SYS_SIGNAL",
- "SYS_SIGNALFD",
- "SYS_SIGNALFD4",
- "SYS_SIGPENDING",
- "SYS_SIGPROCMASK",
- "SYS_SIGQUEUE",
- "SYS_SIGQUEUEINFO",
- "SYS_SIGRETURN",
- "SYS_SIGSUSPEND",
- "SYS_SIGSUSPEND_NOCANCEL",
- "SYS_SIGTIMEDWAIT",
- "SYS_SIGWAIT",
- "SYS_SIGWAITINFO",
- "SYS_SOCKET",
- "SYS_SOCKETCALL",
- "SYS_SOCKETPAIR",
- "SYS_SPLICE",
- "SYS_SSETMASK",
- "SYS_SSTK",
- "SYS_STACK_SNAPSHOT",
- "SYS_STAT",
- "SYS_STAT64",
- "SYS_STAT64_EXTENDED",
- "SYS_STATFS",
- "SYS_STATFS64",
- "SYS_STATV",
- "SYS_STATVFS1",
- "SYS_STAT_EXTENDED",
- "SYS_STIME",
- "SYS_STTY",
- "SYS_SWAPCONTEXT",
- "SYS_SWAPCTL",
- "SYS_SWAPOFF",
- "SYS_SWAPON",
- "SYS_SYMLINK",
- "SYS_SYMLINKAT",
- "SYS_SYNC",
- "SYS_SYNCFS",
- "SYS_SYNC_FILE_RANGE",
- "SYS_SYSARCH",
- "SYS_SYSCALL",
- "SYS_SYSCALL_BASE",
- "SYS_SYSFS",
- "SYS_SYSINFO",
- "SYS_SYSLOG",
- "SYS_TEE",
- "SYS_TGKILL",
- "SYS_THREAD_SELFID",
- "SYS_THR_CREATE",
- "SYS_THR_EXIT",
- "SYS_THR_KILL",
- "SYS_THR_KILL2",
- "SYS_THR_NEW",
- "SYS_THR_SELF",
- "SYS_THR_SET_NAME",
- "SYS_THR_SUSPEND",
- "SYS_THR_WAKE",
- "SYS_TIME",
- "SYS_TIMERFD_CREATE",
- "SYS_TIMERFD_GETTIME",
- "SYS_TIMERFD_SETTIME",
- "SYS_TIMER_CREATE",
- "SYS_TIMER_DELETE",
- "SYS_TIMER_GETOVERRUN",
- "SYS_TIMER_GETTIME",
- "SYS_TIMER_SETTIME",
- "SYS_TIMES",
- "SYS_TKILL",
- "SYS_TRUNCATE",
- "SYS_TRUNCATE64",
- "SYS_TUXCALL",
- "SYS_UGETRLIMIT",
- "SYS_ULIMIT",
- "SYS_UMASK",
- "SYS_UMASK_EXTENDED",
- "SYS_UMOUNT",
- "SYS_UMOUNT2",
- "SYS_UNAME",
- "SYS_UNDELETE",
- "SYS_UNLINK",
- "SYS_UNLINKAT",
- "SYS_UNMOUNT",
- "SYS_UNSHARE",
- "SYS_USELIB",
- "SYS_USTAT",
- "SYS_UTIME",
- "SYS_UTIMENSAT",
- "SYS_UTIMES",
- "SYS_UTRACE",
- "SYS_UUIDGEN",
- "SYS_VADVISE",
- "SYS_VFORK",
- "SYS_VHANGUP",
- "SYS_VM86",
- "SYS_VM86OLD",
- "SYS_VMSPLICE",
- "SYS_VM_PRESSURE_MONITOR",
- "SYS_VSERVER",
- "SYS_WAIT4",
- "SYS_WAIT4_NOCANCEL",
- "SYS_WAIT6",
- "SYS_WAITEVENT",
- "SYS_WAITID",
- "SYS_WAITID_NOCANCEL",
- "SYS_WAITPID",
- "SYS_WATCHEVENT",
- "SYS_WORKQ_KERNRETURN",
- "SYS_WORKQ_OPEN",
- "SYS_WRITE",
- "SYS_WRITEV",
- "SYS_WRITEV_NOCANCEL",
- "SYS_WRITE_NOCANCEL",
- "SYS_YIELD",
- "SYS__LLSEEK",
- "SYS__LWP_CONTINUE",
- "SYS__LWP_CREATE",
- "SYS__LWP_CTL",
- "SYS__LWP_DETACH",
- "SYS__LWP_EXIT",
- "SYS__LWP_GETNAME",
- "SYS__LWP_GETPRIVATE",
- "SYS__LWP_KILL",
- "SYS__LWP_PARK",
- "SYS__LWP_SELF",
- "SYS__LWP_SETNAME",
- "SYS__LWP_SETPRIVATE",
- "SYS__LWP_SUSPEND",
- "SYS__LWP_UNPARK",
- "SYS__LWP_UNPARK_ALL",
- "SYS__LWP_WAIT",
- "SYS__LWP_WAKEUP",
- "SYS__NEWSELECT",
- "SYS__PSET_BIND",
- "SYS__SCHED_GETAFFINITY",
- "SYS__SCHED_GETPARAM",
- "SYS__SCHED_SETAFFINITY",
- "SYS__SCHED_SETPARAM",
- "SYS__SYSCTL",
- "SYS__UMTX_LOCK",
- "SYS__UMTX_OP",
- "SYS__UMTX_UNLOCK",
- "SYS___ACL_ACLCHECK_FD",
- "SYS___ACL_ACLCHECK_FILE",
- "SYS___ACL_ACLCHECK_LINK",
- "SYS___ACL_DELETE_FD",
- "SYS___ACL_DELETE_FILE",
- "SYS___ACL_DELETE_LINK",
- "SYS___ACL_GET_FD",
- "SYS___ACL_GET_FILE",
- "SYS___ACL_GET_LINK",
- "SYS___ACL_SET_FD",
- "SYS___ACL_SET_FILE",
- "SYS___ACL_SET_LINK",
- "SYS___CAP_RIGHTS_GET",
- "SYS___CLONE",
- "SYS___DISABLE_THREADSIGNAL",
- "SYS___GETCWD",
- "SYS___GETLOGIN",
- "SYS___GET_TCB",
- "SYS___MAC_EXECVE",
- "SYS___MAC_GETFSSTAT",
- "SYS___MAC_GET_FD",
- "SYS___MAC_GET_FILE",
- "SYS___MAC_GET_LCID",
- "SYS___MAC_GET_LCTX",
- "SYS___MAC_GET_LINK",
- "SYS___MAC_GET_MOUNT",
- "SYS___MAC_GET_PID",
- "SYS___MAC_GET_PROC",
- "SYS___MAC_MOUNT",
- "SYS___MAC_SET_FD",
- "SYS___MAC_SET_FILE",
- "SYS___MAC_SET_LCTX",
- "SYS___MAC_SET_LINK",
- "SYS___MAC_SET_PROC",
- "SYS___MAC_SYSCALL",
- "SYS___OLD_SEMWAIT_SIGNAL",
- "SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL",
- "SYS___POSIX_CHOWN",
- "SYS___POSIX_FCHOWN",
- "SYS___POSIX_LCHOWN",
- "SYS___POSIX_RENAME",
- "SYS___PTHREAD_CANCELED",
- "SYS___PTHREAD_CHDIR",
- "SYS___PTHREAD_FCHDIR",
- "SYS___PTHREAD_KILL",
- "SYS___PTHREAD_MARKCANCEL",
- "SYS___PTHREAD_SIGMASK",
- "SYS___QUOTACTL",
- "SYS___SEMCTL",
- "SYS___SEMWAIT_SIGNAL",
- "SYS___SEMWAIT_SIGNAL_NOCANCEL",
- "SYS___SETLOGIN",
- "SYS___SETUGID",
- "SYS___SET_TCB",
- "SYS___SIGACTION_SIGTRAMP",
- "SYS___SIGTIMEDWAIT",
- "SYS___SIGWAIT",
- "SYS___SIGWAIT_NOCANCEL",
- "SYS___SYSCTL",
- "SYS___TFORK",
- "SYS___THREXIT",
- "SYS___THRSIGDIVERT",
- "SYS___THRSLEEP",
- "SYS___THRWAKEUP",
- "S_ARCH1",
- "S_ARCH2",
- "S_BLKSIZE",
- "S_IEXEC",
- "S_IFBLK",
- "S_IFCHR",
- "S_IFDIR",
- "S_IFIFO",
- "S_IFLNK",
- "S_IFMT",
- "S_IFREG",
- "S_IFSOCK",
- "S_IFWHT",
- "S_IREAD",
- "S_IRGRP",
- "S_IROTH",
- "S_IRUSR",
- "S_IRWXG",
- "S_IRWXO",
- "S_IRWXU",
- "S_ISGID",
- "S_ISTXT",
- "S_ISUID",
- "S_ISVTX",
- "S_IWGRP",
- "S_IWOTH",
- "S_IWRITE",
- "S_IWUSR",
- "S_IXGRP",
- "S_IXOTH",
- "S_IXUSR",
- "S_LOGIN_SET",
- "SecurityAttributes",
- "Seek",
- "Select",
- "Sendfile",
- "Sendmsg",
- "SendmsgN",
- "Sendto",
- "Servent",
- "SetBpf",
- "SetBpfBuflen",
- "SetBpfDatalink",
- "SetBpfHeadercmpl",
- "SetBpfImmediate",
- "SetBpfInterface",
- "SetBpfPromisc",
- "SetBpfTimeout",
- "SetCurrentDirectory",
- "SetEndOfFile",
- "SetEnvironmentVariable",
- "SetFileAttributes",
- "SetFileCompletionNotificationModes",
- "SetFilePointer",
- "SetFileTime",
- "SetHandleInformation",
- "SetKevent",
- "SetLsfPromisc",
- "SetNonblock",
- "Setdomainname",
- "Setegid",
- "Setenv",
- "Seteuid",
- "Setfsgid",
- "Setfsuid",
- "Setgid",
- "Setgroups",
- "Sethostname",
- "Setlogin",
- "Setpgid",
- "Setpriority",
- "Setprivexec",
- "Setregid",
- "Setresgid",
- "Setresuid",
- "Setreuid",
- "Setrlimit",
- "Setsid",
- "Setsockopt",
- "SetsockoptByte",
- "SetsockoptICMPv6Filter",
- "SetsockoptIPMreq",
- "SetsockoptIPMreqn",
- "SetsockoptIPv6Mreq",
- "SetsockoptInet4Addr",
- "SetsockoptInt",
- "SetsockoptLinger",
- "SetsockoptString",
- "SetsockoptTimeval",
- "Settimeofday",
- "Setuid",
- "Setxattr",
- "Shutdown",
- "SidTypeAlias",
- "SidTypeComputer",
- "SidTypeDeletedAccount",
- "SidTypeDomain",
- "SidTypeGroup",
- "SidTypeInvalid",
- "SidTypeLabel",
- "SidTypeUnknown",
- "SidTypeUser",
- "SidTypeWellKnownGroup",
- "Signal",
- "SizeofBpfHdr",
- "SizeofBpfInsn",
- "SizeofBpfProgram",
- "SizeofBpfStat",
- "SizeofBpfVersion",
- "SizeofBpfZbuf",
- "SizeofBpfZbufHeader",
- "SizeofCmsghdr",
- "SizeofICMPv6Filter",
- "SizeofIPMreq",
- "SizeofIPMreqn",
- "SizeofIPv6MTUInfo",
- "SizeofIPv6Mreq",
- "SizeofIfAddrmsg",
- "SizeofIfAnnounceMsghdr",
- "SizeofIfData",
- "SizeofIfInfomsg",
- "SizeofIfMsghdr",
- "SizeofIfaMsghdr",
- "SizeofIfmaMsghdr",
- "SizeofIfmaMsghdr2",
- "SizeofInet4Pktinfo",
- "SizeofInet6Pktinfo",
- "SizeofInotifyEvent",
- "SizeofLinger",
- "SizeofMsghdr",
- "SizeofNlAttr",
- "SizeofNlMsgerr",
- "SizeofNlMsghdr",
- "SizeofRtAttr",
- "SizeofRtGenmsg",
- "SizeofRtMetrics",
- "SizeofRtMsg",
- "SizeofRtMsghdr",
- "SizeofRtNexthop",
- "SizeofSockFilter",
- "SizeofSockFprog",
- "SizeofSockaddrAny",
- "SizeofSockaddrDatalink",
- "SizeofSockaddrInet4",
- "SizeofSockaddrInet6",
- "SizeofSockaddrLinklayer",
- "SizeofSockaddrNetlink",
- "SizeofSockaddrUnix",
- "SizeofTCPInfo",
- "SizeofUcred",
- "SlicePtrFromStrings",
- "SockFilter",
- "SockFprog",
- "Sockaddr",
- "SockaddrDatalink",
- "SockaddrGen",
- "SockaddrInet4",
- "SockaddrInet6",
- "SockaddrLinklayer",
- "SockaddrNetlink",
- "SockaddrUnix",
- "Socket",
- "SocketControlMessage",
- "SocketDisableIPv6",
- "Socketpair",
- "Splice",
- "StartProcess",
- "StartupInfo",
- "Stat",
- "Stat_t",
- "Statfs",
- "Statfs_t",
- "Stderr",
- "Stdin",
- "Stdout",
- "StringBytePtr",
- "StringByteSlice",
- "StringSlicePtr",
- "StringToSid",
- "StringToUTF16",
- "StringToUTF16Ptr",
- "Symlink",
- "Sync",
- "SyncFileRange",
- "SysProcAttr",
- "SysProcIDMap",
- "Syscall",
- "Syscall12",
- "Syscall15",
- "Syscall18",
- "Syscall6",
- "Syscall9",
- "SyscallN",
- "Sysctl",
- "SysctlUint32",
- "Sysctlnode",
- "Sysinfo",
- "Sysinfo_t",
- "Systemtime",
- "TCGETS",
- "TCIFLUSH",
- "TCIOFLUSH",
- "TCOFLUSH",
- "TCPInfo",
- "TCPKeepalive",
- "TCP_CA_NAME_MAX",
- "TCP_CONGCTL",
- "TCP_CONGESTION",
- "TCP_CONNECTIONTIMEOUT",
- "TCP_CORK",
- "TCP_DEFER_ACCEPT",
- "TCP_ENABLE_ECN",
- "TCP_INFO",
- "TCP_KEEPALIVE",
- "TCP_KEEPCNT",
- "TCP_KEEPIDLE",
- "TCP_KEEPINIT",
- "TCP_KEEPINTVL",
- "TCP_LINGER2",
- "TCP_MAXBURST",
- "TCP_MAXHLEN",
- "TCP_MAXOLEN",
- "TCP_MAXSEG",
- "TCP_MAXWIN",
- "TCP_MAX_SACK",
- "TCP_MAX_WINSHIFT",
- "TCP_MD5SIG",
- "TCP_MD5SIG_MAXKEYLEN",
- "TCP_MINMSS",
- "TCP_MINMSSOVERLOAD",
- "TCP_MSS",
- "TCP_NODELAY",
- "TCP_NOOPT",
- "TCP_NOPUSH",
- "TCP_NOTSENT_LOWAT",
- "TCP_NSTATES",
- "TCP_QUICKACK",
- "TCP_RXT_CONNDROPTIME",
- "TCP_RXT_FINDROP",
- "TCP_SACK_ENABLE",
- "TCP_SENDMOREACKS",
- "TCP_SYNCNT",
- "TCP_VENDOR",
- "TCP_WINDOW_CLAMP",
- "TCSAFLUSH",
- "TCSETS",
- "TF_DISCONNECT",
- "TF_REUSE_SOCKET",
- "TF_USE_DEFAULT_WORKER",
- "TF_USE_KERNEL_APC",
- "TF_USE_SYSTEM_THREAD",
- "TF_WRITE_BEHIND",
- "TH32CS_INHERIT",
- "TH32CS_SNAPALL",
- "TH32CS_SNAPHEAPLIST",
- "TH32CS_SNAPMODULE",
- "TH32CS_SNAPMODULE32",
- "TH32CS_SNAPPROCESS",
- "TH32CS_SNAPTHREAD",
- "TIME_ZONE_ID_DAYLIGHT",
- "TIME_ZONE_ID_STANDARD",
- "TIME_ZONE_ID_UNKNOWN",
- "TIOCCBRK",
- "TIOCCDTR",
- "TIOCCONS",
- "TIOCDCDTIMESTAMP",
- "TIOCDRAIN",
- "TIOCDSIMICROCODE",
- "TIOCEXCL",
- "TIOCEXT",
- "TIOCFLAG_CDTRCTS",
- "TIOCFLAG_CLOCAL",
- "TIOCFLAG_CRTSCTS",
- "TIOCFLAG_MDMBUF",
- "TIOCFLAG_PPS",
- "TIOCFLAG_SOFTCAR",
- "TIOCFLUSH",
- "TIOCGDEV",
- "TIOCGDRAINWAIT",
- "TIOCGETA",
- "TIOCGETD",
- "TIOCGFLAGS",
- "TIOCGICOUNT",
- "TIOCGLCKTRMIOS",
- "TIOCGLINED",
- "TIOCGPGRP",
- "TIOCGPTN",
- "TIOCGQSIZE",
- "TIOCGRANTPT",
- "TIOCGRS485",
- "TIOCGSERIAL",
- "TIOCGSID",
- "TIOCGSIZE",
- "TIOCGSOFTCAR",
- "TIOCGTSTAMP",
- "TIOCGWINSZ",
- "TIOCINQ",
- "TIOCIXOFF",
- "TIOCIXON",
- "TIOCLINUX",
- "TIOCMBIC",
- "TIOCMBIS",
- "TIOCMGDTRWAIT",
- "TIOCMGET",
- "TIOCMIWAIT",
- "TIOCMODG",
- "TIOCMODS",
- "TIOCMSDTRWAIT",
- "TIOCMSET",
- "TIOCM_CAR",
- "TIOCM_CD",
- "TIOCM_CTS",
- "TIOCM_DCD",
- "TIOCM_DSR",
- "TIOCM_DTR",
- "TIOCM_LE",
- "TIOCM_RI",
- "TIOCM_RNG",
- "TIOCM_RTS",
- "TIOCM_SR",
- "TIOCM_ST",
- "TIOCNOTTY",
- "TIOCNXCL",
- "TIOCOUTQ",
- "TIOCPKT",
- "TIOCPKT_DATA",
- "TIOCPKT_DOSTOP",
- "TIOCPKT_FLUSHREAD",
- "TIOCPKT_FLUSHWRITE",
- "TIOCPKT_IOCTL",
- "TIOCPKT_NOSTOP",
- "TIOCPKT_START",
- "TIOCPKT_STOP",
- "TIOCPTMASTER",
- "TIOCPTMGET",
- "TIOCPTSNAME",
- "TIOCPTYGNAME",
- "TIOCPTYGRANT",
- "TIOCPTYUNLK",
- "TIOCRCVFRAME",
- "TIOCREMOTE",
- "TIOCSBRK",
- "TIOCSCONS",
- "TIOCSCTTY",
- "TIOCSDRAINWAIT",
- "TIOCSDTR",
- "TIOCSERCONFIG",
- "TIOCSERGETLSR",
- "TIOCSERGETMULTI",
- "TIOCSERGSTRUCT",
- "TIOCSERGWILD",
- "TIOCSERSETMULTI",
- "TIOCSERSWILD",
- "TIOCSER_TEMT",
- "TIOCSETA",
- "TIOCSETAF",
- "TIOCSETAW",
- "TIOCSETD",
- "TIOCSFLAGS",
- "TIOCSIG",
- "TIOCSLCKTRMIOS",
- "TIOCSLINED",
- "TIOCSPGRP",
- "TIOCSPTLCK",
- "TIOCSQSIZE",
- "TIOCSRS485",
- "TIOCSSERIAL",
- "TIOCSSIZE",
- "TIOCSSOFTCAR",
- "TIOCSTART",
- "TIOCSTAT",
- "TIOCSTI",
- "TIOCSTOP",
- "TIOCSTSTAMP",
- "TIOCSWINSZ",
- "TIOCTIMESTAMP",
- "TIOCUCNTL",
- "TIOCVHANGUP",
- "TIOCXMTFRAME",
- "TOKEN_ADJUST_DEFAULT",
- "TOKEN_ADJUST_GROUPS",
- "TOKEN_ADJUST_PRIVILEGES",
- "TOKEN_ADJUST_SESSIONID",
- "TOKEN_ALL_ACCESS",
- "TOKEN_ASSIGN_PRIMARY",
- "TOKEN_DUPLICATE",
- "TOKEN_EXECUTE",
- "TOKEN_IMPERSONATE",
- "TOKEN_QUERY",
- "TOKEN_QUERY_SOURCE",
- "TOKEN_READ",
- "TOKEN_WRITE",
- "TOSTOP",
- "TRUNCATE_EXISTING",
- "TUNATTACHFILTER",
- "TUNDETACHFILTER",
- "TUNGETFEATURES",
- "TUNGETIFF",
- "TUNGETSNDBUF",
- "TUNGETVNETHDRSZ",
- "TUNSETDEBUG",
- "TUNSETGROUP",
- "TUNSETIFF",
- "TUNSETLINK",
- "TUNSETNOCSUM",
- "TUNSETOFFLOAD",
- "TUNSETOWNER",
- "TUNSETPERSIST",
- "TUNSETSNDBUF",
- "TUNSETTXFILTER",
- "TUNSETVNETHDRSZ",
- "Tee",
- "TerminateProcess",
- "Termios",
- "Tgkill",
- "Time",
- "Time_t",
- "Times",
- "Timespec",
- "TimespecToNsec",
- "Timeval",
- "Timeval32",
- "TimevalToNsec",
- "Timex",
- "Timezoneinformation",
- "Tms",
- "Token",
- "TokenAccessInformation",
- "TokenAuditPolicy",
- "TokenDefaultDacl",
- "TokenElevation",
- "TokenElevationType",
- "TokenGroups",
- "TokenGroupsAndPrivileges",
- "TokenHasRestrictions",
- "TokenImpersonationLevel",
- "TokenIntegrityLevel",
- "TokenLinkedToken",
- "TokenLogonSid",
- "TokenMandatoryPolicy",
- "TokenOrigin",
- "TokenOwner",
- "TokenPrimaryGroup",
- "TokenPrivileges",
- "TokenRestrictedSids",
- "TokenSandBoxInert",
- "TokenSessionId",
- "TokenSessionReference",
- "TokenSource",
- "TokenStatistics",
- "TokenType",
- "TokenUIAccess",
- "TokenUser",
- "TokenVirtualizationAllowed",
- "TokenVirtualizationEnabled",
- "Tokenprimarygroup",
- "Tokenuser",
- "TranslateAccountName",
- "TranslateName",
- "TransmitFile",
- "TransmitFileBuffers",
- "Truncate",
- "UNIX_PATH_MAX",
- "USAGE_MATCH_TYPE_AND",
- "USAGE_MATCH_TYPE_OR",
- "UTF16FromString",
- "UTF16PtrFromString",
- "UTF16ToString",
- "Ucred",
- "Umask",
- "Uname",
- "Undelete",
- "UnixCredentials",
- "UnixRights",
- "Unlink",
- "Unlinkat",
- "UnmapViewOfFile",
- "Unmount",
- "Unsetenv",
- "Unshare",
- "UserInfo10",
- "Ustat",
- "Ustat_t",
- "Utimbuf",
- "Utime",
- "Utimes",
- "UtimesNano",
- "Utsname",
- "VDISCARD",
- "VDSUSP",
- "VEOF",
- "VEOL",
- "VEOL2",
- "VERASE",
- "VERASE2",
- "VINTR",
- "VKILL",
- "VLNEXT",
- "VMIN",
- "VQUIT",
- "VREPRINT",
- "VSTART",
- "VSTATUS",
- "VSTOP",
- "VSUSP",
- "VSWTC",
- "VT0",
- "VT1",
- "VTDLY",
- "VTIME",
- "VWERASE",
- "VirtualLock",
- "VirtualUnlock",
- "WAIT_ABANDONED",
- "WAIT_FAILED",
- "WAIT_OBJECT_0",
- "WAIT_TIMEOUT",
- "WALL",
- "WALLSIG",
- "WALTSIG",
- "WCLONE",
- "WCONTINUED",
- "WCOREFLAG",
- "WEXITED",
- "WLINUXCLONE",
- "WNOHANG",
- "WNOTHREAD",
- "WNOWAIT",
- "WNOZOMBIE",
- "WOPTSCHECKED",
- "WORDSIZE",
- "WSABuf",
- "WSACleanup",
- "WSADESCRIPTION_LEN",
- "WSAData",
- "WSAEACCES",
- "WSAECONNABORTED",
- "WSAECONNRESET",
- "WSAEnumProtocols",
- "WSAID_CONNECTEX",
- "WSAIoctl",
- "WSAPROTOCOL_LEN",
- "WSAProtocolChain",
- "WSAProtocolInfo",
- "WSARecv",
- "WSARecvFrom",
- "WSASYS_STATUS_LEN",
- "WSASend",
- "WSASendTo",
- "WSASendto",
- "WSAStartup",
- "WSTOPPED",
- "WTRAPPED",
- "WUNTRACED",
- "Wait4",
- "WaitForSingleObject",
- "WaitStatus",
- "Win32FileAttributeData",
- "Win32finddata",
- "Write",
- "WriteConsole",
- "WriteFile",
- "X509_ASN_ENCODING",
- "XCASE",
- "XP1_CONNECTIONLESS",
- "XP1_CONNECT_DATA",
- "XP1_DISCONNECT_DATA",
- "XP1_EXPEDITED_DATA",
- "XP1_GRACEFUL_CLOSE",
- "XP1_GUARANTEED_DELIVERY",
- "XP1_GUARANTEED_ORDER",
- "XP1_IFS_HANDLES",
- "XP1_MESSAGE_ORIENTED",
- "XP1_MULTIPOINT_CONTROL_PLANE",
- "XP1_MULTIPOINT_DATA_PLANE",
- "XP1_PARTIAL_MESSAGE",
- "XP1_PSEUDO_STREAM",
- "XP1_QOS_SUPPORTED",
- "XP1_SAN_SUPPORT_SDP",
- "XP1_SUPPORT_BROADCAST",
- "XP1_SUPPORT_MULTIPOINT",
- "XP1_UNI_RECV",
- "XP1_UNI_SEND",
- },
- "syscall/js": {
- "CopyBytesToGo",
- "CopyBytesToJS",
- "Error",
- "Func",
- "FuncOf",
- "Global",
- "Null",
- "Type",
- "TypeBoolean",
- "TypeFunction",
- "TypeNull",
- "TypeNumber",
- "TypeObject",
- "TypeString",
- "TypeSymbol",
- "TypeUndefined",
- "Undefined",
- "Value",
- "ValueError",
- "ValueOf",
- },
- "testing": {
- "AllocsPerRun",
- "B",
- "Benchmark",
- "BenchmarkResult",
- "Cover",
- "CoverBlock",
- "CoverMode",
- "Coverage",
- "F",
- "Init",
- "InternalBenchmark",
- "InternalExample",
- "InternalFuzzTarget",
- "InternalTest",
- "M",
- "Main",
- "MainStart",
- "PB",
- "RegisterCover",
- "RunBenchmarks",
- "RunExamples",
- "RunTests",
- "Short",
- "T",
- "TB",
- "Testing",
- "Verbose",
- },
- "testing/fstest": {
- "MapFS",
- "MapFile",
- "TestFS",
- },
- "testing/iotest": {
- "DataErrReader",
- "ErrReader",
- "ErrTimeout",
- "HalfReader",
- "NewReadLogger",
- "NewWriteLogger",
- "OneByteReader",
- "TestReader",
- "TimeoutReader",
- "TruncateWriter",
- },
- "testing/quick": {
- "Check",
- "CheckEqual",
- "CheckEqualError",
- "CheckError",
- "Config",
- "Generator",
- "SetupError",
- "Value",
- },
- "testing/slogtest": {
- "TestHandler",
- },
- "text/scanner": {
- "Char",
- "Comment",
- "EOF",
- "Float",
- "GoTokens",
- "GoWhitespace",
- "Ident",
- "Int",
- "Position",
- "RawString",
- "ScanChars",
- "ScanComments",
- "ScanFloats",
- "ScanIdents",
- "ScanInts",
- "ScanRawStrings",
- "ScanStrings",
- "Scanner",
- "SkipComments",
- "String",
- "TokenString",
- },
- "text/tabwriter": {
- "AlignRight",
- "Debug",
- "DiscardEmptyColumns",
- "Escape",
- "FilterHTML",
- "NewWriter",
- "StripEscape",
- "TabIndent",
- "Writer",
- },
- "text/template": {
- "ExecError",
- "FuncMap",
- "HTMLEscape",
- "HTMLEscapeString",
- "HTMLEscaper",
- "IsTrue",
- "JSEscape",
- "JSEscapeString",
- "JSEscaper",
- "Must",
- "New",
- "ParseFS",
- "ParseFiles",
- "ParseGlob",
- "Template",
- "URLQueryEscaper",
- },
- "text/template/parse": {
- "ActionNode",
- "BoolNode",
- "BranchNode",
- "BreakNode",
- "ChainNode",
- "CommandNode",
- "CommentNode",
- "ContinueNode",
- "DotNode",
- "FieldNode",
- "IdentifierNode",
- "IfNode",
- "IsEmptyTree",
- "ListNode",
- "Mode",
- "New",
- "NewIdentifier",
- "NilNode",
- "Node",
- "NodeAction",
- "NodeBool",
- "NodeBreak",
- "NodeChain",
- "NodeCommand",
- "NodeComment",
- "NodeContinue",
- "NodeDot",
- "NodeField",
- "NodeIdentifier",
- "NodeIf",
- "NodeList",
- "NodeNil",
- "NodeNumber",
- "NodePipe",
- "NodeRange",
- "NodeString",
- "NodeTemplate",
- "NodeText",
- "NodeType",
- "NodeVariable",
- "NodeWith",
- "NumberNode",
- "Parse",
- "ParseComments",
- "PipeNode",
- "Pos",
- "RangeNode",
- "SkipFuncCheck",
- "StringNode",
- "TemplateNode",
- "TextNode",
- "Tree",
- "VariableNode",
- "WithNode",
- },
- "time": {
- "ANSIC",
- "After",
- "AfterFunc",
- "April",
- "August",
- "Date",
- "DateOnly",
- "DateTime",
- "December",
- "Duration",
- "February",
- "FixedZone",
- "Friday",
- "Hour",
- "January",
- "July",
- "June",
- "Kitchen",
- "Layout",
- "LoadLocation",
- "LoadLocationFromTZData",
- "Local",
- "Location",
- "March",
- "May",
- "Microsecond",
- "Millisecond",
- "Minute",
- "Monday",
- "Month",
- "Nanosecond",
- "NewTicker",
- "NewTimer",
- "November",
- "Now",
- "October",
- "Parse",
- "ParseDuration",
- "ParseError",
- "ParseInLocation",
- "RFC1123",
- "RFC1123Z",
- "RFC3339",
- "RFC3339Nano",
- "RFC822",
- "RFC822Z",
- "RFC850",
- "RubyDate",
- "Saturday",
- "Second",
- "September",
- "Since",
- "Sleep",
- "Stamp",
- "StampMicro",
- "StampMilli",
- "StampNano",
- "Sunday",
- "Thursday",
- "Tick",
- "Ticker",
- "Time",
- "TimeOnly",
- "Timer",
- "Tuesday",
- "UTC",
- "Unix",
- "UnixDate",
- "UnixMicro",
- "UnixMilli",
- "Until",
- "Wednesday",
- "Weekday",
- },
- "unicode": {
- "ASCII_Hex_Digit",
- "Adlam",
- "Ahom",
- "Anatolian_Hieroglyphs",
- "Arabic",
- "Armenian",
- "Avestan",
- "AzeriCase",
- "Balinese",
- "Bamum",
- "Bassa_Vah",
- "Batak",
- "Bengali",
- "Bhaiksuki",
- "Bidi_Control",
- "Bopomofo",
- "Brahmi",
- "Braille",
- "Buginese",
- "Buhid",
- "C",
- "Canadian_Aboriginal",
- "Carian",
- "CaseRange",
- "CaseRanges",
- "Categories",
- "Caucasian_Albanian",
- "Cc",
- "Cf",
- "Chakma",
- "Cham",
- "Cherokee",
- "Chorasmian",
- "Co",
- "Common",
- "Coptic",
- "Cs",
- "Cuneiform",
- "Cypriot",
- "Cypro_Minoan",
- "Cyrillic",
- "Dash",
- "Deprecated",
- "Deseret",
- "Devanagari",
- "Diacritic",
- "Digit",
- "Dives_Akuru",
- "Dogra",
- "Duployan",
- "Egyptian_Hieroglyphs",
- "Elbasan",
- "Elymaic",
- "Ethiopic",
- "Extender",
- "FoldCategory",
- "FoldScript",
- "Georgian",
- "Glagolitic",
- "Gothic",
- "Grantha",
- "GraphicRanges",
- "Greek",
- "Gujarati",
- "Gunjala_Gondi",
- "Gurmukhi",
- "Han",
- "Hangul",
- "Hanifi_Rohingya",
- "Hanunoo",
- "Hatran",
- "Hebrew",
- "Hex_Digit",
- "Hiragana",
- "Hyphen",
- "IDS_Binary_Operator",
- "IDS_Trinary_Operator",
- "Ideographic",
- "Imperial_Aramaic",
- "In",
- "Inherited",
- "Inscriptional_Pahlavi",
- "Inscriptional_Parthian",
- "Is",
- "IsControl",
- "IsDigit",
- "IsGraphic",
- "IsLetter",
- "IsLower",
- "IsMark",
- "IsNumber",
- "IsOneOf",
- "IsPrint",
- "IsPunct",
- "IsSpace",
- "IsSymbol",
- "IsTitle",
- "IsUpper",
- "Javanese",
- "Join_Control",
- "Kaithi",
- "Kannada",
- "Katakana",
- "Kawi",
- "Kayah_Li",
- "Kharoshthi",
- "Khitan_Small_Script",
- "Khmer",
- "Khojki",
- "Khudawadi",
- "L",
- "Lao",
- "Latin",
- "Lepcha",
- "Letter",
- "Limbu",
- "Linear_A",
- "Linear_B",
- "Lisu",
- "Ll",
- "Lm",
- "Lo",
- "Logical_Order_Exception",
- "Lower",
- "LowerCase",
- "Lt",
- "Lu",
- "Lycian",
- "Lydian",
- "M",
- "Mahajani",
- "Makasar",
- "Malayalam",
- "Mandaic",
- "Manichaean",
- "Marchen",
- "Mark",
- "Masaram_Gondi",
- "MaxASCII",
- "MaxCase",
- "MaxLatin1",
- "MaxRune",
- "Mc",
- "Me",
- "Medefaidrin",
- "Meetei_Mayek",
- "Mende_Kikakui",
- "Meroitic_Cursive",
- "Meroitic_Hieroglyphs",
- "Miao",
- "Mn",
- "Modi",
- "Mongolian",
- "Mro",
- "Multani",
- "Myanmar",
- "N",
- "Nabataean",
- "Nag_Mundari",
- "Nandinagari",
- "Nd",
- "New_Tai_Lue",
- "Newa",
- "Nko",
- "Nl",
- "No",
- "Noncharacter_Code_Point",
- "Number",
- "Nushu",
- "Nyiakeng_Puachue_Hmong",
- "Ogham",
- "Ol_Chiki",
- "Old_Hungarian",
- "Old_Italic",
- "Old_North_Arabian",
- "Old_Permic",
- "Old_Persian",
- "Old_Sogdian",
- "Old_South_Arabian",
- "Old_Turkic",
- "Old_Uyghur",
- "Oriya",
- "Osage",
- "Osmanya",
- "Other",
- "Other_Alphabetic",
- "Other_Default_Ignorable_Code_Point",
- "Other_Grapheme_Extend",
- "Other_ID_Continue",
- "Other_ID_Start",
- "Other_Lowercase",
- "Other_Math",
- "Other_Uppercase",
- "P",
- "Pahawh_Hmong",
- "Palmyrene",
- "Pattern_Syntax",
- "Pattern_White_Space",
- "Pau_Cin_Hau",
- "Pc",
- "Pd",
- "Pe",
- "Pf",
- "Phags_Pa",
- "Phoenician",
- "Pi",
- "Po",
- "Prepended_Concatenation_Mark",
- "PrintRanges",
- "Properties",
- "Ps",
- "Psalter_Pahlavi",
- "Punct",
- "Quotation_Mark",
- "Radical",
- "Range16",
- "Range32",
- "RangeTable",
- "Regional_Indicator",
- "Rejang",
- "ReplacementChar",
- "Runic",
- "S",
- "STerm",
- "Samaritan",
- "Saurashtra",
- "Sc",
- "Scripts",
- "Sentence_Terminal",
- "Sharada",
- "Shavian",
- "Siddham",
- "SignWriting",
- "SimpleFold",
- "Sinhala",
- "Sk",
- "Sm",
- "So",
- "Soft_Dotted",
- "Sogdian",
- "Sora_Sompeng",
- "Soyombo",
- "Space",
- "SpecialCase",
- "Sundanese",
- "Syloti_Nagri",
- "Symbol",
- "Syriac",
- "Tagalog",
- "Tagbanwa",
- "Tai_Le",
- "Tai_Tham",
- "Tai_Viet",
- "Takri",
- "Tamil",
- "Tangsa",
- "Tangut",
- "Telugu",
- "Terminal_Punctuation",
- "Thaana",
- "Thai",
- "Tibetan",
- "Tifinagh",
- "Tirhuta",
- "Title",
- "TitleCase",
- "To",
- "ToLower",
- "ToTitle",
- "ToUpper",
- "Toto",
- "TurkishCase",
- "Ugaritic",
- "Unified_Ideograph",
- "Upper",
- "UpperCase",
- "UpperLower",
- "Vai",
- "Variation_Selector",
- "Version",
- "Vithkuqi",
- "Wancho",
- "Warang_Citi",
- "White_Space",
- "Yezidi",
- "Yi",
- "Z",
- "Zanabazar_Square",
- "Zl",
- "Zp",
- "Zs",
- },
- "unicode/utf16": {
- "AppendRune",
- "Decode",
- "DecodeRune",
- "Encode",
- "EncodeRune",
- "IsSurrogate",
- },
- "unicode/utf8": {
- "AppendRune",
- "DecodeLastRune",
- "DecodeLastRuneInString",
- "DecodeRune",
- "DecodeRuneInString",
- "EncodeRune",
- "FullRune",
- "FullRuneInString",
- "MaxRune",
- "RuneCount",
- "RuneCountInString",
- "RuneError",
- "RuneLen",
- "RuneSelf",
- "RuneStart",
- "UTFMax",
- "Valid",
- "ValidRune",
- "ValidString",
- },
- "unsafe": {
- "Add",
- "Alignof",
- "Offsetof",
- "Pointer",
- "Sizeof",
- "Slice",
- "SliceData",
- "String",
- "StringData",
- },
-}
diff --git a/vendor/golang.org/x/tools/internal/packagesinternal/packages.go b/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
index d9950b1f..44719de1 100644
--- a/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
+++ b/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
@@ -5,10 +5,6 @@
// Package packagesinternal exposes internal-only fields from go/packages.
package packagesinternal
-import (
- "golang.org/x/tools/internal/gocommand"
-)
-
var GetForTest = func(p interface{}) string { return "" }
var GetDepsErrors = func(p interface{}) []*PackageError { return nil }
@@ -18,10 +14,6 @@ type PackageError struct {
Err string // the error itself
}
-var GetGoCmdRunner = func(config interface{}) *gocommand.Runner { return nil }
-
-var SetGoCmdRunner = func(config interface{}, runner *gocommand.Runner) {}
-
var TypecheckCgo int
var DepsErrors int // must be set as a LoadMode to call GetDepsErrors
var ForTest int // must be set as a LoadMode to call GetForTest
diff --git a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go
index b92e8e6e..2acd8585 100644
--- a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go
+++ b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go
@@ -23,6 +23,9 @@ type PkgDecoder struct {
// version is the file format version.
version uint32
+ // aliases determines whether types.Aliases should be created
+ aliases bool
+
// sync indicates whether the file uses sync markers.
sync bool
@@ -73,6 +76,7 @@ func (pr *PkgDecoder) SyncMarkers() bool { return pr.sync }
func NewPkgDecoder(pkgPath, input string) PkgDecoder {
pr := PkgDecoder{
pkgPath: pkgPath,
+ //aliases: aliases.Enabled(),
}
// TODO(mdempsky): Implement direct indexing of input string to
diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go
new file mode 100644
index 00000000..fd689207
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go
@@ -0,0 +1,17320 @@
+// Copyright 2024 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.
+
+// Code generated by generate.go. DO NOT EDIT.
+
+package stdlib
+
+var PackageSymbols = map[string][]Symbol{
+ "archive/tar": {
+ {"(*Header).FileInfo", Method, 1},
+ {"(*Reader).Next", Method, 0},
+ {"(*Reader).Read", Method, 0},
+ {"(*Writer).AddFS", Method, 22},
+ {"(*Writer).Close", Method, 0},
+ {"(*Writer).Flush", Method, 0},
+ {"(*Writer).Write", Method, 0},
+ {"(*Writer).WriteHeader", Method, 0},
+ {"(Format).String", Method, 10},
+ {"ErrFieldTooLong", Var, 0},
+ {"ErrHeader", Var, 0},
+ {"ErrInsecurePath", Var, 20},
+ {"ErrWriteAfterClose", Var, 0},
+ {"ErrWriteTooLong", Var, 0},
+ {"FileInfoHeader", Func, 1},
+ {"Format", Type, 10},
+ {"FormatGNU", Const, 10},
+ {"FormatPAX", Const, 10},
+ {"FormatUSTAR", Const, 10},
+ {"FormatUnknown", Const, 10},
+ {"Header", Type, 0},
+ {"Header.AccessTime", Field, 0},
+ {"Header.ChangeTime", Field, 0},
+ {"Header.Devmajor", Field, 0},
+ {"Header.Devminor", Field, 0},
+ {"Header.Format", Field, 10},
+ {"Header.Gid", Field, 0},
+ {"Header.Gname", Field, 0},
+ {"Header.Linkname", Field, 0},
+ {"Header.ModTime", Field, 0},
+ {"Header.Mode", Field, 0},
+ {"Header.Name", Field, 0},
+ {"Header.PAXRecords", Field, 10},
+ {"Header.Size", Field, 0},
+ {"Header.Typeflag", Field, 0},
+ {"Header.Uid", Field, 0},
+ {"Header.Uname", Field, 0},
+ {"Header.Xattrs", Field, 3},
+ {"NewReader", Func, 0},
+ {"NewWriter", Func, 0},
+ {"Reader", Type, 0},
+ {"TypeBlock", Const, 0},
+ {"TypeChar", Const, 0},
+ {"TypeCont", Const, 0},
+ {"TypeDir", Const, 0},
+ {"TypeFifo", Const, 0},
+ {"TypeGNULongLink", Const, 1},
+ {"TypeGNULongName", Const, 1},
+ {"TypeGNUSparse", Const, 3},
+ {"TypeLink", Const, 0},
+ {"TypeReg", Const, 0},
+ {"TypeRegA", Const, 0},
+ {"TypeSymlink", Const, 0},
+ {"TypeXGlobalHeader", Const, 0},
+ {"TypeXHeader", Const, 0},
+ {"Writer", Type, 0},
+ },
+ "archive/zip": {
+ {"(*File).DataOffset", Method, 2},
+ {"(*File).FileInfo", Method, 0},
+ {"(*File).ModTime", Method, 0},
+ {"(*File).Mode", Method, 0},
+ {"(*File).Open", Method, 0},
+ {"(*File).OpenRaw", Method, 17},
+ {"(*File).SetModTime", Method, 0},
+ {"(*File).SetMode", Method, 0},
+ {"(*FileHeader).FileInfo", Method, 0},
+ {"(*FileHeader).ModTime", Method, 0},
+ {"(*FileHeader).Mode", Method, 0},
+ {"(*FileHeader).SetModTime", Method, 0},
+ {"(*FileHeader).SetMode", Method, 0},
+ {"(*ReadCloser).Close", Method, 0},
+ {"(*ReadCloser).Open", Method, 16},
+ {"(*ReadCloser).RegisterDecompressor", Method, 6},
+ {"(*Reader).Open", Method, 16},
+ {"(*Reader).RegisterDecompressor", Method, 6},
+ {"(*Writer).AddFS", Method, 22},
+ {"(*Writer).Close", Method, 0},
+ {"(*Writer).Copy", Method, 17},
+ {"(*Writer).Create", Method, 0},
+ {"(*Writer).CreateHeader", Method, 0},
+ {"(*Writer).CreateRaw", Method, 17},
+ {"(*Writer).Flush", Method, 4},
+ {"(*Writer).RegisterCompressor", Method, 6},
+ {"(*Writer).SetComment", Method, 10},
+ {"(*Writer).SetOffset", Method, 5},
+ {"Compressor", Type, 2},
+ {"Decompressor", Type, 2},
+ {"Deflate", Const, 0},
+ {"ErrAlgorithm", Var, 0},
+ {"ErrChecksum", Var, 0},
+ {"ErrFormat", Var, 0},
+ {"ErrInsecurePath", Var, 20},
+ {"File", Type, 0},
+ {"File.FileHeader", Field, 0},
+ {"FileHeader", Type, 0},
+ {"FileHeader.CRC32", Field, 0},
+ {"FileHeader.Comment", Field, 0},
+ {"FileHeader.CompressedSize", Field, 0},
+ {"FileHeader.CompressedSize64", Field, 1},
+ {"FileHeader.CreatorVersion", Field, 0},
+ {"FileHeader.ExternalAttrs", Field, 0},
+ {"FileHeader.Extra", Field, 0},
+ {"FileHeader.Flags", Field, 0},
+ {"FileHeader.Method", Field, 0},
+ {"FileHeader.Modified", Field, 10},
+ {"FileHeader.ModifiedDate", Field, 0},
+ {"FileHeader.ModifiedTime", Field, 0},
+ {"FileHeader.Name", Field, 0},
+ {"FileHeader.NonUTF8", Field, 10},
+ {"FileHeader.ReaderVersion", Field, 0},
+ {"FileHeader.UncompressedSize", Field, 0},
+ {"FileHeader.UncompressedSize64", Field, 1},
+ {"FileInfoHeader", Func, 0},
+ {"NewReader", Func, 0},
+ {"NewWriter", Func, 0},
+ {"OpenReader", Func, 0},
+ {"ReadCloser", Type, 0},
+ {"ReadCloser.Reader", Field, 0},
+ {"Reader", Type, 0},
+ {"Reader.Comment", Field, 0},
+ {"Reader.File", Field, 0},
+ {"RegisterCompressor", Func, 2},
+ {"RegisterDecompressor", Func, 2},
+ {"Store", Const, 0},
+ {"Writer", Type, 0},
+ },
+ "bufio": {
+ {"(*Reader).Buffered", Method, 0},
+ {"(*Reader).Discard", Method, 5},
+ {"(*Reader).Peek", Method, 0},
+ {"(*Reader).Read", Method, 0},
+ {"(*Reader).ReadByte", Method, 0},
+ {"(*Reader).ReadBytes", Method, 0},
+ {"(*Reader).ReadLine", Method, 0},
+ {"(*Reader).ReadRune", Method, 0},
+ {"(*Reader).ReadSlice", Method, 0},
+ {"(*Reader).ReadString", Method, 0},
+ {"(*Reader).Reset", Method, 2},
+ {"(*Reader).Size", Method, 10},
+ {"(*Reader).UnreadByte", Method, 0},
+ {"(*Reader).UnreadRune", Method, 0},
+ {"(*Reader).WriteTo", Method, 1},
+ {"(*Scanner).Buffer", Method, 6},
+ {"(*Scanner).Bytes", Method, 1},
+ {"(*Scanner).Err", Method, 1},
+ {"(*Scanner).Scan", Method, 1},
+ {"(*Scanner).Split", Method, 1},
+ {"(*Scanner).Text", Method, 1},
+ {"(*Writer).Available", Method, 0},
+ {"(*Writer).AvailableBuffer", Method, 18},
+ {"(*Writer).Buffered", Method, 0},
+ {"(*Writer).Flush", Method, 0},
+ {"(*Writer).ReadFrom", Method, 1},
+ {"(*Writer).Reset", Method, 2},
+ {"(*Writer).Size", Method, 10},
+ {"(*Writer).Write", Method, 0},
+ {"(*Writer).WriteByte", Method, 0},
+ {"(*Writer).WriteRune", Method, 0},
+ {"(*Writer).WriteString", Method, 0},
+ {"(ReadWriter).Available", Method, 0},
+ {"(ReadWriter).AvailableBuffer", Method, 18},
+ {"(ReadWriter).Discard", Method, 5},
+ {"(ReadWriter).Flush", Method, 0},
+ {"(ReadWriter).Peek", Method, 0},
+ {"(ReadWriter).Read", Method, 0},
+ {"(ReadWriter).ReadByte", Method, 0},
+ {"(ReadWriter).ReadBytes", Method, 0},
+ {"(ReadWriter).ReadFrom", Method, 1},
+ {"(ReadWriter).ReadLine", Method, 0},
+ {"(ReadWriter).ReadRune", Method, 0},
+ {"(ReadWriter).ReadSlice", Method, 0},
+ {"(ReadWriter).ReadString", Method, 0},
+ {"(ReadWriter).UnreadByte", Method, 0},
+ {"(ReadWriter).UnreadRune", Method, 0},
+ {"(ReadWriter).Write", Method, 0},
+ {"(ReadWriter).WriteByte", Method, 0},
+ {"(ReadWriter).WriteRune", Method, 0},
+ {"(ReadWriter).WriteString", Method, 0},
+ {"(ReadWriter).WriteTo", Method, 1},
+ {"ErrAdvanceTooFar", Var, 1},
+ {"ErrBadReadCount", Var, 15},
+ {"ErrBufferFull", Var, 0},
+ {"ErrFinalToken", Var, 6},
+ {"ErrInvalidUnreadByte", Var, 0},
+ {"ErrInvalidUnreadRune", Var, 0},
+ {"ErrNegativeAdvance", Var, 1},
+ {"ErrNegativeCount", Var, 0},
+ {"ErrTooLong", Var, 1},
+ {"MaxScanTokenSize", Const, 1},
+ {"NewReadWriter", Func, 0},
+ {"NewReader", Func, 0},
+ {"NewReaderSize", Func, 0},
+ {"NewScanner", Func, 1},
+ {"NewWriter", Func, 0},
+ {"NewWriterSize", Func, 0},
+ {"ReadWriter", Type, 0},
+ {"ReadWriter.Reader", Field, 0},
+ {"ReadWriter.Writer", Field, 0},
+ {"Reader", Type, 0},
+ {"ScanBytes", Func, 1},
+ {"ScanLines", Func, 1},
+ {"ScanRunes", Func, 1},
+ {"ScanWords", Func, 1},
+ {"Scanner", Type, 1},
+ {"SplitFunc", Type, 1},
+ {"Writer", Type, 0},
+ },
+ "bytes": {
+ {"(*Buffer).Available", Method, 21},
+ {"(*Buffer).AvailableBuffer", Method, 21},
+ {"(*Buffer).Bytes", Method, 0},
+ {"(*Buffer).Cap", Method, 5},
+ {"(*Buffer).Grow", Method, 1},
+ {"(*Buffer).Len", Method, 0},
+ {"(*Buffer).Next", Method, 0},
+ {"(*Buffer).Read", Method, 0},
+ {"(*Buffer).ReadByte", Method, 0},
+ {"(*Buffer).ReadBytes", Method, 0},
+ {"(*Buffer).ReadFrom", Method, 0},
+ {"(*Buffer).ReadRune", Method, 0},
+ {"(*Buffer).ReadString", Method, 0},
+ {"(*Buffer).Reset", Method, 0},
+ {"(*Buffer).String", Method, 0},
+ {"(*Buffer).Truncate", Method, 0},
+ {"(*Buffer).UnreadByte", Method, 0},
+ {"(*Buffer).UnreadRune", Method, 0},
+ {"(*Buffer).Write", Method, 0},
+ {"(*Buffer).WriteByte", Method, 0},
+ {"(*Buffer).WriteRune", Method, 0},
+ {"(*Buffer).WriteString", Method, 0},
+ {"(*Buffer).WriteTo", Method, 0},
+ {"(*Reader).Len", Method, 0},
+ {"(*Reader).Read", Method, 0},
+ {"(*Reader).ReadAt", Method, 0},
+ {"(*Reader).ReadByte", Method, 0},
+ {"(*Reader).ReadRune", Method, 0},
+ {"(*Reader).Reset", Method, 7},
+ {"(*Reader).Seek", Method, 0},
+ {"(*Reader).Size", Method, 5},
+ {"(*Reader).UnreadByte", Method, 0},
+ {"(*Reader).UnreadRune", Method, 0},
+ {"(*Reader).WriteTo", Method, 1},
+ {"Buffer", Type, 0},
+ {"Clone", Func, 20},
+ {"Compare", Func, 0},
+ {"Contains", Func, 0},
+ {"ContainsAny", Func, 7},
+ {"ContainsFunc", Func, 21},
+ {"ContainsRune", Func, 7},
+ {"Count", Func, 0},
+ {"Cut", Func, 18},
+ {"CutPrefix", Func, 20},
+ {"CutSuffix", Func, 20},
+ {"Equal", Func, 0},
+ {"EqualFold", Func, 0},
+ {"ErrTooLarge", Var, 0},
+ {"Fields", Func, 0},
+ {"FieldsFunc", Func, 0},
+ {"HasPrefix", Func, 0},
+ {"HasSuffix", Func, 0},
+ {"Index", Func, 0},
+ {"IndexAny", Func, 0},
+ {"IndexByte", Func, 0},
+ {"IndexFunc", Func, 0},
+ {"IndexRune", Func, 0},
+ {"Join", Func, 0},
+ {"LastIndex", Func, 0},
+ {"LastIndexAny", Func, 0},
+ {"LastIndexByte", Func, 5},
+ {"LastIndexFunc", Func, 0},
+ {"Map", Func, 0},
+ {"MinRead", Const, 0},
+ {"NewBuffer", Func, 0},
+ {"NewBufferString", Func, 0},
+ {"NewReader", Func, 0},
+ {"Reader", Type, 0},
+ {"Repeat", Func, 0},
+ {"Replace", Func, 0},
+ {"ReplaceAll", Func, 12},
+ {"Runes", Func, 0},
+ {"Split", Func, 0},
+ {"SplitAfter", Func, 0},
+ {"SplitAfterN", Func, 0},
+ {"SplitN", Func, 0},
+ {"Title", Func, 0},
+ {"ToLower", Func, 0},
+ {"ToLowerSpecial", Func, 0},
+ {"ToTitle", Func, 0},
+ {"ToTitleSpecial", Func, 0},
+ {"ToUpper", Func, 0},
+ {"ToUpperSpecial", Func, 0},
+ {"ToValidUTF8", Func, 13},
+ {"Trim", Func, 0},
+ {"TrimFunc", Func, 0},
+ {"TrimLeft", Func, 0},
+ {"TrimLeftFunc", Func, 0},
+ {"TrimPrefix", Func, 1},
+ {"TrimRight", Func, 0},
+ {"TrimRightFunc", Func, 0},
+ {"TrimSpace", Func, 0},
+ {"TrimSuffix", Func, 1},
+ },
+ "cmp": {
+ {"Compare", Func, 21},
+ {"Less", Func, 21},
+ {"Or", Func, 22},
+ {"Ordered", Type, 21},
+ },
+ "compress/bzip2": {
+ {"(StructuralError).Error", Method, 0},
+ {"NewReader", Func, 0},
+ {"StructuralError", Type, 0},
+ },
+ "compress/flate": {
+ {"(*ReadError).Error", Method, 0},
+ {"(*WriteError).Error", Method, 0},
+ {"(*Writer).Close", Method, 0},
+ {"(*Writer).Flush", Method, 0},
+ {"(*Writer).Reset", Method, 2},
+ {"(*Writer).Write", Method, 0},
+ {"(CorruptInputError).Error", Method, 0},
+ {"(InternalError).Error", Method, 0},
+ {"BestCompression", Const, 0},
+ {"BestSpeed", Const, 0},
+ {"CorruptInputError", Type, 0},
+ {"DefaultCompression", Const, 0},
+ {"HuffmanOnly", Const, 7},
+ {"InternalError", Type, 0},
+ {"NewReader", Func, 0},
+ {"NewReaderDict", Func, 0},
+ {"NewWriter", Func, 0},
+ {"NewWriterDict", Func, 0},
+ {"NoCompression", Const, 0},
+ {"ReadError", Type, 0},
+ {"ReadError.Err", Field, 0},
+ {"ReadError.Offset", Field, 0},
+ {"Reader", Type, 0},
+ {"Resetter", Type, 4},
+ {"WriteError", Type, 0},
+ {"WriteError.Err", Field, 0},
+ {"WriteError.Offset", Field, 0},
+ {"Writer", Type, 0},
+ },
+ "compress/gzip": {
+ {"(*Reader).Close", Method, 0},
+ {"(*Reader).Multistream", Method, 4},
+ {"(*Reader).Read", Method, 0},
+ {"(*Reader).Reset", Method, 3},
+ {"(*Writer).Close", Method, 0},
+ {"(*Writer).Flush", Method, 1},
+ {"(*Writer).Reset", Method, 2},
+ {"(*Writer).Write", Method, 0},
+ {"BestCompression", Const, 0},
+ {"BestSpeed", Const, 0},
+ {"DefaultCompression", Const, 0},
+ {"ErrChecksum", Var, 0},
+ {"ErrHeader", Var, 0},
+ {"Header", Type, 0},
+ {"Header.Comment", Field, 0},
+ {"Header.Extra", Field, 0},
+ {"Header.ModTime", Field, 0},
+ {"Header.Name", Field, 0},
+ {"Header.OS", Field, 0},
+ {"HuffmanOnly", Const, 8},
+ {"NewReader", Func, 0},
+ {"NewWriter", Func, 0},
+ {"NewWriterLevel", Func, 0},
+ {"NoCompression", Const, 0},
+ {"Reader", Type, 0},
+ {"Reader.Header", Field, 0},
+ {"Writer", Type, 0},
+ {"Writer.Header", Field, 0},
+ },
+ "compress/lzw": {
+ {"(*Reader).Close", Method, 17},
+ {"(*Reader).Read", Method, 17},
+ {"(*Reader).Reset", Method, 17},
+ {"(*Writer).Close", Method, 17},
+ {"(*Writer).Reset", Method, 17},
+ {"(*Writer).Write", Method, 17},
+ {"LSB", Const, 0},
+ {"MSB", Const, 0},
+ {"NewReader", Func, 0},
+ {"NewWriter", Func, 0},
+ {"Order", Type, 0},
+ {"Reader", Type, 17},
+ {"Writer", Type, 17},
+ },
+ "compress/zlib": {
+ {"(*Writer).Close", Method, 0},
+ {"(*Writer).Flush", Method, 0},
+ {"(*Writer).Reset", Method, 2},
+ {"(*Writer).Write", Method, 0},
+ {"BestCompression", Const, 0},
+ {"BestSpeed", Const, 0},
+ {"DefaultCompression", Const, 0},
+ {"ErrChecksum", Var, 0},
+ {"ErrDictionary", Var, 0},
+ {"ErrHeader", Var, 0},
+ {"HuffmanOnly", Const, 8},
+ {"NewReader", Func, 0},
+ {"NewReaderDict", Func, 0},
+ {"NewWriter", Func, 0},
+ {"NewWriterLevel", Func, 0},
+ {"NewWriterLevelDict", Func, 0},
+ {"NoCompression", Const, 0},
+ {"Resetter", Type, 4},
+ {"Writer", Type, 0},
+ },
+ "container/heap": {
+ {"Fix", Func, 2},
+ {"Init", Func, 0},
+ {"Interface", Type, 0},
+ {"Pop", Func, 0},
+ {"Push", Func, 0},
+ {"Remove", Func, 0},
+ },
+ "container/list": {
+ {"(*Element).Next", Method, 0},
+ {"(*Element).Prev", Method, 0},
+ {"(*List).Back", Method, 0},
+ {"(*List).Front", Method, 0},
+ {"(*List).Init", Method, 0},
+ {"(*List).InsertAfter", Method, 0},
+ {"(*List).InsertBefore", Method, 0},
+ {"(*List).Len", Method, 0},
+ {"(*List).MoveAfter", Method, 2},
+ {"(*List).MoveBefore", Method, 2},
+ {"(*List).MoveToBack", Method, 0},
+ {"(*List).MoveToFront", Method, 0},
+ {"(*List).PushBack", Method, 0},
+ {"(*List).PushBackList", Method, 0},
+ {"(*List).PushFront", Method, 0},
+ {"(*List).PushFrontList", Method, 0},
+ {"(*List).Remove", Method, 0},
+ {"Element", Type, 0},
+ {"Element.Value", Field, 0},
+ {"List", Type, 0},
+ {"New", Func, 0},
+ },
+ "container/ring": {
+ {"(*Ring).Do", Method, 0},
+ {"(*Ring).Len", Method, 0},
+ {"(*Ring).Link", Method, 0},
+ {"(*Ring).Move", Method, 0},
+ {"(*Ring).Next", Method, 0},
+ {"(*Ring).Prev", Method, 0},
+ {"(*Ring).Unlink", Method, 0},
+ {"New", Func, 0},
+ {"Ring", Type, 0},
+ {"Ring.Value", Field, 0},
+ },
+ "context": {
+ {"AfterFunc", Func, 21},
+ {"Background", Func, 7},
+ {"CancelCauseFunc", Type, 20},
+ {"CancelFunc", Type, 7},
+ {"Canceled", Var, 7},
+ {"Cause", Func, 20},
+ {"Context", Type, 7},
+ {"DeadlineExceeded", Var, 7},
+ {"TODO", Func, 7},
+ {"WithCancel", Func, 7},
+ {"WithCancelCause", Func, 20},
+ {"WithDeadline", Func, 7},
+ {"WithDeadlineCause", Func, 21},
+ {"WithTimeout", Func, 7},
+ {"WithTimeoutCause", Func, 21},
+ {"WithValue", Func, 7},
+ {"WithoutCancel", Func, 21},
+ },
+ "crypto": {
+ {"(Hash).Available", Method, 0},
+ {"(Hash).HashFunc", Method, 4},
+ {"(Hash).New", Method, 0},
+ {"(Hash).Size", Method, 0},
+ {"(Hash).String", Method, 15},
+ {"BLAKE2b_256", Const, 9},
+ {"BLAKE2b_384", Const, 9},
+ {"BLAKE2b_512", Const, 9},
+ {"BLAKE2s_256", Const, 9},
+ {"Decrypter", Type, 5},
+ {"DecrypterOpts", Type, 5},
+ {"Hash", Type, 0},
+ {"MD4", Const, 0},
+ {"MD5", Const, 0},
+ {"MD5SHA1", Const, 0},
+ {"PrivateKey", Type, 0},
+ {"PublicKey", Type, 2},
+ {"RIPEMD160", Const, 0},
+ {"RegisterHash", Func, 0},
+ {"SHA1", Const, 0},
+ {"SHA224", Const, 0},
+ {"SHA256", Const, 0},
+ {"SHA384", Const, 0},
+ {"SHA3_224", Const, 4},
+ {"SHA3_256", Const, 4},
+ {"SHA3_384", Const, 4},
+ {"SHA3_512", Const, 4},
+ {"SHA512", Const, 0},
+ {"SHA512_224", Const, 5},
+ {"SHA512_256", Const, 5},
+ {"Signer", Type, 4},
+ {"SignerOpts", Type, 4},
+ },
+ "crypto/aes": {
+ {"(KeySizeError).Error", Method, 0},
+ {"BlockSize", Const, 0},
+ {"KeySizeError", Type, 0},
+ {"NewCipher", Func, 0},
+ },
+ "crypto/cipher": {
+ {"(StreamReader).Read", Method, 0},
+ {"(StreamWriter).Close", Method, 0},
+ {"(StreamWriter).Write", Method, 0},
+ {"AEAD", Type, 2},
+ {"Block", Type, 0},
+ {"BlockMode", Type, 0},
+ {"NewCBCDecrypter", Func, 0},
+ {"NewCBCEncrypter", Func, 0},
+ {"NewCFBDecrypter", Func, 0},
+ {"NewCFBEncrypter", Func, 0},
+ {"NewCTR", Func, 0},
+ {"NewGCM", Func, 2},
+ {"NewGCMWithNonceSize", Func, 5},
+ {"NewGCMWithTagSize", Func, 11},
+ {"NewOFB", Func, 0},
+ {"Stream", Type, 0},
+ {"StreamReader", Type, 0},
+ {"StreamReader.R", Field, 0},
+ {"StreamReader.S", Field, 0},
+ {"StreamWriter", Type, 0},
+ {"StreamWriter.Err", Field, 0},
+ {"StreamWriter.S", Field, 0},
+ {"StreamWriter.W", Field, 0},
+ },
+ "crypto/des": {
+ {"(KeySizeError).Error", Method, 0},
+ {"BlockSize", Const, 0},
+ {"KeySizeError", Type, 0},
+ {"NewCipher", Func, 0},
+ {"NewTripleDESCipher", Func, 0},
+ },
+ "crypto/dsa": {
+ {"ErrInvalidPublicKey", Var, 0},
+ {"GenerateKey", Func, 0},
+ {"GenerateParameters", Func, 0},
+ {"L1024N160", Const, 0},
+ {"L2048N224", Const, 0},
+ {"L2048N256", Const, 0},
+ {"L3072N256", Const, 0},
+ {"ParameterSizes", Type, 0},
+ {"Parameters", Type, 0},
+ {"Parameters.G", Field, 0},
+ {"Parameters.P", Field, 0},
+ {"Parameters.Q", Field, 0},
+ {"PrivateKey", Type, 0},
+ {"PrivateKey.PublicKey", Field, 0},
+ {"PrivateKey.X", Field, 0},
+ {"PublicKey", Type, 0},
+ {"PublicKey.Parameters", Field, 0},
+ {"PublicKey.Y", Field, 0},
+ {"Sign", Func, 0},
+ {"Verify", Func, 0},
+ },
+ "crypto/ecdh": {
+ {"(*PrivateKey).Bytes", Method, 20},
+ {"(*PrivateKey).Curve", Method, 20},
+ {"(*PrivateKey).ECDH", Method, 20},
+ {"(*PrivateKey).Equal", Method, 20},
+ {"(*PrivateKey).Public", Method, 20},
+ {"(*PrivateKey).PublicKey", Method, 20},
+ {"(*PublicKey).Bytes", Method, 20},
+ {"(*PublicKey).Curve", Method, 20},
+ {"(*PublicKey).Equal", Method, 20},
+ {"Curve", Type, 20},
+ {"P256", Func, 20},
+ {"P384", Func, 20},
+ {"P521", Func, 20},
+ {"PrivateKey", Type, 20},
+ {"PublicKey", Type, 20},
+ {"X25519", Func, 20},
+ },
+ "crypto/ecdsa": {
+ {"(*PrivateKey).ECDH", Method, 20},
+ {"(*PrivateKey).Equal", Method, 15},
+ {"(*PrivateKey).Public", Method, 4},
+ {"(*PrivateKey).Sign", Method, 4},
+ {"(*PublicKey).ECDH", Method, 20},
+ {"(*PublicKey).Equal", Method, 15},
+ {"(PrivateKey).Add", Method, 0},
+ {"(PrivateKey).Double", Method, 0},
+ {"(PrivateKey).IsOnCurve", Method, 0},
+ {"(PrivateKey).Params", Method, 0},
+ {"(PrivateKey).ScalarBaseMult", Method, 0},
+ {"(PrivateKey).ScalarMult", Method, 0},
+ {"(PublicKey).Add", Method, 0},
+ {"(PublicKey).Double", Method, 0},
+ {"(PublicKey).IsOnCurve", Method, 0},
+ {"(PublicKey).Params", Method, 0},
+ {"(PublicKey).ScalarBaseMult", Method, 0},
+ {"(PublicKey).ScalarMult", Method, 0},
+ {"GenerateKey", Func, 0},
+ {"PrivateKey", Type, 0},
+ {"PrivateKey.D", Field, 0},
+ {"PrivateKey.PublicKey", Field, 0},
+ {"PublicKey", Type, 0},
+ {"PublicKey.Curve", Field, 0},
+ {"PublicKey.X", Field, 0},
+ {"PublicKey.Y", Field, 0},
+ {"Sign", Func, 0},
+ {"SignASN1", Func, 15},
+ {"Verify", Func, 0},
+ {"VerifyASN1", Func, 15},
+ },
+ "crypto/ed25519": {
+ {"(*Options).HashFunc", Method, 20},
+ {"(PrivateKey).Equal", Method, 15},
+ {"(PrivateKey).Public", Method, 13},
+ {"(PrivateKey).Seed", Method, 13},
+ {"(PrivateKey).Sign", Method, 13},
+ {"(PublicKey).Equal", Method, 15},
+ {"GenerateKey", Func, 13},
+ {"NewKeyFromSeed", Func, 13},
+ {"Options", Type, 20},
+ {"Options.Context", Field, 20},
+ {"Options.Hash", Field, 20},
+ {"PrivateKey", Type, 13},
+ {"PrivateKeySize", Const, 13},
+ {"PublicKey", Type, 13},
+ {"PublicKeySize", Const, 13},
+ {"SeedSize", Const, 13},
+ {"Sign", Func, 13},
+ {"SignatureSize", Const, 13},
+ {"Verify", Func, 13},
+ {"VerifyWithOptions", Func, 20},
+ },
+ "crypto/elliptic": {
+ {"(*CurveParams).Add", Method, 0},
+ {"(*CurveParams).Double", Method, 0},
+ {"(*CurveParams).IsOnCurve", Method, 0},
+ {"(*CurveParams).Params", Method, 0},
+ {"(*CurveParams).ScalarBaseMult", Method, 0},
+ {"(*CurveParams).ScalarMult", Method, 0},
+ {"Curve", Type, 0},
+ {"CurveParams", Type, 0},
+ {"CurveParams.B", Field, 0},
+ {"CurveParams.BitSize", Field, 0},
+ {"CurveParams.Gx", Field, 0},
+ {"CurveParams.Gy", Field, 0},
+ {"CurveParams.N", Field, 0},
+ {"CurveParams.Name", Field, 5},
+ {"CurveParams.P", Field, 0},
+ {"GenerateKey", Func, 0},
+ {"Marshal", Func, 0},
+ {"MarshalCompressed", Func, 15},
+ {"P224", Func, 0},
+ {"P256", Func, 0},
+ {"P384", Func, 0},
+ {"P521", Func, 0},
+ {"Unmarshal", Func, 0},
+ {"UnmarshalCompressed", Func, 15},
+ },
+ "crypto/hmac": {
+ {"Equal", Func, 1},
+ {"New", Func, 0},
+ },
+ "crypto/md5": {
+ {"BlockSize", Const, 0},
+ {"New", Func, 0},
+ {"Size", Const, 0},
+ {"Sum", Func, 2},
+ },
+ "crypto/rand": {
+ {"Int", Func, 0},
+ {"Prime", Func, 0},
+ {"Read", Func, 0},
+ {"Reader", Var, 0},
+ },
+ "crypto/rc4": {
+ {"(*Cipher).Reset", Method, 0},
+ {"(*Cipher).XORKeyStream", Method, 0},
+ {"(KeySizeError).Error", Method, 0},
+ {"Cipher", Type, 0},
+ {"KeySizeError", Type, 0},
+ {"NewCipher", Func, 0},
+ },
+ "crypto/rsa": {
+ {"(*PSSOptions).HashFunc", Method, 4},
+ {"(*PrivateKey).Decrypt", Method, 5},
+ {"(*PrivateKey).Equal", Method, 15},
+ {"(*PrivateKey).Precompute", Method, 0},
+ {"(*PrivateKey).Public", Method, 4},
+ {"(*PrivateKey).Sign", Method, 4},
+ {"(*PrivateKey).Size", Method, 11},
+ {"(*PrivateKey).Validate", Method, 0},
+ {"(*PublicKey).Equal", Method, 15},
+ {"(*PublicKey).Size", Method, 11},
+ {"CRTValue", Type, 0},
+ {"CRTValue.Coeff", Field, 0},
+ {"CRTValue.Exp", Field, 0},
+ {"CRTValue.R", Field, 0},
+ {"DecryptOAEP", Func, 0},
+ {"DecryptPKCS1v15", Func, 0},
+ {"DecryptPKCS1v15SessionKey", Func, 0},
+ {"EncryptOAEP", Func, 0},
+ {"EncryptPKCS1v15", Func, 0},
+ {"ErrDecryption", Var, 0},
+ {"ErrMessageTooLong", Var, 0},
+ {"ErrVerification", Var, 0},
+ {"GenerateKey", Func, 0},
+ {"GenerateMultiPrimeKey", Func, 0},
+ {"OAEPOptions", Type, 5},
+ {"OAEPOptions.Hash", Field, 5},
+ {"OAEPOptions.Label", Field, 5},
+ {"OAEPOptions.MGFHash", Field, 20},
+ {"PKCS1v15DecryptOptions", Type, 5},
+ {"PKCS1v15DecryptOptions.SessionKeyLen", Field, 5},
+ {"PSSOptions", Type, 2},
+ {"PSSOptions.Hash", Field, 4},
+ {"PSSOptions.SaltLength", Field, 2},
+ {"PSSSaltLengthAuto", Const, 2},
+ {"PSSSaltLengthEqualsHash", Const, 2},
+ {"PrecomputedValues", Type, 0},
+ {"PrecomputedValues.CRTValues", Field, 0},
+ {"PrecomputedValues.Dp", Field, 0},
+ {"PrecomputedValues.Dq", Field, 0},
+ {"PrecomputedValues.Qinv", Field, 0},
+ {"PrivateKey", Type, 0},
+ {"PrivateKey.D", Field, 0},
+ {"PrivateKey.Precomputed", Field, 0},
+ {"PrivateKey.Primes", Field, 0},
+ {"PrivateKey.PublicKey", Field, 0},
+ {"PublicKey", Type, 0},
+ {"PublicKey.E", Field, 0},
+ {"PublicKey.N", Field, 0},
+ {"SignPKCS1v15", Func, 0},
+ {"SignPSS", Func, 2},
+ {"VerifyPKCS1v15", Func, 0},
+ {"VerifyPSS", Func, 2},
+ },
+ "crypto/sha1": {
+ {"BlockSize", Const, 0},
+ {"New", Func, 0},
+ {"Size", Const, 0},
+ {"Sum", Func, 2},
+ },
+ "crypto/sha256": {
+ {"BlockSize", Const, 0},
+ {"New", Func, 0},
+ {"New224", Func, 0},
+ {"Size", Const, 0},
+ {"Size224", Const, 0},
+ {"Sum224", Func, 2},
+ {"Sum256", Func, 2},
+ },
+ "crypto/sha512": {
+ {"BlockSize", Const, 0},
+ {"New", Func, 0},
+ {"New384", Func, 0},
+ {"New512_224", Func, 5},
+ {"New512_256", Func, 5},
+ {"Size", Const, 0},
+ {"Size224", Const, 5},
+ {"Size256", Const, 5},
+ {"Size384", Const, 0},
+ {"Sum384", Func, 2},
+ {"Sum512", Func, 2},
+ {"Sum512_224", Func, 5},
+ {"Sum512_256", Func, 5},
+ },
+ "crypto/subtle": {
+ {"ConstantTimeByteEq", Func, 0},
+ {"ConstantTimeCompare", Func, 0},
+ {"ConstantTimeCopy", Func, 0},
+ {"ConstantTimeEq", Func, 0},
+ {"ConstantTimeLessOrEq", Func, 2},
+ {"ConstantTimeSelect", Func, 0},
+ {"XORBytes", Func, 20},
+ },
+ "crypto/tls": {
+ {"(*CertificateRequestInfo).Context", Method, 17},
+ {"(*CertificateRequestInfo).SupportsCertificate", Method, 14},
+ {"(*CertificateVerificationError).Error", Method, 20},
+ {"(*CertificateVerificationError).Unwrap", Method, 20},
+ {"(*ClientHelloInfo).Context", Method, 17},
+ {"(*ClientHelloInfo).SupportsCertificate", Method, 14},
+ {"(*ClientSessionState).ResumptionState", Method, 21},
+ {"(*Config).BuildNameToCertificate", Method, 0},
+ {"(*Config).Clone", Method, 8},
+ {"(*Config).DecryptTicket", Method, 21},
+ {"(*Config).EncryptTicket", Method, 21},
+ {"(*Config).SetSessionTicketKeys", Method, 5},
+ {"(*Conn).Close", Method, 0},
+ {"(*Conn).CloseWrite", Method, 8},
+ {"(*Conn).ConnectionState", Method, 0},
+ {"(*Conn).Handshake", Method, 0},
+ {"(*Conn).HandshakeContext", Method, 17},
+ {"(*Conn).LocalAddr", Method, 0},
+ {"(*Conn).NetConn", Method, 18},
+ {"(*Conn).OCSPResponse", Method, 0},
+ {"(*Conn).Read", Method, 0},
+ {"(*Conn).RemoteAddr", Method, 0},
+ {"(*Conn).SetDeadline", Method, 0},
+ {"(*Conn).SetReadDeadline", Method, 0},
+ {"(*Conn).SetWriteDeadline", Method, 0},
+ {"(*Conn).VerifyHostname", Method, 0},
+ {"(*Conn).Write", Method, 0},
+ {"(*ConnectionState).ExportKeyingMaterial", Method, 11},
+ {"(*Dialer).Dial", Method, 15},
+ {"(*Dialer).DialContext", Method, 15},
+ {"(*QUICConn).Close", Method, 21},
+ {"(*QUICConn).ConnectionState", Method, 21},
+ {"(*QUICConn).HandleData", Method, 21},
+ {"(*QUICConn).NextEvent", Method, 21},
+ {"(*QUICConn).SendSessionTicket", Method, 21},
+ {"(*QUICConn).SetTransportParameters", Method, 21},
+ {"(*QUICConn).Start", Method, 21},
+ {"(*SessionState).Bytes", Method, 21},
+ {"(AlertError).Error", Method, 21},
+ {"(ClientAuthType).String", Method, 15},
+ {"(CurveID).String", Method, 15},
+ {"(QUICEncryptionLevel).String", Method, 21},
+ {"(RecordHeaderError).Error", Method, 6},
+ {"(SignatureScheme).String", Method, 15},
+ {"AlertError", Type, 21},
+ {"Certificate", Type, 0},
+ {"Certificate.Certificate", Field, 0},
+ {"Certificate.Leaf", Field, 0},
+ {"Certificate.OCSPStaple", Field, 0},
+ {"Certificate.PrivateKey", Field, 0},
+ {"Certificate.SignedCertificateTimestamps", Field, 5},
+ {"Certificate.SupportedSignatureAlgorithms", Field, 14},
+ {"CertificateRequestInfo", Type, 8},
+ {"CertificateRequestInfo.AcceptableCAs", Field, 8},
+ {"CertificateRequestInfo.SignatureSchemes", Field, 8},
+ {"CertificateRequestInfo.Version", Field, 14},
+ {"CertificateVerificationError", Type, 20},
+ {"CertificateVerificationError.Err", Field, 20},
+ {"CertificateVerificationError.UnverifiedCertificates", Field, 20},
+ {"CipherSuite", Type, 14},
+ {"CipherSuite.ID", Field, 14},
+ {"CipherSuite.Insecure", Field, 14},
+ {"CipherSuite.Name", Field, 14},
+ {"CipherSuite.SupportedVersions", Field, 14},
+ {"CipherSuiteName", Func, 14},
+ {"CipherSuites", Func, 14},
+ {"Client", Func, 0},
+ {"ClientAuthType", Type, 0},
+ {"ClientHelloInfo", Type, 4},
+ {"ClientHelloInfo.CipherSuites", Field, 4},
+ {"ClientHelloInfo.Conn", Field, 8},
+ {"ClientHelloInfo.ServerName", Field, 4},
+ {"ClientHelloInfo.SignatureSchemes", Field, 8},
+ {"ClientHelloInfo.SupportedCurves", Field, 4},
+ {"ClientHelloInfo.SupportedPoints", Field, 4},
+ {"ClientHelloInfo.SupportedProtos", Field, 8},
+ {"ClientHelloInfo.SupportedVersions", Field, 8},
+ {"ClientSessionCache", Type, 3},
+ {"ClientSessionState", Type, 3},
+ {"Config", Type, 0},
+ {"Config.Certificates", Field, 0},
+ {"Config.CipherSuites", Field, 0},
+ {"Config.ClientAuth", Field, 0},
+ {"Config.ClientCAs", Field, 0},
+ {"Config.ClientSessionCache", Field, 3},
+ {"Config.CurvePreferences", Field, 3},
+ {"Config.DynamicRecordSizingDisabled", Field, 7},
+ {"Config.GetCertificate", Field, 4},
+ {"Config.GetClientCertificate", Field, 8},
+ {"Config.GetConfigForClient", Field, 8},
+ {"Config.InsecureSkipVerify", Field, 0},
+ {"Config.KeyLogWriter", Field, 8},
+ {"Config.MaxVersion", Field, 2},
+ {"Config.MinVersion", Field, 2},
+ {"Config.NameToCertificate", Field, 0},
+ {"Config.NextProtos", Field, 0},
+ {"Config.PreferServerCipherSuites", Field, 1},
+ {"Config.Rand", Field, 0},
+ {"Config.Renegotiation", Field, 7},
+ {"Config.RootCAs", Field, 0},
+ {"Config.ServerName", Field, 0},
+ {"Config.SessionTicketKey", Field, 1},
+ {"Config.SessionTicketsDisabled", Field, 1},
+ {"Config.Time", Field, 0},
+ {"Config.UnwrapSession", Field, 21},
+ {"Config.VerifyConnection", Field, 15},
+ {"Config.VerifyPeerCertificate", Field, 8},
+ {"Config.WrapSession", Field, 21},
+ {"Conn", Type, 0},
+ {"ConnectionState", Type, 0},
+ {"ConnectionState.CipherSuite", Field, 0},
+ {"ConnectionState.DidResume", Field, 1},
+ {"ConnectionState.HandshakeComplete", Field, 0},
+ {"ConnectionState.NegotiatedProtocol", Field, 0},
+ {"ConnectionState.NegotiatedProtocolIsMutual", Field, 0},
+ {"ConnectionState.OCSPResponse", Field, 5},
+ {"ConnectionState.PeerCertificates", Field, 0},
+ {"ConnectionState.ServerName", Field, 0},
+ {"ConnectionState.SignedCertificateTimestamps", Field, 5},
+ {"ConnectionState.TLSUnique", Field, 4},
+ {"ConnectionState.VerifiedChains", Field, 0},
+ {"ConnectionState.Version", Field, 3},
+ {"CurveID", Type, 3},
+ {"CurveP256", Const, 3},
+ {"CurveP384", Const, 3},
+ {"CurveP521", Const, 3},
+ {"Dial", Func, 0},
+ {"DialWithDialer", Func, 3},
+ {"Dialer", Type, 15},
+ {"Dialer.Config", Field, 15},
+ {"Dialer.NetDialer", Field, 15},
+ {"ECDSAWithP256AndSHA256", Const, 8},
+ {"ECDSAWithP384AndSHA384", Const, 8},
+ {"ECDSAWithP521AndSHA512", Const, 8},
+ {"ECDSAWithSHA1", Const, 10},
+ {"Ed25519", Const, 13},
+ {"InsecureCipherSuites", Func, 14},
+ {"Listen", Func, 0},
+ {"LoadX509KeyPair", Func, 0},
+ {"NewLRUClientSessionCache", Func, 3},
+ {"NewListener", Func, 0},
+ {"NewResumptionState", Func, 21},
+ {"NoClientCert", Const, 0},
+ {"PKCS1WithSHA1", Const, 8},
+ {"PKCS1WithSHA256", Const, 8},
+ {"PKCS1WithSHA384", Const, 8},
+ {"PKCS1WithSHA512", Const, 8},
+ {"PSSWithSHA256", Const, 8},
+ {"PSSWithSHA384", Const, 8},
+ {"PSSWithSHA512", Const, 8},
+ {"ParseSessionState", Func, 21},
+ {"QUICClient", Func, 21},
+ {"QUICConfig", Type, 21},
+ {"QUICConfig.TLSConfig", Field, 21},
+ {"QUICConn", Type, 21},
+ {"QUICEncryptionLevel", Type, 21},
+ {"QUICEncryptionLevelApplication", Const, 21},
+ {"QUICEncryptionLevelEarly", Const, 21},
+ {"QUICEncryptionLevelHandshake", Const, 21},
+ {"QUICEncryptionLevelInitial", Const, 21},
+ {"QUICEvent", Type, 21},
+ {"QUICEvent.Data", Field, 21},
+ {"QUICEvent.Kind", Field, 21},
+ {"QUICEvent.Level", Field, 21},
+ {"QUICEvent.Suite", Field, 21},
+ {"QUICEventKind", Type, 21},
+ {"QUICHandshakeDone", Const, 21},
+ {"QUICNoEvent", Const, 21},
+ {"QUICRejectedEarlyData", Const, 21},
+ {"QUICServer", Func, 21},
+ {"QUICSessionTicketOptions", Type, 21},
+ {"QUICSessionTicketOptions.EarlyData", Field, 21},
+ {"QUICSetReadSecret", Const, 21},
+ {"QUICSetWriteSecret", Const, 21},
+ {"QUICTransportParameters", Const, 21},
+ {"QUICTransportParametersRequired", Const, 21},
+ {"QUICWriteData", Const, 21},
+ {"RecordHeaderError", Type, 6},
+ {"RecordHeaderError.Conn", Field, 12},
+ {"RecordHeaderError.Msg", Field, 6},
+ {"RecordHeaderError.RecordHeader", Field, 6},
+ {"RenegotiateFreelyAsClient", Const, 7},
+ {"RenegotiateNever", Const, 7},
+ {"RenegotiateOnceAsClient", Const, 7},
+ {"RenegotiationSupport", Type, 7},
+ {"RequestClientCert", Const, 0},
+ {"RequireAndVerifyClientCert", Const, 0},
+ {"RequireAnyClientCert", Const, 0},
+ {"Server", Func, 0},
+ {"SessionState", Type, 21},
+ {"SessionState.EarlyData", Field, 21},
+ {"SessionState.Extra", Field, 21},
+ {"SignatureScheme", Type, 8},
+ {"TLS_AES_128_GCM_SHA256", Const, 12},
+ {"TLS_AES_256_GCM_SHA384", Const, 12},
+ {"TLS_CHACHA20_POLY1305_SHA256", Const, 12},
+ {"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", Const, 2},
+ {"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", Const, 8},
+ {"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", Const, 2},
+ {"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", Const, 2},
+ {"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", Const, 5},
+ {"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305", Const, 8},
+ {"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", Const, 14},
+ {"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", Const, 2},
+ {"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", Const, 0},
+ {"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", Const, 0},
+ {"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", Const, 8},
+ {"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", Const, 2},
+ {"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", Const, 1},
+ {"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", Const, 5},
+ {"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305", Const, 8},
+ {"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", Const, 14},
+ {"TLS_ECDHE_RSA_WITH_RC4_128_SHA", Const, 0},
+ {"TLS_FALLBACK_SCSV", Const, 4},
+ {"TLS_RSA_WITH_3DES_EDE_CBC_SHA", Const, 0},
+ {"TLS_RSA_WITH_AES_128_CBC_SHA", Const, 0},
+ {"TLS_RSA_WITH_AES_128_CBC_SHA256", Const, 8},
+ {"TLS_RSA_WITH_AES_128_GCM_SHA256", Const, 6},
+ {"TLS_RSA_WITH_AES_256_CBC_SHA", Const, 1},
+ {"TLS_RSA_WITH_AES_256_GCM_SHA384", Const, 6},
+ {"TLS_RSA_WITH_RC4_128_SHA", Const, 0},
+ {"VerifyClientCertIfGiven", Const, 0},
+ {"VersionName", Func, 21},
+ {"VersionSSL30", Const, 2},
+ {"VersionTLS10", Const, 2},
+ {"VersionTLS11", Const, 2},
+ {"VersionTLS12", Const, 2},
+ {"VersionTLS13", Const, 12},
+ {"X25519", Const, 8},
+ {"X509KeyPair", Func, 0},
+ },
+ "crypto/x509": {
+ {"(*CertPool).AddCert", Method, 0},
+ {"(*CertPool).AddCertWithConstraint", Method, 22},
+ {"(*CertPool).AppendCertsFromPEM", Method, 0},
+ {"(*CertPool).Clone", Method, 19},
+ {"(*CertPool).Equal", Method, 19},
+ {"(*CertPool).Subjects", Method, 0},
+ {"(*Certificate).CheckCRLSignature", Method, 0},
+ {"(*Certificate).CheckSignature", Method, 0},
+ {"(*Certificate).CheckSignatureFrom", Method, 0},
+ {"(*Certificate).CreateCRL", Method, 0},
+ {"(*Certificate).Equal", Method, 0},
+ {"(*Certificate).Verify", Method, 0},
+ {"(*Certificate).VerifyHostname", Method, 0},
+ {"(*CertificateRequest).CheckSignature", Method, 5},
+ {"(*RevocationList).CheckSignatureFrom", Method, 19},
+ {"(CertificateInvalidError).Error", Method, 0},
+ {"(ConstraintViolationError).Error", Method, 0},
+ {"(HostnameError).Error", Method, 0},
+ {"(InsecureAlgorithmError).Error", Method, 6},
+ {"(OID).Equal", Method, 22},
+ {"(OID).EqualASN1OID", Method, 22},
+ {"(OID).String", Method, 22},
+ {"(PublicKeyAlgorithm).String", Method, 10},
+ {"(SignatureAlgorithm).String", Method, 6},
+ {"(SystemRootsError).Error", Method, 1},
+ {"(SystemRootsError).Unwrap", Method, 16},
+ {"(UnhandledCriticalExtension).Error", Method, 0},
+ {"(UnknownAuthorityError).Error", Method, 0},
+ {"CANotAuthorizedForExtKeyUsage", Const, 10},
+ {"CANotAuthorizedForThisName", Const, 0},
+ {"CertPool", Type, 0},
+ {"Certificate", Type, 0},
+ {"Certificate.AuthorityKeyId", Field, 0},
+ {"Certificate.BasicConstraintsValid", Field, 0},
+ {"Certificate.CRLDistributionPoints", Field, 2},
+ {"Certificate.DNSNames", Field, 0},
+ {"Certificate.EmailAddresses", Field, 0},
+ {"Certificate.ExcludedDNSDomains", Field, 9},
+ {"Certificate.ExcludedEmailAddresses", Field, 10},
+ {"Certificate.ExcludedIPRanges", Field, 10},
+ {"Certificate.ExcludedURIDomains", Field, 10},
+ {"Certificate.ExtKeyUsage", Field, 0},
+ {"Certificate.Extensions", Field, 2},
+ {"Certificate.ExtraExtensions", Field, 2},
+ {"Certificate.IPAddresses", Field, 1},
+ {"Certificate.IsCA", Field, 0},
+ {"Certificate.Issuer", Field, 0},
+ {"Certificate.IssuingCertificateURL", Field, 2},
+ {"Certificate.KeyUsage", Field, 0},
+ {"Certificate.MaxPathLen", Field, 0},
+ {"Certificate.MaxPathLenZero", Field, 4},
+ {"Certificate.NotAfter", Field, 0},
+ {"Certificate.NotBefore", Field, 0},
+ {"Certificate.OCSPServer", Field, 2},
+ {"Certificate.PermittedDNSDomains", Field, 0},
+ {"Certificate.PermittedDNSDomainsCritical", Field, 0},
+ {"Certificate.PermittedEmailAddresses", Field, 10},
+ {"Certificate.PermittedIPRanges", Field, 10},
+ {"Certificate.PermittedURIDomains", Field, 10},
+ {"Certificate.Policies", Field, 22},
+ {"Certificate.PolicyIdentifiers", Field, 0},
+ {"Certificate.PublicKey", Field, 0},
+ {"Certificate.PublicKeyAlgorithm", Field, 0},
+ {"Certificate.Raw", Field, 0},
+ {"Certificate.RawIssuer", Field, 0},
+ {"Certificate.RawSubject", Field, 0},
+ {"Certificate.RawSubjectPublicKeyInfo", Field, 0},
+ {"Certificate.RawTBSCertificate", Field, 0},
+ {"Certificate.SerialNumber", Field, 0},
+ {"Certificate.Signature", Field, 0},
+ {"Certificate.SignatureAlgorithm", Field, 0},
+ {"Certificate.Subject", Field, 0},
+ {"Certificate.SubjectKeyId", Field, 0},
+ {"Certificate.URIs", Field, 10},
+ {"Certificate.UnhandledCriticalExtensions", Field, 5},
+ {"Certificate.UnknownExtKeyUsage", Field, 0},
+ {"Certificate.Version", Field, 0},
+ {"CertificateInvalidError", Type, 0},
+ {"CertificateInvalidError.Cert", Field, 0},
+ {"CertificateInvalidError.Detail", Field, 10},
+ {"CertificateInvalidError.Reason", Field, 0},
+ {"CertificateRequest", Type, 3},
+ {"CertificateRequest.Attributes", Field, 3},
+ {"CertificateRequest.DNSNames", Field, 3},
+ {"CertificateRequest.EmailAddresses", Field, 3},
+ {"CertificateRequest.Extensions", Field, 3},
+ {"CertificateRequest.ExtraExtensions", Field, 3},
+ {"CertificateRequest.IPAddresses", Field, 3},
+ {"CertificateRequest.PublicKey", Field, 3},
+ {"CertificateRequest.PublicKeyAlgorithm", Field, 3},
+ {"CertificateRequest.Raw", Field, 3},
+ {"CertificateRequest.RawSubject", Field, 3},
+ {"CertificateRequest.RawSubjectPublicKeyInfo", Field, 3},
+ {"CertificateRequest.RawTBSCertificateRequest", Field, 3},
+ {"CertificateRequest.Signature", Field, 3},
+ {"CertificateRequest.SignatureAlgorithm", Field, 3},
+ {"CertificateRequest.Subject", Field, 3},
+ {"CertificateRequest.URIs", Field, 10},
+ {"CertificateRequest.Version", Field, 3},
+ {"ConstraintViolationError", Type, 0},
+ {"CreateCertificate", Func, 0},
+ {"CreateCertificateRequest", Func, 3},
+ {"CreateRevocationList", Func, 15},
+ {"DSA", Const, 0},
+ {"DSAWithSHA1", Const, 0},
+ {"DSAWithSHA256", Const, 0},
+ {"DecryptPEMBlock", Func, 1},
+ {"ECDSA", Const, 1},
+ {"ECDSAWithSHA1", Const, 1},
+ {"ECDSAWithSHA256", Const, 1},
+ {"ECDSAWithSHA384", Const, 1},
+ {"ECDSAWithSHA512", Const, 1},
+ {"Ed25519", Const, 13},
+ {"EncryptPEMBlock", Func, 1},
+ {"ErrUnsupportedAlgorithm", Var, 0},
+ {"Expired", Const, 0},
+ {"ExtKeyUsage", Type, 0},
+ {"ExtKeyUsageAny", Const, 0},
+ {"ExtKeyUsageClientAuth", Const, 0},
+ {"ExtKeyUsageCodeSigning", Const, 0},
+ {"ExtKeyUsageEmailProtection", Const, 0},
+ {"ExtKeyUsageIPSECEndSystem", Const, 1},
+ {"ExtKeyUsageIPSECTunnel", Const, 1},
+ {"ExtKeyUsageIPSECUser", Const, 1},
+ {"ExtKeyUsageMicrosoftCommercialCodeSigning", Const, 10},
+ {"ExtKeyUsageMicrosoftKernelCodeSigning", Const, 10},
+ {"ExtKeyUsageMicrosoftServerGatedCrypto", Const, 1},
+ {"ExtKeyUsageNetscapeServerGatedCrypto", Const, 1},
+ {"ExtKeyUsageOCSPSigning", Const, 0},
+ {"ExtKeyUsageServerAuth", Const, 0},
+ {"ExtKeyUsageTimeStamping", Const, 0},
+ {"HostnameError", Type, 0},
+ {"HostnameError.Certificate", Field, 0},
+ {"HostnameError.Host", Field, 0},
+ {"IncompatibleUsage", Const, 1},
+ {"IncorrectPasswordError", Var, 1},
+ {"InsecureAlgorithmError", Type, 6},
+ {"InvalidReason", Type, 0},
+ {"IsEncryptedPEMBlock", Func, 1},
+ {"KeyUsage", Type, 0},
+ {"KeyUsageCRLSign", Const, 0},
+ {"KeyUsageCertSign", Const, 0},
+ {"KeyUsageContentCommitment", Const, 0},
+ {"KeyUsageDataEncipherment", Const, 0},
+ {"KeyUsageDecipherOnly", Const, 0},
+ {"KeyUsageDigitalSignature", Const, 0},
+ {"KeyUsageEncipherOnly", Const, 0},
+ {"KeyUsageKeyAgreement", Const, 0},
+ {"KeyUsageKeyEncipherment", Const, 0},
+ {"MD2WithRSA", Const, 0},
+ {"MD5WithRSA", Const, 0},
+ {"MarshalECPrivateKey", Func, 2},
+ {"MarshalPKCS1PrivateKey", Func, 0},
+ {"MarshalPKCS1PublicKey", Func, 10},
+ {"MarshalPKCS8PrivateKey", Func, 10},
+ {"MarshalPKIXPublicKey", Func, 0},
+ {"NameConstraintsWithoutSANs", Const, 10},
+ {"NameMismatch", Const, 8},
+ {"NewCertPool", Func, 0},
+ {"NotAuthorizedToSign", Const, 0},
+ {"OID", Type, 22},
+ {"OIDFromInts", Func, 22},
+ {"PEMCipher", Type, 1},
+ {"PEMCipher3DES", Const, 1},
+ {"PEMCipherAES128", Const, 1},
+ {"PEMCipherAES192", Const, 1},
+ {"PEMCipherAES256", Const, 1},
+ {"PEMCipherDES", Const, 1},
+ {"ParseCRL", Func, 0},
+ {"ParseCertificate", Func, 0},
+ {"ParseCertificateRequest", Func, 3},
+ {"ParseCertificates", Func, 0},
+ {"ParseDERCRL", Func, 0},
+ {"ParseECPrivateKey", Func, 1},
+ {"ParsePKCS1PrivateKey", Func, 0},
+ {"ParsePKCS1PublicKey", Func, 10},
+ {"ParsePKCS8PrivateKey", Func, 0},
+ {"ParsePKIXPublicKey", Func, 0},
+ {"ParseRevocationList", Func, 19},
+ {"PublicKeyAlgorithm", Type, 0},
+ {"PureEd25519", Const, 13},
+ {"RSA", Const, 0},
+ {"RevocationList", Type, 15},
+ {"RevocationList.AuthorityKeyId", Field, 19},
+ {"RevocationList.Extensions", Field, 19},
+ {"RevocationList.ExtraExtensions", Field, 15},
+ {"RevocationList.Issuer", Field, 19},
+ {"RevocationList.NextUpdate", Field, 15},
+ {"RevocationList.Number", Field, 15},
+ {"RevocationList.Raw", Field, 19},
+ {"RevocationList.RawIssuer", Field, 19},
+ {"RevocationList.RawTBSRevocationList", Field, 19},
+ {"RevocationList.RevokedCertificateEntries", Field, 21},
+ {"RevocationList.RevokedCertificates", Field, 15},
+ {"RevocationList.Signature", Field, 19},
+ {"RevocationList.SignatureAlgorithm", Field, 15},
+ {"RevocationList.ThisUpdate", Field, 15},
+ {"RevocationListEntry", Type, 21},
+ {"RevocationListEntry.Extensions", Field, 21},
+ {"RevocationListEntry.ExtraExtensions", Field, 21},
+ {"RevocationListEntry.Raw", Field, 21},
+ {"RevocationListEntry.ReasonCode", Field, 21},
+ {"RevocationListEntry.RevocationTime", Field, 21},
+ {"RevocationListEntry.SerialNumber", Field, 21},
+ {"SHA1WithRSA", Const, 0},
+ {"SHA256WithRSA", Const, 0},
+ {"SHA256WithRSAPSS", Const, 8},
+ {"SHA384WithRSA", Const, 0},
+ {"SHA384WithRSAPSS", Const, 8},
+ {"SHA512WithRSA", Const, 0},
+ {"SHA512WithRSAPSS", Const, 8},
+ {"SetFallbackRoots", Func, 20},
+ {"SignatureAlgorithm", Type, 0},
+ {"SystemCertPool", Func, 7},
+ {"SystemRootsError", Type, 1},
+ {"SystemRootsError.Err", Field, 7},
+ {"TooManyConstraints", Const, 10},
+ {"TooManyIntermediates", Const, 0},
+ {"UnconstrainedName", Const, 10},
+ {"UnhandledCriticalExtension", Type, 0},
+ {"UnknownAuthorityError", Type, 0},
+ {"UnknownAuthorityError.Cert", Field, 8},
+ {"UnknownPublicKeyAlgorithm", Const, 0},
+ {"UnknownSignatureAlgorithm", Const, 0},
+ {"VerifyOptions", Type, 0},
+ {"VerifyOptions.CurrentTime", Field, 0},
+ {"VerifyOptions.DNSName", Field, 0},
+ {"VerifyOptions.Intermediates", Field, 0},
+ {"VerifyOptions.KeyUsages", Field, 1},
+ {"VerifyOptions.MaxConstraintComparisions", Field, 10},
+ {"VerifyOptions.Roots", Field, 0},
+ },
+ "crypto/x509/pkix": {
+ {"(*CertificateList).HasExpired", Method, 0},
+ {"(*Name).FillFromRDNSequence", Method, 0},
+ {"(Name).String", Method, 10},
+ {"(Name).ToRDNSequence", Method, 0},
+ {"(RDNSequence).String", Method, 10},
+ {"AlgorithmIdentifier", Type, 0},
+ {"AlgorithmIdentifier.Algorithm", Field, 0},
+ {"AlgorithmIdentifier.Parameters", Field, 0},
+ {"AttributeTypeAndValue", Type, 0},
+ {"AttributeTypeAndValue.Type", Field, 0},
+ {"AttributeTypeAndValue.Value", Field, 0},
+ {"AttributeTypeAndValueSET", Type, 3},
+ {"AttributeTypeAndValueSET.Type", Field, 3},
+ {"AttributeTypeAndValueSET.Value", Field, 3},
+ {"CertificateList", Type, 0},
+ {"CertificateList.SignatureAlgorithm", Field, 0},
+ {"CertificateList.SignatureValue", Field, 0},
+ {"CertificateList.TBSCertList", Field, 0},
+ {"Extension", Type, 0},
+ {"Extension.Critical", Field, 0},
+ {"Extension.Id", Field, 0},
+ {"Extension.Value", Field, 0},
+ {"Name", Type, 0},
+ {"Name.CommonName", Field, 0},
+ {"Name.Country", Field, 0},
+ {"Name.ExtraNames", Field, 5},
+ {"Name.Locality", Field, 0},
+ {"Name.Names", Field, 0},
+ {"Name.Organization", Field, 0},
+ {"Name.OrganizationalUnit", Field, 0},
+ {"Name.PostalCode", Field, 0},
+ {"Name.Province", Field, 0},
+ {"Name.SerialNumber", Field, 0},
+ {"Name.StreetAddress", Field, 0},
+ {"RDNSequence", Type, 0},
+ {"RelativeDistinguishedNameSET", Type, 0},
+ {"RevokedCertificate", Type, 0},
+ {"RevokedCertificate.Extensions", Field, 0},
+ {"RevokedCertificate.RevocationTime", Field, 0},
+ {"RevokedCertificate.SerialNumber", Field, 0},
+ {"TBSCertificateList", Type, 0},
+ {"TBSCertificateList.Extensions", Field, 0},
+ {"TBSCertificateList.Issuer", Field, 0},
+ {"TBSCertificateList.NextUpdate", Field, 0},
+ {"TBSCertificateList.Raw", Field, 0},
+ {"TBSCertificateList.RevokedCertificates", Field, 0},
+ {"TBSCertificateList.Signature", Field, 0},
+ {"TBSCertificateList.ThisUpdate", Field, 0},
+ {"TBSCertificateList.Version", Field, 0},
+ },
+ "database/sql": {
+ {"(*ColumnType).DatabaseTypeName", Method, 8},
+ {"(*ColumnType).DecimalSize", Method, 8},
+ {"(*ColumnType).Length", Method, 8},
+ {"(*ColumnType).Name", Method, 8},
+ {"(*ColumnType).Nullable", Method, 8},
+ {"(*ColumnType).ScanType", Method, 8},
+ {"(*Conn).BeginTx", Method, 9},
+ {"(*Conn).Close", Method, 9},
+ {"(*Conn).ExecContext", Method, 9},
+ {"(*Conn).PingContext", Method, 9},
+ {"(*Conn).PrepareContext", Method, 9},
+ {"(*Conn).QueryContext", Method, 9},
+ {"(*Conn).QueryRowContext", Method, 9},
+ {"(*Conn).Raw", Method, 13},
+ {"(*DB).Begin", Method, 0},
+ {"(*DB).BeginTx", Method, 8},
+ {"(*DB).Close", Method, 0},
+ {"(*DB).Conn", Method, 9},
+ {"(*DB).Driver", Method, 0},
+ {"(*DB).Exec", Method, 0},
+ {"(*DB).ExecContext", Method, 8},
+ {"(*DB).Ping", Method, 1},
+ {"(*DB).PingContext", Method, 8},
+ {"(*DB).Prepare", Method, 0},
+ {"(*DB).PrepareContext", Method, 8},
+ {"(*DB).Query", Method, 0},
+ {"(*DB).QueryContext", Method, 8},
+ {"(*DB).QueryRow", Method, 0},
+ {"(*DB).QueryRowContext", Method, 8},
+ {"(*DB).SetConnMaxIdleTime", Method, 15},
+ {"(*DB).SetConnMaxLifetime", Method, 6},
+ {"(*DB).SetMaxIdleConns", Method, 1},
+ {"(*DB).SetMaxOpenConns", Method, 2},
+ {"(*DB).Stats", Method, 5},
+ {"(*Null).Scan", Method, 22},
+ {"(*NullBool).Scan", Method, 0},
+ {"(*NullByte).Scan", Method, 17},
+ {"(*NullFloat64).Scan", Method, 0},
+ {"(*NullInt16).Scan", Method, 17},
+ {"(*NullInt32).Scan", Method, 13},
+ {"(*NullInt64).Scan", Method, 0},
+ {"(*NullString).Scan", Method, 0},
+ {"(*NullTime).Scan", Method, 13},
+ {"(*Row).Err", Method, 15},
+ {"(*Row).Scan", Method, 0},
+ {"(*Rows).Close", Method, 0},
+ {"(*Rows).ColumnTypes", Method, 8},
+ {"(*Rows).Columns", Method, 0},
+ {"(*Rows).Err", Method, 0},
+ {"(*Rows).Next", Method, 0},
+ {"(*Rows).NextResultSet", Method, 8},
+ {"(*Rows).Scan", Method, 0},
+ {"(*Stmt).Close", Method, 0},
+ {"(*Stmt).Exec", Method, 0},
+ {"(*Stmt).ExecContext", Method, 8},
+ {"(*Stmt).Query", Method, 0},
+ {"(*Stmt).QueryContext", Method, 8},
+ {"(*Stmt).QueryRow", Method, 0},
+ {"(*Stmt).QueryRowContext", Method, 8},
+ {"(*Tx).Commit", Method, 0},
+ {"(*Tx).Exec", Method, 0},
+ {"(*Tx).ExecContext", Method, 8},
+ {"(*Tx).Prepare", Method, 0},
+ {"(*Tx).PrepareContext", Method, 8},
+ {"(*Tx).Query", Method, 0},
+ {"(*Tx).QueryContext", Method, 8},
+ {"(*Tx).QueryRow", Method, 0},
+ {"(*Tx).QueryRowContext", Method, 8},
+ {"(*Tx).Rollback", Method, 0},
+ {"(*Tx).Stmt", Method, 0},
+ {"(*Tx).StmtContext", Method, 8},
+ {"(IsolationLevel).String", Method, 11},
+ {"(Null).Value", Method, 22},
+ {"(NullBool).Value", Method, 0},
+ {"(NullByte).Value", Method, 17},
+ {"(NullFloat64).Value", Method, 0},
+ {"(NullInt16).Value", Method, 17},
+ {"(NullInt32).Value", Method, 13},
+ {"(NullInt64).Value", Method, 0},
+ {"(NullString).Value", Method, 0},
+ {"(NullTime).Value", Method, 13},
+ {"ColumnType", Type, 8},
+ {"Conn", Type, 9},
+ {"DB", Type, 0},
+ {"DBStats", Type, 5},
+ {"DBStats.Idle", Field, 11},
+ {"DBStats.InUse", Field, 11},
+ {"DBStats.MaxIdleClosed", Field, 11},
+ {"DBStats.MaxIdleTimeClosed", Field, 15},
+ {"DBStats.MaxLifetimeClosed", Field, 11},
+ {"DBStats.MaxOpenConnections", Field, 11},
+ {"DBStats.OpenConnections", Field, 5},
+ {"DBStats.WaitCount", Field, 11},
+ {"DBStats.WaitDuration", Field, 11},
+ {"Drivers", Func, 4},
+ {"ErrConnDone", Var, 9},
+ {"ErrNoRows", Var, 0},
+ {"ErrTxDone", Var, 0},
+ {"IsolationLevel", Type, 8},
+ {"LevelDefault", Const, 8},
+ {"LevelLinearizable", Const, 8},
+ {"LevelReadCommitted", Const, 8},
+ {"LevelReadUncommitted", Const, 8},
+ {"LevelRepeatableRead", Const, 8},
+ {"LevelSerializable", Const, 8},
+ {"LevelSnapshot", Const, 8},
+ {"LevelWriteCommitted", Const, 8},
+ {"Named", Func, 8},
+ {"NamedArg", Type, 8},
+ {"NamedArg.Name", Field, 8},
+ {"NamedArg.Value", Field, 8},
+ {"Null", Type, 22},
+ {"Null.V", Field, 22},
+ {"Null.Valid", Field, 22},
+ {"NullBool", Type, 0},
+ {"NullBool.Bool", Field, 0},
+ {"NullBool.Valid", Field, 0},
+ {"NullByte", Type, 17},
+ {"NullByte.Byte", Field, 17},
+ {"NullByte.Valid", Field, 17},
+ {"NullFloat64", Type, 0},
+ {"NullFloat64.Float64", Field, 0},
+ {"NullFloat64.Valid", Field, 0},
+ {"NullInt16", Type, 17},
+ {"NullInt16.Int16", Field, 17},
+ {"NullInt16.Valid", Field, 17},
+ {"NullInt32", Type, 13},
+ {"NullInt32.Int32", Field, 13},
+ {"NullInt32.Valid", Field, 13},
+ {"NullInt64", Type, 0},
+ {"NullInt64.Int64", Field, 0},
+ {"NullInt64.Valid", Field, 0},
+ {"NullString", Type, 0},
+ {"NullString.String", Field, 0},
+ {"NullString.Valid", Field, 0},
+ {"NullTime", Type, 13},
+ {"NullTime.Time", Field, 13},
+ {"NullTime.Valid", Field, 13},
+ {"Open", Func, 0},
+ {"OpenDB", Func, 10},
+ {"Out", Type, 9},
+ {"Out.Dest", Field, 9},
+ {"Out.In", Field, 9},
+ {"RawBytes", Type, 0},
+ {"Register", Func, 0},
+ {"Result", Type, 0},
+ {"Row", Type, 0},
+ {"Rows", Type, 0},
+ {"Scanner", Type, 0},
+ {"Stmt", Type, 0},
+ {"Tx", Type, 0},
+ {"TxOptions", Type, 8},
+ {"TxOptions.Isolation", Field, 8},
+ {"TxOptions.ReadOnly", Field, 8},
+ },
+ "database/sql/driver": {
+ {"(NotNull).ConvertValue", Method, 0},
+ {"(Null).ConvertValue", Method, 0},
+ {"(RowsAffected).LastInsertId", Method, 0},
+ {"(RowsAffected).RowsAffected", Method, 0},
+ {"Bool", Var, 0},
+ {"ColumnConverter", Type, 0},
+ {"Conn", Type, 0},
+ {"ConnBeginTx", Type, 8},
+ {"ConnPrepareContext", Type, 8},
+ {"Connector", Type, 10},
+ {"DefaultParameterConverter", Var, 0},
+ {"Driver", Type, 0},
+ {"DriverContext", Type, 10},
+ {"ErrBadConn", Var, 0},
+ {"ErrRemoveArgument", Var, 9},
+ {"ErrSkip", Var, 0},
+ {"Execer", Type, 0},
+ {"ExecerContext", Type, 8},
+ {"Int32", Var, 0},
+ {"IsScanValue", Func, 0},
+ {"IsValue", Func, 0},
+ {"IsolationLevel", Type, 8},
+ {"NamedValue", Type, 8},
+ {"NamedValue.Name", Field, 8},
+ {"NamedValue.Ordinal", Field, 8},
+ {"NamedValue.Value", Field, 8},
+ {"NamedValueChecker", Type, 9},
+ {"NotNull", Type, 0},
+ {"NotNull.Converter", Field, 0},
+ {"Null", Type, 0},
+ {"Null.Converter", Field, 0},
+ {"Pinger", Type, 8},
+ {"Queryer", Type, 1},
+ {"QueryerContext", Type, 8},
+ {"Result", Type, 0},
+ {"ResultNoRows", Var, 0},
+ {"Rows", Type, 0},
+ {"RowsAffected", Type, 0},
+ {"RowsColumnTypeDatabaseTypeName", Type, 8},
+ {"RowsColumnTypeLength", Type, 8},
+ {"RowsColumnTypeNullable", Type, 8},
+ {"RowsColumnTypePrecisionScale", Type, 8},
+ {"RowsColumnTypeScanType", Type, 8},
+ {"RowsNextResultSet", Type, 8},
+ {"SessionResetter", Type, 10},
+ {"Stmt", Type, 0},
+ {"StmtExecContext", Type, 8},
+ {"StmtQueryContext", Type, 8},
+ {"String", Var, 0},
+ {"Tx", Type, 0},
+ {"TxOptions", Type, 8},
+ {"TxOptions.Isolation", Field, 8},
+ {"TxOptions.ReadOnly", Field, 8},
+ {"Validator", Type, 15},
+ {"Value", Type, 0},
+ {"ValueConverter", Type, 0},
+ {"Valuer", Type, 0},
+ },
+ "debug/buildinfo": {
+ {"BuildInfo", Type, 18},
+ {"Read", Func, 18},
+ {"ReadFile", Func, 18},
+ },
+ "debug/dwarf": {
+ {"(*AddrType).Basic", Method, 0},
+ {"(*AddrType).Common", Method, 0},
+ {"(*AddrType).Size", Method, 0},
+ {"(*AddrType).String", Method, 0},
+ {"(*ArrayType).Common", Method, 0},
+ {"(*ArrayType).Size", Method, 0},
+ {"(*ArrayType).String", Method, 0},
+ {"(*BasicType).Basic", Method, 0},
+ {"(*BasicType).Common", Method, 0},
+ {"(*BasicType).Size", Method, 0},
+ {"(*BasicType).String", Method, 0},
+ {"(*BoolType).Basic", Method, 0},
+ {"(*BoolType).Common", Method, 0},
+ {"(*BoolType).Size", Method, 0},
+ {"(*BoolType).String", Method, 0},
+ {"(*CharType).Basic", Method, 0},
+ {"(*CharType).Common", Method, 0},
+ {"(*CharType).Size", Method, 0},
+ {"(*CharType).String", Method, 0},
+ {"(*CommonType).Common", Method, 0},
+ {"(*CommonType).Size", Method, 0},
+ {"(*ComplexType).Basic", Method, 0},
+ {"(*ComplexType).Common", Method, 0},
+ {"(*ComplexType).Size", Method, 0},
+ {"(*ComplexType).String", Method, 0},
+ {"(*Data).AddSection", Method, 14},
+ {"(*Data).AddTypes", Method, 3},
+ {"(*Data).LineReader", Method, 5},
+ {"(*Data).Ranges", Method, 7},
+ {"(*Data).Reader", Method, 0},
+ {"(*Data).Type", Method, 0},
+ {"(*DotDotDotType).Common", Method, 0},
+ {"(*DotDotDotType).Size", Method, 0},
+ {"(*DotDotDotType).String", Method, 0},
+ {"(*Entry).AttrField", Method, 5},
+ {"(*Entry).Val", Method, 0},
+ {"(*EnumType).Common", Method, 0},
+ {"(*EnumType).Size", Method, 0},
+ {"(*EnumType).String", Method, 0},
+ {"(*FloatType).Basic", Method, 0},
+ {"(*FloatType).Common", Method, 0},
+ {"(*FloatType).Size", Method, 0},
+ {"(*FloatType).String", Method, 0},
+ {"(*FuncType).Common", Method, 0},
+ {"(*FuncType).Size", Method, 0},
+ {"(*FuncType).String", Method, 0},
+ {"(*IntType).Basic", Method, 0},
+ {"(*IntType).Common", Method, 0},
+ {"(*IntType).Size", Method, 0},
+ {"(*IntType).String", Method, 0},
+ {"(*LineReader).Files", Method, 14},
+ {"(*LineReader).Next", Method, 5},
+ {"(*LineReader).Reset", Method, 5},
+ {"(*LineReader).Seek", Method, 5},
+ {"(*LineReader).SeekPC", Method, 5},
+ {"(*LineReader).Tell", Method, 5},
+ {"(*PtrType).Common", Method, 0},
+ {"(*PtrType).Size", Method, 0},
+ {"(*PtrType).String", Method, 0},
+ {"(*QualType).Common", Method, 0},
+ {"(*QualType).Size", Method, 0},
+ {"(*QualType).String", Method, 0},
+ {"(*Reader).AddressSize", Method, 5},
+ {"(*Reader).ByteOrder", Method, 14},
+ {"(*Reader).Next", Method, 0},
+ {"(*Reader).Seek", Method, 0},
+ {"(*Reader).SeekPC", Method, 7},
+ {"(*Reader).SkipChildren", Method, 0},
+ {"(*StructType).Common", Method, 0},
+ {"(*StructType).Defn", Method, 0},
+ {"(*StructType).Size", Method, 0},
+ {"(*StructType).String", Method, 0},
+ {"(*TypedefType).Common", Method, 0},
+ {"(*TypedefType).Size", Method, 0},
+ {"(*TypedefType).String", Method, 0},
+ {"(*UcharType).Basic", Method, 0},
+ {"(*UcharType).Common", Method, 0},
+ {"(*UcharType).Size", Method, 0},
+ {"(*UcharType).String", Method, 0},
+ {"(*UintType).Basic", Method, 0},
+ {"(*UintType).Common", Method, 0},
+ {"(*UintType).Size", Method, 0},
+ {"(*UintType).String", Method, 0},
+ {"(*UnspecifiedType).Basic", Method, 4},
+ {"(*UnspecifiedType).Common", Method, 4},
+ {"(*UnspecifiedType).Size", Method, 4},
+ {"(*UnspecifiedType).String", Method, 4},
+ {"(*UnsupportedType).Common", Method, 13},
+ {"(*UnsupportedType).Size", Method, 13},
+ {"(*UnsupportedType).String", Method, 13},
+ {"(*VoidType).Common", Method, 0},
+ {"(*VoidType).Size", Method, 0},
+ {"(*VoidType).String", Method, 0},
+ {"(Attr).GoString", Method, 0},
+ {"(Attr).String", Method, 0},
+ {"(Class).GoString", Method, 5},
+ {"(Class).String", Method, 5},
+ {"(DecodeError).Error", Method, 0},
+ {"(Tag).GoString", Method, 0},
+ {"(Tag).String", Method, 0},
+ {"AddrType", Type, 0},
+ {"AddrType.BasicType", Field, 0},
+ {"ArrayType", Type, 0},
+ {"ArrayType.CommonType", Field, 0},
+ {"ArrayType.Count", Field, 0},
+ {"ArrayType.StrideBitSize", Field, 0},
+ {"ArrayType.Type", Field, 0},
+ {"Attr", Type, 0},
+ {"AttrAbstractOrigin", Const, 0},
+ {"AttrAccessibility", Const, 0},
+ {"AttrAddrBase", Const, 14},
+ {"AttrAddrClass", Const, 0},
+ {"AttrAlignment", Const, 14},
+ {"AttrAllocated", Const, 0},
+ {"AttrArtificial", Const, 0},
+ {"AttrAssociated", Const, 0},
+ {"AttrBaseTypes", Const, 0},
+ {"AttrBinaryScale", Const, 14},
+ {"AttrBitOffset", Const, 0},
+ {"AttrBitSize", Const, 0},
+ {"AttrByteSize", Const, 0},
+ {"AttrCallAllCalls", Const, 14},
+ {"AttrCallAllSourceCalls", Const, 14},
+ {"AttrCallAllTailCalls", Const, 14},
+ {"AttrCallColumn", Const, 0},
+ {"AttrCallDataLocation", Const, 14},
+ {"AttrCallDataValue", Const, 14},
+ {"AttrCallFile", Const, 0},
+ {"AttrCallLine", Const, 0},
+ {"AttrCallOrigin", Const, 14},
+ {"AttrCallPC", Const, 14},
+ {"AttrCallParameter", Const, 14},
+ {"AttrCallReturnPC", Const, 14},
+ {"AttrCallTailCall", Const, 14},
+ {"AttrCallTarget", Const, 14},
+ {"AttrCallTargetClobbered", Const, 14},
+ {"AttrCallValue", Const, 14},
+ {"AttrCalling", Const, 0},
+ {"AttrCommonRef", Const, 0},
+ {"AttrCompDir", Const, 0},
+ {"AttrConstExpr", Const, 14},
+ {"AttrConstValue", Const, 0},
+ {"AttrContainingType", Const, 0},
+ {"AttrCount", Const, 0},
+ {"AttrDataBitOffset", Const, 14},
+ {"AttrDataLocation", Const, 0},
+ {"AttrDataMemberLoc", Const, 0},
+ {"AttrDecimalScale", Const, 14},
+ {"AttrDecimalSign", Const, 14},
+ {"AttrDeclColumn", Const, 0},
+ {"AttrDeclFile", Const, 0},
+ {"AttrDeclLine", Const, 0},
+ {"AttrDeclaration", Const, 0},
+ {"AttrDefaultValue", Const, 0},
+ {"AttrDefaulted", Const, 14},
+ {"AttrDeleted", Const, 14},
+ {"AttrDescription", Const, 0},
+ {"AttrDigitCount", Const, 14},
+ {"AttrDiscr", Const, 0},
+ {"AttrDiscrList", Const, 0},
+ {"AttrDiscrValue", Const, 0},
+ {"AttrDwoName", Const, 14},
+ {"AttrElemental", Const, 14},
+ {"AttrEncoding", Const, 0},
+ {"AttrEndianity", Const, 14},
+ {"AttrEntrypc", Const, 0},
+ {"AttrEnumClass", Const, 14},
+ {"AttrExplicit", Const, 14},
+ {"AttrExportSymbols", Const, 14},
+ {"AttrExtension", Const, 0},
+ {"AttrExternal", Const, 0},
+ {"AttrFrameBase", Const, 0},
+ {"AttrFriend", Const, 0},
+ {"AttrHighpc", Const, 0},
+ {"AttrIdentifierCase", Const, 0},
+ {"AttrImport", Const, 0},
+ {"AttrInline", Const, 0},
+ {"AttrIsOptional", Const, 0},
+ {"AttrLanguage", Const, 0},
+ {"AttrLinkageName", Const, 14},
+ {"AttrLocation", Const, 0},
+ {"AttrLoclistsBase", Const, 14},
+ {"AttrLowerBound", Const, 0},
+ {"AttrLowpc", Const, 0},
+ {"AttrMacroInfo", Const, 0},
+ {"AttrMacros", Const, 14},
+ {"AttrMainSubprogram", Const, 14},
+ {"AttrMutable", Const, 14},
+ {"AttrName", Const, 0},
+ {"AttrNamelistItem", Const, 0},
+ {"AttrNoreturn", Const, 14},
+ {"AttrObjectPointer", Const, 14},
+ {"AttrOrdering", Const, 0},
+ {"AttrPictureString", Const, 14},
+ {"AttrPriority", Const, 0},
+ {"AttrProducer", Const, 0},
+ {"AttrPrototyped", Const, 0},
+ {"AttrPure", Const, 14},
+ {"AttrRanges", Const, 0},
+ {"AttrRank", Const, 14},
+ {"AttrRecursive", Const, 14},
+ {"AttrReference", Const, 14},
+ {"AttrReturnAddr", Const, 0},
+ {"AttrRnglistsBase", Const, 14},
+ {"AttrRvalueReference", Const, 14},
+ {"AttrSegment", Const, 0},
+ {"AttrSibling", Const, 0},
+ {"AttrSignature", Const, 14},
+ {"AttrSmall", Const, 14},
+ {"AttrSpecification", Const, 0},
+ {"AttrStartScope", Const, 0},
+ {"AttrStaticLink", Const, 0},
+ {"AttrStmtList", Const, 0},
+ {"AttrStrOffsetsBase", Const, 14},
+ {"AttrStride", Const, 0},
+ {"AttrStrideSize", Const, 0},
+ {"AttrStringLength", Const, 0},
+ {"AttrStringLengthBitSize", Const, 14},
+ {"AttrStringLengthByteSize", Const, 14},
+ {"AttrThreadsScaled", Const, 14},
+ {"AttrTrampoline", Const, 0},
+ {"AttrType", Const, 0},
+ {"AttrUpperBound", Const, 0},
+ {"AttrUseLocation", Const, 0},
+ {"AttrUseUTF8", Const, 0},
+ {"AttrVarParam", Const, 0},
+ {"AttrVirtuality", Const, 0},
+ {"AttrVisibility", Const, 0},
+ {"AttrVtableElemLoc", Const, 0},
+ {"BasicType", Type, 0},
+ {"BasicType.BitOffset", Field, 0},
+ {"BasicType.BitSize", Field, 0},
+ {"BasicType.CommonType", Field, 0},
+ {"BasicType.DataBitOffset", Field, 18},
+ {"BoolType", Type, 0},
+ {"BoolType.BasicType", Field, 0},
+ {"CharType", Type, 0},
+ {"CharType.BasicType", Field, 0},
+ {"Class", Type, 5},
+ {"ClassAddrPtr", Const, 14},
+ {"ClassAddress", Const, 5},
+ {"ClassBlock", Const, 5},
+ {"ClassConstant", Const, 5},
+ {"ClassExprLoc", Const, 5},
+ {"ClassFlag", Const, 5},
+ {"ClassLinePtr", Const, 5},
+ {"ClassLocList", Const, 14},
+ {"ClassLocListPtr", Const, 5},
+ {"ClassMacPtr", Const, 5},
+ {"ClassRangeListPtr", Const, 5},
+ {"ClassReference", Const, 5},
+ {"ClassReferenceAlt", Const, 5},
+ {"ClassReferenceSig", Const, 5},
+ {"ClassRngList", Const, 14},
+ {"ClassRngListsPtr", Const, 14},
+ {"ClassStrOffsetsPtr", Const, 14},
+ {"ClassString", Const, 5},
+ {"ClassStringAlt", Const, 5},
+ {"ClassUnknown", Const, 6},
+ {"CommonType", Type, 0},
+ {"CommonType.ByteSize", Field, 0},
+ {"CommonType.Name", Field, 0},
+ {"ComplexType", Type, 0},
+ {"ComplexType.BasicType", Field, 0},
+ {"Data", Type, 0},
+ {"DecodeError", Type, 0},
+ {"DecodeError.Err", Field, 0},
+ {"DecodeError.Name", Field, 0},
+ {"DecodeError.Offset", Field, 0},
+ {"DotDotDotType", Type, 0},
+ {"DotDotDotType.CommonType", Field, 0},
+ {"Entry", Type, 0},
+ {"Entry.Children", Field, 0},
+ {"Entry.Field", Field, 0},
+ {"Entry.Offset", Field, 0},
+ {"Entry.Tag", Field, 0},
+ {"EnumType", Type, 0},
+ {"EnumType.CommonType", Field, 0},
+ {"EnumType.EnumName", Field, 0},
+ {"EnumType.Val", Field, 0},
+ {"EnumValue", Type, 0},
+ {"EnumValue.Name", Field, 0},
+ {"EnumValue.Val", Field, 0},
+ {"ErrUnknownPC", Var, 5},
+ {"Field", Type, 0},
+ {"Field.Attr", Field, 0},
+ {"Field.Class", Field, 5},
+ {"Field.Val", Field, 0},
+ {"FloatType", Type, 0},
+ {"FloatType.BasicType", Field, 0},
+ {"FuncType", Type, 0},
+ {"FuncType.CommonType", Field, 0},
+ {"FuncType.ParamType", Field, 0},
+ {"FuncType.ReturnType", Field, 0},
+ {"IntType", Type, 0},
+ {"IntType.BasicType", Field, 0},
+ {"LineEntry", Type, 5},
+ {"LineEntry.Address", Field, 5},
+ {"LineEntry.BasicBlock", Field, 5},
+ {"LineEntry.Column", Field, 5},
+ {"LineEntry.Discriminator", Field, 5},
+ {"LineEntry.EndSequence", Field, 5},
+ {"LineEntry.EpilogueBegin", Field, 5},
+ {"LineEntry.File", Field, 5},
+ {"LineEntry.ISA", Field, 5},
+ {"LineEntry.IsStmt", Field, 5},
+ {"LineEntry.Line", Field, 5},
+ {"LineEntry.OpIndex", Field, 5},
+ {"LineEntry.PrologueEnd", Field, 5},
+ {"LineFile", Type, 5},
+ {"LineFile.Length", Field, 5},
+ {"LineFile.Mtime", Field, 5},
+ {"LineFile.Name", Field, 5},
+ {"LineReader", Type, 5},
+ {"LineReaderPos", Type, 5},
+ {"New", Func, 0},
+ {"Offset", Type, 0},
+ {"PtrType", Type, 0},
+ {"PtrType.CommonType", Field, 0},
+ {"PtrType.Type", Field, 0},
+ {"QualType", Type, 0},
+ {"QualType.CommonType", Field, 0},
+ {"QualType.Qual", Field, 0},
+ {"QualType.Type", Field, 0},
+ {"Reader", Type, 0},
+ {"StructField", Type, 0},
+ {"StructField.BitOffset", Field, 0},
+ {"StructField.BitSize", Field, 0},
+ {"StructField.ByteOffset", Field, 0},
+ {"StructField.ByteSize", Field, 0},
+ {"StructField.DataBitOffset", Field, 18},
+ {"StructField.Name", Field, 0},
+ {"StructField.Type", Field, 0},
+ {"StructType", Type, 0},
+ {"StructType.CommonType", Field, 0},
+ {"StructType.Field", Field, 0},
+ {"StructType.Incomplete", Field, 0},
+ {"StructType.Kind", Field, 0},
+ {"StructType.StructName", Field, 0},
+ {"Tag", Type, 0},
+ {"TagAccessDeclaration", Const, 0},
+ {"TagArrayType", Const, 0},
+ {"TagAtomicType", Const, 14},
+ {"TagBaseType", Const, 0},
+ {"TagCallSite", Const, 14},
+ {"TagCallSiteParameter", Const, 14},
+ {"TagCatchDwarfBlock", Const, 0},
+ {"TagClassType", Const, 0},
+ {"TagCoarrayType", Const, 14},
+ {"TagCommonDwarfBlock", Const, 0},
+ {"TagCommonInclusion", Const, 0},
+ {"TagCompileUnit", Const, 0},
+ {"TagCondition", Const, 3},
+ {"TagConstType", Const, 0},
+ {"TagConstant", Const, 0},
+ {"TagDwarfProcedure", Const, 0},
+ {"TagDynamicType", Const, 14},
+ {"TagEntryPoint", Const, 0},
+ {"TagEnumerationType", Const, 0},
+ {"TagEnumerator", Const, 0},
+ {"TagFileType", Const, 0},
+ {"TagFormalParameter", Const, 0},
+ {"TagFriend", Const, 0},
+ {"TagGenericSubrange", Const, 14},
+ {"TagImmutableType", Const, 14},
+ {"TagImportedDeclaration", Const, 0},
+ {"TagImportedModule", Const, 0},
+ {"TagImportedUnit", Const, 0},
+ {"TagInheritance", Const, 0},
+ {"TagInlinedSubroutine", Const, 0},
+ {"TagInterfaceType", Const, 0},
+ {"TagLabel", Const, 0},
+ {"TagLexDwarfBlock", Const, 0},
+ {"TagMember", Const, 0},
+ {"TagModule", Const, 0},
+ {"TagMutableType", Const, 0},
+ {"TagNamelist", Const, 0},
+ {"TagNamelistItem", Const, 0},
+ {"TagNamespace", Const, 0},
+ {"TagPackedType", Const, 0},
+ {"TagPartialUnit", Const, 0},
+ {"TagPointerType", Const, 0},
+ {"TagPtrToMemberType", Const, 0},
+ {"TagReferenceType", Const, 0},
+ {"TagRestrictType", Const, 0},
+ {"TagRvalueReferenceType", Const, 3},
+ {"TagSetType", Const, 0},
+ {"TagSharedType", Const, 3},
+ {"TagSkeletonUnit", Const, 14},
+ {"TagStringType", Const, 0},
+ {"TagStructType", Const, 0},
+ {"TagSubprogram", Const, 0},
+ {"TagSubrangeType", Const, 0},
+ {"TagSubroutineType", Const, 0},
+ {"TagTemplateAlias", Const, 3},
+ {"TagTemplateTypeParameter", Const, 0},
+ {"TagTemplateValueParameter", Const, 0},
+ {"TagThrownType", Const, 0},
+ {"TagTryDwarfBlock", Const, 0},
+ {"TagTypeUnit", Const, 3},
+ {"TagTypedef", Const, 0},
+ {"TagUnionType", Const, 0},
+ {"TagUnspecifiedParameters", Const, 0},
+ {"TagUnspecifiedType", Const, 0},
+ {"TagVariable", Const, 0},
+ {"TagVariant", Const, 0},
+ {"TagVariantPart", Const, 0},
+ {"TagVolatileType", Const, 0},
+ {"TagWithStmt", Const, 0},
+ {"Type", Type, 0},
+ {"TypedefType", Type, 0},
+ {"TypedefType.CommonType", Field, 0},
+ {"TypedefType.Type", Field, 0},
+ {"UcharType", Type, 0},
+ {"UcharType.BasicType", Field, 0},
+ {"UintType", Type, 0},
+ {"UintType.BasicType", Field, 0},
+ {"UnspecifiedType", Type, 4},
+ {"UnspecifiedType.BasicType", Field, 4},
+ {"UnsupportedType", Type, 13},
+ {"UnsupportedType.CommonType", Field, 13},
+ {"UnsupportedType.Tag", Field, 13},
+ {"VoidType", Type, 0},
+ {"VoidType.CommonType", Field, 0},
+ },
+ "debug/elf": {
+ {"(*File).Close", Method, 0},
+ {"(*File).DWARF", Method, 0},
+ {"(*File).DynString", Method, 1},
+ {"(*File).DynValue", Method, 21},
+ {"(*File).DynamicSymbols", Method, 4},
+ {"(*File).ImportedLibraries", Method, 0},
+ {"(*File).ImportedSymbols", Method, 0},
+ {"(*File).Section", Method, 0},
+ {"(*File).SectionByType", Method, 0},
+ {"(*File).Symbols", Method, 0},
+ {"(*FormatError).Error", Method, 0},
+ {"(*Prog).Open", Method, 0},
+ {"(*Section).Data", Method, 0},
+ {"(*Section).Open", Method, 0},
+ {"(Class).GoString", Method, 0},
+ {"(Class).String", Method, 0},
+ {"(CompressionType).GoString", Method, 6},
+ {"(CompressionType).String", Method, 6},
+ {"(Data).GoString", Method, 0},
+ {"(Data).String", Method, 0},
+ {"(DynFlag).GoString", Method, 0},
+ {"(DynFlag).String", Method, 0},
+ {"(DynFlag1).GoString", Method, 21},
+ {"(DynFlag1).String", Method, 21},
+ {"(DynTag).GoString", Method, 0},
+ {"(DynTag).String", Method, 0},
+ {"(Machine).GoString", Method, 0},
+ {"(Machine).String", Method, 0},
+ {"(NType).GoString", Method, 0},
+ {"(NType).String", Method, 0},
+ {"(OSABI).GoString", Method, 0},
+ {"(OSABI).String", Method, 0},
+ {"(Prog).ReadAt", Method, 0},
+ {"(ProgFlag).GoString", Method, 0},
+ {"(ProgFlag).String", Method, 0},
+ {"(ProgType).GoString", Method, 0},
+ {"(ProgType).String", Method, 0},
+ {"(R_386).GoString", Method, 0},
+ {"(R_386).String", Method, 0},
+ {"(R_390).GoString", Method, 7},
+ {"(R_390).String", Method, 7},
+ {"(R_AARCH64).GoString", Method, 4},
+ {"(R_AARCH64).String", Method, 4},
+ {"(R_ALPHA).GoString", Method, 0},
+ {"(R_ALPHA).String", Method, 0},
+ {"(R_ARM).GoString", Method, 0},
+ {"(R_ARM).String", Method, 0},
+ {"(R_LARCH).GoString", Method, 19},
+ {"(R_LARCH).String", Method, 19},
+ {"(R_MIPS).GoString", Method, 6},
+ {"(R_MIPS).String", Method, 6},
+ {"(R_PPC).GoString", Method, 0},
+ {"(R_PPC).String", Method, 0},
+ {"(R_PPC64).GoString", Method, 5},
+ {"(R_PPC64).String", Method, 5},
+ {"(R_RISCV).GoString", Method, 11},
+ {"(R_RISCV).String", Method, 11},
+ {"(R_SPARC).GoString", Method, 0},
+ {"(R_SPARC).String", Method, 0},
+ {"(R_X86_64).GoString", Method, 0},
+ {"(R_X86_64).String", Method, 0},
+ {"(Section).ReadAt", Method, 0},
+ {"(SectionFlag).GoString", Method, 0},
+ {"(SectionFlag).String", Method, 0},
+ {"(SectionIndex).GoString", Method, 0},
+ {"(SectionIndex).String", Method, 0},
+ {"(SectionType).GoString", Method, 0},
+ {"(SectionType).String", Method, 0},
+ {"(SymBind).GoString", Method, 0},
+ {"(SymBind).String", Method, 0},
+ {"(SymType).GoString", Method, 0},
+ {"(SymType).String", Method, 0},
+ {"(SymVis).GoString", Method, 0},
+ {"(SymVis).String", Method, 0},
+ {"(Type).GoString", Method, 0},
+ {"(Type).String", Method, 0},
+ {"(Version).GoString", Method, 0},
+ {"(Version).String", Method, 0},
+ {"ARM_MAGIC_TRAMP_NUMBER", Const, 0},
+ {"COMPRESS_HIOS", Const, 6},
+ {"COMPRESS_HIPROC", Const, 6},
+ {"COMPRESS_LOOS", Const, 6},
+ {"COMPRESS_LOPROC", Const, 6},
+ {"COMPRESS_ZLIB", Const, 6},
+ {"COMPRESS_ZSTD", Const, 21},
+ {"Chdr32", Type, 6},
+ {"Chdr32.Addralign", Field, 6},
+ {"Chdr32.Size", Field, 6},
+ {"Chdr32.Type", Field, 6},
+ {"Chdr64", Type, 6},
+ {"Chdr64.Addralign", Field, 6},
+ {"Chdr64.Size", Field, 6},
+ {"Chdr64.Type", Field, 6},
+ {"Class", Type, 0},
+ {"CompressionType", Type, 6},
+ {"DF_1_CONFALT", Const, 21},
+ {"DF_1_DIRECT", Const, 21},
+ {"DF_1_DISPRELDNE", Const, 21},
+ {"DF_1_DISPRELPND", Const, 21},
+ {"DF_1_EDITED", Const, 21},
+ {"DF_1_ENDFILTEE", Const, 21},
+ {"DF_1_GLOBAL", Const, 21},
+ {"DF_1_GLOBAUDIT", Const, 21},
+ {"DF_1_GROUP", Const, 21},
+ {"DF_1_IGNMULDEF", Const, 21},
+ {"DF_1_INITFIRST", Const, 21},
+ {"DF_1_INTERPOSE", Const, 21},
+ {"DF_1_KMOD", Const, 21},
+ {"DF_1_LOADFLTR", Const, 21},
+ {"DF_1_NOCOMMON", Const, 21},
+ {"DF_1_NODEFLIB", Const, 21},
+ {"DF_1_NODELETE", Const, 21},
+ {"DF_1_NODIRECT", Const, 21},
+ {"DF_1_NODUMP", Const, 21},
+ {"DF_1_NOHDR", Const, 21},
+ {"DF_1_NOKSYMS", Const, 21},
+ {"DF_1_NOOPEN", Const, 21},
+ {"DF_1_NORELOC", Const, 21},
+ {"DF_1_NOW", Const, 21},
+ {"DF_1_ORIGIN", Const, 21},
+ {"DF_1_PIE", Const, 21},
+ {"DF_1_SINGLETON", Const, 21},
+ {"DF_1_STUB", Const, 21},
+ {"DF_1_SYMINTPOSE", Const, 21},
+ {"DF_1_TRANS", Const, 21},
+ {"DF_1_WEAKFILTER", Const, 21},
+ {"DF_BIND_NOW", Const, 0},
+ {"DF_ORIGIN", Const, 0},
+ {"DF_STATIC_TLS", Const, 0},
+ {"DF_SYMBOLIC", Const, 0},
+ {"DF_TEXTREL", Const, 0},
+ {"DT_ADDRRNGHI", Const, 16},
+ {"DT_ADDRRNGLO", Const, 16},
+ {"DT_AUDIT", Const, 16},
+ {"DT_AUXILIARY", Const, 16},
+ {"DT_BIND_NOW", Const, 0},
+ {"DT_CHECKSUM", Const, 16},
+ {"DT_CONFIG", Const, 16},
+ {"DT_DEBUG", Const, 0},
+ {"DT_DEPAUDIT", Const, 16},
+ {"DT_ENCODING", Const, 0},
+ {"DT_FEATURE", Const, 16},
+ {"DT_FILTER", Const, 16},
+ {"DT_FINI", Const, 0},
+ {"DT_FINI_ARRAY", Const, 0},
+ {"DT_FINI_ARRAYSZ", Const, 0},
+ {"DT_FLAGS", Const, 0},
+ {"DT_FLAGS_1", Const, 16},
+ {"DT_GNU_CONFLICT", Const, 16},
+ {"DT_GNU_CONFLICTSZ", Const, 16},
+ {"DT_GNU_HASH", Const, 16},
+ {"DT_GNU_LIBLIST", Const, 16},
+ {"DT_GNU_LIBLISTSZ", Const, 16},
+ {"DT_GNU_PRELINKED", Const, 16},
+ {"DT_HASH", Const, 0},
+ {"DT_HIOS", Const, 0},
+ {"DT_HIPROC", Const, 0},
+ {"DT_INIT", Const, 0},
+ {"DT_INIT_ARRAY", Const, 0},
+ {"DT_INIT_ARRAYSZ", Const, 0},
+ {"DT_JMPREL", Const, 0},
+ {"DT_LOOS", Const, 0},
+ {"DT_LOPROC", Const, 0},
+ {"DT_MIPS_AUX_DYNAMIC", Const, 16},
+ {"DT_MIPS_BASE_ADDRESS", Const, 16},
+ {"DT_MIPS_COMPACT_SIZE", Const, 16},
+ {"DT_MIPS_CONFLICT", Const, 16},
+ {"DT_MIPS_CONFLICTNO", Const, 16},
+ {"DT_MIPS_CXX_FLAGS", Const, 16},
+ {"DT_MIPS_DELTA_CLASS", Const, 16},
+ {"DT_MIPS_DELTA_CLASSSYM", Const, 16},
+ {"DT_MIPS_DELTA_CLASSSYM_NO", Const, 16},
+ {"DT_MIPS_DELTA_CLASS_NO", Const, 16},
+ {"DT_MIPS_DELTA_INSTANCE", Const, 16},
+ {"DT_MIPS_DELTA_INSTANCE_NO", Const, 16},
+ {"DT_MIPS_DELTA_RELOC", Const, 16},
+ {"DT_MIPS_DELTA_RELOC_NO", Const, 16},
+ {"DT_MIPS_DELTA_SYM", Const, 16},
+ {"DT_MIPS_DELTA_SYM_NO", Const, 16},
+ {"DT_MIPS_DYNSTR_ALIGN", Const, 16},
+ {"DT_MIPS_FLAGS", Const, 16},
+ {"DT_MIPS_GOTSYM", Const, 16},
+ {"DT_MIPS_GP_VALUE", Const, 16},
+ {"DT_MIPS_HIDDEN_GOTIDX", Const, 16},
+ {"DT_MIPS_HIPAGENO", Const, 16},
+ {"DT_MIPS_ICHECKSUM", Const, 16},
+ {"DT_MIPS_INTERFACE", Const, 16},
+ {"DT_MIPS_INTERFACE_SIZE", Const, 16},
+ {"DT_MIPS_IVERSION", Const, 16},
+ {"DT_MIPS_LIBLIST", Const, 16},
+ {"DT_MIPS_LIBLISTNO", Const, 16},
+ {"DT_MIPS_LOCALPAGE_GOTIDX", Const, 16},
+ {"DT_MIPS_LOCAL_GOTIDX", Const, 16},
+ {"DT_MIPS_LOCAL_GOTNO", Const, 16},
+ {"DT_MIPS_MSYM", Const, 16},
+ {"DT_MIPS_OPTIONS", Const, 16},
+ {"DT_MIPS_PERF_SUFFIX", Const, 16},
+ {"DT_MIPS_PIXIE_INIT", Const, 16},
+ {"DT_MIPS_PLTGOT", Const, 16},
+ {"DT_MIPS_PROTECTED_GOTIDX", Const, 16},
+ {"DT_MIPS_RLD_MAP", Const, 16},
+ {"DT_MIPS_RLD_MAP_REL", Const, 16},
+ {"DT_MIPS_RLD_TEXT_RESOLVE_ADDR", Const, 16},
+ {"DT_MIPS_RLD_VERSION", Const, 16},
+ {"DT_MIPS_RWPLT", Const, 16},
+ {"DT_MIPS_SYMBOL_LIB", Const, 16},
+ {"DT_MIPS_SYMTABNO", Const, 16},
+ {"DT_MIPS_TIME_STAMP", Const, 16},
+ {"DT_MIPS_UNREFEXTNO", Const, 16},
+ {"DT_MOVEENT", Const, 16},
+ {"DT_MOVESZ", Const, 16},
+ {"DT_MOVETAB", Const, 16},
+ {"DT_NEEDED", Const, 0},
+ {"DT_NULL", Const, 0},
+ {"DT_PLTGOT", Const, 0},
+ {"DT_PLTPAD", Const, 16},
+ {"DT_PLTPADSZ", Const, 16},
+ {"DT_PLTREL", Const, 0},
+ {"DT_PLTRELSZ", Const, 0},
+ {"DT_POSFLAG_1", Const, 16},
+ {"DT_PPC64_GLINK", Const, 16},
+ {"DT_PPC64_OPD", Const, 16},
+ {"DT_PPC64_OPDSZ", Const, 16},
+ {"DT_PPC64_OPT", Const, 16},
+ {"DT_PPC_GOT", Const, 16},
+ {"DT_PPC_OPT", Const, 16},
+ {"DT_PREINIT_ARRAY", Const, 0},
+ {"DT_PREINIT_ARRAYSZ", Const, 0},
+ {"DT_REL", Const, 0},
+ {"DT_RELA", Const, 0},
+ {"DT_RELACOUNT", Const, 16},
+ {"DT_RELAENT", Const, 0},
+ {"DT_RELASZ", Const, 0},
+ {"DT_RELCOUNT", Const, 16},
+ {"DT_RELENT", Const, 0},
+ {"DT_RELSZ", Const, 0},
+ {"DT_RPATH", Const, 0},
+ {"DT_RUNPATH", Const, 0},
+ {"DT_SONAME", Const, 0},
+ {"DT_SPARC_REGISTER", Const, 16},
+ {"DT_STRSZ", Const, 0},
+ {"DT_STRTAB", Const, 0},
+ {"DT_SYMBOLIC", Const, 0},
+ {"DT_SYMENT", Const, 0},
+ {"DT_SYMINENT", Const, 16},
+ {"DT_SYMINFO", Const, 16},
+ {"DT_SYMINSZ", Const, 16},
+ {"DT_SYMTAB", Const, 0},
+ {"DT_SYMTAB_SHNDX", Const, 16},
+ {"DT_TEXTREL", Const, 0},
+ {"DT_TLSDESC_GOT", Const, 16},
+ {"DT_TLSDESC_PLT", Const, 16},
+ {"DT_USED", Const, 16},
+ {"DT_VALRNGHI", Const, 16},
+ {"DT_VALRNGLO", Const, 16},
+ {"DT_VERDEF", Const, 16},
+ {"DT_VERDEFNUM", Const, 16},
+ {"DT_VERNEED", Const, 0},
+ {"DT_VERNEEDNUM", Const, 0},
+ {"DT_VERSYM", Const, 0},
+ {"Data", Type, 0},
+ {"Dyn32", Type, 0},
+ {"Dyn32.Tag", Field, 0},
+ {"Dyn32.Val", Field, 0},
+ {"Dyn64", Type, 0},
+ {"Dyn64.Tag", Field, 0},
+ {"Dyn64.Val", Field, 0},
+ {"DynFlag", Type, 0},
+ {"DynFlag1", Type, 21},
+ {"DynTag", Type, 0},
+ {"EI_ABIVERSION", Const, 0},
+ {"EI_CLASS", Const, 0},
+ {"EI_DATA", Const, 0},
+ {"EI_NIDENT", Const, 0},
+ {"EI_OSABI", Const, 0},
+ {"EI_PAD", Const, 0},
+ {"EI_VERSION", Const, 0},
+ {"ELFCLASS32", Const, 0},
+ {"ELFCLASS64", Const, 0},
+ {"ELFCLASSNONE", Const, 0},
+ {"ELFDATA2LSB", Const, 0},
+ {"ELFDATA2MSB", Const, 0},
+ {"ELFDATANONE", Const, 0},
+ {"ELFMAG", Const, 0},
+ {"ELFOSABI_86OPEN", Const, 0},
+ {"ELFOSABI_AIX", Const, 0},
+ {"ELFOSABI_ARM", Const, 0},
+ {"ELFOSABI_AROS", Const, 11},
+ {"ELFOSABI_CLOUDABI", Const, 11},
+ {"ELFOSABI_FENIXOS", Const, 11},
+ {"ELFOSABI_FREEBSD", Const, 0},
+ {"ELFOSABI_HPUX", Const, 0},
+ {"ELFOSABI_HURD", Const, 0},
+ {"ELFOSABI_IRIX", Const, 0},
+ {"ELFOSABI_LINUX", Const, 0},
+ {"ELFOSABI_MODESTO", Const, 0},
+ {"ELFOSABI_NETBSD", Const, 0},
+ {"ELFOSABI_NONE", Const, 0},
+ {"ELFOSABI_NSK", Const, 0},
+ {"ELFOSABI_OPENBSD", Const, 0},
+ {"ELFOSABI_OPENVMS", Const, 0},
+ {"ELFOSABI_SOLARIS", Const, 0},
+ {"ELFOSABI_STANDALONE", Const, 0},
+ {"ELFOSABI_TRU64", Const, 0},
+ {"EM_386", Const, 0},
+ {"EM_486", Const, 0},
+ {"EM_56800EX", Const, 11},
+ {"EM_68HC05", Const, 11},
+ {"EM_68HC08", Const, 11},
+ {"EM_68HC11", Const, 11},
+ {"EM_68HC12", Const, 0},
+ {"EM_68HC16", Const, 11},
+ {"EM_68K", Const, 0},
+ {"EM_78KOR", Const, 11},
+ {"EM_8051", Const, 11},
+ {"EM_860", Const, 0},
+ {"EM_88K", Const, 0},
+ {"EM_960", Const, 0},
+ {"EM_AARCH64", Const, 4},
+ {"EM_ALPHA", Const, 0},
+ {"EM_ALPHA_STD", Const, 0},
+ {"EM_ALTERA_NIOS2", Const, 11},
+ {"EM_AMDGPU", Const, 11},
+ {"EM_ARC", Const, 0},
+ {"EM_ARCA", Const, 11},
+ {"EM_ARC_COMPACT", Const, 11},
+ {"EM_ARC_COMPACT2", Const, 11},
+ {"EM_ARM", Const, 0},
+ {"EM_AVR", Const, 11},
+ {"EM_AVR32", Const, 11},
+ {"EM_BA1", Const, 11},
+ {"EM_BA2", Const, 11},
+ {"EM_BLACKFIN", Const, 11},
+ {"EM_BPF", Const, 11},
+ {"EM_C166", Const, 11},
+ {"EM_CDP", Const, 11},
+ {"EM_CE", Const, 11},
+ {"EM_CLOUDSHIELD", Const, 11},
+ {"EM_COGE", Const, 11},
+ {"EM_COLDFIRE", Const, 0},
+ {"EM_COOL", Const, 11},
+ {"EM_COREA_1ST", Const, 11},
+ {"EM_COREA_2ND", Const, 11},
+ {"EM_CR", Const, 11},
+ {"EM_CR16", Const, 11},
+ {"EM_CRAYNV2", Const, 11},
+ {"EM_CRIS", Const, 11},
+ {"EM_CRX", Const, 11},
+ {"EM_CSR_KALIMBA", Const, 11},
+ {"EM_CUDA", Const, 11},
+ {"EM_CYPRESS_M8C", Const, 11},
+ {"EM_D10V", Const, 11},
+ {"EM_D30V", Const, 11},
+ {"EM_DSP24", Const, 11},
+ {"EM_DSPIC30F", Const, 11},
+ {"EM_DXP", Const, 11},
+ {"EM_ECOG1", Const, 11},
+ {"EM_ECOG16", Const, 11},
+ {"EM_ECOG1X", Const, 11},
+ {"EM_ECOG2", Const, 11},
+ {"EM_ETPU", Const, 11},
+ {"EM_EXCESS", Const, 11},
+ {"EM_F2MC16", Const, 11},
+ {"EM_FIREPATH", Const, 11},
+ {"EM_FR20", Const, 0},
+ {"EM_FR30", Const, 11},
+ {"EM_FT32", Const, 11},
+ {"EM_FX66", Const, 11},
+ {"EM_H8S", Const, 0},
+ {"EM_H8_300", Const, 0},
+ {"EM_H8_300H", Const, 0},
+ {"EM_H8_500", Const, 0},
+ {"EM_HUANY", Const, 11},
+ {"EM_IA_64", Const, 0},
+ {"EM_INTEL205", Const, 11},
+ {"EM_INTEL206", Const, 11},
+ {"EM_INTEL207", Const, 11},
+ {"EM_INTEL208", Const, 11},
+ {"EM_INTEL209", Const, 11},
+ {"EM_IP2K", Const, 11},
+ {"EM_JAVELIN", Const, 11},
+ {"EM_K10M", Const, 11},
+ {"EM_KM32", Const, 11},
+ {"EM_KMX16", Const, 11},
+ {"EM_KMX32", Const, 11},
+ {"EM_KMX8", Const, 11},
+ {"EM_KVARC", Const, 11},
+ {"EM_L10M", Const, 11},
+ {"EM_LANAI", Const, 11},
+ {"EM_LATTICEMICO32", Const, 11},
+ {"EM_LOONGARCH", Const, 19},
+ {"EM_M16C", Const, 11},
+ {"EM_M32", Const, 0},
+ {"EM_M32C", Const, 11},
+ {"EM_M32R", Const, 11},
+ {"EM_MANIK", Const, 11},
+ {"EM_MAX", Const, 11},
+ {"EM_MAXQ30", Const, 11},
+ {"EM_MCHP_PIC", Const, 11},
+ {"EM_MCST_ELBRUS", Const, 11},
+ {"EM_ME16", Const, 0},
+ {"EM_METAG", Const, 11},
+ {"EM_MICROBLAZE", Const, 11},
+ {"EM_MIPS", Const, 0},
+ {"EM_MIPS_RS3_LE", Const, 0},
+ {"EM_MIPS_RS4_BE", Const, 0},
+ {"EM_MIPS_X", Const, 0},
+ {"EM_MMA", Const, 0},
+ {"EM_MMDSP_PLUS", Const, 11},
+ {"EM_MMIX", Const, 11},
+ {"EM_MN10200", Const, 11},
+ {"EM_MN10300", Const, 11},
+ {"EM_MOXIE", Const, 11},
+ {"EM_MSP430", Const, 11},
+ {"EM_NCPU", Const, 0},
+ {"EM_NDR1", Const, 0},
+ {"EM_NDS32", Const, 11},
+ {"EM_NONE", Const, 0},
+ {"EM_NORC", Const, 11},
+ {"EM_NS32K", Const, 11},
+ {"EM_OPEN8", Const, 11},
+ {"EM_OPENRISC", Const, 11},
+ {"EM_PARISC", Const, 0},
+ {"EM_PCP", Const, 0},
+ {"EM_PDP10", Const, 11},
+ {"EM_PDP11", Const, 11},
+ {"EM_PDSP", Const, 11},
+ {"EM_PJ", Const, 11},
+ {"EM_PPC", Const, 0},
+ {"EM_PPC64", Const, 0},
+ {"EM_PRISM", Const, 11},
+ {"EM_QDSP6", Const, 11},
+ {"EM_R32C", Const, 11},
+ {"EM_RCE", Const, 0},
+ {"EM_RH32", Const, 0},
+ {"EM_RISCV", Const, 11},
+ {"EM_RL78", Const, 11},
+ {"EM_RS08", Const, 11},
+ {"EM_RX", Const, 11},
+ {"EM_S370", Const, 0},
+ {"EM_S390", Const, 0},
+ {"EM_SCORE7", Const, 11},
+ {"EM_SEP", Const, 11},
+ {"EM_SE_C17", Const, 11},
+ {"EM_SE_C33", Const, 11},
+ {"EM_SH", Const, 0},
+ {"EM_SHARC", Const, 11},
+ {"EM_SLE9X", Const, 11},
+ {"EM_SNP1K", Const, 11},
+ {"EM_SPARC", Const, 0},
+ {"EM_SPARC32PLUS", Const, 0},
+ {"EM_SPARCV9", Const, 0},
+ {"EM_ST100", Const, 0},
+ {"EM_ST19", Const, 11},
+ {"EM_ST200", Const, 11},
+ {"EM_ST7", Const, 11},
+ {"EM_ST9PLUS", Const, 11},
+ {"EM_STARCORE", Const, 0},
+ {"EM_STM8", Const, 11},
+ {"EM_STXP7X", Const, 11},
+ {"EM_SVX", Const, 11},
+ {"EM_TILE64", Const, 11},
+ {"EM_TILEGX", Const, 11},
+ {"EM_TILEPRO", Const, 11},
+ {"EM_TINYJ", Const, 0},
+ {"EM_TI_ARP32", Const, 11},
+ {"EM_TI_C2000", Const, 11},
+ {"EM_TI_C5500", Const, 11},
+ {"EM_TI_C6000", Const, 11},
+ {"EM_TI_PRU", Const, 11},
+ {"EM_TMM_GPP", Const, 11},
+ {"EM_TPC", Const, 11},
+ {"EM_TRICORE", Const, 0},
+ {"EM_TRIMEDIA", Const, 11},
+ {"EM_TSK3000", Const, 11},
+ {"EM_UNICORE", Const, 11},
+ {"EM_V800", Const, 0},
+ {"EM_V850", Const, 11},
+ {"EM_VAX", Const, 11},
+ {"EM_VIDEOCORE", Const, 11},
+ {"EM_VIDEOCORE3", Const, 11},
+ {"EM_VIDEOCORE5", Const, 11},
+ {"EM_VISIUM", Const, 11},
+ {"EM_VPP500", Const, 0},
+ {"EM_X86_64", Const, 0},
+ {"EM_XCORE", Const, 11},
+ {"EM_XGATE", Const, 11},
+ {"EM_XIMO16", Const, 11},
+ {"EM_XTENSA", Const, 11},
+ {"EM_Z80", Const, 11},
+ {"EM_ZSP", Const, 11},
+ {"ET_CORE", Const, 0},
+ {"ET_DYN", Const, 0},
+ {"ET_EXEC", Const, 0},
+ {"ET_HIOS", Const, 0},
+ {"ET_HIPROC", Const, 0},
+ {"ET_LOOS", Const, 0},
+ {"ET_LOPROC", Const, 0},
+ {"ET_NONE", Const, 0},
+ {"ET_REL", Const, 0},
+ {"EV_CURRENT", Const, 0},
+ {"EV_NONE", Const, 0},
+ {"ErrNoSymbols", Var, 4},
+ {"File", Type, 0},
+ {"File.FileHeader", Field, 0},
+ {"File.Progs", Field, 0},
+ {"File.Sections", Field, 0},
+ {"FileHeader", Type, 0},
+ {"FileHeader.ABIVersion", Field, 0},
+ {"FileHeader.ByteOrder", Field, 0},
+ {"FileHeader.Class", Field, 0},
+ {"FileHeader.Data", Field, 0},
+ {"FileHeader.Entry", Field, 1},
+ {"FileHeader.Machine", Field, 0},
+ {"FileHeader.OSABI", Field, 0},
+ {"FileHeader.Type", Field, 0},
+ {"FileHeader.Version", Field, 0},
+ {"FormatError", Type, 0},
+ {"Header32", Type, 0},
+ {"Header32.Ehsize", Field, 0},
+ {"Header32.Entry", Field, 0},
+ {"Header32.Flags", Field, 0},
+ {"Header32.Ident", Field, 0},
+ {"Header32.Machine", Field, 0},
+ {"Header32.Phentsize", Field, 0},
+ {"Header32.Phnum", Field, 0},
+ {"Header32.Phoff", Field, 0},
+ {"Header32.Shentsize", Field, 0},
+ {"Header32.Shnum", Field, 0},
+ {"Header32.Shoff", Field, 0},
+ {"Header32.Shstrndx", Field, 0},
+ {"Header32.Type", Field, 0},
+ {"Header32.Version", Field, 0},
+ {"Header64", Type, 0},
+ {"Header64.Ehsize", Field, 0},
+ {"Header64.Entry", Field, 0},
+ {"Header64.Flags", Field, 0},
+ {"Header64.Ident", Field, 0},
+ {"Header64.Machine", Field, 0},
+ {"Header64.Phentsize", Field, 0},
+ {"Header64.Phnum", Field, 0},
+ {"Header64.Phoff", Field, 0},
+ {"Header64.Shentsize", Field, 0},
+ {"Header64.Shnum", Field, 0},
+ {"Header64.Shoff", Field, 0},
+ {"Header64.Shstrndx", Field, 0},
+ {"Header64.Type", Field, 0},
+ {"Header64.Version", Field, 0},
+ {"ImportedSymbol", Type, 0},
+ {"ImportedSymbol.Library", Field, 0},
+ {"ImportedSymbol.Name", Field, 0},
+ {"ImportedSymbol.Version", Field, 0},
+ {"Machine", Type, 0},
+ {"NT_FPREGSET", Const, 0},
+ {"NT_PRPSINFO", Const, 0},
+ {"NT_PRSTATUS", Const, 0},
+ {"NType", Type, 0},
+ {"NewFile", Func, 0},
+ {"OSABI", Type, 0},
+ {"Open", Func, 0},
+ {"PF_MASKOS", Const, 0},
+ {"PF_MASKPROC", Const, 0},
+ {"PF_R", Const, 0},
+ {"PF_W", Const, 0},
+ {"PF_X", Const, 0},
+ {"PT_AARCH64_ARCHEXT", Const, 16},
+ {"PT_AARCH64_UNWIND", Const, 16},
+ {"PT_ARM_ARCHEXT", Const, 16},
+ {"PT_ARM_EXIDX", Const, 16},
+ {"PT_DYNAMIC", Const, 0},
+ {"PT_GNU_EH_FRAME", Const, 16},
+ {"PT_GNU_MBIND_HI", Const, 16},
+ {"PT_GNU_MBIND_LO", Const, 16},
+ {"PT_GNU_PROPERTY", Const, 16},
+ {"PT_GNU_RELRO", Const, 16},
+ {"PT_GNU_STACK", Const, 16},
+ {"PT_HIOS", Const, 0},
+ {"PT_HIPROC", Const, 0},
+ {"PT_INTERP", Const, 0},
+ {"PT_LOAD", Const, 0},
+ {"PT_LOOS", Const, 0},
+ {"PT_LOPROC", Const, 0},
+ {"PT_MIPS_ABIFLAGS", Const, 16},
+ {"PT_MIPS_OPTIONS", Const, 16},
+ {"PT_MIPS_REGINFO", Const, 16},
+ {"PT_MIPS_RTPROC", Const, 16},
+ {"PT_NOTE", Const, 0},
+ {"PT_NULL", Const, 0},
+ {"PT_OPENBSD_BOOTDATA", Const, 16},
+ {"PT_OPENBSD_RANDOMIZE", Const, 16},
+ {"PT_OPENBSD_WXNEEDED", Const, 16},
+ {"PT_PAX_FLAGS", Const, 16},
+ {"PT_PHDR", Const, 0},
+ {"PT_S390_PGSTE", Const, 16},
+ {"PT_SHLIB", Const, 0},
+ {"PT_SUNWSTACK", Const, 16},
+ {"PT_SUNW_EH_FRAME", Const, 16},
+ {"PT_TLS", Const, 0},
+ {"Prog", Type, 0},
+ {"Prog.ProgHeader", Field, 0},
+ {"Prog.ReaderAt", Field, 0},
+ {"Prog32", Type, 0},
+ {"Prog32.Align", Field, 0},
+ {"Prog32.Filesz", Field, 0},
+ {"Prog32.Flags", Field, 0},
+ {"Prog32.Memsz", Field, 0},
+ {"Prog32.Off", Field, 0},
+ {"Prog32.Paddr", Field, 0},
+ {"Prog32.Type", Field, 0},
+ {"Prog32.Vaddr", Field, 0},
+ {"Prog64", Type, 0},
+ {"Prog64.Align", Field, 0},
+ {"Prog64.Filesz", Field, 0},
+ {"Prog64.Flags", Field, 0},
+ {"Prog64.Memsz", Field, 0},
+ {"Prog64.Off", Field, 0},
+ {"Prog64.Paddr", Field, 0},
+ {"Prog64.Type", Field, 0},
+ {"Prog64.Vaddr", Field, 0},
+ {"ProgFlag", Type, 0},
+ {"ProgHeader", Type, 0},
+ {"ProgHeader.Align", Field, 0},
+ {"ProgHeader.Filesz", Field, 0},
+ {"ProgHeader.Flags", Field, 0},
+ {"ProgHeader.Memsz", Field, 0},
+ {"ProgHeader.Off", Field, 0},
+ {"ProgHeader.Paddr", Field, 0},
+ {"ProgHeader.Type", Field, 0},
+ {"ProgHeader.Vaddr", Field, 0},
+ {"ProgType", Type, 0},
+ {"R_386", Type, 0},
+ {"R_386_16", Const, 10},
+ {"R_386_32", Const, 0},
+ {"R_386_32PLT", Const, 10},
+ {"R_386_8", Const, 10},
+ {"R_386_COPY", Const, 0},
+ {"R_386_GLOB_DAT", Const, 0},
+ {"R_386_GOT32", Const, 0},
+ {"R_386_GOT32X", Const, 10},
+ {"R_386_GOTOFF", Const, 0},
+ {"R_386_GOTPC", Const, 0},
+ {"R_386_IRELATIVE", Const, 10},
+ {"R_386_JMP_SLOT", Const, 0},
+ {"R_386_NONE", Const, 0},
+ {"R_386_PC16", Const, 10},
+ {"R_386_PC32", Const, 0},
+ {"R_386_PC8", Const, 10},
+ {"R_386_PLT32", Const, 0},
+ {"R_386_RELATIVE", Const, 0},
+ {"R_386_SIZE32", Const, 10},
+ {"R_386_TLS_DESC", Const, 10},
+ {"R_386_TLS_DESC_CALL", Const, 10},
+ {"R_386_TLS_DTPMOD32", Const, 0},
+ {"R_386_TLS_DTPOFF32", Const, 0},
+ {"R_386_TLS_GD", Const, 0},
+ {"R_386_TLS_GD_32", Const, 0},
+ {"R_386_TLS_GD_CALL", Const, 0},
+ {"R_386_TLS_GD_POP", Const, 0},
+ {"R_386_TLS_GD_PUSH", Const, 0},
+ {"R_386_TLS_GOTDESC", Const, 10},
+ {"R_386_TLS_GOTIE", Const, 0},
+ {"R_386_TLS_IE", Const, 0},
+ {"R_386_TLS_IE_32", Const, 0},
+ {"R_386_TLS_LDM", Const, 0},
+ {"R_386_TLS_LDM_32", Const, 0},
+ {"R_386_TLS_LDM_CALL", Const, 0},
+ {"R_386_TLS_LDM_POP", Const, 0},
+ {"R_386_TLS_LDM_PUSH", Const, 0},
+ {"R_386_TLS_LDO_32", Const, 0},
+ {"R_386_TLS_LE", Const, 0},
+ {"R_386_TLS_LE_32", Const, 0},
+ {"R_386_TLS_TPOFF", Const, 0},
+ {"R_386_TLS_TPOFF32", Const, 0},
+ {"R_390", Type, 7},
+ {"R_390_12", Const, 7},
+ {"R_390_16", Const, 7},
+ {"R_390_20", Const, 7},
+ {"R_390_32", Const, 7},
+ {"R_390_64", Const, 7},
+ {"R_390_8", Const, 7},
+ {"R_390_COPY", Const, 7},
+ {"R_390_GLOB_DAT", Const, 7},
+ {"R_390_GOT12", Const, 7},
+ {"R_390_GOT16", Const, 7},
+ {"R_390_GOT20", Const, 7},
+ {"R_390_GOT32", Const, 7},
+ {"R_390_GOT64", Const, 7},
+ {"R_390_GOTENT", Const, 7},
+ {"R_390_GOTOFF", Const, 7},
+ {"R_390_GOTOFF16", Const, 7},
+ {"R_390_GOTOFF64", Const, 7},
+ {"R_390_GOTPC", Const, 7},
+ {"R_390_GOTPCDBL", Const, 7},
+ {"R_390_GOTPLT12", Const, 7},
+ {"R_390_GOTPLT16", Const, 7},
+ {"R_390_GOTPLT20", Const, 7},
+ {"R_390_GOTPLT32", Const, 7},
+ {"R_390_GOTPLT64", Const, 7},
+ {"R_390_GOTPLTENT", Const, 7},
+ {"R_390_GOTPLTOFF16", Const, 7},
+ {"R_390_GOTPLTOFF32", Const, 7},
+ {"R_390_GOTPLTOFF64", Const, 7},
+ {"R_390_JMP_SLOT", Const, 7},
+ {"R_390_NONE", Const, 7},
+ {"R_390_PC16", Const, 7},
+ {"R_390_PC16DBL", Const, 7},
+ {"R_390_PC32", Const, 7},
+ {"R_390_PC32DBL", Const, 7},
+ {"R_390_PC64", Const, 7},
+ {"R_390_PLT16DBL", Const, 7},
+ {"R_390_PLT32", Const, 7},
+ {"R_390_PLT32DBL", Const, 7},
+ {"R_390_PLT64", Const, 7},
+ {"R_390_RELATIVE", Const, 7},
+ {"R_390_TLS_DTPMOD", Const, 7},
+ {"R_390_TLS_DTPOFF", Const, 7},
+ {"R_390_TLS_GD32", Const, 7},
+ {"R_390_TLS_GD64", Const, 7},
+ {"R_390_TLS_GDCALL", Const, 7},
+ {"R_390_TLS_GOTIE12", Const, 7},
+ {"R_390_TLS_GOTIE20", Const, 7},
+ {"R_390_TLS_GOTIE32", Const, 7},
+ {"R_390_TLS_GOTIE64", Const, 7},
+ {"R_390_TLS_IE32", Const, 7},
+ {"R_390_TLS_IE64", Const, 7},
+ {"R_390_TLS_IEENT", Const, 7},
+ {"R_390_TLS_LDCALL", Const, 7},
+ {"R_390_TLS_LDM32", Const, 7},
+ {"R_390_TLS_LDM64", Const, 7},
+ {"R_390_TLS_LDO32", Const, 7},
+ {"R_390_TLS_LDO64", Const, 7},
+ {"R_390_TLS_LE32", Const, 7},
+ {"R_390_TLS_LE64", Const, 7},
+ {"R_390_TLS_LOAD", Const, 7},
+ {"R_390_TLS_TPOFF", Const, 7},
+ {"R_AARCH64", Type, 4},
+ {"R_AARCH64_ABS16", Const, 4},
+ {"R_AARCH64_ABS32", Const, 4},
+ {"R_AARCH64_ABS64", Const, 4},
+ {"R_AARCH64_ADD_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_ADR_GOT_PAGE", Const, 4},
+ {"R_AARCH64_ADR_PREL_LO21", Const, 4},
+ {"R_AARCH64_ADR_PREL_PG_HI21", Const, 4},
+ {"R_AARCH64_ADR_PREL_PG_HI21_NC", Const, 4},
+ {"R_AARCH64_CALL26", Const, 4},
+ {"R_AARCH64_CONDBR19", Const, 4},
+ {"R_AARCH64_COPY", Const, 4},
+ {"R_AARCH64_GLOB_DAT", Const, 4},
+ {"R_AARCH64_GOT_LD_PREL19", Const, 4},
+ {"R_AARCH64_IRELATIVE", Const, 4},
+ {"R_AARCH64_JUMP26", Const, 4},
+ {"R_AARCH64_JUMP_SLOT", Const, 4},
+ {"R_AARCH64_LD64_GOTOFF_LO15", Const, 10},
+ {"R_AARCH64_LD64_GOTPAGE_LO15", Const, 10},
+ {"R_AARCH64_LD64_GOT_LO12_NC", Const, 4},
+ {"R_AARCH64_LDST128_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_LDST16_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_LDST32_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_LDST64_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_LDST8_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_LD_PREL_LO19", Const, 4},
+ {"R_AARCH64_MOVW_SABS_G0", Const, 4},
+ {"R_AARCH64_MOVW_SABS_G1", Const, 4},
+ {"R_AARCH64_MOVW_SABS_G2", Const, 4},
+ {"R_AARCH64_MOVW_UABS_G0", Const, 4},
+ {"R_AARCH64_MOVW_UABS_G0_NC", Const, 4},
+ {"R_AARCH64_MOVW_UABS_G1", Const, 4},
+ {"R_AARCH64_MOVW_UABS_G1_NC", Const, 4},
+ {"R_AARCH64_MOVW_UABS_G2", Const, 4},
+ {"R_AARCH64_MOVW_UABS_G2_NC", Const, 4},
+ {"R_AARCH64_MOVW_UABS_G3", Const, 4},
+ {"R_AARCH64_NONE", Const, 4},
+ {"R_AARCH64_NULL", Const, 4},
+ {"R_AARCH64_P32_ABS16", Const, 4},
+ {"R_AARCH64_P32_ABS32", Const, 4},
+ {"R_AARCH64_P32_ADD_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_ADR_GOT_PAGE", Const, 4},
+ {"R_AARCH64_P32_ADR_PREL_LO21", Const, 4},
+ {"R_AARCH64_P32_ADR_PREL_PG_HI21", Const, 4},
+ {"R_AARCH64_P32_CALL26", Const, 4},
+ {"R_AARCH64_P32_CONDBR19", Const, 4},
+ {"R_AARCH64_P32_COPY", Const, 4},
+ {"R_AARCH64_P32_GLOB_DAT", Const, 4},
+ {"R_AARCH64_P32_GOT_LD_PREL19", Const, 4},
+ {"R_AARCH64_P32_IRELATIVE", Const, 4},
+ {"R_AARCH64_P32_JUMP26", Const, 4},
+ {"R_AARCH64_P32_JUMP_SLOT", Const, 4},
+ {"R_AARCH64_P32_LD32_GOT_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_LDST128_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_LDST16_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_LDST32_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_LDST64_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_LDST8_ABS_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_LD_PREL_LO19", Const, 4},
+ {"R_AARCH64_P32_MOVW_SABS_G0", Const, 4},
+ {"R_AARCH64_P32_MOVW_UABS_G0", Const, 4},
+ {"R_AARCH64_P32_MOVW_UABS_G0_NC", Const, 4},
+ {"R_AARCH64_P32_MOVW_UABS_G1", Const, 4},
+ {"R_AARCH64_P32_PREL16", Const, 4},
+ {"R_AARCH64_P32_PREL32", Const, 4},
+ {"R_AARCH64_P32_RELATIVE", Const, 4},
+ {"R_AARCH64_P32_TLSDESC", Const, 4},
+ {"R_AARCH64_P32_TLSDESC_ADD_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_TLSDESC_ADR_PAGE21", Const, 4},
+ {"R_AARCH64_P32_TLSDESC_ADR_PREL21", Const, 4},
+ {"R_AARCH64_P32_TLSDESC_CALL", Const, 4},
+ {"R_AARCH64_P32_TLSDESC_LD32_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_TLSDESC_LD_PREL19", Const, 4},
+ {"R_AARCH64_P32_TLSGD_ADD_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_TLSGD_ADR_PAGE21", Const, 4},
+ {"R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21", Const, 4},
+ {"R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19", Const, 4},
+ {"R_AARCH64_P32_TLSLE_ADD_TPREL_HI12", Const, 4},
+ {"R_AARCH64_P32_TLSLE_ADD_TPREL_LO12", Const, 4},
+ {"R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC", Const, 4},
+ {"R_AARCH64_P32_TLSLE_MOVW_TPREL_G0", Const, 4},
+ {"R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC", Const, 4},
+ {"R_AARCH64_P32_TLSLE_MOVW_TPREL_G1", Const, 4},
+ {"R_AARCH64_P32_TLS_DTPMOD", Const, 4},
+ {"R_AARCH64_P32_TLS_DTPREL", Const, 4},
+ {"R_AARCH64_P32_TLS_TPREL", Const, 4},
+ {"R_AARCH64_P32_TSTBR14", Const, 4},
+ {"R_AARCH64_PREL16", Const, 4},
+ {"R_AARCH64_PREL32", Const, 4},
+ {"R_AARCH64_PREL64", Const, 4},
+ {"R_AARCH64_RELATIVE", Const, 4},
+ {"R_AARCH64_TLSDESC", Const, 4},
+ {"R_AARCH64_TLSDESC_ADD", Const, 4},
+ {"R_AARCH64_TLSDESC_ADD_LO12_NC", Const, 4},
+ {"R_AARCH64_TLSDESC_ADR_PAGE21", Const, 4},
+ {"R_AARCH64_TLSDESC_ADR_PREL21", Const, 4},
+ {"R_AARCH64_TLSDESC_CALL", Const, 4},
+ {"R_AARCH64_TLSDESC_LD64_LO12_NC", Const, 4},
+ {"R_AARCH64_TLSDESC_LDR", Const, 4},
+ {"R_AARCH64_TLSDESC_LD_PREL19", Const, 4},
+ {"R_AARCH64_TLSDESC_OFF_G0_NC", Const, 4},
+ {"R_AARCH64_TLSDESC_OFF_G1", Const, 4},
+ {"R_AARCH64_TLSGD_ADD_LO12_NC", Const, 4},
+ {"R_AARCH64_TLSGD_ADR_PAGE21", Const, 4},
+ {"R_AARCH64_TLSGD_ADR_PREL21", Const, 10},
+ {"R_AARCH64_TLSGD_MOVW_G0_NC", Const, 10},
+ {"R_AARCH64_TLSGD_MOVW_G1", Const, 10},
+ {"R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21", Const, 4},
+ {"R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC", Const, 4},
+ {"R_AARCH64_TLSIE_LD_GOTTPREL_PREL19", Const, 4},
+ {"R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC", Const, 4},
+ {"R_AARCH64_TLSIE_MOVW_GOTTPREL_G1", Const, 4},
+ {"R_AARCH64_TLSLD_ADR_PAGE21", Const, 10},
+ {"R_AARCH64_TLSLD_ADR_PREL21", Const, 10},
+ {"R_AARCH64_TLSLD_LDST128_DTPREL_LO12", Const, 10},
+ {"R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC", Const, 10},
+ {"R_AARCH64_TLSLE_ADD_TPREL_HI12", Const, 4},
+ {"R_AARCH64_TLSLE_ADD_TPREL_LO12", Const, 4},
+ {"R_AARCH64_TLSLE_ADD_TPREL_LO12_NC", Const, 4},
+ {"R_AARCH64_TLSLE_LDST128_TPREL_LO12", Const, 10},
+ {"R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC", Const, 10},
+ {"R_AARCH64_TLSLE_MOVW_TPREL_G0", Const, 4},
+ {"R_AARCH64_TLSLE_MOVW_TPREL_G0_NC", Const, 4},
+ {"R_AARCH64_TLSLE_MOVW_TPREL_G1", Const, 4},
+ {"R_AARCH64_TLSLE_MOVW_TPREL_G1_NC", Const, 4},
+ {"R_AARCH64_TLSLE_MOVW_TPREL_G2", Const, 4},
+ {"R_AARCH64_TLS_DTPMOD64", Const, 4},
+ {"R_AARCH64_TLS_DTPREL64", Const, 4},
+ {"R_AARCH64_TLS_TPREL64", Const, 4},
+ {"R_AARCH64_TSTBR14", Const, 4},
+ {"R_ALPHA", Type, 0},
+ {"R_ALPHA_BRADDR", Const, 0},
+ {"R_ALPHA_COPY", Const, 0},
+ {"R_ALPHA_GLOB_DAT", Const, 0},
+ {"R_ALPHA_GPDISP", Const, 0},
+ {"R_ALPHA_GPREL32", Const, 0},
+ {"R_ALPHA_GPRELHIGH", Const, 0},
+ {"R_ALPHA_GPRELLOW", Const, 0},
+ {"R_ALPHA_GPVALUE", Const, 0},
+ {"R_ALPHA_HINT", Const, 0},
+ {"R_ALPHA_IMMED_BR_HI32", Const, 0},
+ {"R_ALPHA_IMMED_GP_16", Const, 0},
+ {"R_ALPHA_IMMED_GP_HI32", Const, 0},
+ {"R_ALPHA_IMMED_LO32", Const, 0},
+ {"R_ALPHA_IMMED_SCN_HI32", Const, 0},
+ {"R_ALPHA_JMP_SLOT", Const, 0},
+ {"R_ALPHA_LITERAL", Const, 0},
+ {"R_ALPHA_LITUSE", Const, 0},
+ {"R_ALPHA_NONE", Const, 0},
+ {"R_ALPHA_OP_PRSHIFT", Const, 0},
+ {"R_ALPHA_OP_PSUB", Const, 0},
+ {"R_ALPHA_OP_PUSH", Const, 0},
+ {"R_ALPHA_OP_STORE", Const, 0},
+ {"R_ALPHA_REFLONG", Const, 0},
+ {"R_ALPHA_REFQUAD", Const, 0},
+ {"R_ALPHA_RELATIVE", Const, 0},
+ {"R_ALPHA_SREL16", Const, 0},
+ {"R_ALPHA_SREL32", Const, 0},
+ {"R_ALPHA_SREL64", Const, 0},
+ {"R_ARM", Type, 0},
+ {"R_ARM_ABS12", Const, 0},
+ {"R_ARM_ABS16", Const, 0},
+ {"R_ARM_ABS32", Const, 0},
+ {"R_ARM_ABS32_NOI", Const, 10},
+ {"R_ARM_ABS8", Const, 0},
+ {"R_ARM_ALU_PCREL_15_8", Const, 10},
+ {"R_ARM_ALU_PCREL_23_15", Const, 10},
+ {"R_ARM_ALU_PCREL_7_0", Const, 10},
+ {"R_ARM_ALU_PC_G0", Const, 10},
+ {"R_ARM_ALU_PC_G0_NC", Const, 10},
+ {"R_ARM_ALU_PC_G1", Const, 10},
+ {"R_ARM_ALU_PC_G1_NC", Const, 10},
+ {"R_ARM_ALU_PC_G2", Const, 10},
+ {"R_ARM_ALU_SBREL_19_12_NC", Const, 10},
+ {"R_ARM_ALU_SBREL_27_20_CK", Const, 10},
+ {"R_ARM_ALU_SB_G0", Const, 10},
+ {"R_ARM_ALU_SB_G0_NC", Const, 10},
+ {"R_ARM_ALU_SB_G1", Const, 10},
+ {"R_ARM_ALU_SB_G1_NC", Const, 10},
+ {"R_ARM_ALU_SB_G2", Const, 10},
+ {"R_ARM_AMP_VCALL9", Const, 0},
+ {"R_ARM_BASE_ABS", Const, 10},
+ {"R_ARM_CALL", Const, 10},
+ {"R_ARM_COPY", Const, 0},
+ {"R_ARM_GLOB_DAT", Const, 0},
+ {"R_ARM_GNU_VTENTRY", Const, 0},
+ {"R_ARM_GNU_VTINHERIT", Const, 0},
+ {"R_ARM_GOT32", Const, 0},
+ {"R_ARM_GOTOFF", Const, 0},
+ {"R_ARM_GOTOFF12", Const, 10},
+ {"R_ARM_GOTPC", Const, 0},
+ {"R_ARM_GOTRELAX", Const, 10},
+ {"R_ARM_GOT_ABS", Const, 10},
+ {"R_ARM_GOT_BREL12", Const, 10},
+ {"R_ARM_GOT_PREL", Const, 10},
+ {"R_ARM_IRELATIVE", Const, 10},
+ {"R_ARM_JUMP24", Const, 10},
+ {"R_ARM_JUMP_SLOT", Const, 0},
+ {"R_ARM_LDC_PC_G0", Const, 10},
+ {"R_ARM_LDC_PC_G1", Const, 10},
+ {"R_ARM_LDC_PC_G2", Const, 10},
+ {"R_ARM_LDC_SB_G0", Const, 10},
+ {"R_ARM_LDC_SB_G1", Const, 10},
+ {"R_ARM_LDC_SB_G2", Const, 10},
+ {"R_ARM_LDRS_PC_G0", Const, 10},
+ {"R_ARM_LDRS_PC_G1", Const, 10},
+ {"R_ARM_LDRS_PC_G2", Const, 10},
+ {"R_ARM_LDRS_SB_G0", Const, 10},
+ {"R_ARM_LDRS_SB_G1", Const, 10},
+ {"R_ARM_LDRS_SB_G2", Const, 10},
+ {"R_ARM_LDR_PC_G1", Const, 10},
+ {"R_ARM_LDR_PC_G2", Const, 10},
+ {"R_ARM_LDR_SBREL_11_10_NC", Const, 10},
+ {"R_ARM_LDR_SB_G0", Const, 10},
+ {"R_ARM_LDR_SB_G1", Const, 10},
+ {"R_ARM_LDR_SB_G2", Const, 10},
+ {"R_ARM_ME_TOO", Const, 10},
+ {"R_ARM_MOVT_ABS", Const, 10},
+ {"R_ARM_MOVT_BREL", Const, 10},
+ {"R_ARM_MOVT_PREL", Const, 10},
+ {"R_ARM_MOVW_ABS_NC", Const, 10},
+ {"R_ARM_MOVW_BREL", Const, 10},
+ {"R_ARM_MOVW_BREL_NC", Const, 10},
+ {"R_ARM_MOVW_PREL_NC", Const, 10},
+ {"R_ARM_NONE", Const, 0},
+ {"R_ARM_PC13", Const, 0},
+ {"R_ARM_PC24", Const, 0},
+ {"R_ARM_PLT32", Const, 0},
+ {"R_ARM_PLT32_ABS", Const, 10},
+ {"R_ARM_PREL31", Const, 10},
+ {"R_ARM_PRIVATE_0", Const, 10},
+ {"R_ARM_PRIVATE_1", Const, 10},
+ {"R_ARM_PRIVATE_10", Const, 10},
+ {"R_ARM_PRIVATE_11", Const, 10},
+ {"R_ARM_PRIVATE_12", Const, 10},
+ {"R_ARM_PRIVATE_13", Const, 10},
+ {"R_ARM_PRIVATE_14", Const, 10},
+ {"R_ARM_PRIVATE_15", Const, 10},
+ {"R_ARM_PRIVATE_2", Const, 10},
+ {"R_ARM_PRIVATE_3", Const, 10},
+ {"R_ARM_PRIVATE_4", Const, 10},
+ {"R_ARM_PRIVATE_5", Const, 10},
+ {"R_ARM_PRIVATE_6", Const, 10},
+ {"R_ARM_PRIVATE_7", Const, 10},
+ {"R_ARM_PRIVATE_8", Const, 10},
+ {"R_ARM_PRIVATE_9", Const, 10},
+ {"R_ARM_RABS32", Const, 0},
+ {"R_ARM_RBASE", Const, 0},
+ {"R_ARM_REL32", Const, 0},
+ {"R_ARM_REL32_NOI", Const, 10},
+ {"R_ARM_RELATIVE", Const, 0},
+ {"R_ARM_RPC24", Const, 0},
+ {"R_ARM_RREL32", Const, 0},
+ {"R_ARM_RSBREL32", Const, 0},
+ {"R_ARM_RXPC25", Const, 10},
+ {"R_ARM_SBREL31", Const, 10},
+ {"R_ARM_SBREL32", Const, 0},
+ {"R_ARM_SWI24", Const, 0},
+ {"R_ARM_TARGET1", Const, 10},
+ {"R_ARM_TARGET2", Const, 10},
+ {"R_ARM_THM_ABS5", Const, 0},
+ {"R_ARM_THM_ALU_ABS_G0_NC", Const, 10},
+ {"R_ARM_THM_ALU_ABS_G1_NC", Const, 10},
+ {"R_ARM_THM_ALU_ABS_G2_NC", Const, 10},
+ {"R_ARM_THM_ALU_ABS_G3", Const, 10},
+ {"R_ARM_THM_ALU_PREL_11_0", Const, 10},
+ {"R_ARM_THM_GOT_BREL12", Const, 10},
+ {"R_ARM_THM_JUMP11", Const, 10},
+ {"R_ARM_THM_JUMP19", Const, 10},
+ {"R_ARM_THM_JUMP24", Const, 10},
+ {"R_ARM_THM_JUMP6", Const, 10},
+ {"R_ARM_THM_JUMP8", Const, 10},
+ {"R_ARM_THM_MOVT_ABS", Const, 10},
+ {"R_ARM_THM_MOVT_BREL", Const, 10},
+ {"R_ARM_THM_MOVT_PREL", Const, 10},
+ {"R_ARM_THM_MOVW_ABS_NC", Const, 10},
+ {"R_ARM_THM_MOVW_BREL", Const, 10},
+ {"R_ARM_THM_MOVW_BREL_NC", Const, 10},
+ {"R_ARM_THM_MOVW_PREL_NC", Const, 10},
+ {"R_ARM_THM_PC12", Const, 10},
+ {"R_ARM_THM_PC22", Const, 0},
+ {"R_ARM_THM_PC8", Const, 0},
+ {"R_ARM_THM_RPC22", Const, 0},
+ {"R_ARM_THM_SWI8", Const, 0},
+ {"R_ARM_THM_TLS_CALL", Const, 10},
+ {"R_ARM_THM_TLS_DESCSEQ16", Const, 10},
+ {"R_ARM_THM_TLS_DESCSEQ32", Const, 10},
+ {"R_ARM_THM_XPC22", Const, 0},
+ {"R_ARM_TLS_CALL", Const, 10},
+ {"R_ARM_TLS_DESCSEQ", Const, 10},
+ {"R_ARM_TLS_DTPMOD32", Const, 10},
+ {"R_ARM_TLS_DTPOFF32", Const, 10},
+ {"R_ARM_TLS_GD32", Const, 10},
+ {"R_ARM_TLS_GOTDESC", Const, 10},
+ {"R_ARM_TLS_IE12GP", Const, 10},
+ {"R_ARM_TLS_IE32", Const, 10},
+ {"R_ARM_TLS_LDM32", Const, 10},
+ {"R_ARM_TLS_LDO12", Const, 10},
+ {"R_ARM_TLS_LDO32", Const, 10},
+ {"R_ARM_TLS_LE12", Const, 10},
+ {"R_ARM_TLS_LE32", Const, 10},
+ {"R_ARM_TLS_TPOFF32", Const, 10},
+ {"R_ARM_V4BX", Const, 10},
+ {"R_ARM_XPC25", Const, 0},
+ {"R_INFO", Func, 0},
+ {"R_INFO32", Func, 0},
+ {"R_LARCH", Type, 19},
+ {"R_LARCH_32", Const, 19},
+ {"R_LARCH_32_PCREL", Const, 20},
+ {"R_LARCH_64", Const, 19},
+ {"R_LARCH_64_PCREL", Const, 22},
+ {"R_LARCH_ABS64_HI12", Const, 20},
+ {"R_LARCH_ABS64_LO20", Const, 20},
+ {"R_LARCH_ABS_HI20", Const, 20},
+ {"R_LARCH_ABS_LO12", Const, 20},
+ {"R_LARCH_ADD16", Const, 19},
+ {"R_LARCH_ADD24", Const, 19},
+ {"R_LARCH_ADD32", Const, 19},
+ {"R_LARCH_ADD6", Const, 22},
+ {"R_LARCH_ADD64", Const, 19},
+ {"R_LARCH_ADD8", Const, 19},
+ {"R_LARCH_ADD_ULEB128", Const, 22},
+ {"R_LARCH_ALIGN", Const, 22},
+ {"R_LARCH_B16", Const, 20},
+ {"R_LARCH_B21", Const, 20},
+ {"R_LARCH_B26", Const, 20},
+ {"R_LARCH_CFA", Const, 22},
+ {"R_LARCH_COPY", Const, 19},
+ {"R_LARCH_DELETE", Const, 22},
+ {"R_LARCH_GNU_VTENTRY", Const, 20},
+ {"R_LARCH_GNU_VTINHERIT", Const, 20},
+ {"R_LARCH_GOT64_HI12", Const, 20},
+ {"R_LARCH_GOT64_LO20", Const, 20},
+ {"R_LARCH_GOT64_PC_HI12", Const, 20},
+ {"R_LARCH_GOT64_PC_LO20", Const, 20},
+ {"R_LARCH_GOT_HI20", Const, 20},
+ {"R_LARCH_GOT_LO12", Const, 20},
+ {"R_LARCH_GOT_PC_HI20", Const, 20},
+ {"R_LARCH_GOT_PC_LO12", Const, 20},
+ {"R_LARCH_IRELATIVE", Const, 19},
+ {"R_LARCH_JUMP_SLOT", Const, 19},
+ {"R_LARCH_MARK_LA", Const, 19},
+ {"R_LARCH_MARK_PCREL", Const, 19},
+ {"R_LARCH_NONE", Const, 19},
+ {"R_LARCH_PCALA64_HI12", Const, 20},
+ {"R_LARCH_PCALA64_LO20", Const, 20},
+ {"R_LARCH_PCALA_HI20", Const, 20},
+ {"R_LARCH_PCALA_LO12", Const, 20},
+ {"R_LARCH_PCREL20_S2", Const, 22},
+ {"R_LARCH_RELATIVE", Const, 19},
+ {"R_LARCH_RELAX", Const, 20},
+ {"R_LARCH_SOP_ADD", Const, 19},
+ {"R_LARCH_SOP_AND", Const, 19},
+ {"R_LARCH_SOP_ASSERT", Const, 19},
+ {"R_LARCH_SOP_IF_ELSE", Const, 19},
+ {"R_LARCH_SOP_NOT", Const, 19},
+ {"R_LARCH_SOP_POP_32_S_0_10_10_16_S2", Const, 19},
+ {"R_LARCH_SOP_POP_32_S_0_5_10_16_S2", Const, 19},
+ {"R_LARCH_SOP_POP_32_S_10_12", Const, 19},
+ {"R_LARCH_SOP_POP_32_S_10_16", Const, 19},
+ {"R_LARCH_SOP_POP_32_S_10_16_S2", Const, 19},
+ {"R_LARCH_SOP_POP_32_S_10_5", Const, 19},
+ {"R_LARCH_SOP_POP_32_S_5_20", Const, 19},
+ {"R_LARCH_SOP_POP_32_U", Const, 19},
+ {"R_LARCH_SOP_POP_32_U_10_12", Const, 19},
+ {"R_LARCH_SOP_PUSH_ABSOLUTE", Const, 19},
+ {"R_LARCH_SOP_PUSH_DUP", Const, 19},
+ {"R_LARCH_SOP_PUSH_GPREL", Const, 19},
+ {"R_LARCH_SOP_PUSH_PCREL", Const, 19},
+ {"R_LARCH_SOP_PUSH_PLT_PCREL", Const, 19},
+ {"R_LARCH_SOP_PUSH_TLS_GD", Const, 19},
+ {"R_LARCH_SOP_PUSH_TLS_GOT", Const, 19},
+ {"R_LARCH_SOP_PUSH_TLS_TPREL", Const, 19},
+ {"R_LARCH_SOP_SL", Const, 19},
+ {"R_LARCH_SOP_SR", Const, 19},
+ {"R_LARCH_SOP_SUB", Const, 19},
+ {"R_LARCH_SUB16", Const, 19},
+ {"R_LARCH_SUB24", Const, 19},
+ {"R_LARCH_SUB32", Const, 19},
+ {"R_LARCH_SUB6", Const, 22},
+ {"R_LARCH_SUB64", Const, 19},
+ {"R_LARCH_SUB8", Const, 19},
+ {"R_LARCH_SUB_ULEB128", Const, 22},
+ {"R_LARCH_TLS_DTPMOD32", Const, 19},
+ {"R_LARCH_TLS_DTPMOD64", Const, 19},
+ {"R_LARCH_TLS_DTPREL32", Const, 19},
+ {"R_LARCH_TLS_DTPREL64", Const, 19},
+ {"R_LARCH_TLS_GD_HI20", Const, 20},
+ {"R_LARCH_TLS_GD_PC_HI20", Const, 20},
+ {"R_LARCH_TLS_IE64_HI12", Const, 20},
+ {"R_LARCH_TLS_IE64_LO20", Const, 20},
+ {"R_LARCH_TLS_IE64_PC_HI12", Const, 20},
+ {"R_LARCH_TLS_IE64_PC_LO20", Const, 20},
+ {"R_LARCH_TLS_IE_HI20", Const, 20},
+ {"R_LARCH_TLS_IE_LO12", Const, 20},
+ {"R_LARCH_TLS_IE_PC_HI20", Const, 20},
+ {"R_LARCH_TLS_IE_PC_LO12", Const, 20},
+ {"R_LARCH_TLS_LD_HI20", Const, 20},
+ {"R_LARCH_TLS_LD_PC_HI20", Const, 20},
+ {"R_LARCH_TLS_LE64_HI12", Const, 20},
+ {"R_LARCH_TLS_LE64_LO20", Const, 20},
+ {"R_LARCH_TLS_LE_HI20", Const, 20},
+ {"R_LARCH_TLS_LE_LO12", Const, 20},
+ {"R_LARCH_TLS_TPREL32", Const, 19},
+ {"R_LARCH_TLS_TPREL64", Const, 19},
+ {"R_MIPS", Type, 6},
+ {"R_MIPS_16", Const, 6},
+ {"R_MIPS_26", Const, 6},
+ {"R_MIPS_32", Const, 6},
+ {"R_MIPS_64", Const, 6},
+ {"R_MIPS_ADD_IMMEDIATE", Const, 6},
+ {"R_MIPS_CALL16", Const, 6},
+ {"R_MIPS_CALL_HI16", Const, 6},
+ {"R_MIPS_CALL_LO16", Const, 6},
+ {"R_MIPS_DELETE", Const, 6},
+ {"R_MIPS_GOT16", Const, 6},
+ {"R_MIPS_GOT_DISP", Const, 6},
+ {"R_MIPS_GOT_HI16", Const, 6},
+ {"R_MIPS_GOT_LO16", Const, 6},
+ {"R_MIPS_GOT_OFST", Const, 6},
+ {"R_MIPS_GOT_PAGE", Const, 6},
+ {"R_MIPS_GPREL16", Const, 6},
+ {"R_MIPS_GPREL32", Const, 6},
+ {"R_MIPS_HI16", Const, 6},
+ {"R_MIPS_HIGHER", Const, 6},
+ {"R_MIPS_HIGHEST", Const, 6},
+ {"R_MIPS_INSERT_A", Const, 6},
+ {"R_MIPS_INSERT_B", Const, 6},
+ {"R_MIPS_JALR", Const, 6},
+ {"R_MIPS_LITERAL", Const, 6},
+ {"R_MIPS_LO16", Const, 6},
+ {"R_MIPS_NONE", Const, 6},
+ {"R_MIPS_PC16", Const, 6},
+ {"R_MIPS_PC32", Const, 22},
+ {"R_MIPS_PJUMP", Const, 6},
+ {"R_MIPS_REL16", Const, 6},
+ {"R_MIPS_REL32", Const, 6},
+ {"R_MIPS_RELGOT", Const, 6},
+ {"R_MIPS_SCN_DISP", Const, 6},
+ {"R_MIPS_SHIFT5", Const, 6},
+ {"R_MIPS_SHIFT6", Const, 6},
+ {"R_MIPS_SUB", Const, 6},
+ {"R_MIPS_TLS_DTPMOD32", Const, 6},
+ {"R_MIPS_TLS_DTPMOD64", Const, 6},
+ {"R_MIPS_TLS_DTPREL32", Const, 6},
+ {"R_MIPS_TLS_DTPREL64", Const, 6},
+ {"R_MIPS_TLS_DTPREL_HI16", Const, 6},
+ {"R_MIPS_TLS_DTPREL_LO16", Const, 6},
+ {"R_MIPS_TLS_GD", Const, 6},
+ {"R_MIPS_TLS_GOTTPREL", Const, 6},
+ {"R_MIPS_TLS_LDM", Const, 6},
+ {"R_MIPS_TLS_TPREL32", Const, 6},
+ {"R_MIPS_TLS_TPREL64", Const, 6},
+ {"R_MIPS_TLS_TPREL_HI16", Const, 6},
+ {"R_MIPS_TLS_TPREL_LO16", Const, 6},
+ {"R_PPC", Type, 0},
+ {"R_PPC64", Type, 5},
+ {"R_PPC64_ADDR14", Const, 5},
+ {"R_PPC64_ADDR14_BRNTAKEN", Const, 5},
+ {"R_PPC64_ADDR14_BRTAKEN", Const, 5},
+ {"R_PPC64_ADDR16", Const, 5},
+ {"R_PPC64_ADDR16_DS", Const, 5},
+ {"R_PPC64_ADDR16_HA", Const, 5},
+ {"R_PPC64_ADDR16_HI", Const, 5},
+ {"R_PPC64_ADDR16_HIGH", Const, 10},
+ {"R_PPC64_ADDR16_HIGHA", Const, 10},
+ {"R_PPC64_ADDR16_HIGHER", Const, 5},
+ {"R_PPC64_ADDR16_HIGHER34", Const, 20},
+ {"R_PPC64_ADDR16_HIGHERA", Const, 5},
+ {"R_PPC64_ADDR16_HIGHERA34", Const, 20},
+ {"R_PPC64_ADDR16_HIGHEST", Const, 5},
+ {"R_PPC64_ADDR16_HIGHEST34", Const, 20},
+ {"R_PPC64_ADDR16_HIGHESTA", Const, 5},
+ {"R_PPC64_ADDR16_HIGHESTA34", Const, 20},
+ {"R_PPC64_ADDR16_LO", Const, 5},
+ {"R_PPC64_ADDR16_LO_DS", Const, 5},
+ {"R_PPC64_ADDR24", Const, 5},
+ {"R_PPC64_ADDR32", Const, 5},
+ {"R_PPC64_ADDR64", Const, 5},
+ {"R_PPC64_ADDR64_LOCAL", Const, 10},
+ {"R_PPC64_COPY", Const, 20},
+ {"R_PPC64_D28", Const, 20},
+ {"R_PPC64_D34", Const, 20},
+ {"R_PPC64_D34_HA30", Const, 20},
+ {"R_PPC64_D34_HI30", Const, 20},
+ {"R_PPC64_D34_LO", Const, 20},
+ {"R_PPC64_DTPMOD64", Const, 5},
+ {"R_PPC64_DTPREL16", Const, 5},
+ {"R_PPC64_DTPREL16_DS", Const, 5},
+ {"R_PPC64_DTPREL16_HA", Const, 5},
+ {"R_PPC64_DTPREL16_HI", Const, 5},
+ {"R_PPC64_DTPREL16_HIGH", Const, 10},
+ {"R_PPC64_DTPREL16_HIGHA", Const, 10},
+ {"R_PPC64_DTPREL16_HIGHER", Const, 5},
+ {"R_PPC64_DTPREL16_HIGHERA", Const, 5},
+ {"R_PPC64_DTPREL16_HIGHEST", Const, 5},
+ {"R_PPC64_DTPREL16_HIGHESTA", Const, 5},
+ {"R_PPC64_DTPREL16_LO", Const, 5},
+ {"R_PPC64_DTPREL16_LO_DS", Const, 5},
+ {"R_PPC64_DTPREL34", Const, 20},
+ {"R_PPC64_DTPREL64", Const, 5},
+ {"R_PPC64_ENTRY", Const, 10},
+ {"R_PPC64_GLOB_DAT", Const, 20},
+ {"R_PPC64_GNU_VTENTRY", Const, 20},
+ {"R_PPC64_GNU_VTINHERIT", Const, 20},
+ {"R_PPC64_GOT16", Const, 5},
+ {"R_PPC64_GOT16_DS", Const, 5},
+ {"R_PPC64_GOT16_HA", Const, 5},
+ {"R_PPC64_GOT16_HI", Const, 5},
+ {"R_PPC64_GOT16_LO", Const, 5},
+ {"R_PPC64_GOT16_LO_DS", Const, 5},
+ {"R_PPC64_GOT_DTPREL16_DS", Const, 5},
+ {"R_PPC64_GOT_DTPREL16_HA", Const, 5},
+ {"R_PPC64_GOT_DTPREL16_HI", Const, 5},
+ {"R_PPC64_GOT_DTPREL16_LO_DS", Const, 5},
+ {"R_PPC64_GOT_DTPREL_PCREL34", Const, 20},
+ {"R_PPC64_GOT_PCREL34", Const, 20},
+ {"R_PPC64_GOT_TLSGD16", Const, 5},
+ {"R_PPC64_GOT_TLSGD16_HA", Const, 5},
+ {"R_PPC64_GOT_TLSGD16_HI", Const, 5},
+ {"R_PPC64_GOT_TLSGD16_LO", Const, 5},
+ {"R_PPC64_GOT_TLSGD_PCREL34", Const, 20},
+ {"R_PPC64_GOT_TLSLD16", Const, 5},
+ {"R_PPC64_GOT_TLSLD16_HA", Const, 5},
+ {"R_PPC64_GOT_TLSLD16_HI", Const, 5},
+ {"R_PPC64_GOT_TLSLD16_LO", Const, 5},
+ {"R_PPC64_GOT_TLSLD_PCREL34", Const, 20},
+ {"R_PPC64_GOT_TPREL16_DS", Const, 5},
+ {"R_PPC64_GOT_TPREL16_HA", Const, 5},
+ {"R_PPC64_GOT_TPREL16_HI", Const, 5},
+ {"R_PPC64_GOT_TPREL16_LO_DS", Const, 5},
+ {"R_PPC64_GOT_TPREL_PCREL34", Const, 20},
+ {"R_PPC64_IRELATIVE", Const, 10},
+ {"R_PPC64_JMP_IREL", Const, 10},
+ {"R_PPC64_JMP_SLOT", Const, 5},
+ {"R_PPC64_NONE", Const, 5},
+ {"R_PPC64_PCREL28", Const, 20},
+ {"R_PPC64_PCREL34", Const, 20},
+ {"R_PPC64_PCREL_OPT", Const, 20},
+ {"R_PPC64_PLT16_HA", Const, 20},
+ {"R_PPC64_PLT16_HI", Const, 20},
+ {"R_PPC64_PLT16_LO", Const, 20},
+ {"R_PPC64_PLT16_LO_DS", Const, 10},
+ {"R_PPC64_PLT32", Const, 20},
+ {"R_PPC64_PLT64", Const, 20},
+ {"R_PPC64_PLTCALL", Const, 20},
+ {"R_PPC64_PLTCALL_NOTOC", Const, 20},
+ {"R_PPC64_PLTGOT16", Const, 10},
+ {"R_PPC64_PLTGOT16_DS", Const, 10},
+ {"R_PPC64_PLTGOT16_HA", Const, 10},
+ {"R_PPC64_PLTGOT16_HI", Const, 10},
+ {"R_PPC64_PLTGOT16_LO", Const, 10},
+ {"R_PPC64_PLTGOT_LO_DS", Const, 10},
+ {"R_PPC64_PLTREL32", Const, 20},
+ {"R_PPC64_PLTREL64", Const, 20},
+ {"R_PPC64_PLTSEQ", Const, 20},
+ {"R_PPC64_PLTSEQ_NOTOC", Const, 20},
+ {"R_PPC64_PLT_PCREL34", Const, 20},
+ {"R_PPC64_PLT_PCREL34_NOTOC", Const, 20},
+ {"R_PPC64_REL14", Const, 5},
+ {"R_PPC64_REL14_BRNTAKEN", Const, 5},
+ {"R_PPC64_REL14_BRTAKEN", Const, 5},
+ {"R_PPC64_REL16", Const, 5},
+ {"R_PPC64_REL16DX_HA", Const, 10},
+ {"R_PPC64_REL16_HA", Const, 5},
+ {"R_PPC64_REL16_HI", Const, 5},
+ {"R_PPC64_REL16_HIGH", Const, 20},
+ {"R_PPC64_REL16_HIGHA", Const, 20},
+ {"R_PPC64_REL16_HIGHER", Const, 20},
+ {"R_PPC64_REL16_HIGHER34", Const, 20},
+ {"R_PPC64_REL16_HIGHERA", Const, 20},
+ {"R_PPC64_REL16_HIGHERA34", Const, 20},
+ {"R_PPC64_REL16_HIGHEST", Const, 20},
+ {"R_PPC64_REL16_HIGHEST34", Const, 20},
+ {"R_PPC64_REL16_HIGHESTA", Const, 20},
+ {"R_PPC64_REL16_HIGHESTA34", Const, 20},
+ {"R_PPC64_REL16_LO", Const, 5},
+ {"R_PPC64_REL24", Const, 5},
+ {"R_PPC64_REL24_NOTOC", Const, 10},
+ {"R_PPC64_REL24_P9NOTOC", Const, 21},
+ {"R_PPC64_REL30", Const, 20},
+ {"R_PPC64_REL32", Const, 5},
+ {"R_PPC64_REL64", Const, 5},
+ {"R_PPC64_RELATIVE", Const, 18},
+ {"R_PPC64_SECTOFF", Const, 20},
+ {"R_PPC64_SECTOFF_DS", Const, 10},
+ {"R_PPC64_SECTOFF_HA", Const, 20},
+ {"R_PPC64_SECTOFF_HI", Const, 20},
+ {"R_PPC64_SECTOFF_LO", Const, 20},
+ {"R_PPC64_SECTOFF_LO_DS", Const, 10},
+ {"R_PPC64_TLS", Const, 5},
+ {"R_PPC64_TLSGD", Const, 5},
+ {"R_PPC64_TLSLD", Const, 5},
+ {"R_PPC64_TOC", Const, 5},
+ {"R_PPC64_TOC16", Const, 5},
+ {"R_PPC64_TOC16_DS", Const, 5},
+ {"R_PPC64_TOC16_HA", Const, 5},
+ {"R_PPC64_TOC16_HI", Const, 5},
+ {"R_PPC64_TOC16_LO", Const, 5},
+ {"R_PPC64_TOC16_LO_DS", Const, 5},
+ {"R_PPC64_TOCSAVE", Const, 10},
+ {"R_PPC64_TPREL16", Const, 5},
+ {"R_PPC64_TPREL16_DS", Const, 5},
+ {"R_PPC64_TPREL16_HA", Const, 5},
+ {"R_PPC64_TPREL16_HI", Const, 5},
+ {"R_PPC64_TPREL16_HIGH", Const, 10},
+ {"R_PPC64_TPREL16_HIGHA", Const, 10},
+ {"R_PPC64_TPREL16_HIGHER", Const, 5},
+ {"R_PPC64_TPREL16_HIGHERA", Const, 5},
+ {"R_PPC64_TPREL16_HIGHEST", Const, 5},
+ {"R_PPC64_TPREL16_HIGHESTA", Const, 5},
+ {"R_PPC64_TPREL16_LO", Const, 5},
+ {"R_PPC64_TPREL16_LO_DS", Const, 5},
+ {"R_PPC64_TPREL34", Const, 20},
+ {"R_PPC64_TPREL64", Const, 5},
+ {"R_PPC64_UADDR16", Const, 20},
+ {"R_PPC64_UADDR32", Const, 20},
+ {"R_PPC64_UADDR64", Const, 20},
+ {"R_PPC_ADDR14", Const, 0},
+ {"R_PPC_ADDR14_BRNTAKEN", Const, 0},
+ {"R_PPC_ADDR14_BRTAKEN", Const, 0},
+ {"R_PPC_ADDR16", Const, 0},
+ {"R_PPC_ADDR16_HA", Const, 0},
+ {"R_PPC_ADDR16_HI", Const, 0},
+ {"R_PPC_ADDR16_LO", Const, 0},
+ {"R_PPC_ADDR24", Const, 0},
+ {"R_PPC_ADDR32", Const, 0},
+ {"R_PPC_COPY", Const, 0},
+ {"R_PPC_DTPMOD32", Const, 0},
+ {"R_PPC_DTPREL16", Const, 0},
+ {"R_PPC_DTPREL16_HA", Const, 0},
+ {"R_PPC_DTPREL16_HI", Const, 0},
+ {"R_PPC_DTPREL16_LO", Const, 0},
+ {"R_PPC_DTPREL32", Const, 0},
+ {"R_PPC_EMB_BIT_FLD", Const, 0},
+ {"R_PPC_EMB_MRKREF", Const, 0},
+ {"R_PPC_EMB_NADDR16", Const, 0},
+ {"R_PPC_EMB_NADDR16_HA", Const, 0},
+ {"R_PPC_EMB_NADDR16_HI", Const, 0},
+ {"R_PPC_EMB_NADDR16_LO", Const, 0},
+ {"R_PPC_EMB_NADDR32", Const, 0},
+ {"R_PPC_EMB_RELSDA", Const, 0},
+ {"R_PPC_EMB_RELSEC16", Const, 0},
+ {"R_PPC_EMB_RELST_HA", Const, 0},
+ {"R_PPC_EMB_RELST_HI", Const, 0},
+ {"R_PPC_EMB_RELST_LO", Const, 0},
+ {"R_PPC_EMB_SDA21", Const, 0},
+ {"R_PPC_EMB_SDA2I16", Const, 0},
+ {"R_PPC_EMB_SDA2REL", Const, 0},
+ {"R_PPC_EMB_SDAI16", Const, 0},
+ {"R_PPC_GLOB_DAT", Const, 0},
+ {"R_PPC_GOT16", Const, 0},
+ {"R_PPC_GOT16_HA", Const, 0},
+ {"R_PPC_GOT16_HI", Const, 0},
+ {"R_PPC_GOT16_LO", Const, 0},
+ {"R_PPC_GOT_TLSGD16", Const, 0},
+ {"R_PPC_GOT_TLSGD16_HA", Const, 0},
+ {"R_PPC_GOT_TLSGD16_HI", Const, 0},
+ {"R_PPC_GOT_TLSGD16_LO", Const, 0},
+ {"R_PPC_GOT_TLSLD16", Const, 0},
+ {"R_PPC_GOT_TLSLD16_HA", Const, 0},
+ {"R_PPC_GOT_TLSLD16_HI", Const, 0},
+ {"R_PPC_GOT_TLSLD16_LO", Const, 0},
+ {"R_PPC_GOT_TPREL16", Const, 0},
+ {"R_PPC_GOT_TPREL16_HA", Const, 0},
+ {"R_PPC_GOT_TPREL16_HI", Const, 0},
+ {"R_PPC_GOT_TPREL16_LO", Const, 0},
+ {"R_PPC_JMP_SLOT", Const, 0},
+ {"R_PPC_LOCAL24PC", Const, 0},
+ {"R_PPC_NONE", Const, 0},
+ {"R_PPC_PLT16_HA", Const, 0},
+ {"R_PPC_PLT16_HI", Const, 0},
+ {"R_PPC_PLT16_LO", Const, 0},
+ {"R_PPC_PLT32", Const, 0},
+ {"R_PPC_PLTREL24", Const, 0},
+ {"R_PPC_PLTREL32", Const, 0},
+ {"R_PPC_REL14", Const, 0},
+ {"R_PPC_REL14_BRNTAKEN", Const, 0},
+ {"R_PPC_REL14_BRTAKEN", Const, 0},
+ {"R_PPC_REL24", Const, 0},
+ {"R_PPC_REL32", Const, 0},
+ {"R_PPC_RELATIVE", Const, 0},
+ {"R_PPC_SDAREL16", Const, 0},
+ {"R_PPC_SECTOFF", Const, 0},
+ {"R_PPC_SECTOFF_HA", Const, 0},
+ {"R_PPC_SECTOFF_HI", Const, 0},
+ {"R_PPC_SECTOFF_LO", Const, 0},
+ {"R_PPC_TLS", Const, 0},
+ {"R_PPC_TPREL16", Const, 0},
+ {"R_PPC_TPREL16_HA", Const, 0},
+ {"R_PPC_TPREL16_HI", Const, 0},
+ {"R_PPC_TPREL16_LO", Const, 0},
+ {"R_PPC_TPREL32", Const, 0},
+ {"R_PPC_UADDR16", Const, 0},
+ {"R_PPC_UADDR32", Const, 0},
+ {"R_RISCV", Type, 11},
+ {"R_RISCV_32", Const, 11},
+ {"R_RISCV_32_PCREL", Const, 12},
+ {"R_RISCV_64", Const, 11},
+ {"R_RISCV_ADD16", Const, 11},
+ {"R_RISCV_ADD32", Const, 11},
+ {"R_RISCV_ADD64", Const, 11},
+ {"R_RISCV_ADD8", Const, 11},
+ {"R_RISCV_ALIGN", Const, 11},
+ {"R_RISCV_BRANCH", Const, 11},
+ {"R_RISCV_CALL", Const, 11},
+ {"R_RISCV_CALL_PLT", Const, 11},
+ {"R_RISCV_COPY", Const, 11},
+ {"R_RISCV_GNU_VTENTRY", Const, 11},
+ {"R_RISCV_GNU_VTINHERIT", Const, 11},
+ {"R_RISCV_GOT_HI20", Const, 11},
+ {"R_RISCV_GPREL_I", Const, 11},
+ {"R_RISCV_GPREL_S", Const, 11},
+ {"R_RISCV_HI20", Const, 11},
+ {"R_RISCV_JAL", Const, 11},
+ {"R_RISCV_JUMP_SLOT", Const, 11},
+ {"R_RISCV_LO12_I", Const, 11},
+ {"R_RISCV_LO12_S", Const, 11},
+ {"R_RISCV_NONE", Const, 11},
+ {"R_RISCV_PCREL_HI20", Const, 11},
+ {"R_RISCV_PCREL_LO12_I", Const, 11},
+ {"R_RISCV_PCREL_LO12_S", Const, 11},
+ {"R_RISCV_RELATIVE", Const, 11},
+ {"R_RISCV_RELAX", Const, 11},
+ {"R_RISCV_RVC_BRANCH", Const, 11},
+ {"R_RISCV_RVC_JUMP", Const, 11},
+ {"R_RISCV_RVC_LUI", Const, 11},
+ {"R_RISCV_SET16", Const, 11},
+ {"R_RISCV_SET32", Const, 11},
+ {"R_RISCV_SET6", Const, 11},
+ {"R_RISCV_SET8", Const, 11},
+ {"R_RISCV_SUB16", Const, 11},
+ {"R_RISCV_SUB32", Const, 11},
+ {"R_RISCV_SUB6", Const, 11},
+ {"R_RISCV_SUB64", Const, 11},
+ {"R_RISCV_SUB8", Const, 11},
+ {"R_RISCV_TLS_DTPMOD32", Const, 11},
+ {"R_RISCV_TLS_DTPMOD64", Const, 11},
+ {"R_RISCV_TLS_DTPREL32", Const, 11},
+ {"R_RISCV_TLS_DTPREL64", Const, 11},
+ {"R_RISCV_TLS_GD_HI20", Const, 11},
+ {"R_RISCV_TLS_GOT_HI20", Const, 11},
+ {"R_RISCV_TLS_TPREL32", Const, 11},
+ {"R_RISCV_TLS_TPREL64", Const, 11},
+ {"R_RISCV_TPREL_ADD", Const, 11},
+ {"R_RISCV_TPREL_HI20", Const, 11},
+ {"R_RISCV_TPREL_I", Const, 11},
+ {"R_RISCV_TPREL_LO12_I", Const, 11},
+ {"R_RISCV_TPREL_LO12_S", Const, 11},
+ {"R_RISCV_TPREL_S", Const, 11},
+ {"R_SPARC", Type, 0},
+ {"R_SPARC_10", Const, 0},
+ {"R_SPARC_11", Const, 0},
+ {"R_SPARC_13", Const, 0},
+ {"R_SPARC_16", Const, 0},
+ {"R_SPARC_22", Const, 0},
+ {"R_SPARC_32", Const, 0},
+ {"R_SPARC_5", Const, 0},
+ {"R_SPARC_6", Const, 0},
+ {"R_SPARC_64", Const, 0},
+ {"R_SPARC_7", Const, 0},
+ {"R_SPARC_8", Const, 0},
+ {"R_SPARC_COPY", Const, 0},
+ {"R_SPARC_DISP16", Const, 0},
+ {"R_SPARC_DISP32", Const, 0},
+ {"R_SPARC_DISP64", Const, 0},
+ {"R_SPARC_DISP8", Const, 0},
+ {"R_SPARC_GLOB_DAT", Const, 0},
+ {"R_SPARC_GLOB_JMP", Const, 0},
+ {"R_SPARC_GOT10", Const, 0},
+ {"R_SPARC_GOT13", Const, 0},
+ {"R_SPARC_GOT22", Const, 0},
+ {"R_SPARC_H44", Const, 0},
+ {"R_SPARC_HH22", Const, 0},
+ {"R_SPARC_HI22", Const, 0},
+ {"R_SPARC_HIPLT22", Const, 0},
+ {"R_SPARC_HIX22", Const, 0},
+ {"R_SPARC_HM10", Const, 0},
+ {"R_SPARC_JMP_SLOT", Const, 0},
+ {"R_SPARC_L44", Const, 0},
+ {"R_SPARC_LM22", Const, 0},
+ {"R_SPARC_LO10", Const, 0},
+ {"R_SPARC_LOPLT10", Const, 0},
+ {"R_SPARC_LOX10", Const, 0},
+ {"R_SPARC_M44", Const, 0},
+ {"R_SPARC_NONE", Const, 0},
+ {"R_SPARC_OLO10", Const, 0},
+ {"R_SPARC_PC10", Const, 0},
+ {"R_SPARC_PC22", Const, 0},
+ {"R_SPARC_PCPLT10", Const, 0},
+ {"R_SPARC_PCPLT22", Const, 0},
+ {"R_SPARC_PCPLT32", Const, 0},
+ {"R_SPARC_PC_HH22", Const, 0},
+ {"R_SPARC_PC_HM10", Const, 0},
+ {"R_SPARC_PC_LM22", Const, 0},
+ {"R_SPARC_PLT32", Const, 0},
+ {"R_SPARC_PLT64", Const, 0},
+ {"R_SPARC_REGISTER", Const, 0},
+ {"R_SPARC_RELATIVE", Const, 0},
+ {"R_SPARC_UA16", Const, 0},
+ {"R_SPARC_UA32", Const, 0},
+ {"R_SPARC_UA64", Const, 0},
+ {"R_SPARC_WDISP16", Const, 0},
+ {"R_SPARC_WDISP19", Const, 0},
+ {"R_SPARC_WDISP22", Const, 0},
+ {"R_SPARC_WDISP30", Const, 0},
+ {"R_SPARC_WPLT30", Const, 0},
+ {"R_SYM32", Func, 0},
+ {"R_SYM64", Func, 0},
+ {"R_TYPE32", Func, 0},
+ {"R_TYPE64", Func, 0},
+ {"R_X86_64", Type, 0},
+ {"R_X86_64_16", Const, 0},
+ {"R_X86_64_32", Const, 0},
+ {"R_X86_64_32S", Const, 0},
+ {"R_X86_64_64", Const, 0},
+ {"R_X86_64_8", Const, 0},
+ {"R_X86_64_COPY", Const, 0},
+ {"R_X86_64_DTPMOD64", Const, 0},
+ {"R_X86_64_DTPOFF32", Const, 0},
+ {"R_X86_64_DTPOFF64", Const, 0},
+ {"R_X86_64_GLOB_DAT", Const, 0},
+ {"R_X86_64_GOT32", Const, 0},
+ {"R_X86_64_GOT64", Const, 10},
+ {"R_X86_64_GOTOFF64", Const, 10},
+ {"R_X86_64_GOTPC32", Const, 10},
+ {"R_X86_64_GOTPC32_TLSDESC", Const, 10},
+ {"R_X86_64_GOTPC64", Const, 10},
+ {"R_X86_64_GOTPCREL", Const, 0},
+ {"R_X86_64_GOTPCREL64", Const, 10},
+ {"R_X86_64_GOTPCRELX", Const, 10},
+ {"R_X86_64_GOTPLT64", Const, 10},
+ {"R_X86_64_GOTTPOFF", Const, 0},
+ {"R_X86_64_IRELATIVE", Const, 10},
+ {"R_X86_64_JMP_SLOT", Const, 0},
+ {"R_X86_64_NONE", Const, 0},
+ {"R_X86_64_PC16", Const, 0},
+ {"R_X86_64_PC32", Const, 0},
+ {"R_X86_64_PC32_BND", Const, 10},
+ {"R_X86_64_PC64", Const, 10},
+ {"R_X86_64_PC8", Const, 0},
+ {"R_X86_64_PLT32", Const, 0},
+ {"R_X86_64_PLT32_BND", Const, 10},
+ {"R_X86_64_PLTOFF64", Const, 10},
+ {"R_X86_64_RELATIVE", Const, 0},
+ {"R_X86_64_RELATIVE64", Const, 10},
+ {"R_X86_64_REX_GOTPCRELX", Const, 10},
+ {"R_X86_64_SIZE32", Const, 10},
+ {"R_X86_64_SIZE64", Const, 10},
+ {"R_X86_64_TLSDESC", Const, 10},
+ {"R_X86_64_TLSDESC_CALL", Const, 10},
+ {"R_X86_64_TLSGD", Const, 0},
+ {"R_X86_64_TLSLD", Const, 0},
+ {"R_X86_64_TPOFF32", Const, 0},
+ {"R_X86_64_TPOFF64", Const, 0},
+ {"Rel32", Type, 0},
+ {"Rel32.Info", Field, 0},
+ {"Rel32.Off", Field, 0},
+ {"Rel64", Type, 0},
+ {"Rel64.Info", Field, 0},
+ {"Rel64.Off", Field, 0},
+ {"Rela32", Type, 0},
+ {"Rela32.Addend", Field, 0},
+ {"Rela32.Info", Field, 0},
+ {"Rela32.Off", Field, 0},
+ {"Rela64", Type, 0},
+ {"Rela64.Addend", Field, 0},
+ {"Rela64.Info", Field, 0},
+ {"Rela64.Off", Field, 0},
+ {"SHF_ALLOC", Const, 0},
+ {"SHF_COMPRESSED", Const, 6},
+ {"SHF_EXECINSTR", Const, 0},
+ {"SHF_GROUP", Const, 0},
+ {"SHF_INFO_LINK", Const, 0},
+ {"SHF_LINK_ORDER", Const, 0},
+ {"SHF_MASKOS", Const, 0},
+ {"SHF_MASKPROC", Const, 0},
+ {"SHF_MERGE", Const, 0},
+ {"SHF_OS_NONCONFORMING", Const, 0},
+ {"SHF_STRINGS", Const, 0},
+ {"SHF_TLS", Const, 0},
+ {"SHF_WRITE", Const, 0},
+ {"SHN_ABS", Const, 0},
+ {"SHN_COMMON", Const, 0},
+ {"SHN_HIOS", Const, 0},
+ {"SHN_HIPROC", Const, 0},
+ {"SHN_HIRESERVE", Const, 0},
+ {"SHN_LOOS", Const, 0},
+ {"SHN_LOPROC", Const, 0},
+ {"SHN_LORESERVE", Const, 0},
+ {"SHN_UNDEF", Const, 0},
+ {"SHN_XINDEX", Const, 0},
+ {"SHT_DYNAMIC", Const, 0},
+ {"SHT_DYNSYM", Const, 0},
+ {"SHT_FINI_ARRAY", Const, 0},
+ {"SHT_GNU_ATTRIBUTES", Const, 0},
+ {"SHT_GNU_HASH", Const, 0},
+ {"SHT_GNU_LIBLIST", Const, 0},
+ {"SHT_GNU_VERDEF", Const, 0},
+ {"SHT_GNU_VERNEED", Const, 0},
+ {"SHT_GNU_VERSYM", Const, 0},
+ {"SHT_GROUP", Const, 0},
+ {"SHT_HASH", Const, 0},
+ {"SHT_HIOS", Const, 0},
+ {"SHT_HIPROC", Const, 0},
+ {"SHT_HIUSER", Const, 0},
+ {"SHT_INIT_ARRAY", Const, 0},
+ {"SHT_LOOS", Const, 0},
+ {"SHT_LOPROC", Const, 0},
+ {"SHT_LOUSER", Const, 0},
+ {"SHT_MIPS_ABIFLAGS", Const, 17},
+ {"SHT_NOBITS", Const, 0},
+ {"SHT_NOTE", Const, 0},
+ {"SHT_NULL", Const, 0},
+ {"SHT_PREINIT_ARRAY", Const, 0},
+ {"SHT_PROGBITS", Const, 0},
+ {"SHT_REL", Const, 0},
+ {"SHT_RELA", Const, 0},
+ {"SHT_SHLIB", Const, 0},
+ {"SHT_STRTAB", Const, 0},
+ {"SHT_SYMTAB", Const, 0},
+ {"SHT_SYMTAB_SHNDX", Const, 0},
+ {"STB_GLOBAL", Const, 0},
+ {"STB_HIOS", Const, 0},
+ {"STB_HIPROC", Const, 0},
+ {"STB_LOCAL", Const, 0},
+ {"STB_LOOS", Const, 0},
+ {"STB_LOPROC", Const, 0},
+ {"STB_WEAK", Const, 0},
+ {"STT_COMMON", Const, 0},
+ {"STT_FILE", Const, 0},
+ {"STT_FUNC", Const, 0},
+ {"STT_HIOS", Const, 0},
+ {"STT_HIPROC", Const, 0},
+ {"STT_LOOS", Const, 0},
+ {"STT_LOPROC", Const, 0},
+ {"STT_NOTYPE", Const, 0},
+ {"STT_OBJECT", Const, 0},
+ {"STT_SECTION", Const, 0},
+ {"STT_TLS", Const, 0},
+ {"STV_DEFAULT", Const, 0},
+ {"STV_HIDDEN", Const, 0},
+ {"STV_INTERNAL", Const, 0},
+ {"STV_PROTECTED", Const, 0},
+ {"ST_BIND", Func, 0},
+ {"ST_INFO", Func, 0},
+ {"ST_TYPE", Func, 0},
+ {"ST_VISIBILITY", Func, 0},
+ {"Section", Type, 0},
+ {"Section.ReaderAt", Field, 0},
+ {"Section.SectionHeader", Field, 0},
+ {"Section32", Type, 0},
+ {"Section32.Addr", Field, 0},
+ {"Section32.Addralign", Field, 0},
+ {"Section32.Entsize", Field, 0},
+ {"Section32.Flags", Field, 0},
+ {"Section32.Info", Field, 0},
+ {"Section32.Link", Field, 0},
+ {"Section32.Name", Field, 0},
+ {"Section32.Off", Field, 0},
+ {"Section32.Size", Field, 0},
+ {"Section32.Type", Field, 0},
+ {"Section64", Type, 0},
+ {"Section64.Addr", Field, 0},
+ {"Section64.Addralign", Field, 0},
+ {"Section64.Entsize", Field, 0},
+ {"Section64.Flags", Field, 0},
+ {"Section64.Info", Field, 0},
+ {"Section64.Link", Field, 0},
+ {"Section64.Name", Field, 0},
+ {"Section64.Off", Field, 0},
+ {"Section64.Size", Field, 0},
+ {"Section64.Type", Field, 0},
+ {"SectionFlag", Type, 0},
+ {"SectionHeader", Type, 0},
+ {"SectionHeader.Addr", Field, 0},
+ {"SectionHeader.Addralign", Field, 0},
+ {"SectionHeader.Entsize", Field, 0},
+ {"SectionHeader.FileSize", Field, 6},
+ {"SectionHeader.Flags", Field, 0},
+ {"SectionHeader.Info", Field, 0},
+ {"SectionHeader.Link", Field, 0},
+ {"SectionHeader.Name", Field, 0},
+ {"SectionHeader.Offset", Field, 0},
+ {"SectionHeader.Size", Field, 0},
+ {"SectionHeader.Type", Field, 0},
+ {"SectionIndex", Type, 0},
+ {"SectionType", Type, 0},
+ {"Sym32", Type, 0},
+ {"Sym32.Info", Field, 0},
+ {"Sym32.Name", Field, 0},
+ {"Sym32.Other", Field, 0},
+ {"Sym32.Shndx", Field, 0},
+ {"Sym32.Size", Field, 0},
+ {"Sym32.Value", Field, 0},
+ {"Sym32Size", Const, 0},
+ {"Sym64", Type, 0},
+ {"Sym64.Info", Field, 0},
+ {"Sym64.Name", Field, 0},
+ {"Sym64.Other", Field, 0},
+ {"Sym64.Shndx", Field, 0},
+ {"Sym64.Size", Field, 0},
+ {"Sym64.Value", Field, 0},
+ {"Sym64Size", Const, 0},
+ {"SymBind", Type, 0},
+ {"SymType", Type, 0},
+ {"SymVis", Type, 0},
+ {"Symbol", Type, 0},
+ {"Symbol.Info", Field, 0},
+ {"Symbol.Library", Field, 13},
+ {"Symbol.Name", Field, 0},
+ {"Symbol.Other", Field, 0},
+ {"Symbol.Section", Field, 0},
+ {"Symbol.Size", Field, 0},
+ {"Symbol.Value", Field, 0},
+ {"Symbol.Version", Field, 13},
+ {"Type", Type, 0},
+ {"Version", Type, 0},
+ },
+ "debug/gosym": {
+ {"(*DecodingError).Error", Method, 0},
+ {"(*LineTable).LineToPC", Method, 0},
+ {"(*LineTable).PCToLine", Method, 0},
+ {"(*Sym).BaseName", Method, 0},
+ {"(*Sym).PackageName", Method, 0},
+ {"(*Sym).ReceiverName", Method, 0},
+ {"(*Sym).Static", Method, 0},
+ {"(*Table).LineToPC", Method, 0},
+ {"(*Table).LookupFunc", Method, 0},
+ {"(*Table).LookupSym", Method, 0},
+ {"(*Table).PCToFunc", Method, 0},
+ {"(*Table).PCToLine", Method, 0},
+ {"(*Table).SymByAddr", Method, 0},
+ {"(*UnknownLineError).Error", Method, 0},
+ {"(Func).BaseName", Method, 0},
+ {"(Func).PackageName", Method, 0},
+ {"(Func).ReceiverName", Method, 0},
+ {"(Func).Static", Method, 0},
+ {"(UnknownFileError).Error", Method, 0},
+ {"DecodingError", Type, 0},
+ {"Func", Type, 0},
+ {"Func.End", Field, 0},
+ {"Func.Entry", Field, 0},
+ {"Func.FrameSize", Field, 0},
+ {"Func.LineTable", Field, 0},
+ {"Func.Locals", Field, 0},
+ {"Func.Obj", Field, 0},
+ {"Func.Params", Field, 0},
+ {"Func.Sym", Field, 0},
+ {"LineTable", Type, 0},
+ {"LineTable.Data", Field, 0},
+ {"LineTable.Line", Field, 0},
+ {"LineTable.PC", Field, 0},
+ {"NewLineTable", Func, 0},
+ {"NewTable", Func, 0},
+ {"Obj", Type, 0},
+ {"Obj.Funcs", Field, 0},
+ {"Obj.Paths", Field, 0},
+ {"Sym", Type, 0},
+ {"Sym.Func", Field, 0},
+ {"Sym.GoType", Field, 0},
+ {"Sym.Name", Field, 0},
+ {"Sym.Type", Field, 0},
+ {"Sym.Value", Field, 0},
+ {"Table", Type, 0},
+ {"Table.Files", Field, 0},
+ {"Table.Funcs", Field, 0},
+ {"Table.Objs", Field, 0},
+ {"Table.Syms", Field, 0},
+ {"UnknownFileError", Type, 0},
+ {"UnknownLineError", Type, 0},
+ {"UnknownLineError.File", Field, 0},
+ {"UnknownLineError.Line", Field, 0},
+ },
+ "debug/macho": {
+ {"(*FatFile).Close", Method, 3},
+ {"(*File).Close", Method, 0},
+ {"(*File).DWARF", Method, 0},
+ {"(*File).ImportedLibraries", Method, 0},
+ {"(*File).ImportedSymbols", Method, 0},
+ {"(*File).Section", Method, 0},
+ {"(*File).Segment", Method, 0},
+ {"(*FormatError).Error", Method, 0},
+ {"(*Section).Data", Method, 0},
+ {"(*Section).Open", Method, 0},
+ {"(*Segment).Data", Method, 0},
+ {"(*Segment).Open", Method, 0},
+ {"(Cpu).GoString", Method, 0},
+ {"(Cpu).String", Method, 0},
+ {"(Dylib).Raw", Method, 0},
+ {"(Dysymtab).Raw", Method, 0},
+ {"(FatArch).Close", Method, 3},
+ {"(FatArch).DWARF", Method, 3},
+ {"(FatArch).ImportedLibraries", Method, 3},
+ {"(FatArch).ImportedSymbols", Method, 3},
+ {"(FatArch).Section", Method, 3},
+ {"(FatArch).Segment", Method, 3},
+ {"(LoadBytes).Raw", Method, 0},
+ {"(LoadCmd).GoString", Method, 0},
+ {"(LoadCmd).String", Method, 0},
+ {"(RelocTypeARM).GoString", Method, 10},
+ {"(RelocTypeARM).String", Method, 10},
+ {"(RelocTypeARM64).GoString", Method, 10},
+ {"(RelocTypeARM64).String", Method, 10},
+ {"(RelocTypeGeneric).GoString", Method, 10},
+ {"(RelocTypeGeneric).String", Method, 10},
+ {"(RelocTypeX86_64).GoString", Method, 10},
+ {"(RelocTypeX86_64).String", Method, 10},
+ {"(Rpath).Raw", Method, 10},
+ {"(Section).ReadAt", Method, 0},
+ {"(Segment).Raw", Method, 0},
+ {"(Segment).ReadAt", Method, 0},
+ {"(Symtab).Raw", Method, 0},
+ {"(Type).GoString", Method, 10},
+ {"(Type).String", Method, 10},
+ {"ARM64_RELOC_ADDEND", Const, 10},
+ {"ARM64_RELOC_BRANCH26", Const, 10},
+ {"ARM64_RELOC_GOT_LOAD_PAGE21", Const, 10},
+ {"ARM64_RELOC_GOT_LOAD_PAGEOFF12", Const, 10},
+ {"ARM64_RELOC_PAGE21", Const, 10},
+ {"ARM64_RELOC_PAGEOFF12", Const, 10},
+ {"ARM64_RELOC_POINTER_TO_GOT", Const, 10},
+ {"ARM64_RELOC_SUBTRACTOR", Const, 10},
+ {"ARM64_RELOC_TLVP_LOAD_PAGE21", Const, 10},
+ {"ARM64_RELOC_TLVP_LOAD_PAGEOFF12", Const, 10},
+ {"ARM64_RELOC_UNSIGNED", Const, 10},
+ {"ARM_RELOC_BR24", Const, 10},
+ {"ARM_RELOC_HALF", Const, 10},
+ {"ARM_RELOC_HALF_SECTDIFF", Const, 10},
+ {"ARM_RELOC_LOCAL_SECTDIFF", Const, 10},
+ {"ARM_RELOC_PAIR", Const, 10},
+ {"ARM_RELOC_PB_LA_PTR", Const, 10},
+ {"ARM_RELOC_SECTDIFF", Const, 10},
+ {"ARM_RELOC_VANILLA", Const, 10},
+ {"ARM_THUMB_32BIT_BRANCH", Const, 10},
+ {"ARM_THUMB_RELOC_BR22", Const, 10},
+ {"Cpu", Type, 0},
+ {"Cpu386", Const, 0},
+ {"CpuAmd64", Const, 0},
+ {"CpuArm", Const, 3},
+ {"CpuArm64", Const, 11},
+ {"CpuPpc", Const, 3},
+ {"CpuPpc64", Const, 3},
+ {"Dylib", Type, 0},
+ {"Dylib.CompatVersion", Field, 0},
+ {"Dylib.CurrentVersion", Field, 0},
+ {"Dylib.LoadBytes", Field, 0},
+ {"Dylib.Name", Field, 0},
+ {"Dylib.Time", Field, 0},
+ {"DylibCmd", Type, 0},
+ {"DylibCmd.Cmd", Field, 0},
+ {"DylibCmd.CompatVersion", Field, 0},
+ {"DylibCmd.CurrentVersion", Field, 0},
+ {"DylibCmd.Len", Field, 0},
+ {"DylibCmd.Name", Field, 0},
+ {"DylibCmd.Time", Field, 0},
+ {"Dysymtab", Type, 0},
+ {"Dysymtab.DysymtabCmd", Field, 0},
+ {"Dysymtab.IndirectSyms", Field, 0},
+ {"Dysymtab.LoadBytes", Field, 0},
+ {"DysymtabCmd", Type, 0},
+ {"DysymtabCmd.Cmd", Field, 0},
+ {"DysymtabCmd.Extrefsymoff", Field, 0},
+ {"DysymtabCmd.Extreloff", Field, 0},
+ {"DysymtabCmd.Iextdefsym", Field, 0},
+ {"DysymtabCmd.Ilocalsym", Field, 0},
+ {"DysymtabCmd.Indirectsymoff", Field, 0},
+ {"DysymtabCmd.Iundefsym", Field, 0},
+ {"DysymtabCmd.Len", Field, 0},
+ {"DysymtabCmd.Locreloff", Field, 0},
+ {"DysymtabCmd.Modtaboff", Field, 0},
+ {"DysymtabCmd.Nextdefsym", Field, 0},
+ {"DysymtabCmd.Nextrefsyms", Field, 0},
+ {"DysymtabCmd.Nextrel", Field, 0},
+ {"DysymtabCmd.Nindirectsyms", Field, 0},
+ {"DysymtabCmd.Nlocalsym", Field, 0},
+ {"DysymtabCmd.Nlocrel", Field, 0},
+ {"DysymtabCmd.Nmodtab", Field, 0},
+ {"DysymtabCmd.Ntoc", Field, 0},
+ {"DysymtabCmd.Nundefsym", Field, 0},
+ {"DysymtabCmd.Tocoffset", Field, 0},
+ {"ErrNotFat", Var, 3},
+ {"FatArch", Type, 3},
+ {"FatArch.FatArchHeader", Field, 3},
+ {"FatArch.File", Field, 3},
+ {"FatArchHeader", Type, 3},
+ {"FatArchHeader.Align", Field, 3},
+ {"FatArchHeader.Cpu", Field, 3},
+ {"FatArchHeader.Offset", Field, 3},
+ {"FatArchHeader.Size", Field, 3},
+ {"FatArchHeader.SubCpu", Field, 3},
+ {"FatFile", Type, 3},
+ {"FatFile.Arches", Field, 3},
+ {"FatFile.Magic", Field, 3},
+ {"File", Type, 0},
+ {"File.ByteOrder", Field, 0},
+ {"File.Dysymtab", Field, 0},
+ {"File.FileHeader", Field, 0},
+ {"File.Loads", Field, 0},
+ {"File.Sections", Field, 0},
+ {"File.Symtab", Field, 0},
+ {"FileHeader", Type, 0},
+ {"FileHeader.Cmdsz", Field, 0},
+ {"FileHeader.Cpu", Field, 0},
+ {"FileHeader.Flags", Field, 0},
+ {"FileHeader.Magic", Field, 0},
+ {"FileHeader.Ncmd", Field, 0},
+ {"FileHeader.SubCpu", Field, 0},
+ {"FileHeader.Type", Field, 0},
+ {"FlagAllModsBound", Const, 10},
+ {"FlagAllowStackExecution", Const, 10},
+ {"FlagAppExtensionSafe", Const, 10},
+ {"FlagBindAtLoad", Const, 10},
+ {"FlagBindsToWeak", Const, 10},
+ {"FlagCanonical", Const, 10},
+ {"FlagDeadStrippableDylib", Const, 10},
+ {"FlagDyldLink", Const, 10},
+ {"FlagForceFlat", Const, 10},
+ {"FlagHasTLVDescriptors", Const, 10},
+ {"FlagIncrLink", Const, 10},
+ {"FlagLazyInit", Const, 10},
+ {"FlagNoFixPrebinding", Const, 10},
+ {"FlagNoHeapExecution", Const, 10},
+ {"FlagNoMultiDefs", Const, 10},
+ {"FlagNoReexportedDylibs", Const, 10},
+ {"FlagNoUndefs", Const, 10},
+ {"FlagPIE", Const, 10},
+ {"FlagPrebindable", Const, 10},
+ {"FlagPrebound", Const, 10},
+ {"FlagRootSafe", Const, 10},
+ {"FlagSetuidSafe", Const, 10},
+ {"FlagSplitSegs", Const, 10},
+ {"FlagSubsectionsViaSymbols", Const, 10},
+ {"FlagTwoLevel", Const, 10},
+ {"FlagWeakDefines", Const, 10},
+ {"FormatError", Type, 0},
+ {"GENERIC_RELOC_LOCAL_SECTDIFF", Const, 10},
+ {"GENERIC_RELOC_PAIR", Const, 10},
+ {"GENERIC_RELOC_PB_LA_PTR", Const, 10},
+ {"GENERIC_RELOC_SECTDIFF", Const, 10},
+ {"GENERIC_RELOC_TLV", Const, 10},
+ {"GENERIC_RELOC_VANILLA", Const, 10},
+ {"Load", Type, 0},
+ {"LoadBytes", Type, 0},
+ {"LoadCmd", Type, 0},
+ {"LoadCmdDylib", Const, 0},
+ {"LoadCmdDylinker", Const, 0},
+ {"LoadCmdDysymtab", Const, 0},
+ {"LoadCmdRpath", Const, 10},
+ {"LoadCmdSegment", Const, 0},
+ {"LoadCmdSegment64", Const, 0},
+ {"LoadCmdSymtab", Const, 0},
+ {"LoadCmdThread", Const, 0},
+ {"LoadCmdUnixThread", Const, 0},
+ {"Magic32", Const, 0},
+ {"Magic64", Const, 0},
+ {"MagicFat", Const, 3},
+ {"NewFatFile", Func, 3},
+ {"NewFile", Func, 0},
+ {"Nlist32", Type, 0},
+ {"Nlist32.Desc", Field, 0},
+ {"Nlist32.Name", Field, 0},
+ {"Nlist32.Sect", Field, 0},
+ {"Nlist32.Type", Field, 0},
+ {"Nlist32.Value", Field, 0},
+ {"Nlist64", Type, 0},
+ {"Nlist64.Desc", Field, 0},
+ {"Nlist64.Name", Field, 0},
+ {"Nlist64.Sect", Field, 0},
+ {"Nlist64.Type", Field, 0},
+ {"Nlist64.Value", Field, 0},
+ {"Open", Func, 0},
+ {"OpenFat", Func, 3},
+ {"Regs386", Type, 0},
+ {"Regs386.AX", Field, 0},
+ {"Regs386.BP", Field, 0},
+ {"Regs386.BX", Field, 0},
+ {"Regs386.CS", Field, 0},
+ {"Regs386.CX", Field, 0},
+ {"Regs386.DI", Field, 0},
+ {"Regs386.DS", Field, 0},
+ {"Regs386.DX", Field, 0},
+ {"Regs386.ES", Field, 0},
+ {"Regs386.FLAGS", Field, 0},
+ {"Regs386.FS", Field, 0},
+ {"Regs386.GS", Field, 0},
+ {"Regs386.IP", Field, 0},
+ {"Regs386.SI", Field, 0},
+ {"Regs386.SP", Field, 0},
+ {"Regs386.SS", Field, 0},
+ {"RegsAMD64", Type, 0},
+ {"RegsAMD64.AX", Field, 0},
+ {"RegsAMD64.BP", Field, 0},
+ {"RegsAMD64.BX", Field, 0},
+ {"RegsAMD64.CS", Field, 0},
+ {"RegsAMD64.CX", Field, 0},
+ {"RegsAMD64.DI", Field, 0},
+ {"RegsAMD64.DX", Field, 0},
+ {"RegsAMD64.FLAGS", Field, 0},
+ {"RegsAMD64.FS", Field, 0},
+ {"RegsAMD64.GS", Field, 0},
+ {"RegsAMD64.IP", Field, 0},
+ {"RegsAMD64.R10", Field, 0},
+ {"RegsAMD64.R11", Field, 0},
+ {"RegsAMD64.R12", Field, 0},
+ {"RegsAMD64.R13", Field, 0},
+ {"RegsAMD64.R14", Field, 0},
+ {"RegsAMD64.R15", Field, 0},
+ {"RegsAMD64.R8", Field, 0},
+ {"RegsAMD64.R9", Field, 0},
+ {"RegsAMD64.SI", Field, 0},
+ {"RegsAMD64.SP", Field, 0},
+ {"Reloc", Type, 10},
+ {"Reloc.Addr", Field, 10},
+ {"Reloc.Extern", Field, 10},
+ {"Reloc.Len", Field, 10},
+ {"Reloc.Pcrel", Field, 10},
+ {"Reloc.Scattered", Field, 10},
+ {"Reloc.Type", Field, 10},
+ {"Reloc.Value", Field, 10},
+ {"RelocTypeARM", Type, 10},
+ {"RelocTypeARM64", Type, 10},
+ {"RelocTypeGeneric", Type, 10},
+ {"RelocTypeX86_64", Type, 10},
+ {"Rpath", Type, 10},
+ {"Rpath.LoadBytes", Field, 10},
+ {"Rpath.Path", Field, 10},
+ {"RpathCmd", Type, 10},
+ {"RpathCmd.Cmd", Field, 10},
+ {"RpathCmd.Len", Field, 10},
+ {"RpathCmd.Path", Field, 10},
+ {"Section", Type, 0},
+ {"Section.ReaderAt", Field, 0},
+ {"Section.Relocs", Field, 10},
+ {"Section.SectionHeader", Field, 0},
+ {"Section32", Type, 0},
+ {"Section32.Addr", Field, 0},
+ {"Section32.Align", Field, 0},
+ {"Section32.Flags", Field, 0},
+ {"Section32.Name", Field, 0},
+ {"Section32.Nreloc", Field, 0},
+ {"Section32.Offset", Field, 0},
+ {"Section32.Reloff", Field, 0},
+ {"Section32.Reserve1", Field, 0},
+ {"Section32.Reserve2", Field, 0},
+ {"Section32.Seg", Field, 0},
+ {"Section32.Size", Field, 0},
+ {"Section64", Type, 0},
+ {"Section64.Addr", Field, 0},
+ {"Section64.Align", Field, 0},
+ {"Section64.Flags", Field, 0},
+ {"Section64.Name", Field, 0},
+ {"Section64.Nreloc", Field, 0},
+ {"Section64.Offset", Field, 0},
+ {"Section64.Reloff", Field, 0},
+ {"Section64.Reserve1", Field, 0},
+ {"Section64.Reserve2", Field, 0},
+ {"Section64.Reserve3", Field, 0},
+ {"Section64.Seg", Field, 0},
+ {"Section64.Size", Field, 0},
+ {"SectionHeader", Type, 0},
+ {"SectionHeader.Addr", Field, 0},
+ {"SectionHeader.Align", Field, 0},
+ {"SectionHeader.Flags", Field, 0},
+ {"SectionHeader.Name", Field, 0},
+ {"SectionHeader.Nreloc", Field, 0},
+ {"SectionHeader.Offset", Field, 0},
+ {"SectionHeader.Reloff", Field, 0},
+ {"SectionHeader.Seg", Field, 0},
+ {"SectionHeader.Size", Field, 0},
+ {"Segment", Type, 0},
+ {"Segment.LoadBytes", Field, 0},
+ {"Segment.ReaderAt", Field, 0},
+ {"Segment.SegmentHeader", Field, 0},
+ {"Segment32", Type, 0},
+ {"Segment32.Addr", Field, 0},
+ {"Segment32.Cmd", Field, 0},
+ {"Segment32.Filesz", Field, 0},
+ {"Segment32.Flag", Field, 0},
+ {"Segment32.Len", Field, 0},
+ {"Segment32.Maxprot", Field, 0},
+ {"Segment32.Memsz", Field, 0},
+ {"Segment32.Name", Field, 0},
+ {"Segment32.Nsect", Field, 0},
+ {"Segment32.Offset", Field, 0},
+ {"Segment32.Prot", Field, 0},
+ {"Segment64", Type, 0},
+ {"Segment64.Addr", Field, 0},
+ {"Segment64.Cmd", Field, 0},
+ {"Segment64.Filesz", Field, 0},
+ {"Segment64.Flag", Field, 0},
+ {"Segment64.Len", Field, 0},
+ {"Segment64.Maxprot", Field, 0},
+ {"Segment64.Memsz", Field, 0},
+ {"Segment64.Name", Field, 0},
+ {"Segment64.Nsect", Field, 0},
+ {"Segment64.Offset", Field, 0},
+ {"Segment64.Prot", Field, 0},
+ {"SegmentHeader", Type, 0},
+ {"SegmentHeader.Addr", Field, 0},
+ {"SegmentHeader.Cmd", Field, 0},
+ {"SegmentHeader.Filesz", Field, 0},
+ {"SegmentHeader.Flag", Field, 0},
+ {"SegmentHeader.Len", Field, 0},
+ {"SegmentHeader.Maxprot", Field, 0},
+ {"SegmentHeader.Memsz", Field, 0},
+ {"SegmentHeader.Name", Field, 0},
+ {"SegmentHeader.Nsect", Field, 0},
+ {"SegmentHeader.Offset", Field, 0},
+ {"SegmentHeader.Prot", Field, 0},
+ {"Symbol", Type, 0},
+ {"Symbol.Desc", Field, 0},
+ {"Symbol.Name", Field, 0},
+ {"Symbol.Sect", Field, 0},
+ {"Symbol.Type", Field, 0},
+ {"Symbol.Value", Field, 0},
+ {"Symtab", Type, 0},
+ {"Symtab.LoadBytes", Field, 0},
+ {"Symtab.Syms", Field, 0},
+ {"Symtab.SymtabCmd", Field, 0},
+ {"SymtabCmd", Type, 0},
+ {"SymtabCmd.Cmd", Field, 0},
+ {"SymtabCmd.Len", Field, 0},
+ {"SymtabCmd.Nsyms", Field, 0},
+ {"SymtabCmd.Stroff", Field, 0},
+ {"SymtabCmd.Strsize", Field, 0},
+ {"SymtabCmd.Symoff", Field, 0},
+ {"Thread", Type, 0},
+ {"Thread.Cmd", Field, 0},
+ {"Thread.Data", Field, 0},
+ {"Thread.Len", Field, 0},
+ {"Thread.Type", Field, 0},
+ {"Type", Type, 0},
+ {"TypeBundle", Const, 3},
+ {"TypeDylib", Const, 3},
+ {"TypeExec", Const, 0},
+ {"TypeObj", Const, 0},
+ {"X86_64_RELOC_BRANCH", Const, 10},
+ {"X86_64_RELOC_GOT", Const, 10},
+ {"X86_64_RELOC_GOT_LOAD", Const, 10},
+ {"X86_64_RELOC_SIGNED", Const, 10},
+ {"X86_64_RELOC_SIGNED_1", Const, 10},
+ {"X86_64_RELOC_SIGNED_2", Const, 10},
+ {"X86_64_RELOC_SIGNED_4", Const, 10},
+ {"X86_64_RELOC_SUBTRACTOR", Const, 10},
+ {"X86_64_RELOC_TLV", Const, 10},
+ {"X86_64_RELOC_UNSIGNED", Const, 10},
+ },
+ "debug/pe": {
+ {"(*COFFSymbol).FullName", Method, 8},
+ {"(*File).COFFSymbolReadSectionDefAux", Method, 19},
+ {"(*File).Close", Method, 0},
+ {"(*File).DWARF", Method, 0},
+ {"(*File).ImportedLibraries", Method, 0},
+ {"(*File).ImportedSymbols", Method, 0},
+ {"(*File).Section", Method, 0},
+ {"(*FormatError).Error", Method, 0},
+ {"(*Section).Data", Method, 0},
+ {"(*Section).Open", Method, 0},
+ {"(Section).ReadAt", Method, 0},
+ {"(StringTable).String", Method, 8},
+ {"COFFSymbol", Type, 1},
+ {"COFFSymbol.Name", Field, 1},
+ {"COFFSymbol.NumberOfAuxSymbols", Field, 1},
+ {"COFFSymbol.SectionNumber", Field, 1},
+ {"COFFSymbol.StorageClass", Field, 1},
+ {"COFFSymbol.Type", Field, 1},
+ {"COFFSymbol.Value", Field, 1},
+ {"COFFSymbolAuxFormat5", Type, 19},
+ {"COFFSymbolAuxFormat5.Checksum", Field, 19},
+ {"COFFSymbolAuxFormat5.NumLineNumbers", Field, 19},
+ {"COFFSymbolAuxFormat5.NumRelocs", Field, 19},
+ {"COFFSymbolAuxFormat5.SecNum", Field, 19},
+ {"COFFSymbolAuxFormat5.Selection", Field, 19},
+ {"COFFSymbolAuxFormat5.Size", Field, 19},
+ {"COFFSymbolSize", Const, 1},
+ {"DataDirectory", Type, 3},
+ {"DataDirectory.Size", Field, 3},
+ {"DataDirectory.VirtualAddress", Field, 3},
+ {"File", Type, 0},
+ {"File.COFFSymbols", Field, 8},
+ {"File.FileHeader", Field, 0},
+ {"File.OptionalHeader", Field, 3},
+ {"File.Sections", Field, 0},
+ {"File.StringTable", Field, 8},
+ {"File.Symbols", Field, 1},
+ {"FileHeader", Type, 0},
+ {"FileHeader.Characteristics", Field, 0},
+ {"FileHeader.Machine", Field, 0},
+ {"FileHeader.NumberOfSections", Field, 0},
+ {"FileHeader.NumberOfSymbols", Field, 0},
+ {"FileHeader.PointerToSymbolTable", Field, 0},
+ {"FileHeader.SizeOfOptionalHeader", Field, 0},
+ {"FileHeader.TimeDateStamp", Field, 0},
+ {"FormatError", Type, 0},
+ {"IMAGE_COMDAT_SELECT_ANY", Const, 19},
+ {"IMAGE_COMDAT_SELECT_ASSOCIATIVE", Const, 19},
+ {"IMAGE_COMDAT_SELECT_EXACT_MATCH", Const, 19},
+ {"IMAGE_COMDAT_SELECT_LARGEST", Const, 19},
+ {"IMAGE_COMDAT_SELECT_NODUPLICATES", Const, 19},
+ {"IMAGE_COMDAT_SELECT_SAME_SIZE", Const, 19},
+ {"IMAGE_DIRECTORY_ENTRY_ARCHITECTURE", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_BASERELOC", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_DEBUG", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_EXCEPTION", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_EXPORT", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_GLOBALPTR", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_IAT", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_IMPORT", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_RESOURCE", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_SECURITY", Const, 11},
+ {"IMAGE_DIRECTORY_ENTRY_TLS", Const, 11},
+ {"IMAGE_DLLCHARACTERISTICS_APPCONTAINER", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_GUARD_CF", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_NO_BIND", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_NO_ISOLATION", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_NO_SEH", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_NX_COMPAT", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE", Const, 15},
+ {"IMAGE_DLLCHARACTERISTICS_WDM_DRIVER", Const, 15},
+ {"IMAGE_FILE_32BIT_MACHINE", Const, 15},
+ {"IMAGE_FILE_AGGRESIVE_WS_TRIM", Const, 15},
+ {"IMAGE_FILE_BYTES_REVERSED_HI", Const, 15},
+ {"IMAGE_FILE_BYTES_REVERSED_LO", Const, 15},
+ {"IMAGE_FILE_DEBUG_STRIPPED", Const, 15},
+ {"IMAGE_FILE_DLL", Const, 15},
+ {"IMAGE_FILE_EXECUTABLE_IMAGE", Const, 15},
+ {"IMAGE_FILE_LARGE_ADDRESS_AWARE", Const, 15},
+ {"IMAGE_FILE_LINE_NUMS_STRIPPED", Const, 15},
+ {"IMAGE_FILE_LOCAL_SYMS_STRIPPED", Const, 15},
+ {"IMAGE_FILE_MACHINE_AM33", Const, 0},
+ {"IMAGE_FILE_MACHINE_AMD64", Const, 0},
+ {"IMAGE_FILE_MACHINE_ARM", Const, 0},
+ {"IMAGE_FILE_MACHINE_ARM64", Const, 11},
+ {"IMAGE_FILE_MACHINE_ARMNT", Const, 12},
+ {"IMAGE_FILE_MACHINE_EBC", Const, 0},
+ {"IMAGE_FILE_MACHINE_I386", Const, 0},
+ {"IMAGE_FILE_MACHINE_IA64", Const, 0},
+ {"IMAGE_FILE_MACHINE_LOONGARCH32", Const, 19},
+ {"IMAGE_FILE_MACHINE_LOONGARCH64", Const, 19},
+ {"IMAGE_FILE_MACHINE_M32R", Const, 0},
+ {"IMAGE_FILE_MACHINE_MIPS16", Const, 0},
+ {"IMAGE_FILE_MACHINE_MIPSFPU", Const, 0},
+ {"IMAGE_FILE_MACHINE_MIPSFPU16", Const, 0},
+ {"IMAGE_FILE_MACHINE_POWERPC", Const, 0},
+ {"IMAGE_FILE_MACHINE_POWERPCFP", Const, 0},
+ {"IMAGE_FILE_MACHINE_R4000", Const, 0},
+ {"IMAGE_FILE_MACHINE_RISCV128", Const, 20},
+ {"IMAGE_FILE_MACHINE_RISCV32", Const, 20},
+ {"IMAGE_FILE_MACHINE_RISCV64", Const, 20},
+ {"IMAGE_FILE_MACHINE_SH3", Const, 0},
+ {"IMAGE_FILE_MACHINE_SH3DSP", Const, 0},
+ {"IMAGE_FILE_MACHINE_SH4", Const, 0},
+ {"IMAGE_FILE_MACHINE_SH5", Const, 0},
+ {"IMAGE_FILE_MACHINE_THUMB", Const, 0},
+ {"IMAGE_FILE_MACHINE_UNKNOWN", Const, 0},
+ {"IMAGE_FILE_MACHINE_WCEMIPSV2", Const, 0},
+ {"IMAGE_FILE_NET_RUN_FROM_SWAP", Const, 15},
+ {"IMAGE_FILE_RELOCS_STRIPPED", Const, 15},
+ {"IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP", Const, 15},
+ {"IMAGE_FILE_SYSTEM", Const, 15},
+ {"IMAGE_FILE_UP_SYSTEM_ONLY", Const, 15},
+ {"IMAGE_SCN_CNT_CODE", Const, 19},
+ {"IMAGE_SCN_CNT_INITIALIZED_DATA", Const, 19},
+ {"IMAGE_SCN_CNT_UNINITIALIZED_DATA", Const, 19},
+ {"IMAGE_SCN_LNK_COMDAT", Const, 19},
+ {"IMAGE_SCN_MEM_DISCARDABLE", Const, 19},
+ {"IMAGE_SCN_MEM_EXECUTE", Const, 19},
+ {"IMAGE_SCN_MEM_READ", Const, 19},
+ {"IMAGE_SCN_MEM_WRITE", Const, 19},
+ {"IMAGE_SUBSYSTEM_EFI_APPLICATION", Const, 15},
+ {"IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER", Const, 15},
+ {"IMAGE_SUBSYSTEM_EFI_ROM", Const, 15},
+ {"IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER", Const, 15},
+ {"IMAGE_SUBSYSTEM_NATIVE", Const, 15},
+ {"IMAGE_SUBSYSTEM_NATIVE_WINDOWS", Const, 15},
+ {"IMAGE_SUBSYSTEM_OS2_CUI", Const, 15},
+ {"IMAGE_SUBSYSTEM_POSIX_CUI", Const, 15},
+ {"IMAGE_SUBSYSTEM_UNKNOWN", Const, 15},
+ {"IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION", Const, 15},
+ {"IMAGE_SUBSYSTEM_WINDOWS_CE_GUI", Const, 15},
+ {"IMAGE_SUBSYSTEM_WINDOWS_CUI", Const, 15},
+ {"IMAGE_SUBSYSTEM_WINDOWS_GUI", Const, 15},
+ {"IMAGE_SUBSYSTEM_XBOX", Const, 15},
+ {"ImportDirectory", Type, 0},
+ {"ImportDirectory.FirstThunk", Field, 0},
+ {"ImportDirectory.ForwarderChain", Field, 0},
+ {"ImportDirectory.Name", Field, 0},
+ {"ImportDirectory.OriginalFirstThunk", Field, 0},
+ {"ImportDirectory.TimeDateStamp", Field, 0},
+ {"NewFile", Func, 0},
+ {"Open", Func, 0},
+ {"OptionalHeader32", Type, 3},
+ {"OptionalHeader32.AddressOfEntryPoint", Field, 3},
+ {"OptionalHeader32.BaseOfCode", Field, 3},
+ {"OptionalHeader32.BaseOfData", Field, 3},
+ {"OptionalHeader32.CheckSum", Field, 3},
+ {"OptionalHeader32.DataDirectory", Field, 3},
+ {"OptionalHeader32.DllCharacteristics", Field, 3},
+ {"OptionalHeader32.FileAlignment", Field, 3},
+ {"OptionalHeader32.ImageBase", Field, 3},
+ {"OptionalHeader32.LoaderFlags", Field, 3},
+ {"OptionalHeader32.Magic", Field, 3},
+ {"OptionalHeader32.MajorImageVersion", Field, 3},
+ {"OptionalHeader32.MajorLinkerVersion", Field, 3},
+ {"OptionalHeader32.MajorOperatingSystemVersion", Field, 3},
+ {"OptionalHeader32.MajorSubsystemVersion", Field, 3},
+ {"OptionalHeader32.MinorImageVersion", Field, 3},
+ {"OptionalHeader32.MinorLinkerVersion", Field, 3},
+ {"OptionalHeader32.MinorOperatingSystemVersion", Field, 3},
+ {"OptionalHeader32.MinorSubsystemVersion", Field, 3},
+ {"OptionalHeader32.NumberOfRvaAndSizes", Field, 3},
+ {"OptionalHeader32.SectionAlignment", Field, 3},
+ {"OptionalHeader32.SizeOfCode", Field, 3},
+ {"OptionalHeader32.SizeOfHeaders", Field, 3},
+ {"OptionalHeader32.SizeOfHeapCommit", Field, 3},
+ {"OptionalHeader32.SizeOfHeapReserve", Field, 3},
+ {"OptionalHeader32.SizeOfImage", Field, 3},
+ {"OptionalHeader32.SizeOfInitializedData", Field, 3},
+ {"OptionalHeader32.SizeOfStackCommit", Field, 3},
+ {"OptionalHeader32.SizeOfStackReserve", Field, 3},
+ {"OptionalHeader32.SizeOfUninitializedData", Field, 3},
+ {"OptionalHeader32.Subsystem", Field, 3},
+ {"OptionalHeader32.Win32VersionValue", Field, 3},
+ {"OptionalHeader64", Type, 3},
+ {"OptionalHeader64.AddressOfEntryPoint", Field, 3},
+ {"OptionalHeader64.BaseOfCode", Field, 3},
+ {"OptionalHeader64.CheckSum", Field, 3},
+ {"OptionalHeader64.DataDirectory", Field, 3},
+ {"OptionalHeader64.DllCharacteristics", Field, 3},
+ {"OptionalHeader64.FileAlignment", Field, 3},
+ {"OptionalHeader64.ImageBase", Field, 3},
+ {"OptionalHeader64.LoaderFlags", Field, 3},
+ {"OptionalHeader64.Magic", Field, 3},
+ {"OptionalHeader64.MajorImageVersion", Field, 3},
+ {"OptionalHeader64.MajorLinkerVersion", Field, 3},
+ {"OptionalHeader64.MajorOperatingSystemVersion", Field, 3},
+ {"OptionalHeader64.MajorSubsystemVersion", Field, 3},
+ {"OptionalHeader64.MinorImageVersion", Field, 3},
+ {"OptionalHeader64.MinorLinkerVersion", Field, 3},
+ {"OptionalHeader64.MinorOperatingSystemVersion", Field, 3},
+ {"OptionalHeader64.MinorSubsystemVersion", Field, 3},
+ {"OptionalHeader64.NumberOfRvaAndSizes", Field, 3},
+ {"OptionalHeader64.SectionAlignment", Field, 3},
+ {"OptionalHeader64.SizeOfCode", Field, 3},
+ {"OptionalHeader64.SizeOfHeaders", Field, 3},
+ {"OptionalHeader64.SizeOfHeapCommit", Field, 3},
+ {"OptionalHeader64.SizeOfHeapReserve", Field, 3},
+ {"OptionalHeader64.SizeOfImage", Field, 3},
+ {"OptionalHeader64.SizeOfInitializedData", Field, 3},
+ {"OptionalHeader64.SizeOfStackCommit", Field, 3},
+ {"OptionalHeader64.SizeOfStackReserve", Field, 3},
+ {"OptionalHeader64.SizeOfUninitializedData", Field, 3},
+ {"OptionalHeader64.Subsystem", Field, 3},
+ {"OptionalHeader64.Win32VersionValue", Field, 3},
+ {"Reloc", Type, 8},
+ {"Reloc.SymbolTableIndex", Field, 8},
+ {"Reloc.Type", Field, 8},
+ {"Reloc.VirtualAddress", Field, 8},
+ {"Section", Type, 0},
+ {"Section.ReaderAt", Field, 0},
+ {"Section.Relocs", Field, 8},
+ {"Section.SectionHeader", Field, 0},
+ {"SectionHeader", Type, 0},
+ {"SectionHeader.Characteristics", Field, 0},
+ {"SectionHeader.Name", Field, 0},
+ {"SectionHeader.NumberOfLineNumbers", Field, 0},
+ {"SectionHeader.NumberOfRelocations", Field, 0},
+ {"SectionHeader.Offset", Field, 0},
+ {"SectionHeader.PointerToLineNumbers", Field, 0},
+ {"SectionHeader.PointerToRelocations", Field, 0},
+ {"SectionHeader.Size", Field, 0},
+ {"SectionHeader.VirtualAddress", Field, 0},
+ {"SectionHeader.VirtualSize", Field, 0},
+ {"SectionHeader32", Type, 0},
+ {"SectionHeader32.Characteristics", Field, 0},
+ {"SectionHeader32.Name", Field, 0},
+ {"SectionHeader32.NumberOfLineNumbers", Field, 0},
+ {"SectionHeader32.NumberOfRelocations", Field, 0},
+ {"SectionHeader32.PointerToLineNumbers", Field, 0},
+ {"SectionHeader32.PointerToRawData", Field, 0},
+ {"SectionHeader32.PointerToRelocations", Field, 0},
+ {"SectionHeader32.SizeOfRawData", Field, 0},
+ {"SectionHeader32.VirtualAddress", Field, 0},
+ {"SectionHeader32.VirtualSize", Field, 0},
+ {"StringTable", Type, 8},
+ {"Symbol", Type, 1},
+ {"Symbol.Name", Field, 1},
+ {"Symbol.SectionNumber", Field, 1},
+ {"Symbol.StorageClass", Field, 1},
+ {"Symbol.Type", Field, 1},
+ {"Symbol.Value", Field, 1},
+ },
+ "debug/plan9obj": {
+ {"(*File).Close", Method, 3},
+ {"(*File).Section", Method, 3},
+ {"(*File).Symbols", Method, 3},
+ {"(*Section).Data", Method, 3},
+ {"(*Section).Open", Method, 3},
+ {"(Section).ReadAt", Method, 3},
+ {"ErrNoSymbols", Var, 18},
+ {"File", Type, 3},
+ {"File.FileHeader", Field, 3},
+ {"File.Sections", Field, 3},
+ {"FileHeader", Type, 3},
+ {"FileHeader.Bss", Field, 3},
+ {"FileHeader.Entry", Field, 3},
+ {"FileHeader.HdrSize", Field, 4},
+ {"FileHeader.LoadAddress", Field, 4},
+ {"FileHeader.Magic", Field, 3},
+ {"FileHeader.PtrSize", Field, 3},
+ {"Magic386", Const, 3},
+ {"Magic64", Const, 3},
+ {"MagicAMD64", Const, 3},
+ {"MagicARM", Const, 3},
+ {"NewFile", Func, 3},
+ {"Open", Func, 3},
+ {"Section", Type, 3},
+ {"Section.ReaderAt", Field, 3},
+ {"Section.SectionHeader", Field, 3},
+ {"SectionHeader", Type, 3},
+ {"SectionHeader.Name", Field, 3},
+ {"SectionHeader.Offset", Field, 3},
+ {"SectionHeader.Size", Field, 3},
+ {"Sym", Type, 3},
+ {"Sym.Name", Field, 3},
+ {"Sym.Type", Field, 3},
+ {"Sym.Value", Field, 3},
+ },
+ "embed": {
+ {"(FS).Open", Method, 16},
+ {"(FS).ReadDir", Method, 16},
+ {"(FS).ReadFile", Method, 16},
+ {"FS", Type, 16},
+ },
+ "encoding": {
+ {"BinaryMarshaler", Type, 2},
+ {"BinaryUnmarshaler", Type, 2},
+ {"TextMarshaler", Type, 2},
+ {"TextUnmarshaler", Type, 2},
+ },
+ "encoding/ascii85": {
+ {"(CorruptInputError).Error", Method, 0},
+ {"CorruptInputError", Type, 0},
+ {"Decode", Func, 0},
+ {"Encode", Func, 0},
+ {"MaxEncodedLen", Func, 0},
+ {"NewDecoder", Func, 0},
+ {"NewEncoder", Func, 0},
+ },
+ "encoding/asn1": {
+ {"(BitString).At", Method, 0},
+ {"(BitString).RightAlign", Method, 0},
+ {"(ObjectIdentifier).Equal", Method, 0},
+ {"(ObjectIdentifier).String", Method, 3},
+ {"(StructuralError).Error", Method, 0},
+ {"(SyntaxError).Error", Method, 0},
+ {"BitString", Type, 0},
+ {"BitString.BitLength", Field, 0},
+ {"BitString.Bytes", Field, 0},
+ {"ClassApplication", Const, 6},
+ {"ClassContextSpecific", Const, 6},
+ {"ClassPrivate", Const, 6},
+ {"ClassUniversal", Const, 6},
+ {"Enumerated", Type, 0},
+ {"Flag", Type, 0},
+ {"Marshal", Func, 0},
+ {"MarshalWithParams", Func, 10},
+ {"NullBytes", Var, 9},
+ {"NullRawValue", Var, 9},
+ {"ObjectIdentifier", Type, 0},
+ {"RawContent", Type, 0},
+ {"RawValue", Type, 0},
+ {"RawValue.Bytes", Field, 0},
+ {"RawValue.Class", Field, 0},
+ {"RawValue.FullBytes", Field, 0},
+ {"RawValue.IsCompound", Field, 0},
+ {"RawValue.Tag", Field, 0},
+ {"StructuralError", Type, 0},
+ {"StructuralError.Msg", Field, 0},
+ {"SyntaxError", Type, 0},
+ {"SyntaxError.Msg", Field, 0},
+ {"TagBMPString", Const, 14},
+ {"TagBitString", Const, 6},
+ {"TagBoolean", Const, 6},
+ {"TagEnum", Const, 6},
+ {"TagGeneralString", Const, 6},
+ {"TagGeneralizedTime", Const, 6},
+ {"TagIA5String", Const, 6},
+ {"TagInteger", Const, 6},
+ {"TagNull", Const, 9},
+ {"TagNumericString", Const, 10},
+ {"TagOID", Const, 6},
+ {"TagOctetString", Const, 6},
+ {"TagPrintableString", Const, 6},
+ {"TagSequence", Const, 6},
+ {"TagSet", Const, 6},
+ {"TagT61String", Const, 6},
+ {"TagUTCTime", Const, 6},
+ {"TagUTF8String", Const, 6},
+ {"Unmarshal", Func, 0},
+ {"UnmarshalWithParams", Func, 0},
+ },
+ "encoding/base32": {
+ {"(*Encoding).AppendDecode", Method, 22},
+ {"(*Encoding).AppendEncode", Method, 22},
+ {"(*Encoding).Decode", Method, 0},
+ {"(*Encoding).DecodeString", Method, 0},
+ {"(*Encoding).DecodedLen", Method, 0},
+ {"(*Encoding).Encode", Method, 0},
+ {"(*Encoding).EncodeToString", Method, 0},
+ {"(*Encoding).EncodedLen", Method, 0},
+ {"(CorruptInputError).Error", Method, 0},
+ {"(Encoding).WithPadding", Method, 9},
+ {"CorruptInputError", Type, 0},
+ {"Encoding", Type, 0},
+ {"HexEncoding", Var, 0},
+ {"NewDecoder", Func, 0},
+ {"NewEncoder", Func, 0},
+ {"NewEncoding", Func, 0},
+ {"NoPadding", Const, 9},
+ {"StdEncoding", Var, 0},
+ {"StdPadding", Const, 9},
+ },
+ "encoding/base64": {
+ {"(*Encoding).AppendDecode", Method, 22},
+ {"(*Encoding).AppendEncode", Method, 22},
+ {"(*Encoding).Decode", Method, 0},
+ {"(*Encoding).DecodeString", Method, 0},
+ {"(*Encoding).DecodedLen", Method, 0},
+ {"(*Encoding).Encode", Method, 0},
+ {"(*Encoding).EncodeToString", Method, 0},
+ {"(*Encoding).EncodedLen", Method, 0},
+ {"(CorruptInputError).Error", Method, 0},
+ {"(Encoding).Strict", Method, 8},
+ {"(Encoding).WithPadding", Method, 5},
+ {"CorruptInputError", Type, 0},
+ {"Encoding", Type, 0},
+ {"NewDecoder", Func, 0},
+ {"NewEncoder", Func, 0},
+ {"NewEncoding", Func, 0},
+ {"NoPadding", Const, 5},
+ {"RawStdEncoding", Var, 5},
+ {"RawURLEncoding", Var, 5},
+ {"StdEncoding", Var, 0},
+ {"StdPadding", Const, 5},
+ {"URLEncoding", Var, 0},
+ },
+ "encoding/binary": {
+ {"AppendByteOrder", Type, 19},
+ {"AppendUvarint", Func, 19},
+ {"AppendVarint", Func, 19},
+ {"BigEndian", Var, 0},
+ {"ByteOrder", Type, 0},
+ {"LittleEndian", Var, 0},
+ {"MaxVarintLen16", Const, 0},
+ {"MaxVarintLen32", Const, 0},
+ {"MaxVarintLen64", Const, 0},
+ {"NativeEndian", Var, 21},
+ {"PutUvarint", Func, 0},
+ {"PutVarint", Func, 0},
+ {"Read", Func, 0},
+ {"ReadUvarint", Func, 0},
+ {"ReadVarint", Func, 0},
+ {"Size", Func, 0},
+ {"Uvarint", Func, 0},
+ {"Varint", Func, 0},
+ {"Write", Func, 0},
+ },
+ "encoding/csv": {
+ {"(*ParseError).Error", Method, 0},
+ {"(*ParseError).Unwrap", Method, 13},
+ {"(*Reader).FieldPos", Method, 17},
+ {"(*Reader).InputOffset", Method, 19},
+ {"(*Reader).Read", Method, 0},
+ {"(*Reader).ReadAll", Method, 0},
+ {"(*Writer).Error", Method, 1},
+ {"(*Writer).Flush", Method, 0},
+ {"(*Writer).Write", Method, 0},
+ {"(*Writer).WriteAll", Method, 0},
+ {"ErrBareQuote", Var, 0},
+ {"ErrFieldCount", Var, 0},
+ {"ErrQuote", Var, 0},
+ {"ErrTrailingComma", Var, 0},
+ {"NewReader", Func, 0},
+ {"NewWriter", Func, 0},
+ {"ParseError", Type, 0},
+ {"ParseError.Column", Field, 0},
+ {"ParseError.Err", Field, 0},
+ {"ParseError.Line", Field, 0},
+ {"ParseError.StartLine", Field, 10},
+ {"Reader", Type, 0},
+ {"Reader.Comma", Field, 0},
+ {"Reader.Comment", Field, 0},
+ {"Reader.FieldsPerRecord", Field, 0},
+ {"Reader.LazyQuotes", Field, 0},
+ {"Reader.ReuseRecord", Field, 9},
+ {"Reader.TrailingComma", Field, 0},
+ {"Reader.TrimLeadingSpace", Field, 0},
+ {"Writer", Type, 0},
+ {"Writer.Comma", Field, 0},
+ {"Writer.UseCRLF", Field, 0},
+ },
+ "encoding/gob": {
+ {"(*Decoder).Decode", Method, 0},
+ {"(*Decoder).DecodeValue", Method, 0},
+ {"(*Encoder).Encode", Method, 0},
+ {"(*Encoder).EncodeValue", Method, 0},
+ {"CommonType", Type, 0},
+ {"CommonType.Id", Field, 0},
+ {"CommonType.Name", Field, 0},
+ {"Decoder", Type, 0},
+ {"Encoder", Type, 0},
+ {"GobDecoder", Type, 0},
+ {"GobEncoder", Type, 0},
+ {"NewDecoder", Func, 0},
+ {"NewEncoder", Func, 0},
+ {"Register", Func, 0},
+ {"RegisterName", Func, 0},
+ },
+ "encoding/hex": {
+ {"(InvalidByteError).Error", Method, 0},
+ {"AppendDecode", Func, 22},
+ {"AppendEncode", Func, 22},
+ {"Decode", Func, 0},
+ {"DecodeString", Func, 0},
+ {"DecodedLen", Func, 0},
+ {"Dump", Func, 0},
+ {"Dumper", Func, 0},
+ {"Encode", Func, 0},
+ {"EncodeToString", Func, 0},
+ {"EncodedLen", Func, 0},
+ {"ErrLength", Var, 0},
+ {"InvalidByteError", Type, 0},
+ {"NewDecoder", Func, 10},
+ {"NewEncoder", Func, 10},
+ },
+ "encoding/json": {
+ {"(*Decoder).Buffered", Method, 1},
+ {"(*Decoder).Decode", Method, 0},
+ {"(*Decoder).DisallowUnknownFields", Method, 10},
+ {"(*Decoder).InputOffset", Method, 14},
+ {"(*Decoder).More", Method, 5},
+ {"(*Decoder).Token", Method, 5},
+ {"(*Decoder).UseNumber", Method, 1},
+ {"(*Encoder).Encode", Method, 0},
+ {"(*Encoder).SetEscapeHTML", Method, 7},
+ {"(*Encoder).SetIndent", Method, 7},
+ {"(*InvalidUTF8Error).Error", Method, 0},
+ {"(*InvalidUnmarshalError).Error", Method, 0},
+ {"(*MarshalerError).Error", Method, 0},
+ {"(*MarshalerError).Unwrap", Method, 13},
+ {"(*RawMessage).MarshalJSON", Method, 0},
+ {"(*RawMessage).UnmarshalJSON", Method, 0},
+ {"(*SyntaxError).Error", Method, 0},
+ {"(*UnmarshalFieldError).Error", Method, 0},
+ {"(*UnmarshalTypeError).Error", Method, 0},
+ {"(*UnsupportedTypeError).Error", Method, 0},
+ {"(*UnsupportedValueError).Error", Method, 0},
+ {"(Delim).String", Method, 5},
+ {"(Number).Float64", Method, 1},
+ {"(Number).Int64", Method, 1},
+ {"(Number).String", Method, 1},
+ {"(RawMessage).MarshalJSON", Method, 8},
+ {"Compact", Func, 0},
+ {"Decoder", Type, 0},
+ {"Delim", Type, 5},
+ {"Encoder", Type, 0},
+ {"HTMLEscape", Func, 0},
+ {"Indent", Func, 0},
+ {"InvalidUTF8Error", Type, 0},
+ {"InvalidUTF8Error.S", Field, 0},
+ {"InvalidUnmarshalError", Type, 0},
+ {"InvalidUnmarshalError.Type", Field, 0},
+ {"Marshal", Func, 0},
+ {"MarshalIndent", Func, 0},
+ {"Marshaler", Type, 0},
+ {"MarshalerError", Type, 0},
+ {"MarshalerError.Err", Field, 0},
+ {"MarshalerError.Type", Field, 0},
+ {"NewDecoder", Func, 0},
+ {"NewEncoder", Func, 0},
+ {"Number", Type, 1},
+ {"RawMessage", Type, 0},
+ {"SyntaxError", Type, 0},
+ {"SyntaxError.Offset", Field, 0},
+ {"Token", Type, 5},
+ {"Unmarshal", Func, 0},
+ {"UnmarshalFieldError", Type, 0},
+ {"UnmarshalFieldError.Field", Field, 0},
+ {"UnmarshalFieldError.Key", Field, 0},
+ {"UnmarshalFieldError.Type", Field, 0},
+ {"UnmarshalTypeError", Type, 0},
+ {"UnmarshalTypeError.Field", Field, 8},
+ {"UnmarshalTypeError.Offset", Field, 5},
+ {"UnmarshalTypeError.Struct", Field, 8},
+ {"UnmarshalTypeError.Type", Field, 0},
+ {"UnmarshalTypeError.Value", Field, 0},
+ {"Unmarshaler", Type, 0},
+ {"UnsupportedTypeError", Type, 0},
+ {"UnsupportedTypeError.Type", Field, 0},
+ {"UnsupportedValueError", Type, 0},
+ {"UnsupportedValueError.Str", Field, 0},
+ {"UnsupportedValueError.Value", Field, 0},
+ {"Valid", Func, 9},
+ },
+ "encoding/pem": {
+ {"Block", Type, 0},
+ {"Block.Bytes", Field, 0},
+ {"Block.Headers", Field, 0},
+ {"Block.Type", Field, 0},
+ {"Decode", Func, 0},
+ {"Encode", Func, 0},
+ {"EncodeToMemory", Func, 0},
+ },
+ "encoding/xml": {
+ {"(*Decoder).Decode", Method, 0},
+ {"(*Decoder).DecodeElement", Method, 0},
+ {"(*Decoder).InputOffset", Method, 4},
+ {"(*Decoder).InputPos", Method, 19},
+ {"(*Decoder).RawToken", Method, 0},
+ {"(*Decoder).Skip", Method, 0},
+ {"(*Decoder).Token", Method, 0},
+ {"(*Encoder).Close", Method, 20},
+ {"(*Encoder).Encode", Method, 0},
+ {"(*Encoder).EncodeElement", Method, 2},
+ {"(*Encoder).EncodeToken", Method, 2},
+ {"(*Encoder).Flush", Method, 2},
+ {"(*Encoder).Indent", Method, 1},
+ {"(*SyntaxError).Error", Method, 0},
+ {"(*TagPathError).Error", Method, 0},
+ {"(*UnsupportedTypeError).Error", Method, 0},
+ {"(CharData).Copy", Method, 0},
+ {"(Comment).Copy", Method, 0},
+ {"(Directive).Copy", Method, 0},
+ {"(ProcInst).Copy", Method, 0},
+ {"(StartElement).Copy", Method, 0},
+ {"(StartElement).End", Method, 2},
+ {"(UnmarshalError).Error", Method, 0},
+ {"Attr", Type, 0},
+ {"Attr.Name", Field, 0},
+ {"Attr.Value", Field, 0},
+ {"CharData", Type, 0},
+ {"Comment", Type, 0},
+ {"CopyToken", Func, 0},
+ {"Decoder", Type, 0},
+ {"Decoder.AutoClose", Field, 0},
+ {"Decoder.CharsetReader", Field, 0},
+ {"Decoder.DefaultSpace", Field, 1},
+ {"Decoder.Entity", Field, 0},
+ {"Decoder.Strict", Field, 0},
+ {"Directive", Type, 0},
+ {"Encoder", Type, 0},
+ {"EndElement", Type, 0},
+ {"EndElement.Name", Field, 0},
+ {"Escape", Func, 0},
+ {"EscapeText", Func, 1},
+ {"HTMLAutoClose", Var, 0},
+ {"HTMLEntity", Var, 0},
+ {"Header", Const, 0},
+ {"Marshal", Func, 0},
+ {"MarshalIndent", Func, 0},
+ {"Marshaler", Type, 2},
+ {"MarshalerAttr", Type, 2},
+ {"Name", Type, 0},
+ {"Name.Local", Field, 0},
+ {"Name.Space", Field, 0},
+ {"NewDecoder", Func, 0},
+ {"NewEncoder", Func, 0},
+ {"NewTokenDecoder", Func, 10},
+ {"ProcInst", Type, 0},
+ {"ProcInst.Inst", Field, 0},
+ {"ProcInst.Target", Field, 0},
+ {"StartElement", Type, 0},
+ {"StartElement.Attr", Field, 0},
+ {"StartElement.Name", Field, 0},
+ {"SyntaxError", Type, 0},
+ {"SyntaxError.Line", Field, 0},
+ {"SyntaxError.Msg", Field, 0},
+ {"TagPathError", Type, 0},
+ {"TagPathError.Field1", Field, 0},
+ {"TagPathError.Field2", Field, 0},
+ {"TagPathError.Struct", Field, 0},
+ {"TagPathError.Tag1", Field, 0},
+ {"TagPathError.Tag2", Field, 0},
+ {"Token", Type, 0},
+ {"TokenReader", Type, 10},
+ {"Unmarshal", Func, 0},
+ {"UnmarshalError", Type, 0},
+ {"Unmarshaler", Type, 2},
+ {"UnmarshalerAttr", Type, 2},
+ {"UnsupportedTypeError", Type, 0},
+ {"UnsupportedTypeError.Type", Field, 0},
+ },
+ "errors": {
+ {"As", Func, 13},
+ {"ErrUnsupported", Var, 21},
+ {"Is", Func, 13},
+ {"Join", Func, 20},
+ {"New", Func, 0},
+ {"Unwrap", Func, 13},
+ },
+ "expvar": {
+ {"(*Float).Add", Method, 0},
+ {"(*Float).Set", Method, 0},
+ {"(*Float).String", Method, 0},
+ {"(*Float).Value", Method, 8},
+ {"(*Int).Add", Method, 0},
+ {"(*Int).Set", Method, 0},
+ {"(*Int).String", Method, 0},
+ {"(*Int).Value", Method, 8},
+ {"(*Map).Add", Method, 0},
+ {"(*Map).AddFloat", Method, 0},
+ {"(*Map).Delete", Method, 12},
+ {"(*Map).Do", Method, 0},
+ {"(*Map).Get", Method, 0},
+ {"(*Map).Init", Method, 0},
+ {"(*Map).Set", Method, 0},
+ {"(*Map).String", Method, 0},
+ {"(*String).Set", Method, 0},
+ {"(*String).String", Method, 0},
+ {"(*String).Value", Method, 8},
+ {"(Func).String", Method, 0},
+ {"(Func).Value", Method, 8},
+ {"Do", Func, 0},
+ {"Float", Type, 0},
+ {"Func", Type, 0},
+ {"Get", Func, 0},
+ {"Handler", Func, 8},
+ {"Int", Type, 0},
+ {"KeyValue", Type, 0},
+ {"KeyValue.Key", Field, 0},
+ {"KeyValue.Value", Field, 0},
+ {"Map", Type, 0},
+ {"NewFloat", Func, 0},
+ {"NewInt", Func, 0},
+ {"NewMap", Func, 0},
+ {"NewString", Func, 0},
+ {"Publish", Func, 0},
+ {"String", Type, 0},
+ {"Var", Type, 0},
+ },
+ "flag": {
+ {"(*FlagSet).Arg", Method, 0},
+ {"(*FlagSet).Args", Method, 0},
+ {"(*FlagSet).Bool", Method, 0},
+ {"(*FlagSet).BoolFunc", Method, 21},
+ {"(*FlagSet).BoolVar", Method, 0},
+ {"(*FlagSet).Duration", Method, 0},
+ {"(*FlagSet).DurationVar", Method, 0},
+ {"(*FlagSet).ErrorHandling", Method, 10},
+ {"(*FlagSet).Float64", Method, 0},
+ {"(*FlagSet).Float64Var", Method, 0},
+ {"(*FlagSet).Func", Method, 16},
+ {"(*FlagSet).Init", Method, 0},
+ {"(*FlagSet).Int", Method, 0},
+ {"(*FlagSet).Int64", Method, 0},
+ {"(*FlagSet).Int64Var", Method, 0},
+ {"(*FlagSet).IntVar", Method, 0},
+ {"(*FlagSet).Lookup", Method, 0},
+ {"(*FlagSet).NArg", Method, 0},
+ {"(*FlagSet).NFlag", Method, 0},
+ {"(*FlagSet).Name", Method, 10},
+ {"(*FlagSet).Output", Method, 10},
+ {"(*FlagSet).Parse", Method, 0},
+ {"(*FlagSet).Parsed", Method, 0},
+ {"(*FlagSet).PrintDefaults", Method, 0},
+ {"(*FlagSet).Set", Method, 0},
+ {"(*FlagSet).SetOutput", Method, 0},
+ {"(*FlagSet).String", Method, 0},
+ {"(*FlagSet).StringVar", Method, 0},
+ {"(*FlagSet).TextVar", Method, 19},
+ {"(*FlagSet).Uint", Method, 0},
+ {"(*FlagSet).Uint64", Method, 0},
+ {"(*FlagSet).Uint64Var", Method, 0},
+ {"(*FlagSet).UintVar", Method, 0},
+ {"(*FlagSet).Var", Method, 0},
+ {"(*FlagSet).Visit", Method, 0},
+ {"(*FlagSet).VisitAll", Method, 0},
+ {"Arg", Func, 0},
+ {"Args", Func, 0},
+ {"Bool", Func, 0},
+ {"BoolFunc", Func, 21},
+ {"BoolVar", Func, 0},
+ {"CommandLine", Var, 2},
+ {"ContinueOnError", Const, 0},
+ {"Duration", Func, 0},
+ {"DurationVar", Func, 0},
+ {"ErrHelp", Var, 0},
+ {"ErrorHandling", Type, 0},
+ {"ExitOnError", Const, 0},
+ {"Flag", Type, 0},
+ {"Flag.DefValue", Field, 0},
+ {"Flag.Name", Field, 0},
+ {"Flag.Usage", Field, 0},
+ {"Flag.Value", Field, 0},
+ {"FlagSet", Type, 0},
+ {"FlagSet.Usage", Field, 0},
+ {"Float64", Func, 0},
+ {"Float64Var", Func, 0},
+ {"Func", Func, 16},
+ {"Getter", Type, 2},
+ {"Int", Func, 0},
+ {"Int64", Func, 0},
+ {"Int64Var", Func, 0},
+ {"IntVar", Func, 0},
+ {"Lookup", Func, 0},
+ {"NArg", Func, 0},
+ {"NFlag", Func, 0},
+ {"NewFlagSet", Func, 0},
+ {"PanicOnError", Const, 0},
+ {"Parse", Func, 0},
+ {"Parsed", Func, 0},
+ {"PrintDefaults", Func, 0},
+ {"Set", Func, 0},
+ {"String", Func, 0},
+ {"StringVar", Func, 0},
+ {"TextVar", Func, 19},
+ {"Uint", Func, 0},
+ {"Uint64", Func, 0},
+ {"Uint64Var", Func, 0},
+ {"UintVar", Func, 0},
+ {"UnquoteUsage", Func, 5},
+ {"Usage", Var, 0},
+ {"Value", Type, 0},
+ {"Var", Func, 0},
+ {"Visit", Func, 0},
+ {"VisitAll", Func, 0},
+ },
+ "fmt": {
+ {"Append", Func, 19},
+ {"Appendf", Func, 19},
+ {"Appendln", Func, 19},
+ {"Errorf", Func, 0},
+ {"FormatString", Func, 20},
+ {"Formatter", Type, 0},
+ {"Fprint", Func, 0},
+ {"Fprintf", Func, 0},
+ {"Fprintln", Func, 0},
+ {"Fscan", Func, 0},
+ {"Fscanf", Func, 0},
+ {"Fscanln", Func, 0},
+ {"GoStringer", Type, 0},
+ {"Print", Func, 0},
+ {"Printf", Func, 0},
+ {"Println", Func, 0},
+ {"Scan", Func, 0},
+ {"ScanState", Type, 0},
+ {"Scanf", Func, 0},
+ {"Scanln", Func, 0},
+ {"Scanner", Type, 0},
+ {"Sprint", Func, 0},
+ {"Sprintf", Func, 0},
+ {"Sprintln", Func, 0},
+ {"Sscan", Func, 0},
+ {"Sscanf", Func, 0},
+ {"Sscanln", Func, 0},
+ {"State", Type, 0},
+ {"Stringer", Type, 0},
+ },
+ "go/ast": {
+ {"(*ArrayType).End", Method, 0},
+ {"(*ArrayType).Pos", Method, 0},
+ {"(*AssignStmt).End", Method, 0},
+ {"(*AssignStmt).Pos", Method, 0},
+ {"(*BadDecl).End", Method, 0},
+ {"(*BadDecl).Pos", Method, 0},
+ {"(*BadExpr).End", Method, 0},
+ {"(*BadExpr).Pos", Method, 0},
+ {"(*BadStmt).End", Method, 0},
+ {"(*BadStmt).Pos", Method, 0},
+ {"(*BasicLit).End", Method, 0},
+ {"(*BasicLit).Pos", Method, 0},
+ {"(*BinaryExpr).End", Method, 0},
+ {"(*BinaryExpr).Pos", Method, 0},
+ {"(*BlockStmt).End", Method, 0},
+ {"(*BlockStmt).Pos", Method, 0},
+ {"(*BranchStmt).End", Method, 0},
+ {"(*BranchStmt).Pos", Method, 0},
+ {"(*CallExpr).End", Method, 0},
+ {"(*CallExpr).Pos", Method, 0},
+ {"(*CaseClause).End", Method, 0},
+ {"(*CaseClause).Pos", Method, 0},
+ {"(*ChanType).End", Method, 0},
+ {"(*ChanType).Pos", Method, 0},
+ {"(*CommClause).End", Method, 0},
+ {"(*CommClause).Pos", Method, 0},
+ {"(*Comment).End", Method, 0},
+ {"(*Comment).Pos", Method, 0},
+ {"(*CommentGroup).End", Method, 0},
+ {"(*CommentGroup).Pos", Method, 0},
+ {"(*CommentGroup).Text", Method, 0},
+ {"(*CompositeLit).End", Method, 0},
+ {"(*CompositeLit).Pos", Method, 0},
+ {"(*DeclStmt).End", Method, 0},
+ {"(*DeclStmt).Pos", Method, 0},
+ {"(*DeferStmt).End", Method, 0},
+ {"(*DeferStmt).Pos", Method, 0},
+ {"(*Ellipsis).End", Method, 0},
+ {"(*Ellipsis).Pos", Method, 0},
+ {"(*EmptyStmt).End", Method, 0},
+ {"(*EmptyStmt).Pos", Method, 0},
+ {"(*ExprStmt).End", Method, 0},
+ {"(*ExprStmt).Pos", Method, 0},
+ {"(*Field).End", Method, 0},
+ {"(*Field).Pos", Method, 0},
+ {"(*FieldList).End", Method, 0},
+ {"(*FieldList).NumFields", Method, 0},
+ {"(*FieldList).Pos", Method, 0},
+ {"(*File).End", Method, 0},
+ {"(*File).Pos", Method, 0},
+ {"(*ForStmt).End", Method, 0},
+ {"(*ForStmt).Pos", Method, 0},
+ {"(*FuncDecl).End", Method, 0},
+ {"(*FuncDecl).Pos", Method, 0},
+ {"(*FuncLit).End", Method, 0},
+ {"(*FuncLit).Pos", Method, 0},
+ {"(*FuncType).End", Method, 0},
+ {"(*FuncType).Pos", Method, 0},
+ {"(*GenDecl).End", Method, 0},
+ {"(*GenDecl).Pos", Method, 0},
+ {"(*GoStmt).End", Method, 0},
+ {"(*GoStmt).Pos", Method, 0},
+ {"(*Ident).End", Method, 0},
+ {"(*Ident).IsExported", Method, 0},
+ {"(*Ident).Pos", Method, 0},
+ {"(*Ident).String", Method, 0},
+ {"(*IfStmt).End", Method, 0},
+ {"(*IfStmt).Pos", Method, 0},
+ {"(*ImportSpec).End", Method, 0},
+ {"(*ImportSpec).Pos", Method, 0},
+ {"(*IncDecStmt).End", Method, 0},
+ {"(*IncDecStmt).Pos", Method, 0},
+ {"(*IndexExpr).End", Method, 0},
+ {"(*IndexExpr).Pos", Method, 0},
+ {"(*IndexListExpr).End", Method, 18},
+ {"(*IndexListExpr).Pos", Method, 18},
+ {"(*InterfaceType).End", Method, 0},
+ {"(*InterfaceType).Pos", Method, 0},
+ {"(*KeyValueExpr).End", Method, 0},
+ {"(*KeyValueExpr).Pos", Method, 0},
+ {"(*LabeledStmt).End", Method, 0},
+ {"(*LabeledStmt).Pos", Method, 0},
+ {"(*MapType).End", Method, 0},
+ {"(*MapType).Pos", Method, 0},
+ {"(*Object).Pos", Method, 0},
+ {"(*Package).End", Method, 0},
+ {"(*Package).Pos", Method, 0},
+ {"(*ParenExpr).End", Method, 0},
+ {"(*ParenExpr).Pos", Method, 0},
+ {"(*RangeStmt).End", Method, 0},
+ {"(*RangeStmt).Pos", Method, 0},
+ {"(*ReturnStmt).End", Method, 0},
+ {"(*ReturnStmt).Pos", Method, 0},
+ {"(*Scope).Insert", Method, 0},
+ {"(*Scope).Lookup", Method, 0},
+ {"(*Scope).String", Method, 0},
+ {"(*SelectStmt).End", Method, 0},
+ {"(*SelectStmt).Pos", Method, 0},
+ {"(*SelectorExpr).End", Method, 0},
+ {"(*SelectorExpr).Pos", Method, 0},
+ {"(*SendStmt).End", Method, 0},
+ {"(*SendStmt).Pos", Method, 0},
+ {"(*SliceExpr).End", Method, 0},
+ {"(*SliceExpr).Pos", Method, 0},
+ {"(*StarExpr).End", Method, 0},
+ {"(*StarExpr).Pos", Method, 0},
+ {"(*StructType).End", Method, 0},
+ {"(*StructType).Pos", Method, 0},
+ {"(*SwitchStmt).End", Method, 0},
+ {"(*SwitchStmt).Pos", Method, 0},
+ {"(*TypeAssertExpr).End", Method, 0},
+ {"(*TypeAssertExpr).Pos", Method, 0},
+ {"(*TypeSpec).End", Method, 0},
+ {"(*TypeSpec).Pos", Method, 0},
+ {"(*TypeSwitchStmt).End", Method, 0},
+ {"(*TypeSwitchStmt).Pos", Method, 0},
+ {"(*UnaryExpr).End", Method, 0},
+ {"(*UnaryExpr).Pos", Method, 0},
+ {"(*ValueSpec).End", Method, 0},
+ {"(*ValueSpec).Pos", Method, 0},
+ {"(CommentMap).Comments", Method, 1},
+ {"(CommentMap).Filter", Method, 1},
+ {"(CommentMap).String", Method, 1},
+ {"(CommentMap).Update", Method, 1},
+ {"(ObjKind).String", Method, 0},
+ {"ArrayType", Type, 0},
+ {"ArrayType.Elt", Field, 0},
+ {"ArrayType.Lbrack", Field, 0},
+ {"ArrayType.Len", Field, 0},
+ {"AssignStmt", Type, 0},
+ {"AssignStmt.Lhs", Field, 0},
+ {"AssignStmt.Rhs", Field, 0},
+ {"AssignStmt.Tok", Field, 0},
+ {"AssignStmt.TokPos", Field, 0},
+ {"Bad", Const, 0},
+ {"BadDecl", Type, 0},
+ {"BadDecl.From", Field, 0},
+ {"BadDecl.To", Field, 0},
+ {"BadExpr", Type, 0},
+ {"BadExpr.From", Field, 0},
+ {"BadExpr.To", Field, 0},
+ {"BadStmt", Type, 0},
+ {"BadStmt.From", Field, 0},
+ {"BadStmt.To", Field, 0},
+ {"BasicLit", Type, 0},
+ {"BasicLit.Kind", Field, 0},
+ {"BasicLit.Value", Field, 0},
+ {"BasicLit.ValuePos", Field, 0},
+ {"BinaryExpr", Type, 0},
+ {"BinaryExpr.Op", Field, 0},
+ {"BinaryExpr.OpPos", Field, 0},
+ {"BinaryExpr.X", Field, 0},
+ {"BinaryExpr.Y", Field, 0},
+ {"BlockStmt", Type, 0},
+ {"BlockStmt.Lbrace", Field, 0},
+ {"BlockStmt.List", Field, 0},
+ {"BlockStmt.Rbrace", Field, 0},
+ {"BranchStmt", Type, 0},
+ {"BranchStmt.Label", Field, 0},
+ {"BranchStmt.Tok", Field, 0},
+ {"BranchStmt.TokPos", Field, 0},
+ {"CallExpr", Type, 0},
+ {"CallExpr.Args", Field, 0},
+ {"CallExpr.Ellipsis", Field, 0},
+ {"CallExpr.Fun", Field, 0},
+ {"CallExpr.Lparen", Field, 0},
+ {"CallExpr.Rparen", Field, 0},
+ {"CaseClause", Type, 0},
+ {"CaseClause.Body", Field, 0},
+ {"CaseClause.Case", Field, 0},
+ {"CaseClause.Colon", Field, 0},
+ {"CaseClause.List", Field, 0},
+ {"ChanDir", Type, 0},
+ {"ChanType", Type, 0},
+ {"ChanType.Arrow", Field, 1},
+ {"ChanType.Begin", Field, 0},
+ {"ChanType.Dir", Field, 0},
+ {"ChanType.Value", Field, 0},
+ {"CommClause", Type, 0},
+ {"CommClause.Body", Field, 0},
+ {"CommClause.Case", Field, 0},
+ {"CommClause.Colon", Field, 0},
+ {"CommClause.Comm", Field, 0},
+ {"Comment", Type, 0},
+ {"Comment.Slash", Field, 0},
+ {"Comment.Text", Field, 0},
+ {"CommentGroup", Type, 0},
+ {"CommentGroup.List", Field, 0},
+ {"CommentMap", Type, 1},
+ {"CompositeLit", Type, 0},
+ {"CompositeLit.Elts", Field, 0},
+ {"CompositeLit.Incomplete", Field, 11},
+ {"CompositeLit.Lbrace", Field, 0},
+ {"CompositeLit.Rbrace", Field, 0},
+ {"CompositeLit.Type", Field, 0},
+ {"Con", Const, 0},
+ {"Decl", Type, 0},
+ {"DeclStmt", Type, 0},
+ {"DeclStmt.Decl", Field, 0},
+ {"DeferStmt", Type, 0},
+ {"DeferStmt.Call", Field, 0},
+ {"DeferStmt.Defer", Field, 0},
+ {"Ellipsis", Type, 0},
+ {"Ellipsis.Ellipsis", Field, 0},
+ {"Ellipsis.Elt", Field, 0},
+ {"EmptyStmt", Type, 0},
+ {"EmptyStmt.Implicit", Field, 5},
+ {"EmptyStmt.Semicolon", Field, 0},
+ {"Expr", Type, 0},
+ {"ExprStmt", Type, 0},
+ {"ExprStmt.X", Field, 0},
+ {"Field", Type, 0},
+ {"Field.Comment", Field, 0},
+ {"Field.Doc", Field, 0},
+ {"Field.Names", Field, 0},
+ {"Field.Tag", Field, 0},
+ {"Field.Type", Field, 0},
+ {"FieldFilter", Type, 0},
+ {"FieldList", Type, 0},
+ {"FieldList.Closing", Field, 0},
+ {"FieldList.List", Field, 0},
+ {"FieldList.Opening", Field, 0},
+ {"File", Type, 0},
+ {"File.Comments", Field, 0},
+ {"File.Decls", Field, 0},
+ {"File.Doc", Field, 0},
+ {"File.FileEnd", Field, 20},
+ {"File.FileStart", Field, 20},
+ {"File.GoVersion", Field, 21},
+ {"File.Imports", Field, 0},
+ {"File.Name", Field, 0},
+ {"File.Package", Field, 0},
+ {"File.Scope", Field, 0},
+ {"File.Unresolved", Field, 0},
+ {"FileExports", Func, 0},
+ {"Filter", Type, 0},
+ {"FilterDecl", Func, 0},
+ {"FilterFile", Func, 0},
+ {"FilterFuncDuplicates", Const, 0},
+ {"FilterImportDuplicates", Const, 0},
+ {"FilterPackage", Func, 0},
+ {"FilterUnassociatedComments", Const, 0},
+ {"ForStmt", Type, 0},
+ {"ForStmt.Body", Field, 0},
+ {"ForStmt.Cond", Field, 0},
+ {"ForStmt.For", Field, 0},
+ {"ForStmt.Init", Field, 0},
+ {"ForStmt.Post", Field, 0},
+ {"Fprint", Func, 0},
+ {"Fun", Const, 0},
+ {"FuncDecl", Type, 0},
+ {"FuncDecl.Body", Field, 0},
+ {"FuncDecl.Doc", Field, 0},
+ {"FuncDecl.Name", Field, 0},
+ {"FuncDecl.Recv", Field, 0},
+ {"FuncDecl.Type", Field, 0},
+ {"FuncLit", Type, 0},
+ {"FuncLit.Body", Field, 0},
+ {"FuncLit.Type", Field, 0},
+ {"FuncType", Type, 0},
+ {"FuncType.Func", Field, 0},
+ {"FuncType.Params", Field, 0},
+ {"FuncType.Results", Field, 0},
+ {"FuncType.TypeParams", Field, 18},
+ {"GenDecl", Type, 0},
+ {"GenDecl.Doc", Field, 0},
+ {"GenDecl.Lparen", Field, 0},
+ {"GenDecl.Rparen", Field, 0},
+ {"GenDecl.Specs", Field, 0},
+ {"GenDecl.Tok", Field, 0},
+ {"GenDecl.TokPos", Field, 0},
+ {"GoStmt", Type, 0},
+ {"GoStmt.Call", Field, 0},
+ {"GoStmt.Go", Field, 0},
+ {"Ident", Type, 0},
+ {"Ident.Name", Field, 0},
+ {"Ident.NamePos", Field, 0},
+ {"Ident.Obj", Field, 0},
+ {"IfStmt", Type, 0},
+ {"IfStmt.Body", Field, 0},
+ {"IfStmt.Cond", Field, 0},
+ {"IfStmt.Else", Field, 0},
+ {"IfStmt.If", Field, 0},
+ {"IfStmt.Init", Field, 0},
+ {"ImportSpec", Type, 0},
+ {"ImportSpec.Comment", Field, 0},
+ {"ImportSpec.Doc", Field, 0},
+ {"ImportSpec.EndPos", Field, 0},
+ {"ImportSpec.Name", Field, 0},
+ {"ImportSpec.Path", Field, 0},
+ {"Importer", Type, 0},
+ {"IncDecStmt", Type, 0},
+ {"IncDecStmt.Tok", Field, 0},
+ {"IncDecStmt.TokPos", Field, 0},
+ {"IncDecStmt.X", Field, 0},
+ {"IndexExpr", Type, 0},
+ {"IndexExpr.Index", Field, 0},
+ {"IndexExpr.Lbrack", Field, 0},
+ {"IndexExpr.Rbrack", Field, 0},
+ {"IndexExpr.X", Field, 0},
+ {"IndexListExpr", Type, 18},
+ {"IndexListExpr.Indices", Field, 18},
+ {"IndexListExpr.Lbrack", Field, 18},
+ {"IndexListExpr.Rbrack", Field, 18},
+ {"IndexListExpr.X", Field, 18},
+ {"Inspect", Func, 0},
+ {"InterfaceType", Type, 0},
+ {"InterfaceType.Incomplete", Field, 0},
+ {"InterfaceType.Interface", Field, 0},
+ {"InterfaceType.Methods", Field, 0},
+ {"IsExported", Func, 0},
+ {"IsGenerated", Func, 21},
+ {"KeyValueExpr", Type, 0},
+ {"KeyValueExpr.Colon", Field, 0},
+ {"KeyValueExpr.Key", Field, 0},
+ {"KeyValueExpr.Value", Field, 0},
+ {"LabeledStmt", Type, 0},
+ {"LabeledStmt.Colon", Field, 0},
+ {"LabeledStmt.Label", Field, 0},
+ {"LabeledStmt.Stmt", Field, 0},
+ {"Lbl", Const, 0},
+ {"MapType", Type, 0},
+ {"MapType.Key", Field, 0},
+ {"MapType.Map", Field, 0},
+ {"MapType.Value", Field, 0},
+ {"MergeMode", Type, 0},
+ {"MergePackageFiles", Func, 0},
+ {"NewCommentMap", Func, 1},
+ {"NewIdent", Func, 0},
+ {"NewObj", Func, 0},
+ {"NewPackage", Func, 0},
+ {"NewScope", Func, 0},
+ {"Node", Type, 0},
+ {"NotNilFilter", Func, 0},
+ {"ObjKind", Type, 0},
+ {"Object", Type, 0},
+ {"Object.Data", Field, 0},
+ {"Object.Decl", Field, 0},
+ {"Object.Kind", Field, 0},
+ {"Object.Name", Field, 0},
+ {"Object.Type", Field, 0},
+ {"Package", Type, 0},
+ {"Package.Files", Field, 0},
+ {"Package.Imports", Field, 0},
+ {"Package.Name", Field, 0},
+ {"Package.Scope", Field, 0},
+ {"PackageExports", Func, 0},
+ {"ParenExpr", Type, 0},
+ {"ParenExpr.Lparen", Field, 0},
+ {"ParenExpr.Rparen", Field, 0},
+ {"ParenExpr.X", Field, 0},
+ {"Pkg", Const, 0},
+ {"Print", Func, 0},
+ {"RECV", Const, 0},
+ {"RangeStmt", Type, 0},
+ {"RangeStmt.Body", Field, 0},
+ {"RangeStmt.For", Field, 0},
+ {"RangeStmt.Key", Field, 0},
+ {"RangeStmt.Range", Field, 20},
+ {"RangeStmt.Tok", Field, 0},
+ {"RangeStmt.TokPos", Field, 0},
+ {"RangeStmt.Value", Field, 0},
+ {"RangeStmt.X", Field, 0},
+ {"ReturnStmt", Type, 0},
+ {"ReturnStmt.Results", Field, 0},
+ {"ReturnStmt.Return", Field, 0},
+ {"SEND", Const, 0},
+ {"Scope", Type, 0},
+ {"Scope.Objects", Field, 0},
+ {"Scope.Outer", Field, 0},
+ {"SelectStmt", Type, 0},
+ {"SelectStmt.Body", Field, 0},
+ {"SelectStmt.Select", Field, 0},
+ {"SelectorExpr", Type, 0},
+ {"SelectorExpr.Sel", Field, 0},
+ {"SelectorExpr.X", Field, 0},
+ {"SendStmt", Type, 0},
+ {"SendStmt.Arrow", Field, 0},
+ {"SendStmt.Chan", Field, 0},
+ {"SendStmt.Value", Field, 0},
+ {"SliceExpr", Type, 0},
+ {"SliceExpr.High", Field, 0},
+ {"SliceExpr.Lbrack", Field, 0},
+ {"SliceExpr.Low", Field, 0},
+ {"SliceExpr.Max", Field, 2},
+ {"SliceExpr.Rbrack", Field, 0},
+ {"SliceExpr.Slice3", Field, 2},
+ {"SliceExpr.X", Field, 0},
+ {"SortImports", Func, 0},
+ {"Spec", Type, 0},
+ {"StarExpr", Type, 0},
+ {"StarExpr.Star", Field, 0},
+ {"StarExpr.X", Field, 0},
+ {"Stmt", Type, 0},
+ {"StructType", Type, 0},
+ {"StructType.Fields", Field, 0},
+ {"StructType.Incomplete", Field, 0},
+ {"StructType.Struct", Field, 0},
+ {"SwitchStmt", Type, 0},
+ {"SwitchStmt.Body", Field, 0},
+ {"SwitchStmt.Init", Field, 0},
+ {"SwitchStmt.Switch", Field, 0},
+ {"SwitchStmt.Tag", Field, 0},
+ {"Typ", Const, 0},
+ {"TypeAssertExpr", Type, 0},
+ {"TypeAssertExpr.Lparen", Field, 2},
+ {"TypeAssertExpr.Rparen", Field, 2},
+ {"TypeAssertExpr.Type", Field, 0},
+ {"TypeAssertExpr.X", Field, 0},
+ {"TypeSpec", Type, 0},
+ {"TypeSpec.Assign", Field, 9},
+ {"TypeSpec.Comment", Field, 0},
+ {"TypeSpec.Doc", Field, 0},
+ {"TypeSpec.Name", Field, 0},
+ {"TypeSpec.Type", Field, 0},
+ {"TypeSpec.TypeParams", Field, 18},
+ {"TypeSwitchStmt", Type, 0},
+ {"TypeSwitchStmt.Assign", Field, 0},
+ {"TypeSwitchStmt.Body", Field, 0},
+ {"TypeSwitchStmt.Init", Field, 0},
+ {"TypeSwitchStmt.Switch", Field, 0},
+ {"UnaryExpr", Type, 0},
+ {"UnaryExpr.Op", Field, 0},
+ {"UnaryExpr.OpPos", Field, 0},
+ {"UnaryExpr.X", Field, 0},
+ {"Unparen", Func, 22},
+ {"ValueSpec", Type, 0},
+ {"ValueSpec.Comment", Field, 0},
+ {"ValueSpec.Doc", Field, 0},
+ {"ValueSpec.Names", Field, 0},
+ {"ValueSpec.Type", Field, 0},
+ {"ValueSpec.Values", Field, 0},
+ {"Var", Const, 0},
+ {"Visitor", Type, 0},
+ {"Walk", Func, 0},
+ },
+ "go/build": {
+ {"(*Context).Import", Method, 0},
+ {"(*Context).ImportDir", Method, 0},
+ {"(*Context).MatchFile", Method, 2},
+ {"(*Context).SrcDirs", Method, 0},
+ {"(*MultiplePackageError).Error", Method, 4},
+ {"(*NoGoError).Error", Method, 0},
+ {"(*Package).IsCommand", Method, 0},
+ {"AllowBinary", Const, 0},
+ {"ArchChar", Func, 0},
+ {"Context", Type, 0},
+ {"Context.BuildTags", Field, 0},
+ {"Context.CgoEnabled", Field, 0},
+ {"Context.Compiler", Field, 0},
+ {"Context.Dir", Field, 14},
+ {"Context.GOARCH", Field, 0},
+ {"Context.GOOS", Field, 0},
+ {"Context.GOPATH", Field, 0},
+ {"Context.GOROOT", Field, 0},
+ {"Context.HasSubdir", Field, 0},
+ {"Context.InstallSuffix", Field, 1},
+ {"Context.IsAbsPath", Field, 0},
+ {"Context.IsDir", Field, 0},
+ {"Context.JoinPath", Field, 0},
+ {"Context.OpenFile", Field, 0},
+ {"Context.ReadDir", Field, 0},
+ {"Context.ReleaseTags", Field, 1},
+ {"Context.SplitPathList", Field, 0},
+ {"Context.ToolTags", Field, 17},
+ {"Context.UseAllFiles", Field, 0},
+ {"Default", Var, 0},
+ {"Directive", Type, 21},
+ {"Directive.Pos", Field, 21},
+ {"Directive.Text", Field, 21},
+ {"FindOnly", Const, 0},
+ {"IgnoreVendor", Const, 6},
+ {"Import", Func, 0},
+ {"ImportComment", Const, 4},
+ {"ImportDir", Func, 0},
+ {"ImportMode", Type, 0},
+ {"IsLocalImport", Func, 0},
+ {"MultiplePackageError", Type, 4},
+ {"MultiplePackageError.Dir", Field, 4},
+ {"MultiplePackageError.Files", Field, 4},
+ {"MultiplePackageError.Packages", Field, 4},
+ {"NoGoError", Type, 0},
+ {"NoGoError.Dir", Field, 0},
+ {"Package", Type, 0},
+ {"Package.AllTags", Field, 2},
+ {"Package.BinDir", Field, 0},
+ {"Package.BinaryOnly", Field, 7},
+ {"Package.CFiles", Field, 0},
+ {"Package.CXXFiles", Field, 2},
+ {"Package.CgoCFLAGS", Field, 0},
+ {"Package.CgoCPPFLAGS", Field, 2},
+ {"Package.CgoCXXFLAGS", Field, 2},
+ {"Package.CgoFFLAGS", Field, 7},
+ {"Package.CgoFiles", Field, 0},
+ {"Package.CgoLDFLAGS", Field, 0},
+ {"Package.CgoPkgConfig", Field, 0},
+ {"Package.ConflictDir", Field, 2},
+ {"Package.Dir", Field, 0},
+ {"Package.Directives", Field, 21},
+ {"Package.Doc", Field, 0},
+ {"Package.EmbedPatternPos", Field, 16},
+ {"Package.EmbedPatterns", Field, 16},
+ {"Package.FFiles", Field, 7},
+ {"Package.GoFiles", Field, 0},
+ {"Package.Goroot", Field, 0},
+ {"Package.HFiles", Field, 0},
+ {"Package.IgnoredGoFiles", Field, 1},
+ {"Package.IgnoredOtherFiles", Field, 16},
+ {"Package.ImportComment", Field, 4},
+ {"Package.ImportPath", Field, 0},
+ {"Package.ImportPos", Field, 0},
+ {"Package.Imports", Field, 0},
+ {"Package.InvalidGoFiles", Field, 6},
+ {"Package.MFiles", Field, 3},
+ {"Package.Name", Field, 0},
+ {"Package.PkgObj", Field, 0},
+ {"Package.PkgRoot", Field, 0},
+ {"Package.PkgTargetRoot", Field, 5},
+ {"Package.Root", Field, 0},
+ {"Package.SFiles", Field, 0},
+ {"Package.SrcRoot", Field, 0},
+ {"Package.SwigCXXFiles", Field, 1},
+ {"Package.SwigFiles", Field, 1},
+ {"Package.SysoFiles", Field, 0},
+ {"Package.TestDirectives", Field, 21},
+ {"Package.TestEmbedPatternPos", Field, 16},
+ {"Package.TestEmbedPatterns", Field, 16},
+ {"Package.TestGoFiles", Field, 0},
+ {"Package.TestImportPos", Field, 0},
+ {"Package.TestImports", Field, 0},
+ {"Package.XTestDirectives", Field, 21},
+ {"Package.XTestEmbedPatternPos", Field, 16},
+ {"Package.XTestEmbedPatterns", Field, 16},
+ {"Package.XTestGoFiles", Field, 0},
+ {"Package.XTestImportPos", Field, 0},
+ {"Package.XTestImports", Field, 0},
+ {"ToolDir", Var, 0},
+ },
+ "go/build/constraint": {
+ {"(*AndExpr).Eval", Method, 16},
+ {"(*AndExpr).String", Method, 16},
+ {"(*NotExpr).Eval", Method, 16},
+ {"(*NotExpr).String", Method, 16},
+ {"(*OrExpr).Eval", Method, 16},
+ {"(*OrExpr).String", Method, 16},
+ {"(*SyntaxError).Error", Method, 16},
+ {"(*TagExpr).Eval", Method, 16},
+ {"(*TagExpr).String", Method, 16},
+ {"AndExpr", Type, 16},
+ {"AndExpr.X", Field, 16},
+ {"AndExpr.Y", Field, 16},
+ {"Expr", Type, 16},
+ {"GoVersion", Func, 21},
+ {"IsGoBuild", Func, 16},
+ {"IsPlusBuild", Func, 16},
+ {"NotExpr", Type, 16},
+ {"NotExpr.X", Field, 16},
+ {"OrExpr", Type, 16},
+ {"OrExpr.X", Field, 16},
+ {"OrExpr.Y", Field, 16},
+ {"Parse", Func, 16},
+ {"PlusBuildLines", Func, 16},
+ {"SyntaxError", Type, 16},
+ {"SyntaxError.Err", Field, 16},
+ {"SyntaxError.Offset", Field, 16},
+ {"TagExpr", Type, 16},
+ {"TagExpr.Tag", Field, 16},
+ },
+ "go/constant": {
+ {"(Kind).String", Method, 18},
+ {"BinaryOp", Func, 5},
+ {"BitLen", Func, 5},
+ {"Bool", Const, 5},
+ {"BoolVal", Func, 5},
+ {"Bytes", Func, 5},
+ {"Compare", Func, 5},
+ {"Complex", Const, 5},
+ {"Denom", Func, 5},
+ {"Float", Const, 5},
+ {"Float32Val", Func, 5},
+ {"Float64Val", Func, 5},
+ {"Imag", Func, 5},
+ {"Int", Const, 5},
+ {"Int64Val", Func, 5},
+ {"Kind", Type, 5},
+ {"Make", Func, 13},
+ {"MakeBool", Func, 5},
+ {"MakeFloat64", Func, 5},
+ {"MakeFromBytes", Func, 5},
+ {"MakeFromLiteral", Func, 5},
+ {"MakeImag", Func, 5},
+ {"MakeInt64", Func, 5},
+ {"MakeString", Func, 5},
+ {"MakeUint64", Func, 5},
+ {"MakeUnknown", Func, 5},
+ {"Num", Func, 5},
+ {"Real", Func, 5},
+ {"Shift", Func, 5},
+ {"Sign", Func, 5},
+ {"String", Const, 5},
+ {"StringVal", Func, 5},
+ {"ToComplex", Func, 6},
+ {"ToFloat", Func, 6},
+ {"ToInt", Func, 6},
+ {"Uint64Val", Func, 5},
+ {"UnaryOp", Func, 5},
+ {"Unknown", Const, 5},
+ {"Val", Func, 13},
+ {"Value", Type, 5},
+ },
+ "go/doc": {
+ {"(*Package).Filter", Method, 0},
+ {"(*Package).HTML", Method, 19},
+ {"(*Package).Markdown", Method, 19},
+ {"(*Package).Parser", Method, 19},
+ {"(*Package).Printer", Method, 19},
+ {"(*Package).Synopsis", Method, 19},
+ {"(*Package).Text", Method, 19},
+ {"AllDecls", Const, 0},
+ {"AllMethods", Const, 0},
+ {"Example", Type, 0},
+ {"Example.Code", Field, 0},
+ {"Example.Comments", Field, 0},
+ {"Example.Doc", Field, 0},
+ {"Example.EmptyOutput", Field, 1},
+ {"Example.Name", Field, 0},
+ {"Example.Order", Field, 1},
+ {"Example.Output", Field, 0},
+ {"Example.Play", Field, 1},
+ {"Example.Suffix", Field, 14},
+ {"Example.Unordered", Field, 7},
+ {"Examples", Func, 0},
+ {"Filter", Type, 0},
+ {"Func", Type, 0},
+ {"Func.Decl", Field, 0},
+ {"Func.Doc", Field, 0},
+ {"Func.Examples", Field, 14},
+ {"Func.Level", Field, 0},
+ {"Func.Name", Field, 0},
+ {"Func.Orig", Field, 0},
+ {"Func.Recv", Field, 0},
+ {"IllegalPrefixes", Var, 1},
+ {"IsPredeclared", Func, 8},
+ {"Mode", Type, 0},
+ {"New", Func, 0},
+ {"NewFromFiles", Func, 14},
+ {"Note", Type, 1},
+ {"Note.Body", Field, 1},
+ {"Note.End", Field, 1},
+ {"Note.Pos", Field, 1},
+ {"Note.UID", Field, 1},
+ {"Package", Type, 0},
+ {"Package.Bugs", Field, 0},
+ {"Package.Consts", Field, 0},
+ {"Package.Doc", Field, 0},
+ {"Package.Examples", Field, 14},
+ {"Package.Filenames", Field, 0},
+ {"Package.Funcs", Field, 0},
+ {"Package.ImportPath", Field, 0},
+ {"Package.Imports", Field, 0},
+ {"Package.Name", Field, 0},
+ {"Package.Notes", Field, 1},
+ {"Package.Types", Field, 0},
+ {"Package.Vars", Field, 0},
+ {"PreserveAST", Const, 12},
+ {"Synopsis", Func, 0},
+ {"ToHTML", Func, 0},
+ {"ToText", Func, 0},
+ {"Type", Type, 0},
+ {"Type.Consts", Field, 0},
+ {"Type.Decl", Field, 0},
+ {"Type.Doc", Field, 0},
+ {"Type.Examples", Field, 14},
+ {"Type.Funcs", Field, 0},
+ {"Type.Methods", Field, 0},
+ {"Type.Name", Field, 0},
+ {"Type.Vars", Field, 0},
+ {"Value", Type, 0},
+ {"Value.Decl", Field, 0},
+ {"Value.Doc", Field, 0},
+ {"Value.Names", Field, 0},
+ },
+ "go/doc/comment": {
+ {"(*DocLink).DefaultURL", Method, 19},
+ {"(*Heading).DefaultID", Method, 19},
+ {"(*List).BlankBefore", Method, 19},
+ {"(*List).BlankBetween", Method, 19},
+ {"(*Parser).Parse", Method, 19},
+ {"(*Printer).Comment", Method, 19},
+ {"(*Printer).HTML", Method, 19},
+ {"(*Printer).Markdown", Method, 19},
+ {"(*Printer).Text", Method, 19},
+ {"Block", Type, 19},
+ {"Code", Type, 19},
+ {"Code.Text", Field, 19},
+ {"DefaultLookupPackage", Func, 19},
+ {"Doc", Type, 19},
+ {"Doc.Content", Field, 19},
+ {"Doc.Links", Field, 19},
+ {"DocLink", Type, 19},
+ {"DocLink.ImportPath", Field, 19},
+ {"DocLink.Name", Field, 19},
+ {"DocLink.Recv", Field, 19},
+ {"DocLink.Text", Field, 19},
+ {"Heading", Type, 19},
+ {"Heading.Text", Field, 19},
+ {"Italic", Type, 19},
+ {"Link", Type, 19},
+ {"Link.Auto", Field, 19},
+ {"Link.Text", Field, 19},
+ {"Link.URL", Field, 19},
+ {"LinkDef", Type, 19},
+ {"LinkDef.Text", Field, 19},
+ {"LinkDef.URL", Field, 19},
+ {"LinkDef.Used", Field, 19},
+ {"List", Type, 19},
+ {"List.ForceBlankBefore", Field, 19},
+ {"List.ForceBlankBetween", Field, 19},
+ {"List.Items", Field, 19},
+ {"ListItem", Type, 19},
+ {"ListItem.Content", Field, 19},
+ {"ListItem.Number", Field, 19},
+ {"Paragraph", Type, 19},
+ {"Paragraph.Text", Field, 19},
+ {"Parser", Type, 19},
+ {"Parser.LookupPackage", Field, 19},
+ {"Parser.LookupSym", Field, 19},
+ {"Parser.Words", Field, 19},
+ {"Plain", Type, 19},
+ {"Printer", Type, 19},
+ {"Printer.DocLinkBaseURL", Field, 19},
+ {"Printer.DocLinkURL", Field, 19},
+ {"Printer.HeadingID", Field, 19},
+ {"Printer.HeadingLevel", Field, 19},
+ {"Printer.TextCodePrefix", Field, 19},
+ {"Printer.TextPrefix", Field, 19},
+ {"Printer.TextWidth", Field, 19},
+ {"Text", Type, 19},
+ },
+ "go/format": {
+ {"Node", Func, 1},
+ {"Source", Func, 1},
+ },
+ "go/importer": {
+ {"Default", Func, 5},
+ {"For", Func, 5},
+ {"ForCompiler", Func, 12},
+ {"Lookup", Type, 5},
+ },
+ "go/parser": {
+ {"AllErrors", Const, 1},
+ {"DeclarationErrors", Const, 0},
+ {"ImportsOnly", Const, 0},
+ {"Mode", Type, 0},
+ {"PackageClauseOnly", Const, 0},
+ {"ParseComments", Const, 0},
+ {"ParseDir", Func, 0},
+ {"ParseExpr", Func, 0},
+ {"ParseExprFrom", Func, 5},
+ {"ParseFile", Func, 0},
+ {"SkipObjectResolution", Const, 17},
+ {"SpuriousErrors", Const, 0},
+ {"Trace", Const, 0},
+ },
+ "go/printer": {
+ {"(*Config).Fprint", Method, 0},
+ {"CommentedNode", Type, 0},
+ {"CommentedNode.Comments", Field, 0},
+ {"CommentedNode.Node", Field, 0},
+ {"Config", Type, 0},
+ {"Config.Indent", Field, 1},
+ {"Config.Mode", Field, 0},
+ {"Config.Tabwidth", Field, 0},
+ {"Fprint", Func, 0},
+ {"Mode", Type, 0},
+ {"RawFormat", Const, 0},
+ {"SourcePos", Const, 0},
+ {"TabIndent", Const, 0},
+ {"UseSpaces", Const, 0},
+ },
+ "go/scanner": {
+ {"(*ErrorList).Add", Method, 0},
+ {"(*ErrorList).RemoveMultiples", Method, 0},
+ {"(*ErrorList).Reset", Method, 0},
+ {"(*Scanner).Init", Method, 0},
+ {"(*Scanner).Scan", Method, 0},
+ {"(Error).Error", Method, 0},
+ {"(ErrorList).Err", Method, 0},
+ {"(ErrorList).Error", Method, 0},
+ {"(ErrorList).Len", Method, 0},
+ {"(ErrorList).Less", Method, 0},
+ {"(ErrorList).Sort", Method, 0},
+ {"(ErrorList).Swap", Method, 0},
+ {"Error", Type, 0},
+ {"Error.Msg", Field, 0},
+ {"Error.Pos", Field, 0},
+ {"ErrorHandler", Type, 0},
+ {"ErrorList", Type, 0},
+ {"Mode", Type, 0},
+ {"PrintError", Func, 0},
+ {"ScanComments", Const, 0},
+ {"Scanner", Type, 0},
+ {"Scanner.ErrorCount", Field, 0},
+ },
+ "go/token": {
+ {"(*File).AddLine", Method, 0},
+ {"(*File).AddLineColumnInfo", Method, 11},
+ {"(*File).AddLineInfo", Method, 0},
+ {"(*File).Base", Method, 0},
+ {"(*File).Line", Method, 0},
+ {"(*File).LineCount", Method, 0},
+ {"(*File).LineStart", Method, 12},
+ {"(*File).Lines", Method, 21},
+ {"(*File).MergeLine", Method, 2},
+ {"(*File).Name", Method, 0},
+ {"(*File).Offset", Method, 0},
+ {"(*File).Pos", Method, 0},
+ {"(*File).Position", Method, 0},
+ {"(*File).PositionFor", Method, 4},
+ {"(*File).SetLines", Method, 0},
+ {"(*File).SetLinesForContent", Method, 0},
+ {"(*File).Size", Method, 0},
+ {"(*FileSet).AddFile", Method, 0},
+ {"(*FileSet).Base", Method, 0},
+ {"(*FileSet).File", Method, 0},
+ {"(*FileSet).Iterate", Method, 0},
+ {"(*FileSet).Position", Method, 0},
+ {"(*FileSet).PositionFor", Method, 4},
+ {"(*FileSet).Read", Method, 0},
+ {"(*FileSet).RemoveFile", Method, 20},
+ {"(*FileSet).Write", Method, 0},
+ {"(*Position).IsValid", Method, 0},
+ {"(Pos).IsValid", Method, 0},
+ {"(Position).String", Method, 0},
+ {"(Token).IsKeyword", Method, 0},
+ {"(Token).IsLiteral", Method, 0},
+ {"(Token).IsOperator", Method, 0},
+ {"(Token).Precedence", Method, 0},
+ {"(Token).String", Method, 0},
+ {"ADD", Const, 0},
+ {"ADD_ASSIGN", Const, 0},
+ {"AND", Const, 0},
+ {"AND_ASSIGN", Const, 0},
+ {"AND_NOT", Const, 0},
+ {"AND_NOT_ASSIGN", Const, 0},
+ {"ARROW", Const, 0},
+ {"ASSIGN", Const, 0},
+ {"BREAK", Const, 0},
+ {"CASE", Const, 0},
+ {"CHAN", Const, 0},
+ {"CHAR", Const, 0},
+ {"COLON", Const, 0},
+ {"COMMA", Const, 0},
+ {"COMMENT", Const, 0},
+ {"CONST", Const, 0},
+ {"CONTINUE", Const, 0},
+ {"DEC", Const, 0},
+ {"DEFAULT", Const, 0},
+ {"DEFER", Const, 0},
+ {"DEFINE", Const, 0},
+ {"ELLIPSIS", Const, 0},
+ {"ELSE", Const, 0},
+ {"EOF", Const, 0},
+ {"EQL", Const, 0},
+ {"FALLTHROUGH", Const, 0},
+ {"FLOAT", Const, 0},
+ {"FOR", Const, 0},
+ {"FUNC", Const, 0},
+ {"File", Type, 0},
+ {"FileSet", Type, 0},
+ {"GEQ", Const, 0},
+ {"GO", Const, 0},
+ {"GOTO", Const, 0},
+ {"GTR", Const, 0},
+ {"HighestPrec", Const, 0},
+ {"IDENT", Const, 0},
+ {"IF", Const, 0},
+ {"ILLEGAL", Const, 0},
+ {"IMAG", Const, 0},
+ {"IMPORT", Const, 0},
+ {"INC", Const, 0},
+ {"INT", Const, 0},
+ {"INTERFACE", Const, 0},
+ {"IsExported", Func, 13},
+ {"IsIdentifier", Func, 13},
+ {"IsKeyword", Func, 13},
+ {"LAND", Const, 0},
+ {"LBRACE", Const, 0},
+ {"LBRACK", Const, 0},
+ {"LEQ", Const, 0},
+ {"LOR", Const, 0},
+ {"LPAREN", Const, 0},
+ {"LSS", Const, 0},
+ {"Lookup", Func, 0},
+ {"LowestPrec", Const, 0},
+ {"MAP", Const, 0},
+ {"MUL", Const, 0},
+ {"MUL_ASSIGN", Const, 0},
+ {"NEQ", Const, 0},
+ {"NOT", Const, 0},
+ {"NewFileSet", Func, 0},
+ {"NoPos", Const, 0},
+ {"OR", Const, 0},
+ {"OR_ASSIGN", Const, 0},
+ {"PACKAGE", Const, 0},
+ {"PERIOD", Const, 0},
+ {"Pos", Type, 0},
+ {"Position", Type, 0},
+ {"Position.Column", Field, 0},
+ {"Position.Filename", Field, 0},
+ {"Position.Line", Field, 0},
+ {"Position.Offset", Field, 0},
+ {"QUO", Const, 0},
+ {"QUO_ASSIGN", Const, 0},
+ {"RANGE", Const, 0},
+ {"RBRACE", Const, 0},
+ {"RBRACK", Const, 0},
+ {"REM", Const, 0},
+ {"REM_ASSIGN", Const, 0},
+ {"RETURN", Const, 0},
+ {"RPAREN", Const, 0},
+ {"SELECT", Const, 0},
+ {"SEMICOLON", Const, 0},
+ {"SHL", Const, 0},
+ {"SHL_ASSIGN", Const, 0},
+ {"SHR", Const, 0},
+ {"SHR_ASSIGN", Const, 0},
+ {"STRING", Const, 0},
+ {"STRUCT", Const, 0},
+ {"SUB", Const, 0},
+ {"SUB_ASSIGN", Const, 0},
+ {"SWITCH", Const, 0},
+ {"TILDE", Const, 18},
+ {"TYPE", Const, 0},
+ {"Token", Type, 0},
+ {"UnaryPrec", Const, 0},
+ {"VAR", Const, 0},
+ {"XOR", Const, 0},
+ {"XOR_ASSIGN", Const, 0},
+ },
+ "go/types": {
+ {"(*Alias).Obj", Method, 22},
+ {"(*Alias).String", Method, 22},
+ {"(*Alias).Underlying", Method, 22},
+ {"(*ArgumentError).Error", Method, 18},
+ {"(*ArgumentError).Unwrap", Method, 18},
+ {"(*Array).Elem", Method, 5},
+ {"(*Array).Len", Method, 5},
+ {"(*Array).String", Method, 5},
+ {"(*Array).Underlying", Method, 5},
+ {"(*Basic).Info", Method, 5},
+ {"(*Basic).Kind", Method, 5},
+ {"(*Basic).Name", Method, 5},
+ {"(*Basic).String", Method, 5},
+ {"(*Basic).Underlying", Method, 5},
+ {"(*Builtin).Exported", Method, 5},
+ {"(*Builtin).Id", Method, 5},
+ {"(*Builtin).Name", Method, 5},
+ {"(*Builtin).Parent", Method, 5},
+ {"(*Builtin).Pkg", Method, 5},
+ {"(*Builtin).Pos", Method, 5},
+ {"(*Builtin).String", Method, 5},
+ {"(*Builtin).Type", Method, 5},
+ {"(*Chan).Dir", Method, 5},
+ {"(*Chan).Elem", Method, 5},
+ {"(*Chan).String", Method, 5},
+ {"(*Chan).Underlying", Method, 5},
+ {"(*Checker).Files", Method, 5},
+ {"(*Config).Check", Method, 5},
+ {"(*Const).Exported", Method, 5},
+ {"(*Const).Id", Method, 5},
+ {"(*Const).Name", Method, 5},
+ {"(*Const).Parent", Method, 5},
+ {"(*Const).Pkg", Method, 5},
+ {"(*Const).Pos", Method, 5},
+ {"(*Const).String", Method, 5},
+ {"(*Const).Type", Method, 5},
+ {"(*Const).Val", Method, 5},
+ {"(*Func).Exported", Method, 5},
+ {"(*Func).FullName", Method, 5},
+ {"(*Func).Id", Method, 5},
+ {"(*Func).Name", Method, 5},
+ {"(*Func).Origin", Method, 19},
+ {"(*Func).Parent", Method, 5},
+ {"(*Func).Pkg", Method, 5},
+ {"(*Func).Pos", Method, 5},
+ {"(*Func).Scope", Method, 5},
+ {"(*Func).String", Method, 5},
+ {"(*Func).Type", Method, 5},
+ {"(*Info).ObjectOf", Method, 5},
+ {"(*Info).PkgNameOf", Method, 22},
+ {"(*Info).TypeOf", Method, 5},
+ {"(*Initializer).String", Method, 5},
+ {"(*Interface).Complete", Method, 5},
+ {"(*Interface).Embedded", Method, 5},
+ {"(*Interface).EmbeddedType", Method, 11},
+ {"(*Interface).Empty", Method, 5},
+ {"(*Interface).ExplicitMethod", Method, 5},
+ {"(*Interface).IsComparable", Method, 18},
+ {"(*Interface).IsImplicit", Method, 18},
+ {"(*Interface).IsMethodSet", Method, 18},
+ {"(*Interface).MarkImplicit", Method, 18},
+ {"(*Interface).Method", Method, 5},
+ {"(*Interface).NumEmbeddeds", Method, 5},
+ {"(*Interface).NumExplicitMethods", Method, 5},
+ {"(*Interface).NumMethods", Method, 5},
+ {"(*Interface).String", Method, 5},
+ {"(*Interface).Underlying", Method, 5},
+ {"(*Label).Exported", Method, 5},
+ {"(*Label).Id", Method, 5},
+ {"(*Label).Name", Method, 5},
+ {"(*Label).Parent", Method, 5},
+ {"(*Label).Pkg", Method, 5},
+ {"(*Label).Pos", Method, 5},
+ {"(*Label).String", Method, 5},
+ {"(*Label).Type", Method, 5},
+ {"(*Map).Elem", Method, 5},
+ {"(*Map).Key", Method, 5},
+ {"(*Map).String", Method, 5},
+ {"(*Map).Underlying", Method, 5},
+ {"(*MethodSet).At", Method, 5},
+ {"(*MethodSet).Len", Method, 5},
+ {"(*MethodSet).Lookup", Method, 5},
+ {"(*MethodSet).String", Method, 5},
+ {"(*Named).AddMethod", Method, 5},
+ {"(*Named).Method", Method, 5},
+ {"(*Named).NumMethods", Method, 5},
+ {"(*Named).Obj", Method, 5},
+ {"(*Named).Origin", Method, 18},
+ {"(*Named).SetTypeParams", Method, 18},
+ {"(*Named).SetUnderlying", Method, 5},
+ {"(*Named).String", Method, 5},
+ {"(*Named).TypeArgs", Method, 18},
+ {"(*Named).TypeParams", Method, 18},
+ {"(*Named).Underlying", Method, 5},
+ {"(*Nil).Exported", Method, 5},
+ {"(*Nil).Id", Method, 5},
+ {"(*Nil).Name", Method, 5},
+ {"(*Nil).Parent", Method, 5},
+ {"(*Nil).Pkg", Method, 5},
+ {"(*Nil).Pos", Method, 5},
+ {"(*Nil).String", Method, 5},
+ {"(*Nil).Type", Method, 5},
+ {"(*Package).Complete", Method, 5},
+ {"(*Package).GoVersion", Method, 21},
+ {"(*Package).Imports", Method, 5},
+ {"(*Package).MarkComplete", Method, 5},
+ {"(*Package).Name", Method, 5},
+ {"(*Package).Path", Method, 5},
+ {"(*Package).Scope", Method, 5},
+ {"(*Package).SetImports", Method, 5},
+ {"(*Package).SetName", Method, 6},
+ {"(*Package).String", Method, 5},
+ {"(*PkgName).Exported", Method, 5},
+ {"(*PkgName).Id", Method, 5},
+ {"(*PkgName).Imported", Method, 5},
+ {"(*PkgName).Name", Method, 5},
+ {"(*PkgName).Parent", Method, 5},
+ {"(*PkgName).Pkg", Method, 5},
+ {"(*PkgName).Pos", Method, 5},
+ {"(*PkgName).String", Method, 5},
+ {"(*PkgName).Type", Method, 5},
+ {"(*Pointer).Elem", Method, 5},
+ {"(*Pointer).String", Method, 5},
+ {"(*Pointer).Underlying", Method, 5},
+ {"(*Scope).Child", Method, 5},
+ {"(*Scope).Contains", Method, 5},
+ {"(*Scope).End", Method, 5},
+ {"(*Scope).Innermost", Method, 5},
+ {"(*Scope).Insert", Method, 5},
+ {"(*Scope).Len", Method, 5},
+ {"(*Scope).Lookup", Method, 5},
+ {"(*Scope).LookupParent", Method, 5},
+ {"(*Scope).Names", Method, 5},
+ {"(*Scope).NumChildren", Method, 5},
+ {"(*Scope).Parent", Method, 5},
+ {"(*Scope).Pos", Method, 5},
+ {"(*Scope).String", Method, 5},
+ {"(*Scope).WriteTo", Method, 5},
+ {"(*Selection).Index", Method, 5},
+ {"(*Selection).Indirect", Method, 5},
+ {"(*Selection).Kind", Method, 5},
+ {"(*Selection).Obj", Method, 5},
+ {"(*Selection).Recv", Method, 5},
+ {"(*Selection).String", Method, 5},
+ {"(*Selection).Type", Method, 5},
+ {"(*Signature).Params", Method, 5},
+ {"(*Signature).Recv", Method, 5},
+ {"(*Signature).RecvTypeParams", Method, 18},
+ {"(*Signature).Results", Method, 5},
+ {"(*Signature).String", Method, 5},
+ {"(*Signature).TypeParams", Method, 18},
+ {"(*Signature).Underlying", Method, 5},
+ {"(*Signature).Variadic", Method, 5},
+ {"(*Slice).Elem", Method, 5},
+ {"(*Slice).String", Method, 5},
+ {"(*Slice).Underlying", Method, 5},
+ {"(*StdSizes).Alignof", Method, 5},
+ {"(*StdSizes).Offsetsof", Method, 5},
+ {"(*StdSizes).Sizeof", Method, 5},
+ {"(*Struct).Field", Method, 5},
+ {"(*Struct).NumFields", Method, 5},
+ {"(*Struct).String", Method, 5},
+ {"(*Struct).Tag", Method, 5},
+ {"(*Struct).Underlying", Method, 5},
+ {"(*Term).String", Method, 18},
+ {"(*Term).Tilde", Method, 18},
+ {"(*Term).Type", Method, 18},
+ {"(*Tuple).At", Method, 5},
+ {"(*Tuple).Len", Method, 5},
+ {"(*Tuple).String", Method, 5},
+ {"(*Tuple).Underlying", Method, 5},
+ {"(*TypeList).At", Method, 18},
+ {"(*TypeList).Len", Method, 18},
+ {"(*TypeName).Exported", Method, 5},
+ {"(*TypeName).Id", Method, 5},
+ {"(*TypeName).IsAlias", Method, 9},
+ {"(*TypeName).Name", Method, 5},
+ {"(*TypeName).Parent", Method, 5},
+ {"(*TypeName).Pkg", Method, 5},
+ {"(*TypeName).Pos", Method, 5},
+ {"(*TypeName).String", Method, 5},
+ {"(*TypeName).Type", Method, 5},
+ {"(*TypeParam).Constraint", Method, 18},
+ {"(*TypeParam).Index", Method, 18},
+ {"(*TypeParam).Obj", Method, 18},
+ {"(*TypeParam).SetConstraint", Method, 18},
+ {"(*TypeParam).String", Method, 18},
+ {"(*TypeParam).Underlying", Method, 18},
+ {"(*TypeParamList).At", Method, 18},
+ {"(*TypeParamList).Len", Method, 18},
+ {"(*Union).Len", Method, 18},
+ {"(*Union).String", Method, 18},
+ {"(*Union).Term", Method, 18},
+ {"(*Union).Underlying", Method, 18},
+ {"(*Var).Anonymous", Method, 5},
+ {"(*Var).Embedded", Method, 11},
+ {"(*Var).Exported", Method, 5},
+ {"(*Var).Id", Method, 5},
+ {"(*Var).IsField", Method, 5},
+ {"(*Var).Name", Method, 5},
+ {"(*Var).Origin", Method, 19},
+ {"(*Var).Parent", Method, 5},
+ {"(*Var).Pkg", Method, 5},
+ {"(*Var).Pos", Method, 5},
+ {"(*Var).String", Method, 5},
+ {"(*Var).Type", Method, 5},
+ {"(Checker).ObjectOf", Method, 5},
+ {"(Checker).PkgNameOf", Method, 22},
+ {"(Checker).TypeOf", Method, 5},
+ {"(Error).Error", Method, 5},
+ {"(TypeAndValue).Addressable", Method, 5},
+ {"(TypeAndValue).Assignable", Method, 5},
+ {"(TypeAndValue).HasOk", Method, 5},
+ {"(TypeAndValue).IsBuiltin", Method, 5},
+ {"(TypeAndValue).IsNil", Method, 5},
+ {"(TypeAndValue).IsType", Method, 5},
+ {"(TypeAndValue).IsValue", Method, 5},
+ {"(TypeAndValue).IsVoid", Method, 5},
+ {"Alias", Type, 22},
+ {"ArgumentError", Type, 18},
+ {"ArgumentError.Err", Field, 18},
+ {"ArgumentError.Index", Field, 18},
+ {"Array", Type, 5},
+ {"AssertableTo", Func, 5},
+ {"AssignableTo", Func, 5},
+ {"Basic", Type, 5},
+ {"BasicInfo", Type, 5},
+ {"BasicKind", Type, 5},
+ {"Bool", Const, 5},
+ {"Builtin", Type, 5},
+ {"Byte", Const, 5},
+ {"Chan", Type, 5},
+ {"ChanDir", Type, 5},
+ {"CheckExpr", Func, 13},
+ {"Checker", Type, 5},
+ {"Checker.Info", Field, 5},
+ {"Comparable", Func, 5},
+ {"Complex128", Const, 5},
+ {"Complex64", Const, 5},
+ {"Config", Type, 5},
+ {"Config.Context", Field, 18},
+ {"Config.DisableUnusedImportCheck", Field, 5},
+ {"Config.Error", Field, 5},
+ {"Config.FakeImportC", Field, 5},
+ {"Config.GoVersion", Field, 18},
+ {"Config.IgnoreFuncBodies", Field, 5},
+ {"Config.Importer", Field, 5},
+ {"Config.Sizes", Field, 5},
+ {"Const", Type, 5},
+ {"Context", Type, 18},
+ {"ConvertibleTo", Func, 5},
+ {"DefPredeclaredTestFuncs", Func, 5},
+ {"Default", Func, 8},
+ {"Error", Type, 5},
+ {"Error.Fset", Field, 5},
+ {"Error.Msg", Field, 5},
+ {"Error.Pos", Field, 5},
+ {"Error.Soft", Field, 5},
+ {"Eval", Func, 5},
+ {"ExprString", Func, 5},
+ {"FieldVal", Const, 5},
+ {"Float32", Const, 5},
+ {"Float64", Const, 5},
+ {"Func", Type, 5},
+ {"Id", Func, 5},
+ {"Identical", Func, 5},
+ {"IdenticalIgnoreTags", Func, 8},
+ {"Implements", Func, 5},
+ {"ImportMode", Type, 6},
+ {"Importer", Type, 5},
+ {"ImporterFrom", Type, 6},
+ {"Info", Type, 5},
+ {"Info.Defs", Field, 5},
+ {"Info.FileVersions", Field, 22},
+ {"Info.Implicits", Field, 5},
+ {"Info.InitOrder", Field, 5},
+ {"Info.Instances", Field, 18},
+ {"Info.Scopes", Field, 5},
+ {"Info.Selections", Field, 5},
+ {"Info.Types", Field, 5},
+ {"Info.Uses", Field, 5},
+ {"Initializer", Type, 5},
+ {"Initializer.Lhs", Field, 5},
+ {"Initializer.Rhs", Field, 5},
+ {"Instance", Type, 18},
+ {"Instance.Type", Field, 18},
+ {"Instance.TypeArgs", Field, 18},
+ {"Instantiate", Func, 18},
+ {"Int", Const, 5},
+ {"Int16", Const, 5},
+ {"Int32", Const, 5},
+ {"Int64", Const, 5},
+ {"Int8", Const, 5},
+ {"Interface", Type, 5},
+ {"Invalid", Const, 5},
+ {"IsBoolean", Const, 5},
+ {"IsComplex", Const, 5},
+ {"IsConstType", Const, 5},
+ {"IsFloat", Const, 5},
+ {"IsInteger", Const, 5},
+ {"IsInterface", Func, 5},
+ {"IsNumeric", Const, 5},
+ {"IsOrdered", Const, 5},
+ {"IsString", Const, 5},
+ {"IsUnsigned", Const, 5},
+ {"IsUntyped", Const, 5},
+ {"Label", Type, 5},
+ {"LookupFieldOrMethod", Func, 5},
+ {"Map", Type, 5},
+ {"MethodExpr", Const, 5},
+ {"MethodSet", Type, 5},
+ {"MethodVal", Const, 5},
+ {"MissingMethod", Func, 5},
+ {"Named", Type, 5},
+ {"NewAlias", Func, 22},
+ {"NewArray", Func, 5},
+ {"NewChan", Func, 5},
+ {"NewChecker", Func, 5},
+ {"NewConst", Func, 5},
+ {"NewContext", Func, 18},
+ {"NewField", Func, 5},
+ {"NewFunc", Func, 5},
+ {"NewInterface", Func, 5},
+ {"NewInterfaceType", Func, 11},
+ {"NewLabel", Func, 5},
+ {"NewMap", Func, 5},
+ {"NewMethodSet", Func, 5},
+ {"NewNamed", Func, 5},
+ {"NewPackage", Func, 5},
+ {"NewParam", Func, 5},
+ {"NewPkgName", Func, 5},
+ {"NewPointer", Func, 5},
+ {"NewScope", Func, 5},
+ {"NewSignature", Func, 5},
+ {"NewSignatureType", Func, 18},
+ {"NewSlice", Func, 5},
+ {"NewStruct", Func, 5},
+ {"NewTerm", Func, 18},
+ {"NewTuple", Func, 5},
+ {"NewTypeName", Func, 5},
+ {"NewTypeParam", Func, 18},
+ {"NewUnion", Func, 18},
+ {"NewVar", Func, 5},
+ {"Nil", Type, 5},
+ {"Object", Type, 5},
+ {"ObjectString", Func, 5},
+ {"Package", Type, 5},
+ {"PkgName", Type, 5},
+ {"Pointer", Type, 5},
+ {"Qualifier", Type, 5},
+ {"RecvOnly", Const, 5},
+ {"RelativeTo", Func, 5},
+ {"Rune", Const, 5},
+ {"Satisfies", Func, 20},
+ {"Scope", Type, 5},
+ {"Selection", Type, 5},
+ {"SelectionKind", Type, 5},
+ {"SelectionString", Func, 5},
+ {"SendOnly", Const, 5},
+ {"SendRecv", Const, 5},
+ {"Signature", Type, 5},
+ {"Sizes", Type, 5},
+ {"SizesFor", Func, 9},
+ {"Slice", Type, 5},
+ {"StdSizes", Type, 5},
+ {"StdSizes.MaxAlign", Field, 5},
+ {"StdSizes.WordSize", Field, 5},
+ {"String", Const, 5},
+ {"Struct", Type, 5},
+ {"Term", Type, 18},
+ {"Tuple", Type, 5},
+ {"Typ", Var, 5},
+ {"Type", Type, 5},
+ {"TypeAndValue", Type, 5},
+ {"TypeAndValue.Type", Field, 5},
+ {"TypeAndValue.Value", Field, 5},
+ {"TypeList", Type, 18},
+ {"TypeName", Type, 5},
+ {"TypeParam", Type, 18},
+ {"TypeParamList", Type, 18},
+ {"TypeString", Func, 5},
+ {"Uint", Const, 5},
+ {"Uint16", Const, 5},
+ {"Uint32", Const, 5},
+ {"Uint64", Const, 5},
+ {"Uint8", Const, 5},
+ {"Uintptr", Const, 5},
+ {"Unalias", Func, 22},
+ {"Union", Type, 18},
+ {"Universe", Var, 5},
+ {"Unsafe", Var, 5},
+ {"UnsafePointer", Const, 5},
+ {"UntypedBool", Const, 5},
+ {"UntypedComplex", Const, 5},
+ {"UntypedFloat", Const, 5},
+ {"UntypedInt", Const, 5},
+ {"UntypedNil", Const, 5},
+ {"UntypedRune", Const, 5},
+ {"UntypedString", Const, 5},
+ {"Var", Type, 5},
+ {"WriteExpr", Func, 5},
+ {"WriteSignature", Func, 5},
+ {"WriteType", Func, 5},
+ },
+ "go/version": {
+ {"Compare", Func, 22},
+ {"IsValid", Func, 22},
+ {"Lang", Func, 22},
+ },
+ "hash": {
+ {"Hash", Type, 0},
+ {"Hash32", Type, 0},
+ {"Hash64", Type, 0},
+ },
+ "hash/adler32": {
+ {"Checksum", Func, 0},
+ {"New", Func, 0},
+ {"Size", Const, 0},
+ },
+ "hash/crc32": {
+ {"Castagnoli", Const, 0},
+ {"Checksum", Func, 0},
+ {"ChecksumIEEE", Func, 0},
+ {"IEEE", Const, 0},
+ {"IEEETable", Var, 0},
+ {"Koopman", Const, 0},
+ {"MakeTable", Func, 0},
+ {"New", Func, 0},
+ {"NewIEEE", Func, 0},
+ {"Size", Const, 0},
+ {"Table", Type, 0},
+ {"Update", Func, 0},
+ },
+ "hash/crc64": {
+ {"Checksum", Func, 0},
+ {"ECMA", Const, 0},
+ {"ISO", Const, 0},
+ {"MakeTable", Func, 0},
+ {"New", Func, 0},
+ {"Size", Const, 0},
+ {"Table", Type, 0},
+ {"Update", Func, 0},
+ },
+ "hash/fnv": {
+ {"New128", Func, 9},
+ {"New128a", Func, 9},
+ {"New32", Func, 0},
+ {"New32a", Func, 0},
+ {"New64", Func, 0},
+ {"New64a", Func, 0},
+ },
+ "hash/maphash": {
+ {"(*Hash).BlockSize", Method, 14},
+ {"(*Hash).Reset", Method, 14},
+ {"(*Hash).Seed", Method, 14},
+ {"(*Hash).SetSeed", Method, 14},
+ {"(*Hash).Size", Method, 14},
+ {"(*Hash).Sum", Method, 14},
+ {"(*Hash).Sum64", Method, 14},
+ {"(*Hash).Write", Method, 14},
+ {"(*Hash).WriteByte", Method, 14},
+ {"(*Hash).WriteString", Method, 14},
+ {"Bytes", Func, 19},
+ {"Hash", Type, 14},
+ {"MakeSeed", Func, 14},
+ {"Seed", Type, 14},
+ {"String", Func, 19},
+ },
+ "html": {
+ {"EscapeString", Func, 0},
+ {"UnescapeString", Func, 0},
+ },
+ "html/template": {
+ {"(*Error).Error", Method, 0},
+ {"(*Template).AddParseTree", Method, 0},
+ {"(*Template).Clone", Method, 0},
+ {"(*Template).DefinedTemplates", Method, 6},
+ {"(*Template).Delims", Method, 0},
+ {"(*Template).Execute", Method, 0},
+ {"(*Template).ExecuteTemplate", Method, 0},
+ {"(*Template).Funcs", Method, 0},
+ {"(*Template).Lookup", Method, 0},
+ {"(*Template).Name", Method, 0},
+ {"(*Template).New", Method, 0},
+ {"(*Template).Option", Method, 5},
+ {"(*Template).Parse", Method, 0},
+ {"(*Template).ParseFS", Method, 16},
+ {"(*Template).ParseFiles", Method, 0},
+ {"(*Template).ParseGlob", Method, 0},
+ {"(*Template).Templates", Method, 0},
+ {"CSS", Type, 0},
+ {"ErrAmbigContext", Const, 0},
+ {"ErrBadHTML", Const, 0},
+ {"ErrBranchEnd", Const, 0},
+ {"ErrEndContext", Const, 0},
+ {"ErrJSTemplate", Const, 21},
+ {"ErrNoSuchTemplate", Const, 0},
+ {"ErrOutputContext", Const, 0},
+ {"ErrPartialCharset", Const, 0},
+ {"ErrPartialEscape", Const, 0},
+ {"ErrPredefinedEscaper", Const, 9},
+ {"ErrRangeLoopReentry", Const, 0},
+ {"ErrSlashAmbig", Const, 0},
+ {"Error", Type, 0},
+ {"Error.Description", Field, 0},
+ {"Error.ErrorCode", Field, 0},
+ {"Error.Line", Field, 0},
+ {"Error.Name", Field, 0},
+ {"Error.Node", Field, 4},
+ {"ErrorCode", Type, 0},
+ {"FuncMap", Type, 0},
+ {"HTML", Type, 0},
+ {"HTMLAttr", Type, 0},
+ {"HTMLEscape", Func, 0},
+ {"HTMLEscapeString", Func, 0},
+ {"HTMLEscaper", Func, 0},
+ {"IsTrue", Func, 6},
+ {"JS", Type, 0},
+ {"JSEscape", Func, 0},
+ {"JSEscapeString", Func, 0},
+ {"JSEscaper", Func, 0},
+ {"JSStr", Type, 0},
+ {"Must", Func, 0},
+ {"New", Func, 0},
+ {"OK", Const, 0},
+ {"ParseFS", Func, 16},
+ {"ParseFiles", Func, 0},
+ {"ParseGlob", Func, 0},
+ {"Srcset", Type, 10},
+ {"Template", Type, 0},
+ {"Template.Tree", Field, 2},
+ {"URL", Type, 0},
+ {"URLQueryEscaper", Func, 0},
+ },
+ "image": {
+ {"(*Alpha).AlphaAt", Method, 4},
+ {"(*Alpha).At", Method, 0},
+ {"(*Alpha).Bounds", Method, 0},
+ {"(*Alpha).ColorModel", Method, 0},
+ {"(*Alpha).Opaque", Method, 0},
+ {"(*Alpha).PixOffset", Method, 0},
+ {"(*Alpha).RGBA64At", Method, 17},
+ {"(*Alpha).Set", Method, 0},
+ {"(*Alpha).SetAlpha", Method, 0},
+ {"(*Alpha).SetRGBA64", Method, 17},
+ {"(*Alpha).SubImage", Method, 0},
+ {"(*Alpha16).Alpha16At", Method, 4},
+ {"(*Alpha16).At", Method, 0},
+ {"(*Alpha16).Bounds", Method, 0},
+ {"(*Alpha16).ColorModel", Method, 0},
+ {"(*Alpha16).Opaque", Method, 0},
+ {"(*Alpha16).PixOffset", Method, 0},
+ {"(*Alpha16).RGBA64At", Method, 17},
+ {"(*Alpha16).Set", Method, 0},
+ {"(*Alpha16).SetAlpha16", Method, 0},
+ {"(*Alpha16).SetRGBA64", Method, 17},
+ {"(*Alpha16).SubImage", Method, 0},
+ {"(*CMYK).At", Method, 5},
+ {"(*CMYK).Bounds", Method, 5},
+ {"(*CMYK).CMYKAt", Method, 5},
+ {"(*CMYK).ColorModel", Method, 5},
+ {"(*CMYK).Opaque", Method, 5},
+ {"(*CMYK).PixOffset", Method, 5},
+ {"(*CMYK).RGBA64At", Method, 17},
+ {"(*CMYK).Set", Method, 5},
+ {"(*CMYK).SetCMYK", Method, 5},
+ {"(*CMYK).SetRGBA64", Method, 17},
+ {"(*CMYK).SubImage", Method, 5},
+ {"(*Gray).At", Method, 0},
+ {"(*Gray).Bounds", Method, 0},
+ {"(*Gray).ColorModel", Method, 0},
+ {"(*Gray).GrayAt", Method, 4},
+ {"(*Gray).Opaque", Method, 0},
+ {"(*Gray).PixOffset", Method, 0},
+ {"(*Gray).RGBA64At", Method, 17},
+ {"(*Gray).Set", Method, 0},
+ {"(*Gray).SetGray", Method, 0},
+ {"(*Gray).SetRGBA64", Method, 17},
+ {"(*Gray).SubImage", Method, 0},
+ {"(*Gray16).At", Method, 0},
+ {"(*Gray16).Bounds", Method, 0},
+ {"(*Gray16).ColorModel", Method, 0},
+ {"(*Gray16).Gray16At", Method, 4},
+ {"(*Gray16).Opaque", Method, 0},
+ {"(*Gray16).PixOffset", Method, 0},
+ {"(*Gray16).RGBA64At", Method, 17},
+ {"(*Gray16).Set", Method, 0},
+ {"(*Gray16).SetGray16", Method, 0},
+ {"(*Gray16).SetRGBA64", Method, 17},
+ {"(*Gray16).SubImage", Method, 0},
+ {"(*NRGBA).At", Method, 0},
+ {"(*NRGBA).Bounds", Method, 0},
+ {"(*NRGBA).ColorModel", Method, 0},
+ {"(*NRGBA).NRGBAAt", Method, 4},
+ {"(*NRGBA).Opaque", Method, 0},
+ {"(*NRGBA).PixOffset", Method, 0},
+ {"(*NRGBA).RGBA64At", Method, 17},
+ {"(*NRGBA).Set", Method, 0},
+ {"(*NRGBA).SetNRGBA", Method, 0},
+ {"(*NRGBA).SetRGBA64", Method, 17},
+ {"(*NRGBA).SubImage", Method, 0},
+ {"(*NRGBA64).At", Method, 0},
+ {"(*NRGBA64).Bounds", Method, 0},
+ {"(*NRGBA64).ColorModel", Method, 0},
+ {"(*NRGBA64).NRGBA64At", Method, 4},
+ {"(*NRGBA64).Opaque", Method, 0},
+ {"(*NRGBA64).PixOffset", Method, 0},
+ {"(*NRGBA64).RGBA64At", Method, 17},
+ {"(*NRGBA64).Set", Method, 0},
+ {"(*NRGBA64).SetNRGBA64", Method, 0},
+ {"(*NRGBA64).SetRGBA64", Method, 17},
+ {"(*NRGBA64).SubImage", Method, 0},
+ {"(*NYCbCrA).AOffset", Method, 6},
+ {"(*NYCbCrA).At", Method, 6},
+ {"(*NYCbCrA).Bounds", Method, 6},
+ {"(*NYCbCrA).COffset", Method, 6},
+ {"(*NYCbCrA).ColorModel", Method, 6},
+ {"(*NYCbCrA).NYCbCrAAt", Method, 6},
+ {"(*NYCbCrA).Opaque", Method, 6},
+ {"(*NYCbCrA).RGBA64At", Method, 17},
+ {"(*NYCbCrA).SubImage", Method, 6},
+ {"(*NYCbCrA).YCbCrAt", Method, 6},
+ {"(*NYCbCrA).YOffset", Method, 6},
+ {"(*Paletted).At", Method, 0},
+ {"(*Paletted).Bounds", Method, 0},
+ {"(*Paletted).ColorIndexAt", Method, 0},
+ {"(*Paletted).ColorModel", Method, 0},
+ {"(*Paletted).Opaque", Method, 0},
+ {"(*Paletted).PixOffset", Method, 0},
+ {"(*Paletted).RGBA64At", Method, 17},
+ {"(*Paletted).Set", Method, 0},
+ {"(*Paletted).SetColorIndex", Method, 0},
+ {"(*Paletted).SetRGBA64", Method, 17},
+ {"(*Paletted).SubImage", Method, 0},
+ {"(*RGBA).At", Method, 0},
+ {"(*RGBA).Bounds", Method, 0},
+ {"(*RGBA).ColorModel", Method, 0},
+ {"(*RGBA).Opaque", Method, 0},
+ {"(*RGBA).PixOffset", Method, 0},
+ {"(*RGBA).RGBA64At", Method, 17},
+ {"(*RGBA).RGBAAt", Method, 4},
+ {"(*RGBA).Set", Method, 0},
+ {"(*RGBA).SetRGBA", Method, 0},
+ {"(*RGBA).SetRGBA64", Method, 17},
+ {"(*RGBA).SubImage", Method, 0},
+ {"(*RGBA64).At", Method, 0},
+ {"(*RGBA64).Bounds", Method, 0},
+ {"(*RGBA64).ColorModel", Method, 0},
+ {"(*RGBA64).Opaque", Method, 0},
+ {"(*RGBA64).PixOffset", Method, 0},
+ {"(*RGBA64).RGBA64At", Method, 4},
+ {"(*RGBA64).Set", Method, 0},
+ {"(*RGBA64).SetRGBA64", Method, 0},
+ {"(*RGBA64).SubImage", Method, 0},
+ {"(*Uniform).At", Method, 0},
+ {"(*Uniform).Bounds", Method, 0},
+ {"(*Uniform).ColorModel", Method, 0},
+ {"(*Uniform).Convert", Method, 0},
+ {"(*Uniform).Opaque", Method, 0},
+ {"(*Uniform).RGBA", Method, 0},
+ {"(*Uniform).RGBA64At", Method, 17},
+ {"(*YCbCr).At", Method, 0},
+ {"(*YCbCr).Bounds", Method, 0},
+ {"(*YCbCr).COffset", Method, 0},
+ {"(*YCbCr).ColorModel", Method, 0},
+ {"(*YCbCr).Opaque", Method, 0},
+ {"(*YCbCr).RGBA64At", Method, 17},
+ {"(*YCbCr).SubImage", Method, 0},
+ {"(*YCbCr).YCbCrAt", Method, 4},
+ {"(*YCbCr).YOffset", Method, 0},
+ {"(Point).Add", Method, 0},
+ {"(Point).Div", Method, 0},
+ {"(Point).Eq", Method, 0},
+ {"(Point).In", Method, 0},
+ {"(Point).Mod", Method, 0},
+ {"(Point).Mul", Method, 0},
+ {"(Point).String", Method, 0},
+ {"(Point).Sub", Method, 0},
+ {"(Rectangle).Add", Method, 0},
+ {"(Rectangle).At", Method, 5},
+ {"(Rectangle).Bounds", Method, 5},
+ {"(Rectangle).Canon", Method, 0},
+ {"(Rectangle).ColorModel", Method, 5},
+ {"(Rectangle).Dx", Method, 0},
+ {"(Rectangle).Dy", Method, 0},
+ {"(Rectangle).Empty", Method, 0},
+ {"(Rectangle).Eq", Method, 0},
+ {"(Rectangle).In", Method, 0},
+ {"(Rectangle).Inset", Method, 0},
+ {"(Rectangle).Intersect", Method, 0},
+ {"(Rectangle).Overlaps", Method, 0},
+ {"(Rectangle).RGBA64At", Method, 17},
+ {"(Rectangle).Size", Method, 0},
+ {"(Rectangle).String", Method, 0},
+ {"(Rectangle).Sub", Method, 0},
+ {"(Rectangle).Union", Method, 0},
+ {"(YCbCrSubsampleRatio).String", Method, 0},
+ {"Alpha", Type, 0},
+ {"Alpha.Pix", Field, 0},
+ {"Alpha.Rect", Field, 0},
+ {"Alpha.Stride", Field, 0},
+ {"Alpha16", Type, 0},
+ {"Alpha16.Pix", Field, 0},
+ {"Alpha16.Rect", Field, 0},
+ {"Alpha16.Stride", Field, 0},
+ {"Black", Var, 0},
+ {"CMYK", Type, 5},
+ {"CMYK.Pix", Field, 5},
+ {"CMYK.Rect", Field, 5},
+ {"CMYK.Stride", Field, 5},
+ {"Config", Type, 0},
+ {"Config.ColorModel", Field, 0},
+ {"Config.Height", Field, 0},
+ {"Config.Width", Field, 0},
+ {"Decode", Func, 0},
+ {"DecodeConfig", Func, 0},
+ {"ErrFormat", Var, 0},
+ {"Gray", Type, 0},
+ {"Gray.Pix", Field, 0},
+ {"Gray.Rect", Field, 0},
+ {"Gray.Stride", Field, 0},
+ {"Gray16", Type, 0},
+ {"Gray16.Pix", Field, 0},
+ {"Gray16.Rect", Field, 0},
+ {"Gray16.Stride", Field, 0},
+ {"Image", Type, 0},
+ {"NRGBA", Type, 0},
+ {"NRGBA.Pix", Field, 0},
+ {"NRGBA.Rect", Field, 0},
+ {"NRGBA.Stride", Field, 0},
+ {"NRGBA64", Type, 0},
+ {"NRGBA64.Pix", Field, 0},
+ {"NRGBA64.Rect", Field, 0},
+ {"NRGBA64.Stride", Field, 0},
+ {"NYCbCrA", Type, 6},
+ {"NYCbCrA.A", Field, 6},
+ {"NYCbCrA.AStride", Field, 6},
+ {"NYCbCrA.YCbCr", Field, 6},
+ {"NewAlpha", Func, 0},
+ {"NewAlpha16", Func, 0},
+ {"NewCMYK", Func, 5},
+ {"NewGray", Func, 0},
+ {"NewGray16", Func, 0},
+ {"NewNRGBA", Func, 0},
+ {"NewNRGBA64", Func, 0},
+ {"NewNYCbCrA", Func, 6},
+ {"NewPaletted", Func, 0},
+ {"NewRGBA", Func, 0},
+ {"NewRGBA64", Func, 0},
+ {"NewUniform", Func, 0},
+ {"NewYCbCr", Func, 0},
+ {"Opaque", Var, 0},
+ {"Paletted", Type, 0},
+ {"Paletted.Palette", Field, 0},
+ {"Paletted.Pix", Field, 0},
+ {"Paletted.Rect", Field, 0},
+ {"Paletted.Stride", Field, 0},
+ {"PalettedImage", Type, 0},
+ {"Point", Type, 0},
+ {"Point.X", Field, 0},
+ {"Point.Y", Field, 0},
+ {"Pt", Func, 0},
+ {"RGBA", Type, 0},
+ {"RGBA.Pix", Field, 0},
+ {"RGBA.Rect", Field, 0},
+ {"RGBA.Stride", Field, 0},
+ {"RGBA64", Type, 0},
+ {"RGBA64.Pix", Field, 0},
+ {"RGBA64.Rect", Field, 0},
+ {"RGBA64.Stride", Field, 0},
+ {"RGBA64Image", Type, 17},
+ {"Rect", Func, 0},
+ {"Rectangle", Type, 0},
+ {"Rectangle.Max", Field, 0},
+ {"Rectangle.Min", Field, 0},
+ {"RegisterFormat", Func, 0},
+ {"Transparent", Var, 0},
+ {"Uniform", Type, 0},
+ {"Uniform.C", Field, 0},
+ {"White", Var, 0},
+ {"YCbCr", Type, 0},
+ {"YCbCr.CStride", Field, 0},
+ {"YCbCr.Cb", Field, 0},
+ {"YCbCr.Cr", Field, 0},
+ {"YCbCr.Rect", Field, 0},
+ {"YCbCr.SubsampleRatio", Field, 0},
+ {"YCbCr.Y", Field, 0},
+ {"YCbCr.YStride", Field, 0},
+ {"YCbCrSubsampleRatio", Type, 0},
+ {"YCbCrSubsampleRatio410", Const, 5},
+ {"YCbCrSubsampleRatio411", Const, 5},
+ {"YCbCrSubsampleRatio420", Const, 0},
+ {"YCbCrSubsampleRatio422", Const, 0},
+ {"YCbCrSubsampleRatio440", Const, 1},
+ {"YCbCrSubsampleRatio444", Const, 0},
+ {"ZP", Var, 0},
+ {"ZR", Var, 0},
+ },
+ "image/color": {
+ {"(Alpha).RGBA", Method, 0},
+ {"(Alpha16).RGBA", Method, 0},
+ {"(CMYK).RGBA", Method, 5},
+ {"(Gray).RGBA", Method, 0},
+ {"(Gray16).RGBA", Method, 0},
+ {"(NRGBA).RGBA", Method, 0},
+ {"(NRGBA64).RGBA", Method, 0},
+ {"(NYCbCrA).RGBA", Method, 6},
+ {"(Palette).Convert", Method, 0},
+ {"(Palette).Index", Method, 0},
+ {"(RGBA).RGBA", Method, 0},
+ {"(RGBA64).RGBA", Method, 0},
+ {"(YCbCr).RGBA", Method, 0},
+ {"Alpha", Type, 0},
+ {"Alpha.A", Field, 0},
+ {"Alpha16", Type, 0},
+ {"Alpha16.A", Field, 0},
+ {"Alpha16Model", Var, 0},
+ {"AlphaModel", Var, 0},
+ {"Black", Var, 0},
+ {"CMYK", Type, 5},
+ {"CMYK.C", Field, 5},
+ {"CMYK.K", Field, 5},
+ {"CMYK.M", Field, 5},
+ {"CMYK.Y", Field, 5},
+ {"CMYKModel", Var, 5},
+ {"CMYKToRGB", Func, 5},
+ {"Color", Type, 0},
+ {"Gray", Type, 0},
+ {"Gray.Y", Field, 0},
+ {"Gray16", Type, 0},
+ {"Gray16.Y", Field, 0},
+ {"Gray16Model", Var, 0},
+ {"GrayModel", Var, 0},
+ {"Model", Type, 0},
+ {"ModelFunc", Func, 0},
+ {"NRGBA", Type, 0},
+ {"NRGBA.A", Field, 0},
+ {"NRGBA.B", Field, 0},
+ {"NRGBA.G", Field, 0},
+ {"NRGBA.R", Field, 0},
+ {"NRGBA64", Type, 0},
+ {"NRGBA64.A", Field, 0},
+ {"NRGBA64.B", Field, 0},
+ {"NRGBA64.G", Field, 0},
+ {"NRGBA64.R", Field, 0},
+ {"NRGBA64Model", Var, 0},
+ {"NRGBAModel", Var, 0},
+ {"NYCbCrA", Type, 6},
+ {"NYCbCrA.A", Field, 6},
+ {"NYCbCrA.YCbCr", Field, 6},
+ {"NYCbCrAModel", Var, 6},
+ {"Opaque", Var, 0},
+ {"Palette", Type, 0},
+ {"RGBA", Type, 0},
+ {"RGBA.A", Field, 0},
+ {"RGBA.B", Field, 0},
+ {"RGBA.G", Field, 0},
+ {"RGBA.R", Field, 0},
+ {"RGBA64", Type, 0},
+ {"RGBA64.A", Field, 0},
+ {"RGBA64.B", Field, 0},
+ {"RGBA64.G", Field, 0},
+ {"RGBA64.R", Field, 0},
+ {"RGBA64Model", Var, 0},
+ {"RGBAModel", Var, 0},
+ {"RGBToCMYK", Func, 5},
+ {"RGBToYCbCr", Func, 0},
+ {"Transparent", Var, 0},
+ {"White", Var, 0},
+ {"YCbCr", Type, 0},
+ {"YCbCr.Cb", Field, 0},
+ {"YCbCr.Cr", Field, 0},
+ {"YCbCr.Y", Field, 0},
+ {"YCbCrModel", Var, 0},
+ {"YCbCrToRGB", Func, 0},
+ },
+ "image/color/palette": {
+ {"Plan9", Var, 2},
+ {"WebSafe", Var, 2},
+ },
+ "image/draw": {
+ {"(Op).Draw", Method, 2},
+ {"Draw", Func, 0},
+ {"DrawMask", Func, 0},
+ {"Drawer", Type, 2},
+ {"FloydSteinberg", Var, 2},
+ {"Image", Type, 0},
+ {"Op", Type, 0},
+ {"Over", Const, 0},
+ {"Quantizer", Type, 2},
+ {"RGBA64Image", Type, 17},
+ {"Src", Const, 0},
+ },
+ "image/gif": {
+ {"Decode", Func, 0},
+ {"DecodeAll", Func, 0},
+ {"DecodeConfig", Func, 0},
+ {"DisposalBackground", Const, 5},
+ {"DisposalNone", Const, 5},
+ {"DisposalPrevious", Const, 5},
+ {"Encode", Func, 2},
+ {"EncodeAll", Func, 2},
+ {"GIF", Type, 0},
+ {"GIF.BackgroundIndex", Field, 5},
+ {"GIF.Config", Field, 5},
+ {"GIF.Delay", Field, 0},
+ {"GIF.Disposal", Field, 5},
+ {"GIF.Image", Field, 0},
+ {"GIF.LoopCount", Field, 0},
+ {"Options", Type, 2},
+ {"Options.Drawer", Field, 2},
+ {"Options.NumColors", Field, 2},
+ {"Options.Quantizer", Field, 2},
+ },
+ "image/jpeg": {
+ {"(FormatError).Error", Method, 0},
+ {"(UnsupportedError).Error", Method, 0},
+ {"Decode", Func, 0},
+ {"DecodeConfig", Func, 0},
+ {"DefaultQuality", Const, 0},
+ {"Encode", Func, 0},
+ {"FormatError", Type, 0},
+ {"Options", Type, 0},
+ {"Options.Quality", Field, 0},
+ {"Reader", Type, 0},
+ {"UnsupportedError", Type, 0},
+ },
+ "image/png": {
+ {"(*Encoder).Encode", Method, 4},
+ {"(FormatError).Error", Method, 0},
+ {"(UnsupportedError).Error", Method, 0},
+ {"BestCompression", Const, 4},
+ {"BestSpeed", Const, 4},
+ {"CompressionLevel", Type, 4},
+ {"Decode", Func, 0},
+ {"DecodeConfig", Func, 0},
+ {"DefaultCompression", Const, 4},
+ {"Encode", Func, 0},
+ {"Encoder", Type, 4},
+ {"Encoder.BufferPool", Field, 9},
+ {"Encoder.CompressionLevel", Field, 4},
+ {"EncoderBuffer", Type, 9},
+ {"EncoderBufferPool", Type, 9},
+ {"FormatError", Type, 0},
+ {"NoCompression", Const, 4},
+ {"UnsupportedError", Type, 0},
+ },
+ "index/suffixarray": {
+ {"(*Index).Bytes", Method, 0},
+ {"(*Index).FindAllIndex", Method, 0},
+ {"(*Index).Lookup", Method, 0},
+ {"(*Index).Read", Method, 0},
+ {"(*Index).Write", Method, 0},
+ {"Index", Type, 0},
+ {"New", Func, 0},
+ },
+ "io": {
+ {"(*LimitedReader).Read", Method, 0},
+ {"(*OffsetWriter).Seek", Method, 20},
+ {"(*OffsetWriter).Write", Method, 20},
+ {"(*OffsetWriter).WriteAt", Method, 20},
+ {"(*PipeReader).Close", Method, 0},
+ {"(*PipeReader).CloseWithError", Method, 0},
+ {"(*PipeReader).Read", Method, 0},
+ {"(*PipeWriter).Close", Method, 0},
+ {"(*PipeWriter).CloseWithError", Method, 0},
+ {"(*PipeWriter).Write", Method, 0},
+ {"(*SectionReader).Outer", Method, 22},
+ {"(*SectionReader).Read", Method, 0},
+ {"(*SectionReader).ReadAt", Method, 0},
+ {"(*SectionReader).Seek", Method, 0},
+ {"(*SectionReader).Size", Method, 0},
+ {"ByteReader", Type, 0},
+ {"ByteScanner", Type, 0},
+ {"ByteWriter", Type, 1},
+ {"Closer", Type, 0},
+ {"Copy", Func, 0},
+ {"CopyBuffer", Func, 5},
+ {"CopyN", Func, 0},
+ {"Discard", Var, 16},
+ {"EOF", Var, 0},
+ {"ErrClosedPipe", Var, 0},
+ {"ErrNoProgress", Var, 1},
+ {"ErrShortBuffer", Var, 0},
+ {"ErrShortWrite", Var, 0},
+ {"ErrUnexpectedEOF", Var, 0},
+ {"LimitReader", Func, 0},
+ {"LimitedReader", Type, 0},
+ {"LimitedReader.N", Field, 0},
+ {"LimitedReader.R", Field, 0},
+ {"MultiReader", Func, 0},
+ {"MultiWriter", Func, 0},
+ {"NewOffsetWriter", Func, 20},
+ {"NewSectionReader", Func, 0},
+ {"NopCloser", Func, 16},
+ {"OffsetWriter", Type, 20},
+ {"Pipe", Func, 0},
+ {"PipeReader", Type, 0},
+ {"PipeWriter", Type, 0},
+ {"ReadAll", Func, 16},
+ {"ReadAtLeast", Func, 0},
+ {"ReadCloser", Type, 0},
+ {"ReadFull", Func, 0},
+ {"ReadSeekCloser", Type, 16},
+ {"ReadSeeker", Type, 0},
+ {"ReadWriteCloser", Type, 0},
+ {"ReadWriteSeeker", Type, 0},
+ {"ReadWriter", Type, 0},
+ {"Reader", Type, 0},
+ {"ReaderAt", Type, 0},
+ {"ReaderFrom", Type, 0},
+ {"RuneReader", Type, 0},
+ {"RuneScanner", Type, 0},
+ {"SectionReader", Type, 0},
+ {"SeekCurrent", Const, 7},
+ {"SeekEnd", Const, 7},
+ {"SeekStart", Const, 7},
+ {"Seeker", Type, 0},
+ {"StringWriter", Type, 12},
+ {"TeeReader", Func, 0},
+ {"WriteCloser", Type, 0},
+ {"WriteSeeker", Type, 0},
+ {"WriteString", Func, 0},
+ {"Writer", Type, 0},
+ {"WriterAt", Type, 0},
+ {"WriterTo", Type, 0},
+ },
+ "io/fs": {
+ {"(*PathError).Error", Method, 16},
+ {"(*PathError).Timeout", Method, 16},
+ {"(*PathError).Unwrap", Method, 16},
+ {"(FileMode).IsDir", Method, 16},
+ {"(FileMode).IsRegular", Method, 16},
+ {"(FileMode).Perm", Method, 16},
+ {"(FileMode).String", Method, 16},
+ {"(FileMode).Type", Method, 16},
+ {"DirEntry", Type, 16},
+ {"ErrClosed", Var, 16},
+ {"ErrExist", Var, 16},
+ {"ErrInvalid", Var, 16},
+ {"ErrNotExist", Var, 16},
+ {"ErrPermission", Var, 16},
+ {"FS", Type, 16},
+ {"File", Type, 16},
+ {"FileInfo", Type, 16},
+ {"FileInfoToDirEntry", Func, 17},
+ {"FileMode", Type, 16},
+ {"FormatDirEntry", Func, 21},
+ {"FormatFileInfo", Func, 21},
+ {"Glob", Func, 16},
+ {"GlobFS", Type, 16},
+ {"ModeAppend", Const, 16},
+ {"ModeCharDevice", Const, 16},
+ {"ModeDevice", Const, 16},
+ {"ModeDir", Const, 16},
+ {"ModeExclusive", Const, 16},
+ {"ModeIrregular", Const, 16},
+ {"ModeNamedPipe", Const, 16},
+ {"ModePerm", Const, 16},
+ {"ModeSetgid", Const, 16},
+ {"ModeSetuid", Const, 16},
+ {"ModeSocket", Const, 16},
+ {"ModeSticky", Const, 16},
+ {"ModeSymlink", Const, 16},
+ {"ModeTemporary", Const, 16},
+ {"ModeType", Const, 16},
+ {"PathError", Type, 16},
+ {"PathError.Err", Field, 16},
+ {"PathError.Op", Field, 16},
+ {"PathError.Path", Field, 16},
+ {"ReadDir", Func, 16},
+ {"ReadDirFS", Type, 16},
+ {"ReadDirFile", Type, 16},
+ {"ReadFile", Func, 16},
+ {"ReadFileFS", Type, 16},
+ {"SkipAll", Var, 20},
+ {"SkipDir", Var, 16},
+ {"Stat", Func, 16},
+ {"StatFS", Type, 16},
+ {"Sub", Func, 16},
+ {"SubFS", Type, 16},
+ {"ValidPath", Func, 16},
+ {"WalkDir", Func, 16},
+ {"WalkDirFunc", Type, 16},
+ },
+ "io/ioutil": {
+ {"Discard", Var, 0},
+ {"NopCloser", Func, 0},
+ {"ReadAll", Func, 0},
+ {"ReadDir", Func, 0},
+ {"ReadFile", Func, 0},
+ {"TempDir", Func, 0},
+ {"TempFile", Func, 0},
+ {"WriteFile", Func, 0},
+ },
+ "log": {
+ {"(*Logger).Fatal", Method, 0},
+ {"(*Logger).Fatalf", Method, 0},
+ {"(*Logger).Fatalln", Method, 0},
+ {"(*Logger).Flags", Method, 0},
+ {"(*Logger).Output", Method, 0},
+ {"(*Logger).Panic", Method, 0},
+ {"(*Logger).Panicf", Method, 0},
+ {"(*Logger).Panicln", Method, 0},
+ {"(*Logger).Prefix", Method, 0},
+ {"(*Logger).Print", Method, 0},
+ {"(*Logger).Printf", Method, 0},
+ {"(*Logger).Println", Method, 0},
+ {"(*Logger).SetFlags", Method, 0},
+ {"(*Logger).SetOutput", Method, 5},
+ {"(*Logger).SetPrefix", Method, 0},
+ {"(*Logger).Writer", Method, 12},
+ {"Default", Func, 16},
+ {"Fatal", Func, 0},
+ {"Fatalf", Func, 0},
+ {"Fatalln", Func, 0},
+ {"Flags", Func, 0},
+ {"LUTC", Const, 5},
+ {"Ldate", Const, 0},
+ {"Llongfile", Const, 0},
+ {"Lmicroseconds", Const, 0},
+ {"Lmsgprefix", Const, 14},
+ {"Logger", Type, 0},
+ {"Lshortfile", Const, 0},
+ {"LstdFlags", Const, 0},
+ {"Ltime", Const, 0},
+ {"New", Func, 0},
+ {"Output", Func, 5},
+ {"Panic", Func, 0},
+ {"Panicf", Func, 0},
+ {"Panicln", Func, 0},
+ {"Prefix", Func, 0},
+ {"Print", Func, 0},
+ {"Printf", Func, 0},
+ {"Println", Func, 0},
+ {"SetFlags", Func, 0},
+ {"SetOutput", Func, 0},
+ {"SetPrefix", Func, 0},
+ {"Writer", Func, 13},
+ },
+ "log/slog": {
+ {"(*JSONHandler).Enabled", Method, 21},
+ {"(*JSONHandler).Handle", Method, 21},
+ {"(*JSONHandler).WithAttrs", Method, 21},
+ {"(*JSONHandler).WithGroup", Method, 21},
+ {"(*Level).UnmarshalJSON", Method, 21},
+ {"(*Level).UnmarshalText", Method, 21},
+ {"(*LevelVar).Level", Method, 21},
+ {"(*LevelVar).MarshalText", Method, 21},
+ {"(*LevelVar).Set", Method, 21},
+ {"(*LevelVar).String", Method, 21},
+ {"(*LevelVar).UnmarshalText", Method, 21},
+ {"(*Logger).Debug", Method, 21},
+ {"(*Logger).DebugContext", Method, 21},
+ {"(*Logger).Enabled", Method, 21},
+ {"(*Logger).Error", Method, 21},
+ {"(*Logger).ErrorContext", Method, 21},
+ {"(*Logger).Handler", Method, 21},
+ {"(*Logger).Info", Method, 21},
+ {"(*Logger).InfoContext", Method, 21},
+ {"(*Logger).Log", Method, 21},
+ {"(*Logger).LogAttrs", Method, 21},
+ {"(*Logger).Warn", Method, 21},
+ {"(*Logger).WarnContext", Method, 21},
+ {"(*Logger).With", Method, 21},
+ {"(*Logger).WithGroup", Method, 21},
+ {"(*Record).Add", Method, 21},
+ {"(*Record).AddAttrs", Method, 21},
+ {"(*TextHandler).Enabled", Method, 21},
+ {"(*TextHandler).Handle", Method, 21},
+ {"(*TextHandler).WithAttrs", Method, 21},
+ {"(*TextHandler).WithGroup", Method, 21},
+ {"(Attr).Equal", Method, 21},
+ {"(Attr).String", Method, 21},
+ {"(Kind).String", Method, 21},
+ {"(Level).Level", Method, 21},
+ {"(Level).MarshalJSON", Method, 21},
+ {"(Level).MarshalText", Method, 21},
+ {"(Level).String", Method, 21},
+ {"(Record).Attrs", Method, 21},
+ {"(Record).Clone", Method, 21},
+ {"(Record).NumAttrs", Method, 21},
+ {"(Value).Any", Method, 21},
+ {"(Value).Bool", Method, 21},
+ {"(Value).Duration", Method, 21},
+ {"(Value).Equal", Method, 21},
+ {"(Value).Float64", Method, 21},
+ {"(Value).Group", Method, 21},
+ {"(Value).Int64", Method, 21},
+ {"(Value).Kind", Method, 21},
+ {"(Value).LogValuer", Method, 21},
+ {"(Value).Resolve", Method, 21},
+ {"(Value).String", Method, 21},
+ {"(Value).Time", Method, 21},
+ {"(Value).Uint64", Method, 21},
+ {"Any", Func, 21},
+ {"AnyValue", Func, 21},
+ {"Attr", Type, 21},
+ {"Attr.Key", Field, 21},
+ {"Attr.Value", Field, 21},
+ {"Bool", Func, 21},
+ {"BoolValue", Func, 21},
+ {"Debug", Func, 21},
+ {"DebugContext", Func, 21},
+ {"Default", Func, 21},
+ {"Duration", Func, 21},
+ {"DurationValue", Func, 21},
+ {"Error", Func, 21},
+ {"ErrorContext", Func, 21},
+ {"Float64", Func, 21},
+ {"Float64Value", Func, 21},
+ {"Group", Func, 21},
+ {"GroupValue", Func, 21},
+ {"Handler", Type, 21},
+ {"HandlerOptions", Type, 21},
+ {"HandlerOptions.AddSource", Field, 21},
+ {"HandlerOptions.Level", Field, 21},
+ {"HandlerOptions.ReplaceAttr", Field, 21},
+ {"Info", Func, 21},
+ {"InfoContext", Func, 21},
+ {"Int", Func, 21},
+ {"Int64", Func, 21},
+ {"Int64Value", Func, 21},
+ {"IntValue", Func, 21},
+ {"JSONHandler", Type, 21},
+ {"Kind", Type, 21},
+ {"KindAny", Const, 21},
+ {"KindBool", Const, 21},
+ {"KindDuration", Const, 21},
+ {"KindFloat64", Const, 21},
+ {"KindGroup", Const, 21},
+ {"KindInt64", Const, 21},
+ {"KindLogValuer", Const, 21},
+ {"KindString", Const, 21},
+ {"KindTime", Const, 21},
+ {"KindUint64", Const, 21},
+ {"Level", Type, 21},
+ {"LevelDebug", Const, 21},
+ {"LevelError", Const, 21},
+ {"LevelInfo", Const, 21},
+ {"LevelKey", Const, 21},
+ {"LevelVar", Type, 21},
+ {"LevelWarn", Const, 21},
+ {"Leveler", Type, 21},
+ {"Log", Func, 21},
+ {"LogAttrs", Func, 21},
+ {"LogValuer", Type, 21},
+ {"Logger", Type, 21},
+ {"MessageKey", Const, 21},
+ {"New", Func, 21},
+ {"NewJSONHandler", Func, 21},
+ {"NewLogLogger", Func, 21},
+ {"NewRecord", Func, 21},
+ {"NewTextHandler", Func, 21},
+ {"Record", Type, 21},
+ {"Record.Level", Field, 21},
+ {"Record.Message", Field, 21},
+ {"Record.PC", Field, 21},
+ {"Record.Time", Field, 21},
+ {"SetDefault", Func, 21},
+ {"SetLogLoggerLevel", Func, 22},
+ {"Source", Type, 21},
+ {"Source.File", Field, 21},
+ {"Source.Function", Field, 21},
+ {"Source.Line", Field, 21},
+ {"SourceKey", Const, 21},
+ {"String", Func, 21},
+ {"StringValue", Func, 21},
+ {"TextHandler", Type, 21},
+ {"Time", Func, 21},
+ {"TimeKey", Const, 21},
+ {"TimeValue", Func, 21},
+ {"Uint64", Func, 21},
+ {"Uint64Value", Func, 21},
+ {"Value", Type, 21},
+ {"Warn", Func, 21},
+ {"WarnContext", Func, 21},
+ {"With", Func, 21},
+ },
+ "log/syslog": {
+ {"(*Writer).Alert", Method, 0},
+ {"(*Writer).Close", Method, 0},
+ {"(*Writer).Crit", Method, 0},
+ {"(*Writer).Debug", Method, 0},
+ {"(*Writer).Emerg", Method, 0},
+ {"(*Writer).Err", Method, 0},
+ {"(*Writer).Info", Method, 0},
+ {"(*Writer).Notice", Method, 0},
+ {"(*Writer).Warning", Method, 0},
+ {"(*Writer).Write", Method, 0},
+ {"Dial", Func, 0},
+ {"LOG_ALERT", Const, 0},
+ {"LOG_AUTH", Const, 1},
+ {"LOG_AUTHPRIV", Const, 1},
+ {"LOG_CRIT", Const, 0},
+ {"LOG_CRON", Const, 1},
+ {"LOG_DAEMON", Const, 1},
+ {"LOG_DEBUG", Const, 0},
+ {"LOG_EMERG", Const, 0},
+ {"LOG_ERR", Const, 0},
+ {"LOG_FTP", Const, 1},
+ {"LOG_INFO", Const, 0},
+ {"LOG_KERN", Const, 1},
+ {"LOG_LOCAL0", Const, 1},
+ {"LOG_LOCAL1", Const, 1},
+ {"LOG_LOCAL2", Const, 1},
+ {"LOG_LOCAL3", Const, 1},
+ {"LOG_LOCAL4", Const, 1},
+ {"LOG_LOCAL5", Const, 1},
+ {"LOG_LOCAL6", Const, 1},
+ {"LOG_LOCAL7", Const, 1},
+ {"LOG_LPR", Const, 1},
+ {"LOG_MAIL", Const, 1},
+ {"LOG_NEWS", Const, 1},
+ {"LOG_NOTICE", Const, 0},
+ {"LOG_SYSLOG", Const, 1},
+ {"LOG_USER", Const, 1},
+ {"LOG_UUCP", Const, 1},
+ {"LOG_WARNING", Const, 0},
+ {"New", Func, 0},
+ {"NewLogger", Func, 0},
+ {"Priority", Type, 0},
+ {"Writer", Type, 0},
+ },
+ "maps": {
+ {"Clone", Func, 21},
+ {"Copy", Func, 21},
+ {"DeleteFunc", Func, 21},
+ {"Equal", Func, 21},
+ {"EqualFunc", Func, 21},
+ },
+ "math": {
+ {"Abs", Func, 0},
+ {"Acos", Func, 0},
+ {"Acosh", Func, 0},
+ {"Asin", Func, 0},
+ {"Asinh", Func, 0},
+ {"Atan", Func, 0},
+ {"Atan2", Func, 0},
+ {"Atanh", Func, 0},
+ {"Cbrt", Func, 0},
+ {"Ceil", Func, 0},
+ {"Copysign", Func, 0},
+ {"Cos", Func, 0},
+ {"Cosh", Func, 0},
+ {"Dim", Func, 0},
+ {"E", Const, 0},
+ {"Erf", Func, 0},
+ {"Erfc", Func, 0},
+ {"Erfcinv", Func, 10},
+ {"Erfinv", Func, 10},
+ {"Exp", Func, 0},
+ {"Exp2", Func, 0},
+ {"Expm1", Func, 0},
+ {"FMA", Func, 14},
+ {"Float32bits", Func, 0},
+ {"Float32frombits", Func, 0},
+ {"Float64bits", Func, 0},
+ {"Float64frombits", Func, 0},
+ {"Floor", Func, 0},
+ {"Frexp", Func, 0},
+ {"Gamma", Func, 0},
+ {"Hypot", Func, 0},
+ {"Ilogb", Func, 0},
+ {"Inf", Func, 0},
+ {"IsInf", Func, 0},
+ {"IsNaN", Func, 0},
+ {"J0", Func, 0},
+ {"J1", Func, 0},
+ {"Jn", Func, 0},
+ {"Ldexp", Func, 0},
+ {"Lgamma", Func, 0},
+ {"Ln10", Const, 0},
+ {"Ln2", Const, 0},
+ {"Log", Func, 0},
+ {"Log10", Func, 0},
+ {"Log10E", Const, 0},
+ {"Log1p", Func, 0},
+ {"Log2", Func, 0},
+ {"Log2E", Const, 0},
+ {"Logb", Func, 0},
+ {"Max", Func, 0},
+ {"MaxFloat32", Const, 0},
+ {"MaxFloat64", Const, 0},
+ {"MaxInt", Const, 17},
+ {"MaxInt16", Const, 0},
+ {"MaxInt32", Const, 0},
+ {"MaxInt64", Const, 0},
+ {"MaxInt8", Const, 0},
+ {"MaxUint", Const, 17},
+ {"MaxUint16", Const, 0},
+ {"MaxUint32", Const, 0},
+ {"MaxUint64", Const, 0},
+ {"MaxUint8", Const, 0},
+ {"Min", Func, 0},
+ {"MinInt", Const, 17},
+ {"MinInt16", Const, 0},
+ {"MinInt32", Const, 0},
+ {"MinInt64", Const, 0},
+ {"MinInt8", Const, 0},
+ {"Mod", Func, 0},
+ {"Modf", Func, 0},
+ {"NaN", Func, 0},
+ {"Nextafter", Func, 0},
+ {"Nextafter32", Func, 4},
+ {"Phi", Const, 0},
+ {"Pi", Const, 0},
+ {"Pow", Func, 0},
+ {"Pow10", Func, 0},
+ {"Remainder", Func, 0},
+ {"Round", Func, 10},
+ {"RoundToEven", Func, 10},
+ {"Signbit", Func, 0},
+ {"Sin", Func, 0},
+ {"Sincos", Func, 0},
+ {"Sinh", Func, 0},
+ {"SmallestNonzeroFloat32", Const, 0},
+ {"SmallestNonzeroFloat64", Const, 0},
+ {"Sqrt", Func, 0},
+ {"Sqrt2", Const, 0},
+ {"SqrtE", Const, 0},
+ {"SqrtPhi", Const, 0},
+ {"SqrtPi", Const, 0},
+ {"Tan", Func, 0},
+ {"Tanh", Func, 0},
+ {"Trunc", Func, 0},
+ {"Y0", Func, 0},
+ {"Y1", Func, 0},
+ {"Yn", Func, 0},
+ },
+ "math/big": {
+ {"(*Float).Abs", Method, 5},
+ {"(*Float).Acc", Method, 5},
+ {"(*Float).Add", Method, 5},
+ {"(*Float).Append", Method, 5},
+ {"(*Float).Cmp", Method, 5},
+ {"(*Float).Copy", Method, 5},
+ {"(*Float).Float32", Method, 5},
+ {"(*Float).Float64", Method, 5},
+ {"(*Float).Format", Method, 5},
+ {"(*Float).GobDecode", Method, 7},
+ {"(*Float).GobEncode", Method, 7},
+ {"(*Float).Int", Method, 5},
+ {"(*Float).Int64", Method, 5},
+ {"(*Float).IsInf", Method, 5},
+ {"(*Float).IsInt", Method, 5},
+ {"(*Float).MantExp", Method, 5},
+ {"(*Float).MarshalText", Method, 6},
+ {"(*Float).MinPrec", Method, 5},
+ {"(*Float).Mode", Method, 5},
+ {"(*Float).Mul", Method, 5},
+ {"(*Float).Neg", Method, 5},
+ {"(*Float).Parse", Method, 5},
+ {"(*Float).Prec", Method, 5},
+ {"(*Float).Quo", Method, 5},
+ {"(*Float).Rat", Method, 5},
+ {"(*Float).Scan", Method, 8},
+ {"(*Float).Set", Method, 5},
+ {"(*Float).SetFloat64", Method, 5},
+ {"(*Float).SetInf", Method, 5},
+ {"(*Float).SetInt", Method, 5},
+ {"(*Float).SetInt64", Method, 5},
+ {"(*Float).SetMantExp", Method, 5},
+ {"(*Float).SetMode", Method, 5},
+ {"(*Float).SetPrec", Method, 5},
+ {"(*Float).SetRat", Method, 5},
+ {"(*Float).SetString", Method, 5},
+ {"(*Float).SetUint64", Method, 5},
+ {"(*Float).Sign", Method, 5},
+ {"(*Float).Signbit", Method, 5},
+ {"(*Float).Sqrt", Method, 10},
+ {"(*Float).String", Method, 5},
+ {"(*Float).Sub", Method, 5},
+ {"(*Float).Text", Method, 5},
+ {"(*Float).Uint64", Method, 5},
+ {"(*Float).UnmarshalText", Method, 6},
+ {"(*Int).Abs", Method, 0},
+ {"(*Int).Add", Method, 0},
+ {"(*Int).And", Method, 0},
+ {"(*Int).AndNot", Method, 0},
+ {"(*Int).Append", Method, 6},
+ {"(*Int).Binomial", Method, 0},
+ {"(*Int).Bit", Method, 0},
+ {"(*Int).BitLen", Method, 0},
+ {"(*Int).Bits", Method, 0},
+ {"(*Int).Bytes", Method, 0},
+ {"(*Int).Cmp", Method, 0},
+ {"(*Int).CmpAbs", Method, 10},
+ {"(*Int).Div", Method, 0},
+ {"(*Int).DivMod", Method, 0},
+ {"(*Int).Exp", Method, 0},
+ {"(*Int).FillBytes", Method, 15},
+ {"(*Int).Float64", Method, 21},
+ {"(*Int).Format", Method, 0},
+ {"(*Int).GCD", Method, 0},
+ {"(*Int).GobDecode", Method, 0},
+ {"(*Int).GobEncode", Method, 0},
+ {"(*Int).Int64", Method, 0},
+ {"(*Int).IsInt64", Method, 9},
+ {"(*Int).IsUint64", Method, 9},
+ {"(*Int).Lsh", Method, 0},
+ {"(*Int).MarshalJSON", Method, 1},
+ {"(*Int).MarshalText", Method, 3},
+ {"(*Int).Mod", Method, 0},
+ {"(*Int).ModInverse", Method, 0},
+ {"(*Int).ModSqrt", Method, 5},
+ {"(*Int).Mul", Method, 0},
+ {"(*Int).MulRange", Method, 0},
+ {"(*Int).Neg", Method, 0},
+ {"(*Int).Not", Method, 0},
+ {"(*Int).Or", Method, 0},
+ {"(*Int).ProbablyPrime", Method, 0},
+ {"(*Int).Quo", Method, 0},
+ {"(*Int).QuoRem", Method, 0},
+ {"(*Int).Rand", Method, 0},
+ {"(*Int).Rem", Method, 0},
+ {"(*Int).Rsh", Method, 0},
+ {"(*Int).Scan", Method, 0},
+ {"(*Int).Set", Method, 0},
+ {"(*Int).SetBit", Method, 0},
+ {"(*Int).SetBits", Method, 0},
+ {"(*Int).SetBytes", Method, 0},
+ {"(*Int).SetInt64", Method, 0},
+ {"(*Int).SetString", Method, 0},
+ {"(*Int).SetUint64", Method, 1},
+ {"(*Int).Sign", Method, 0},
+ {"(*Int).Sqrt", Method, 8},
+ {"(*Int).String", Method, 0},
+ {"(*Int).Sub", Method, 0},
+ {"(*Int).Text", Method, 6},
+ {"(*Int).TrailingZeroBits", Method, 13},
+ {"(*Int).Uint64", Method, 1},
+ {"(*Int).UnmarshalJSON", Method, 1},
+ {"(*Int).UnmarshalText", Method, 3},
+ {"(*Int).Xor", Method, 0},
+ {"(*Rat).Abs", Method, 0},
+ {"(*Rat).Add", Method, 0},
+ {"(*Rat).Cmp", Method, 0},
+ {"(*Rat).Denom", Method, 0},
+ {"(*Rat).Float32", Method, 4},
+ {"(*Rat).Float64", Method, 1},
+ {"(*Rat).FloatPrec", Method, 22},
+ {"(*Rat).FloatString", Method, 0},
+ {"(*Rat).GobDecode", Method, 0},
+ {"(*Rat).GobEncode", Method, 0},
+ {"(*Rat).Inv", Method, 0},
+ {"(*Rat).IsInt", Method, 0},
+ {"(*Rat).MarshalText", Method, 3},
+ {"(*Rat).Mul", Method, 0},
+ {"(*Rat).Neg", Method, 0},
+ {"(*Rat).Num", Method, 0},
+ {"(*Rat).Quo", Method, 0},
+ {"(*Rat).RatString", Method, 0},
+ {"(*Rat).Scan", Method, 0},
+ {"(*Rat).Set", Method, 0},
+ {"(*Rat).SetFloat64", Method, 1},
+ {"(*Rat).SetFrac", Method, 0},
+ {"(*Rat).SetFrac64", Method, 0},
+ {"(*Rat).SetInt", Method, 0},
+ {"(*Rat).SetInt64", Method, 0},
+ {"(*Rat).SetString", Method, 0},
+ {"(*Rat).SetUint64", Method, 13},
+ {"(*Rat).Sign", Method, 0},
+ {"(*Rat).String", Method, 0},
+ {"(*Rat).Sub", Method, 0},
+ {"(*Rat).UnmarshalText", Method, 3},
+ {"(Accuracy).String", Method, 5},
+ {"(ErrNaN).Error", Method, 5},
+ {"(RoundingMode).String", Method, 5},
+ {"Above", Const, 5},
+ {"Accuracy", Type, 5},
+ {"AwayFromZero", Const, 5},
+ {"Below", Const, 5},
+ {"ErrNaN", Type, 5},
+ {"Exact", Const, 5},
+ {"Float", Type, 5},
+ {"Int", Type, 0},
+ {"Jacobi", Func, 5},
+ {"MaxBase", Const, 0},
+ {"MaxExp", Const, 5},
+ {"MaxPrec", Const, 5},
+ {"MinExp", Const, 5},
+ {"NewFloat", Func, 5},
+ {"NewInt", Func, 0},
+ {"NewRat", Func, 0},
+ {"ParseFloat", Func, 5},
+ {"Rat", Type, 0},
+ {"RoundingMode", Type, 5},
+ {"ToNearestAway", Const, 5},
+ {"ToNearestEven", Const, 5},
+ {"ToNegativeInf", Const, 5},
+ {"ToPositiveInf", Const, 5},
+ {"ToZero", Const, 5},
+ {"Word", Type, 0},
+ },
+ "math/bits": {
+ {"Add", Func, 12},
+ {"Add32", Func, 12},
+ {"Add64", Func, 12},
+ {"Div", Func, 12},
+ {"Div32", Func, 12},
+ {"Div64", Func, 12},
+ {"LeadingZeros", Func, 9},
+ {"LeadingZeros16", Func, 9},
+ {"LeadingZeros32", Func, 9},
+ {"LeadingZeros64", Func, 9},
+ {"LeadingZeros8", Func, 9},
+ {"Len", Func, 9},
+ {"Len16", Func, 9},
+ {"Len32", Func, 9},
+ {"Len64", Func, 9},
+ {"Len8", Func, 9},
+ {"Mul", Func, 12},
+ {"Mul32", Func, 12},
+ {"Mul64", Func, 12},
+ {"OnesCount", Func, 9},
+ {"OnesCount16", Func, 9},
+ {"OnesCount32", Func, 9},
+ {"OnesCount64", Func, 9},
+ {"OnesCount8", Func, 9},
+ {"Rem", Func, 14},
+ {"Rem32", Func, 14},
+ {"Rem64", Func, 14},
+ {"Reverse", Func, 9},
+ {"Reverse16", Func, 9},
+ {"Reverse32", Func, 9},
+ {"Reverse64", Func, 9},
+ {"Reverse8", Func, 9},
+ {"ReverseBytes", Func, 9},
+ {"ReverseBytes16", Func, 9},
+ {"ReverseBytes32", Func, 9},
+ {"ReverseBytes64", Func, 9},
+ {"RotateLeft", Func, 9},
+ {"RotateLeft16", Func, 9},
+ {"RotateLeft32", Func, 9},
+ {"RotateLeft64", Func, 9},
+ {"RotateLeft8", Func, 9},
+ {"Sub", Func, 12},
+ {"Sub32", Func, 12},
+ {"Sub64", Func, 12},
+ {"TrailingZeros", Func, 9},
+ {"TrailingZeros16", Func, 9},
+ {"TrailingZeros32", Func, 9},
+ {"TrailingZeros64", Func, 9},
+ {"TrailingZeros8", Func, 9},
+ {"UintSize", Const, 9},
+ },
+ "math/cmplx": {
+ {"Abs", Func, 0},
+ {"Acos", Func, 0},
+ {"Acosh", Func, 0},
+ {"Asin", Func, 0},
+ {"Asinh", Func, 0},
+ {"Atan", Func, 0},
+ {"Atanh", Func, 0},
+ {"Conj", Func, 0},
+ {"Cos", Func, 0},
+ {"Cosh", Func, 0},
+ {"Cot", Func, 0},
+ {"Exp", Func, 0},
+ {"Inf", Func, 0},
+ {"IsInf", Func, 0},
+ {"IsNaN", Func, 0},
+ {"Log", Func, 0},
+ {"Log10", Func, 0},
+ {"NaN", Func, 0},
+ {"Phase", Func, 0},
+ {"Polar", Func, 0},
+ {"Pow", Func, 0},
+ {"Rect", Func, 0},
+ {"Sin", Func, 0},
+ {"Sinh", Func, 0},
+ {"Sqrt", Func, 0},
+ {"Tan", Func, 0},
+ {"Tanh", Func, 0},
+ },
+ "math/rand": {
+ {"(*Rand).ExpFloat64", Method, 0},
+ {"(*Rand).Float32", Method, 0},
+ {"(*Rand).Float64", Method, 0},
+ {"(*Rand).Int", Method, 0},
+ {"(*Rand).Int31", Method, 0},
+ {"(*Rand).Int31n", Method, 0},
+ {"(*Rand).Int63", Method, 0},
+ {"(*Rand).Int63n", Method, 0},
+ {"(*Rand).Intn", Method, 0},
+ {"(*Rand).NormFloat64", Method, 0},
+ {"(*Rand).Perm", Method, 0},
+ {"(*Rand).Read", Method, 6},
+ {"(*Rand).Seed", Method, 0},
+ {"(*Rand).Shuffle", Method, 10},
+ {"(*Rand).Uint32", Method, 0},
+ {"(*Rand).Uint64", Method, 8},
+ {"(*Zipf).Uint64", Method, 0},
+ {"ExpFloat64", Func, 0},
+ {"Float32", Func, 0},
+ {"Float64", Func, 0},
+ {"Int", Func, 0},
+ {"Int31", Func, 0},
+ {"Int31n", Func, 0},
+ {"Int63", Func, 0},
+ {"Int63n", Func, 0},
+ {"Intn", Func, 0},
+ {"New", Func, 0},
+ {"NewSource", Func, 0},
+ {"NewZipf", Func, 0},
+ {"NormFloat64", Func, 0},
+ {"Perm", Func, 0},
+ {"Rand", Type, 0},
+ {"Read", Func, 6},
+ {"Seed", Func, 0},
+ {"Shuffle", Func, 10},
+ {"Source", Type, 0},
+ {"Source64", Type, 8},
+ {"Uint32", Func, 0},
+ {"Uint64", Func, 8},
+ {"Zipf", Type, 0},
+ },
+ "math/rand/v2": {
+ {"(*ChaCha8).MarshalBinary", Method, 22},
+ {"(*ChaCha8).Seed", Method, 22},
+ {"(*ChaCha8).Uint64", Method, 22},
+ {"(*ChaCha8).UnmarshalBinary", Method, 22},
+ {"(*PCG).MarshalBinary", Method, 22},
+ {"(*PCG).Seed", Method, 22},
+ {"(*PCG).Uint64", Method, 22},
+ {"(*PCG).UnmarshalBinary", Method, 22},
+ {"(*Rand).ExpFloat64", Method, 22},
+ {"(*Rand).Float32", Method, 22},
+ {"(*Rand).Float64", Method, 22},
+ {"(*Rand).Int", Method, 22},
+ {"(*Rand).Int32", Method, 22},
+ {"(*Rand).Int32N", Method, 22},
+ {"(*Rand).Int64", Method, 22},
+ {"(*Rand).Int64N", Method, 22},
+ {"(*Rand).IntN", Method, 22},
+ {"(*Rand).NormFloat64", Method, 22},
+ {"(*Rand).Perm", Method, 22},
+ {"(*Rand).Shuffle", Method, 22},
+ {"(*Rand).Uint32", Method, 22},
+ {"(*Rand).Uint32N", Method, 22},
+ {"(*Rand).Uint64", Method, 22},
+ {"(*Rand).Uint64N", Method, 22},
+ {"(*Rand).UintN", Method, 22},
+ {"(*Zipf).Uint64", Method, 22},
+ {"ChaCha8", Type, 22},
+ {"ExpFloat64", Func, 22},
+ {"Float32", Func, 22},
+ {"Float64", Func, 22},
+ {"Int", Func, 22},
+ {"Int32", Func, 22},
+ {"Int32N", Func, 22},
+ {"Int64", Func, 22},
+ {"Int64N", Func, 22},
+ {"IntN", Func, 22},
+ {"N", Func, 22},
+ {"New", Func, 22},
+ {"NewChaCha8", Func, 22},
+ {"NewPCG", Func, 22},
+ {"NewZipf", Func, 22},
+ {"NormFloat64", Func, 22},
+ {"PCG", Type, 22},
+ {"Perm", Func, 22},
+ {"Rand", Type, 22},
+ {"Shuffle", Func, 22},
+ {"Source", Type, 22},
+ {"Uint32", Func, 22},
+ {"Uint32N", Func, 22},
+ {"Uint64", Func, 22},
+ {"Uint64N", Func, 22},
+ {"UintN", Func, 22},
+ {"Zipf", Type, 22},
+ },
+ "mime": {
+ {"(*WordDecoder).Decode", Method, 5},
+ {"(*WordDecoder).DecodeHeader", Method, 5},
+ {"(WordEncoder).Encode", Method, 5},
+ {"AddExtensionType", Func, 0},
+ {"BEncoding", Const, 5},
+ {"ErrInvalidMediaParameter", Var, 9},
+ {"ExtensionsByType", Func, 5},
+ {"FormatMediaType", Func, 0},
+ {"ParseMediaType", Func, 0},
+ {"QEncoding", Const, 5},
+ {"TypeByExtension", Func, 0},
+ {"WordDecoder", Type, 5},
+ {"WordDecoder.CharsetReader", Field, 5},
+ {"WordEncoder", Type, 5},
+ },
+ "mime/multipart": {
+ {"(*FileHeader).Open", Method, 0},
+ {"(*Form).RemoveAll", Method, 0},
+ {"(*Part).Close", Method, 0},
+ {"(*Part).FileName", Method, 0},
+ {"(*Part).FormName", Method, 0},
+ {"(*Part).Read", Method, 0},
+ {"(*Reader).NextPart", Method, 0},
+ {"(*Reader).NextRawPart", Method, 14},
+ {"(*Reader).ReadForm", Method, 0},
+ {"(*Writer).Boundary", Method, 0},
+ {"(*Writer).Close", Method, 0},
+ {"(*Writer).CreateFormField", Method, 0},
+ {"(*Writer).CreateFormFile", Method, 0},
+ {"(*Writer).CreatePart", Method, 0},
+ {"(*Writer).FormDataContentType", Method, 0},
+ {"(*Writer).SetBoundary", Method, 1},
+ {"(*Writer).WriteField", Method, 0},
+ {"ErrMessageTooLarge", Var, 9},
+ {"File", Type, 0},
+ {"FileHeader", Type, 0},
+ {"FileHeader.Filename", Field, 0},
+ {"FileHeader.Header", Field, 0},
+ {"FileHeader.Size", Field, 9},
+ {"Form", Type, 0},
+ {"Form.File", Field, 0},
+ {"Form.Value", Field, 0},
+ {"NewReader", Func, 0},
+ {"NewWriter", Func, 0},
+ {"Part", Type, 0},
+ {"Part.Header", Field, 0},
+ {"Reader", Type, 0},
+ {"Writer", Type, 0},
+ },
+ "mime/quotedprintable": {
+ {"(*Reader).Read", Method, 5},
+ {"(*Writer).Close", Method, 5},
+ {"(*Writer).Write", Method, 5},
+ {"NewReader", Func, 5},
+ {"NewWriter", Func, 5},
+ {"Reader", Type, 5},
+ {"Writer", Type, 5},
+ {"Writer.Binary", Field, 5},
+ },
+ "net": {
+ {"(*AddrError).Error", Method, 0},
+ {"(*AddrError).Temporary", Method, 0},
+ {"(*AddrError).Timeout", Method, 0},
+ {"(*Buffers).Read", Method, 8},
+ {"(*Buffers).WriteTo", Method, 8},
+ {"(*DNSConfigError).Error", Method, 0},
+ {"(*DNSConfigError).Temporary", Method, 0},
+ {"(*DNSConfigError).Timeout", Method, 0},
+ {"(*DNSConfigError).Unwrap", Method, 13},
+ {"(*DNSError).Error", Method, 0},
+ {"(*DNSError).Temporary", Method, 0},
+ {"(*DNSError).Timeout", Method, 0},
+ {"(*Dialer).Dial", Method, 1},
+ {"(*Dialer).DialContext", Method, 7},
+ {"(*Dialer).MultipathTCP", Method, 21},
+ {"(*Dialer).SetMultipathTCP", Method, 21},
+ {"(*IP).UnmarshalText", Method, 2},
+ {"(*IPAddr).Network", Method, 0},
+ {"(*IPAddr).String", Method, 0},
+ {"(*IPConn).Close", Method, 0},
+ {"(*IPConn).File", Method, 0},
+ {"(*IPConn).LocalAddr", Method, 0},
+ {"(*IPConn).Read", Method, 0},
+ {"(*IPConn).ReadFrom", Method, 0},
+ {"(*IPConn).ReadFromIP", Method, 0},
+ {"(*IPConn).ReadMsgIP", Method, 1},
+ {"(*IPConn).RemoteAddr", Method, 0},
+ {"(*IPConn).SetDeadline", Method, 0},
+ {"(*IPConn).SetReadBuffer", Method, 0},
+ {"(*IPConn).SetReadDeadline", Method, 0},
+ {"(*IPConn).SetWriteBuffer", Method, 0},
+ {"(*IPConn).SetWriteDeadline", Method, 0},
+ {"(*IPConn).SyscallConn", Method, 9},
+ {"(*IPConn).Write", Method, 0},
+ {"(*IPConn).WriteMsgIP", Method, 1},
+ {"(*IPConn).WriteTo", Method, 0},
+ {"(*IPConn).WriteToIP", Method, 0},
+ {"(*IPNet).Contains", Method, 0},
+ {"(*IPNet).Network", Method, 0},
+ {"(*IPNet).String", Method, 0},
+ {"(*Interface).Addrs", Method, 0},
+ {"(*Interface).MulticastAddrs", Method, 0},
+ {"(*ListenConfig).Listen", Method, 11},
+ {"(*ListenConfig).ListenPacket", Method, 11},
+ {"(*ListenConfig).MultipathTCP", Method, 21},
+ {"(*ListenConfig).SetMultipathTCP", Method, 21},
+ {"(*OpError).Error", Method, 0},
+ {"(*OpError).Temporary", Method, 0},
+ {"(*OpError).Timeout", Method, 0},
+ {"(*OpError).Unwrap", Method, 13},
+ {"(*ParseError).Error", Method, 0},
+ {"(*ParseError).Temporary", Method, 17},
+ {"(*ParseError).Timeout", Method, 17},
+ {"(*Resolver).LookupAddr", Method, 8},
+ {"(*Resolver).LookupCNAME", Method, 8},
+ {"(*Resolver).LookupHost", Method, 8},
+ {"(*Resolver).LookupIP", Method, 15},
+ {"(*Resolver).LookupIPAddr", Method, 8},
+ {"(*Resolver).LookupMX", Method, 8},
+ {"(*Resolver).LookupNS", Method, 8},
+ {"(*Resolver).LookupNetIP", Method, 18},
+ {"(*Resolver).LookupPort", Method, 8},
+ {"(*Resolver).LookupSRV", Method, 8},
+ {"(*Resolver).LookupTXT", Method, 8},
+ {"(*TCPAddr).AddrPort", Method, 18},
+ {"(*TCPAddr).Network", Method, 0},
+ {"(*TCPAddr).String", Method, 0},
+ {"(*TCPConn).Close", Method, 0},
+ {"(*TCPConn).CloseRead", Method, 0},
+ {"(*TCPConn).CloseWrite", Method, 0},
+ {"(*TCPConn).File", Method, 0},
+ {"(*TCPConn).LocalAddr", Method, 0},
+ {"(*TCPConn).MultipathTCP", Method, 21},
+ {"(*TCPConn).Read", Method, 0},
+ {"(*TCPConn).ReadFrom", Method, 0},
+ {"(*TCPConn).RemoteAddr", Method, 0},
+ {"(*TCPConn).SetDeadline", Method, 0},
+ {"(*TCPConn).SetKeepAlive", Method, 0},
+ {"(*TCPConn).SetKeepAlivePeriod", Method, 2},
+ {"(*TCPConn).SetLinger", Method, 0},
+ {"(*TCPConn).SetNoDelay", Method, 0},
+ {"(*TCPConn).SetReadBuffer", Method, 0},
+ {"(*TCPConn).SetReadDeadline", Method, 0},
+ {"(*TCPConn).SetWriteBuffer", Method, 0},
+ {"(*TCPConn).SetWriteDeadline", Method, 0},
+ {"(*TCPConn).SyscallConn", Method, 9},
+ {"(*TCPConn).Write", Method, 0},
+ {"(*TCPConn).WriteTo", Method, 22},
+ {"(*TCPListener).Accept", Method, 0},
+ {"(*TCPListener).AcceptTCP", Method, 0},
+ {"(*TCPListener).Addr", Method, 0},
+ {"(*TCPListener).Close", Method, 0},
+ {"(*TCPListener).File", Method, 0},
+ {"(*TCPListener).SetDeadline", Method, 0},
+ {"(*TCPListener).SyscallConn", Method, 10},
+ {"(*UDPAddr).AddrPort", Method, 18},
+ {"(*UDPAddr).Network", Method, 0},
+ {"(*UDPAddr).String", Method, 0},
+ {"(*UDPConn).Close", Method, 0},
+ {"(*UDPConn).File", Method, 0},
+ {"(*UDPConn).LocalAddr", Method, 0},
+ {"(*UDPConn).Read", Method, 0},
+ {"(*UDPConn).ReadFrom", Method, 0},
+ {"(*UDPConn).ReadFromUDP", Method, 0},
+ {"(*UDPConn).ReadFromUDPAddrPort", Method, 18},
+ {"(*UDPConn).ReadMsgUDP", Method, 1},
+ {"(*UDPConn).ReadMsgUDPAddrPort", Method, 18},
+ {"(*UDPConn).RemoteAddr", Method, 0},
+ {"(*UDPConn).SetDeadline", Method, 0},
+ {"(*UDPConn).SetReadBuffer", Method, 0},
+ {"(*UDPConn).SetReadDeadline", Method, 0},
+ {"(*UDPConn).SetWriteBuffer", Method, 0},
+ {"(*UDPConn).SetWriteDeadline", Method, 0},
+ {"(*UDPConn).SyscallConn", Method, 9},
+ {"(*UDPConn).Write", Method, 0},
+ {"(*UDPConn).WriteMsgUDP", Method, 1},
+ {"(*UDPConn).WriteMsgUDPAddrPort", Method, 18},
+ {"(*UDPConn).WriteTo", Method, 0},
+ {"(*UDPConn).WriteToUDP", Method, 0},
+ {"(*UDPConn).WriteToUDPAddrPort", Method, 18},
+ {"(*UnixAddr).Network", Method, 0},
+ {"(*UnixAddr).String", Method, 0},
+ {"(*UnixConn).Close", Method, 0},
+ {"(*UnixConn).CloseRead", Method, 1},
+ {"(*UnixConn).CloseWrite", Method, 1},
+ {"(*UnixConn).File", Method, 0},
+ {"(*UnixConn).LocalAddr", Method, 0},
+ {"(*UnixConn).Read", Method, 0},
+ {"(*UnixConn).ReadFrom", Method, 0},
+ {"(*UnixConn).ReadFromUnix", Method, 0},
+ {"(*UnixConn).ReadMsgUnix", Method, 0},
+ {"(*UnixConn).RemoteAddr", Method, 0},
+ {"(*UnixConn).SetDeadline", Method, 0},
+ {"(*UnixConn).SetReadBuffer", Method, 0},
+ {"(*UnixConn).SetReadDeadline", Method, 0},
+ {"(*UnixConn).SetWriteBuffer", Method, 0},
+ {"(*UnixConn).SetWriteDeadline", Method, 0},
+ {"(*UnixConn).SyscallConn", Method, 9},
+ {"(*UnixConn).Write", Method, 0},
+ {"(*UnixConn).WriteMsgUnix", Method, 0},
+ {"(*UnixConn).WriteTo", Method, 0},
+ {"(*UnixConn).WriteToUnix", Method, 0},
+ {"(*UnixListener).Accept", Method, 0},
+ {"(*UnixListener).AcceptUnix", Method, 0},
+ {"(*UnixListener).Addr", Method, 0},
+ {"(*UnixListener).Close", Method, 0},
+ {"(*UnixListener).File", Method, 0},
+ {"(*UnixListener).SetDeadline", Method, 0},
+ {"(*UnixListener).SetUnlinkOnClose", Method, 8},
+ {"(*UnixListener).SyscallConn", Method, 10},
+ {"(Flags).String", Method, 0},
+ {"(HardwareAddr).String", Method, 0},
+ {"(IP).DefaultMask", Method, 0},
+ {"(IP).Equal", Method, 0},
+ {"(IP).IsGlobalUnicast", Method, 0},
+ {"(IP).IsInterfaceLocalMulticast", Method, 0},
+ {"(IP).IsLinkLocalMulticast", Method, 0},
+ {"(IP).IsLinkLocalUnicast", Method, 0},
+ {"(IP).IsLoopback", Method, 0},
+ {"(IP).IsMulticast", Method, 0},
+ {"(IP).IsPrivate", Method, 17},
+ {"(IP).IsUnspecified", Method, 0},
+ {"(IP).MarshalText", Method, 2},
+ {"(IP).Mask", Method, 0},
+ {"(IP).String", Method, 0},
+ {"(IP).To16", Method, 0},
+ {"(IP).To4", Method, 0},
+ {"(IPMask).Size", Method, 0},
+ {"(IPMask).String", Method, 0},
+ {"(InvalidAddrError).Error", Method, 0},
+ {"(InvalidAddrError).Temporary", Method, 0},
+ {"(InvalidAddrError).Timeout", Method, 0},
+ {"(UnknownNetworkError).Error", Method, 0},
+ {"(UnknownNetworkError).Temporary", Method, 0},
+ {"(UnknownNetworkError).Timeout", Method, 0},
+ {"Addr", Type, 0},
+ {"AddrError", Type, 0},
+ {"AddrError.Addr", Field, 0},
+ {"AddrError.Err", Field, 0},
+ {"Buffers", Type, 8},
+ {"CIDRMask", Func, 0},
+ {"Conn", Type, 0},
+ {"DNSConfigError", Type, 0},
+ {"DNSConfigError.Err", Field, 0},
+ {"DNSError", Type, 0},
+ {"DNSError.Err", Field, 0},
+ {"DNSError.IsNotFound", Field, 13},
+ {"DNSError.IsTemporary", Field, 6},
+ {"DNSError.IsTimeout", Field, 0},
+ {"DNSError.Name", Field, 0},
+ {"DNSError.Server", Field, 0},
+ {"DefaultResolver", Var, 8},
+ {"Dial", Func, 0},
+ {"DialIP", Func, 0},
+ {"DialTCP", Func, 0},
+ {"DialTimeout", Func, 0},
+ {"DialUDP", Func, 0},
+ {"DialUnix", Func, 0},
+ {"Dialer", Type, 1},
+ {"Dialer.Cancel", Field, 6},
+ {"Dialer.Control", Field, 11},
+ {"Dialer.ControlContext", Field, 20},
+ {"Dialer.Deadline", Field, 1},
+ {"Dialer.DualStack", Field, 2},
+ {"Dialer.FallbackDelay", Field, 5},
+ {"Dialer.KeepAlive", Field, 3},
+ {"Dialer.LocalAddr", Field, 1},
+ {"Dialer.Resolver", Field, 8},
+ {"Dialer.Timeout", Field, 1},
+ {"ErrClosed", Var, 16},
+ {"ErrWriteToConnected", Var, 0},
+ {"Error", Type, 0},
+ {"FileConn", Func, 0},
+ {"FileListener", Func, 0},
+ {"FilePacketConn", Func, 0},
+ {"FlagBroadcast", Const, 0},
+ {"FlagLoopback", Const, 0},
+ {"FlagMulticast", Const, 0},
+ {"FlagPointToPoint", Const, 0},
+ {"FlagRunning", Const, 20},
+ {"FlagUp", Const, 0},
+ {"Flags", Type, 0},
+ {"HardwareAddr", Type, 0},
+ {"IP", Type, 0},
+ {"IPAddr", Type, 0},
+ {"IPAddr.IP", Field, 0},
+ {"IPAddr.Zone", Field, 1},
+ {"IPConn", Type, 0},
+ {"IPMask", Type, 0},
+ {"IPNet", Type, 0},
+ {"IPNet.IP", Field, 0},
+ {"IPNet.Mask", Field, 0},
+ {"IPv4", Func, 0},
+ {"IPv4Mask", Func, 0},
+ {"IPv4allrouter", Var, 0},
+ {"IPv4allsys", Var, 0},
+ {"IPv4bcast", Var, 0},
+ {"IPv4len", Const, 0},
+ {"IPv4zero", Var, 0},
+ {"IPv6interfacelocalallnodes", Var, 0},
+ {"IPv6len", Const, 0},
+ {"IPv6linklocalallnodes", Var, 0},
+ {"IPv6linklocalallrouters", Var, 0},
+ {"IPv6loopback", Var, 0},
+ {"IPv6unspecified", Var, 0},
+ {"IPv6zero", Var, 0},
+ {"Interface", Type, 0},
+ {"Interface.Flags", Field, 0},
+ {"Interface.HardwareAddr", Field, 0},
+ {"Interface.Index", Field, 0},
+ {"Interface.MTU", Field, 0},
+ {"Interface.Name", Field, 0},
+ {"InterfaceAddrs", Func, 0},
+ {"InterfaceByIndex", Func, 0},
+ {"InterfaceByName", Func, 0},
+ {"Interfaces", Func, 0},
+ {"InvalidAddrError", Type, 0},
+ {"JoinHostPort", Func, 0},
+ {"Listen", Func, 0},
+ {"ListenConfig", Type, 11},
+ {"ListenConfig.Control", Field, 11},
+ {"ListenConfig.KeepAlive", Field, 13},
+ {"ListenIP", Func, 0},
+ {"ListenMulticastUDP", Func, 0},
+ {"ListenPacket", Func, 0},
+ {"ListenTCP", Func, 0},
+ {"ListenUDP", Func, 0},
+ {"ListenUnix", Func, 0},
+ {"ListenUnixgram", Func, 0},
+ {"Listener", Type, 0},
+ {"LookupAddr", Func, 0},
+ {"LookupCNAME", Func, 0},
+ {"LookupHost", Func, 0},
+ {"LookupIP", Func, 0},
+ {"LookupMX", Func, 0},
+ {"LookupNS", Func, 1},
+ {"LookupPort", Func, 0},
+ {"LookupSRV", Func, 0},
+ {"LookupTXT", Func, 0},
+ {"MX", Type, 0},
+ {"MX.Host", Field, 0},
+ {"MX.Pref", Field, 0},
+ {"NS", Type, 1},
+ {"NS.Host", Field, 1},
+ {"OpError", Type, 0},
+ {"OpError.Addr", Field, 0},
+ {"OpError.Err", Field, 0},
+ {"OpError.Net", Field, 0},
+ {"OpError.Op", Field, 0},
+ {"OpError.Source", Field, 5},
+ {"PacketConn", Type, 0},
+ {"ParseCIDR", Func, 0},
+ {"ParseError", Type, 0},
+ {"ParseError.Text", Field, 0},
+ {"ParseError.Type", Field, 0},
+ {"ParseIP", Func, 0},
+ {"ParseMAC", Func, 0},
+ {"Pipe", Func, 0},
+ {"ResolveIPAddr", Func, 0},
+ {"ResolveTCPAddr", Func, 0},
+ {"ResolveUDPAddr", Func, 0},
+ {"ResolveUnixAddr", Func, 0},
+ {"Resolver", Type, 8},
+ {"Resolver.Dial", Field, 9},
+ {"Resolver.PreferGo", Field, 8},
+ {"Resolver.StrictErrors", Field, 9},
+ {"SRV", Type, 0},
+ {"SRV.Port", Field, 0},
+ {"SRV.Priority", Field, 0},
+ {"SRV.Target", Field, 0},
+ {"SRV.Weight", Field, 0},
+ {"SplitHostPort", Func, 0},
+ {"TCPAddr", Type, 0},
+ {"TCPAddr.IP", Field, 0},
+ {"TCPAddr.Port", Field, 0},
+ {"TCPAddr.Zone", Field, 1},
+ {"TCPAddrFromAddrPort", Func, 18},
+ {"TCPConn", Type, 0},
+ {"TCPListener", Type, 0},
+ {"UDPAddr", Type, 0},
+ {"UDPAddr.IP", Field, 0},
+ {"UDPAddr.Port", Field, 0},
+ {"UDPAddr.Zone", Field, 1},
+ {"UDPAddrFromAddrPort", Func, 18},
+ {"UDPConn", Type, 0},
+ {"UnixAddr", Type, 0},
+ {"UnixAddr.Name", Field, 0},
+ {"UnixAddr.Net", Field, 0},
+ {"UnixConn", Type, 0},
+ {"UnixListener", Type, 0},
+ {"UnknownNetworkError", Type, 0},
+ },
+ "net/http": {
+ {"(*Client).CloseIdleConnections", Method, 12},
+ {"(*Client).Do", Method, 0},
+ {"(*Client).Get", Method, 0},
+ {"(*Client).Head", Method, 0},
+ {"(*Client).Post", Method, 0},
+ {"(*Client).PostForm", Method, 0},
+ {"(*Cookie).String", Method, 0},
+ {"(*Cookie).Valid", Method, 18},
+ {"(*MaxBytesError).Error", Method, 19},
+ {"(*ProtocolError).Error", Method, 0},
+ {"(*ProtocolError).Is", Method, 21},
+ {"(*Request).AddCookie", Method, 0},
+ {"(*Request).BasicAuth", Method, 4},
+ {"(*Request).Clone", Method, 13},
+ {"(*Request).Context", Method, 7},
+ {"(*Request).Cookie", Method, 0},
+ {"(*Request).Cookies", Method, 0},
+ {"(*Request).FormFile", Method, 0},
+ {"(*Request).FormValue", Method, 0},
+ {"(*Request).MultipartReader", Method, 0},
+ {"(*Request).ParseForm", Method, 0},
+ {"(*Request).ParseMultipartForm", Method, 0},
+ {"(*Request).PathValue", Method, 22},
+ {"(*Request).PostFormValue", Method, 1},
+ {"(*Request).ProtoAtLeast", Method, 0},
+ {"(*Request).Referer", Method, 0},
+ {"(*Request).SetBasicAuth", Method, 0},
+ {"(*Request).SetPathValue", Method, 22},
+ {"(*Request).UserAgent", Method, 0},
+ {"(*Request).WithContext", Method, 7},
+ {"(*Request).Write", Method, 0},
+ {"(*Request).WriteProxy", Method, 0},
+ {"(*Response).Cookies", Method, 0},
+ {"(*Response).Location", Method, 0},
+ {"(*Response).ProtoAtLeast", Method, 0},
+ {"(*Response).Write", Method, 0},
+ {"(*ResponseController).EnableFullDuplex", Method, 21},
+ {"(*ResponseController).Flush", Method, 20},
+ {"(*ResponseController).Hijack", Method, 20},
+ {"(*ResponseController).SetReadDeadline", Method, 20},
+ {"(*ResponseController).SetWriteDeadline", Method, 20},
+ {"(*ServeMux).Handle", Method, 0},
+ {"(*ServeMux).HandleFunc", Method, 0},
+ {"(*ServeMux).Handler", Method, 1},
+ {"(*ServeMux).ServeHTTP", Method, 0},
+ {"(*Server).Close", Method, 8},
+ {"(*Server).ListenAndServe", Method, 0},
+ {"(*Server).ListenAndServeTLS", Method, 0},
+ {"(*Server).RegisterOnShutdown", Method, 9},
+ {"(*Server).Serve", Method, 0},
+ {"(*Server).ServeTLS", Method, 9},
+ {"(*Server).SetKeepAlivesEnabled", Method, 3},
+ {"(*Server).Shutdown", Method, 8},
+ {"(*Transport).CancelRequest", Method, 1},
+ {"(*Transport).Clone", Method, 13},
+ {"(*Transport).CloseIdleConnections", Method, 0},
+ {"(*Transport).RegisterProtocol", Method, 0},
+ {"(*Transport).RoundTrip", Method, 0},
+ {"(ConnState).String", Method, 3},
+ {"(Dir).Open", Method, 0},
+ {"(HandlerFunc).ServeHTTP", Method, 0},
+ {"(Header).Add", Method, 0},
+ {"(Header).Clone", Method, 13},
+ {"(Header).Del", Method, 0},
+ {"(Header).Get", Method, 0},
+ {"(Header).Set", Method, 0},
+ {"(Header).Values", Method, 14},
+ {"(Header).Write", Method, 0},
+ {"(Header).WriteSubset", Method, 0},
+ {"AllowQuerySemicolons", Func, 17},
+ {"CanonicalHeaderKey", Func, 0},
+ {"Client", Type, 0},
+ {"Client.CheckRedirect", Field, 0},
+ {"Client.Jar", Field, 0},
+ {"Client.Timeout", Field, 3},
+ {"Client.Transport", Field, 0},
+ {"CloseNotifier", Type, 1},
+ {"ConnState", Type, 3},
+ {"Cookie", Type, 0},
+ {"Cookie.Domain", Field, 0},
+ {"Cookie.Expires", Field, 0},
+ {"Cookie.HttpOnly", Field, 0},
+ {"Cookie.MaxAge", Field, 0},
+ {"Cookie.Name", Field, 0},
+ {"Cookie.Path", Field, 0},
+ {"Cookie.Raw", Field, 0},
+ {"Cookie.RawExpires", Field, 0},
+ {"Cookie.SameSite", Field, 11},
+ {"Cookie.Secure", Field, 0},
+ {"Cookie.Unparsed", Field, 0},
+ {"Cookie.Value", Field, 0},
+ {"CookieJar", Type, 0},
+ {"DefaultClient", Var, 0},
+ {"DefaultMaxHeaderBytes", Const, 0},
+ {"DefaultMaxIdleConnsPerHost", Const, 0},
+ {"DefaultServeMux", Var, 0},
+ {"DefaultTransport", Var, 0},
+ {"DetectContentType", Func, 0},
+ {"Dir", Type, 0},
+ {"ErrAbortHandler", Var, 8},
+ {"ErrBodyNotAllowed", Var, 0},
+ {"ErrBodyReadAfterClose", Var, 0},
+ {"ErrContentLength", Var, 0},
+ {"ErrHandlerTimeout", Var, 0},
+ {"ErrHeaderTooLong", Var, 0},
+ {"ErrHijacked", Var, 0},
+ {"ErrLineTooLong", Var, 0},
+ {"ErrMissingBoundary", Var, 0},
+ {"ErrMissingContentLength", Var, 0},
+ {"ErrMissingFile", Var, 0},
+ {"ErrNoCookie", Var, 0},
+ {"ErrNoLocation", Var, 0},
+ {"ErrNotMultipart", Var, 0},
+ {"ErrNotSupported", Var, 0},
+ {"ErrSchemeMismatch", Var, 21},
+ {"ErrServerClosed", Var, 8},
+ {"ErrShortBody", Var, 0},
+ {"ErrSkipAltProtocol", Var, 6},
+ {"ErrUnexpectedTrailer", Var, 0},
+ {"ErrUseLastResponse", Var, 7},
+ {"ErrWriteAfterFlush", Var, 0},
+ {"Error", Func, 0},
+ {"FS", Func, 16},
+ {"File", Type, 0},
+ {"FileServer", Func, 0},
+ {"FileServerFS", Func, 22},
+ {"FileSystem", Type, 0},
+ {"Flusher", Type, 0},
+ {"Get", Func, 0},
+ {"Handle", Func, 0},
+ {"HandleFunc", Func, 0},
+ {"Handler", Type, 0},
+ {"HandlerFunc", Type, 0},
+ {"Head", Func, 0},
+ {"Header", Type, 0},
+ {"Hijacker", Type, 0},
+ {"ListenAndServe", Func, 0},
+ {"ListenAndServeTLS", Func, 0},
+ {"LocalAddrContextKey", Var, 7},
+ {"MaxBytesError", Type, 19},
+ {"MaxBytesError.Limit", Field, 19},
+ {"MaxBytesHandler", Func, 18},
+ {"MaxBytesReader", Func, 0},
+ {"MethodConnect", Const, 6},
+ {"MethodDelete", Const, 6},
+ {"MethodGet", Const, 6},
+ {"MethodHead", Const, 6},
+ {"MethodOptions", Const, 6},
+ {"MethodPatch", Const, 6},
+ {"MethodPost", Const, 6},
+ {"MethodPut", Const, 6},
+ {"MethodTrace", Const, 6},
+ {"NewFileTransport", Func, 0},
+ {"NewFileTransportFS", Func, 22},
+ {"NewRequest", Func, 0},
+ {"NewRequestWithContext", Func, 13},
+ {"NewResponseController", Func, 20},
+ {"NewServeMux", Func, 0},
+ {"NoBody", Var, 8},
+ {"NotFound", Func, 0},
+ {"NotFoundHandler", Func, 0},
+ {"ParseHTTPVersion", Func, 0},
+ {"ParseTime", Func, 1},
+ {"Post", Func, 0},
+ {"PostForm", Func, 0},
+ {"ProtocolError", Type, 0},
+ {"ProtocolError.ErrorString", Field, 0},
+ {"ProxyFromEnvironment", Func, 0},
+ {"ProxyURL", Func, 0},
+ {"PushOptions", Type, 8},
+ {"PushOptions.Header", Field, 8},
+ {"PushOptions.Method", Field, 8},
+ {"Pusher", Type, 8},
+ {"ReadRequest", Func, 0},
+ {"ReadResponse", Func, 0},
+ {"Redirect", Func, 0},
+ {"RedirectHandler", Func, 0},
+ {"Request", Type, 0},
+ {"Request.Body", Field, 0},
+ {"Request.Cancel", Field, 5},
+ {"Request.Close", Field, 0},
+ {"Request.ContentLength", Field, 0},
+ {"Request.Form", Field, 0},
+ {"Request.GetBody", Field, 8},
+ {"Request.Header", Field, 0},
+ {"Request.Host", Field, 0},
+ {"Request.Method", Field, 0},
+ {"Request.MultipartForm", Field, 0},
+ {"Request.PostForm", Field, 1},
+ {"Request.Proto", Field, 0},
+ {"Request.ProtoMajor", Field, 0},
+ {"Request.ProtoMinor", Field, 0},
+ {"Request.RemoteAddr", Field, 0},
+ {"Request.RequestURI", Field, 0},
+ {"Request.Response", Field, 7},
+ {"Request.TLS", Field, 0},
+ {"Request.Trailer", Field, 0},
+ {"Request.TransferEncoding", Field, 0},
+ {"Request.URL", Field, 0},
+ {"Response", Type, 0},
+ {"Response.Body", Field, 0},
+ {"Response.Close", Field, 0},
+ {"Response.ContentLength", Field, 0},
+ {"Response.Header", Field, 0},
+ {"Response.Proto", Field, 0},
+ {"Response.ProtoMajor", Field, 0},
+ {"Response.ProtoMinor", Field, 0},
+ {"Response.Request", Field, 0},
+ {"Response.Status", Field, 0},
+ {"Response.StatusCode", Field, 0},
+ {"Response.TLS", Field, 3},
+ {"Response.Trailer", Field, 0},
+ {"Response.TransferEncoding", Field, 0},
+ {"Response.Uncompressed", Field, 7},
+ {"ResponseController", Type, 20},
+ {"ResponseWriter", Type, 0},
+ {"RoundTripper", Type, 0},
+ {"SameSite", Type, 11},
+ {"SameSiteDefaultMode", Const, 11},
+ {"SameSiteLaxMode", Const, 11},
+ {"SameSiteNoneMode", Const, 13},
+ {"SameSiteStrictMode", Const, 11},
+ {"Serve", Func, 0},
+ {"ServeContent", Func, 0},
+ {"ServeFile", Func, 0},
+ {"ServeFileFS", Func, 22},
+ {"ServeMux", Type, 0},
+ {"ServeTLS", Func, 9},
+ {"Server", Type, 0},
+ {"Server.Addr", Field, 0},
+ {"Server.BaseContext", Field, 13},
+ {"Server.ConnContext", Field, 13},
+ {"Server.ConnState", Field, 3},
+ {"Server.DisableGeneralOptionsHandler", Field, 20},
+ {"Server.ErrorLog", Field, 3},
+ {"Server.Handler", Field, 0},
+ {"Server.IdleTimeout", Field, 8},
+ {"Server.MaxHeaderBytes", Field, 0},
+ {"Server.ReadHeaderTimeout", Field, 8},
+ {"Server.ReadTimeout", Field, 0},
+ {"Server.TLSConfig", Field, 0},
+ {"Server.TLSNextProto", Field, 1},
+ {"Server.WriteTimeout", Field, 0},
+ {"ServerContextKey", Var, 7},
+ {"SetCookie", Func, 0},
+ {"StateActive", Const, 3},
+ {"StateClosed", Const, 3},
+ {"StateHijacked", Const, 3},
+ {"StateIdle", Const, 3},
+ {"StateNew", Const, 3},
+ {"StatusAccepted", Const, 0},
+ {"StatusAlreadyReported", Const, 7},
+ {"StatusBadGateway", Const, 0},
+ {"StatusBadRequest", Const, 0},
+ {"StatusConflict", Const, 0},
+ {"StatusContinue", Const, 0},
+ {"StatusCreated", Const, 0},
+ {"StatusEarlyHints", Const, 13},
+ {"StatusExpectationFailed", Const, 0},
+ {"StatusFailedDependency", Const, 7},
+ {"StatusForbidden", Const, 0},
+ {"StatusFound", Const, 0},
+ {"StatusGatewayTimeout", Const, 0},
+ {"StatusGone", Const, 0},
+ {"StatusHTTPVersionNotSupported", Const, 0},
+ {"StatusIMUsed", Const, 7},
+ {"StatusInsufficientStorage", Const, 7},
+ {"StatusInternalServerError", Const, 0},
+ {"StatusLengthRequired", Const, 0},
+ {"StatusLocked", Const, 7},
+ {"StatusLoopDetected", Const, 7},
+ {"StatusMethodNotAllowed", Const, 0},
+ {"StatusMisdirectedRequest", Const, 11},
+ {"StatusMovedPermanently", Const, 0},
+ {"StatusMultiStatus", Const, 7},
+ {"StatusMultipleChoices", Const, 0},
+ {"StatusNetworkAuthenticationRequired", Const, 6},
+ {"StatusNoContent", Const, 0},
+ {"StatusNonAuthoritativeInfo", Const, 0},
+ {"StatusNotAcceptable", Const, 0},
+ {"StatusNotExtended", Const, 7},
+ {"StatusNotFound", Const, 0},
+ {"StatusNotImplemented", Const, 0},
+ {"StatusNotModified", Const, 0},
+ {"StatusOK", Const, 0},
+ {"StatusPartialContent", Const, 0},
+ {"StatusPaymentRequired", Const, 0},
+ {"StatusPermanentRedirect", Const, 7},
+ {"StatusPreconditionFailed", Const, 0},
+ {"StatusPreconditionRequired", Const, 6},
+ {"StatusProcessing", Const, 7},
+ {"StatusProxyAuthRequired", Const, 0},
+ {"StatusRequestEntityTooLarge", Const, 0},
+ {"StatusRequestHeaderFieldsTooLarge", Const, 6},
+ {"StatusRequestTimeout", Const, 0},
+ {"StatusRequestURITooLong", Const, 0},
+ {"StatusRequestedRangeNotSatisfiable", Const, 0},
+ {"StatusResetContent", Const, 0},
+ {"StatusSeeOther", Const, 0},
+ {"StatusServiceUnavailable", Const, 0},
+ {"StatusSwitchingProtocols", Const, 0},
+ {"StatusTeapot", Const, 0},
+ {"StatusTemporaryRedirect", Const, 0},
+ {"StatusText", Func, 0},
+ {"StatusTooEarly", Const, 12},
+ {"StatusTooManyRequests", Const, 6},
+ {"StatusUnauthorized", Const, 0},
+ {"StatusUnavailableForLegalReasons", Const, 6},
+ {"StatusUnprocessableEntity", Const, 7},
+ {"StatusUnsupportedMediaType", Const, 0},
+ {"StatusUpgradeRequired", Const, 7},
+ {"StatusUseProxy", Const, 0},
+ {"StatusVariantAlsoNegotiates", Const, 7},
+ {"StripPrefix", Func, 0},
+ {"TimeFormat", Const, 0},
+ {"TimeoutHandler", Func, 0},
+ {"TrailerPrefix", Const, 8},
+ {"Transport", Type, 0},
+ {"Transport.Dial", Field, 0},
+ {"Transport.DialContext", Field, 7},
+ {"Transport.DialTLS", Field, 4},
+ {"Transport.DialTLSContext", Field, 14},
+ {"Transport.DisableCompression", Field, 0},
+ {"Transport.DisableKeepAlives", Field, 0},
+ {"Transport.ExpectContinueTimeout", Field, 6},
+ {"Transport.ForceAttemptHTTP2", Field, 13},
+ {"Transport.GetProxyConnectHeader", Field, 16},
+ {"Transport.IdleConnTimeout", Field, 7},
+ {"Transport.MaxConnsPerHost", Field, 11},
+ {"Transport.MaxIdleConns", Field, 7},
+ {"Transport.MaxIdleConnsPerHost", Field, 0},
+ {"Transport.MaxResponseHeaderBytes", Field, 7},
+ {"Transport.OnProxyConnectResponse", Field, 20},
+ {"Transport.Proxy", Field, 0},
+ {"Transport.ProxyConnectHeader", Field, 8},
+ {"Transport.ReadBufferSize", Field, 13},
+ {"Transport.ResponseHeaderTimeout", Field, 1},
+ {"Transport.TLSClientConfig", Field, 0},
+ {"Transport.TLSHandshakeTimeout", Field, 3},
+ {"Transport.TLSNextProto", Field, 6},
+ {"Transport.WriteBufferSize", Field, 13},
+ },
+ "net/http/cgi": {
+ {"(*Handler).ServeHTTP", Method, 0},
+ {"Handler", Type, 0},
+ {"Handler.Args", Field, 0},
+ {"Handler.Dir", Field, 0},
+ {"Handler.Env", Field, 0},
+ {"Handler.InheritEnv", Field, 0},
+ {"Handler.Logger", Field, 0},
+ {"Handler.Path", Field, 0},
+ {"Handler.PathLocationHandler", Field, 0},
+ {"Handler.Root", Field, 0},
+ {"Handler.Stderr", Field, 7},
+ {"Request", Func, 0},
+ {"RequestFromMap", Func, 0},
+ {"Serve", Func, 0},
+ },
+ "net/http/cookiejar": {
+ {"(*Jar).Cookies", Method, 1},
+ {"(*Jar).SetCookies", Method, 1},
+ {"Jar", Type, 1},
+ {"New", Func, 1},
+ {"Options", Type, 1},
+ {"Options.PublicSuffixList", Field, 1},
+ {"PublicSuffixList", Type, 1},
+ },
+ "net/http/fcgi": {
+ {"ErrConnClosed", Var, 5},
+ {"ErrRequestAborted", Var, 5},
+ {"ProcessEnv", Func, 9},
+ {"Serve", Func, 0},
+ },
+ "net/http/httptest": {
+ {"(*ResponseRecorder).Flush", Method, 0},
+ {"(*ResponseRecorder).Header", Method, 0},
+ {"(*ResponseRecorder).Result", Method, 7},
+ {"(*ResponseRecorder).Write", Method, 0},
+ {"(*ResponseRecorder).WriteHeader", Method, 0},
+ {"(*ResponseRecorder).WriteString", Method, 6},
+ {"(*Server).Certificate", Method, 9},
+ {"(*Server).Client", Method, 9},
+ {"(*Server).Close", Method, 0},
+ {"(*Server).CloseClientConnections", Method, 0},
+ {"(*Server).Start", Method, 0},
+ {"(*Server).StartTLS", Method, 0},
+ {"DefaultRemoteAddr", Const, 0},
+ {"NewRecorder", Func, 0},
+ {"NewRequest", Func, 7},
+ {"NewServer", Func, 0},
+ {"NewTLSServer", Func, 0},
+ {"NewUnstartedServer", Func, 0},
+ {"ResponseRecorder", Type, 0},
+ {"ResponseRecorder.Body", Field, 0},
+ {"ResponseRecorder.Code", Field, 0},
+ {"ResponseRecorder.Flushed", Field, 0},
+ {"ResponseRecorder.HeaderMap", Field, 0},
+ {"Server", Type, 0},
+ {"Server.Config", Field, 0},
+ {"Server.EnableHTTP2", Field, 14},
+ {"Server.Listener", Field, 0},
+ {"Server.TLS", Field, 0},
+ {"Server.URL", Field, 0},
+ },
+ "net/http/httptrace": {
+ {"ClientTrace", Type, 7},
+ {"ClientTrace.ConnectDone", Field, 7},
+ {"ClientTrace.ConnectStart", Field, 7},
+ {"ClientTrace.DNSDone", Field, 7},
+ {"ClientTrace.DNSStart", Field, 7},
+ {"ClientTrace.GetConn", Field, 7},
+ {"ClientTrace.Got100Continue", Field, 7},
+ {"ClientTrace.Got1xxResponse", Field, 11},
+ {"ClientTrace.GotConn", Field, 7},
+ {"ClientTrace.GotFirstResponseByte", Field, 7},
+ {"ClientTrace.PutIdleConn", Field, 7},
+ {"ClientTrace.TLSHandshakeDone", Field, 8},
+ {"ClientTrace.TLSHandshakeStart", Field, 8},
+ {"ClientTrace.Wait100Continue", Field, 7},
+ {"ClientTrace.WroteHeaderField", Field, 11},
+ {"ClientTrace.WroteHeaders", Field, 7},
+ {"ClientTrace.WroteRequest", Field, 7},
+ {"ContextClientTrace", Func, 7},
+ {"DNSDoneInfo", Type, 7},
+ {"DNSDoneInfo.Addrs", Field, 7},
+ {"DNSDoneInfo.Coalesced", Field, 7},
+ {"DNSDoneInfo.Err", Field, 7},
+ {"DNSStartInfo", Type, 7},
+ {"DNSStartInfo.Host", Field, 7},
+ {"GotConnInfo", Type, 7},
+ {"GotConnInfo.Conn", Field, 7},
+ {"GotConnInfo.IdleTime", Field, 7},
+ {"GotConnInfo.Reused", Field, 7},
+ {"GotConnInfo.WasIdle", Field, 7},
+ {"WithClientTrace", Func, 7},
+ {"WroteRequestInfo", Type, 7},
+ {"WroteRequestInfo.Err", Field, 7},
+ },
+ "net/http/httputil": {
+ {"(*ClientConn).Close", Method, 0},
+ {"(*ClientConn).Do", Method, 0},
+ {"(*ClientConn).Hijack", Method, 0},
+ {"(*ClientConn).Pending", Method, 0},
+ {"(*ClientConn).Read", Method, 0},
+ {"(*ClientConn).Write", Method, 0},
+ {"(*ProxyRequest).SetURL", Method, 20},
+ {"(*ProxyRequest).SetXForwarded", Method, 20},
+ {"(*ReverseProxy).ServeHTTP", Method, 0},
+ {"(*ServerConn).Close", Method, 0},
+ {"(*ServerConn).Hijack", Method, 0},
+ {"(*ServerConn).Pending", Method, 0},
+ {"(*ServerConn).Read", Method, 0},
+ {"(*ServerConn).Write", Method, 0},
+ {"BufferPool", Type, 6},
+ {"ClientConn", Type, 0},
+ {"DumpRequest", Func, 0},
+ {"DumpRequestOut", Func, 0},
+ {"DumpResponse", Func, 0},
+ {"ErrClosed", Var, 0},
+ {"ErrLineTooLong", Var, 0},
+ {"ErrPersistEOF", Var, 0},
+ {"ErrPipeline", Var, 0},
+ {"NewChunkedReader", Func, 0},
+ {"NewChunkedWriter", Func, 0},
+ {"NewClientConn", Func, 0},
+ {"NewProxyClientConn", Func, 0},
+ {"NewServerConn", Func, 0},
+ {"NewSingleHostReverseProxy", Func, 0},
+ {"ProxyRequest", Type, 20},
+ {"ProxyRequest.In", Field, 20},
+ {"ProxyRequest.Out", Field, 20},
+ {"ReverseProxy", Type, 0},
+ {"ReverseProxy.BufferPool", Field, 6},
+ {"ReverseProxy.Director", Field, 0},
+ {"ReverseProxy.ErrorHandler", Field, 11},
+ {"ReverseProxy.ErrorLog", Field, 4},
+ {"ReverseProxy.FlushInterval", Field, 0},
+ {"ReverseProxy.ModifyResponse", Field, 8},
+ {"ReverseProxy.Rewrite", Field, 20},
+ {"ReverseProxy.Transport", Field, 0},
+ {"ServerConn", Type, 0},
+ },
+ "net/http/pprof": {
+ {"Cmdline", Func, 0},
+ {"Handler", Func, 0},
+ {"Index", Func, 0},
+ {"Profile", Func, 0},
+ {"Symbol", Func, 0},
+ {"Trace", Func, 5},
+ },
+ "net/mail": {
+ {"(*Address).String", Method, 0},
+ {"(*AddressParser).Parse", Method, 5},
+ {"(*AddressParser).ParseList", Method, 5},
+ {"(Header).AddressList", Method, 0},
+ {"(Header).Date", Method, 0},
+ {"(Header).Get", Method, 0},
+ {"Address", Type, 0},
+ {"Address.Address", Field, 0},
+ {"Address.Name", Field, 0},
+ {"AddressParser", Type, 5},
+ {"AddressParser.WordDecoder", Field, 5},
+ {"ErrHeaderNotPresent", Var, 0},
+ {"Header", Type, 0},
+ {"Message", Type, 0},
+ {"Message.Body", Field, 0},
+ {"Message.Header", Field, 0},
+ {"ParseAddress", Func, 1},
+ {"ParseAddressList", Func, 1},
+ {"ParseDate", Func, 8},
+ {"ReadMessage", Func, 0},
+ },
+ "net/netip": {
+ {"(*Addr).UnmarshalBinary", Method, 18},
+ {"(*Addr).UnmarshalText", Method, 18},
+ {"(*AddrPort).UnmarshalBinary", Method, 18},
+ {"(*AddrPort).UnmarshalText", Method, 18},
+ {"(*Prefix).UnmarshalBinary", Method, 18},
+ {"(*Prefix).UnmarshalText", Method, 18},
+ {"(Addr).AppendTo", Method, 18},
+ {"(Addr).As16", Method, 18},
+ {"(Addr).As4", Method, 18},
+ {"(Addr).AsSlice", Method, 18},
+ {"(Addr).BitLen", Method, 18},
+ {"(Addr).Compare", Method, 18},
+ {"(Addr).Is4", Method, 18},
+ {"(Addr).Is4In6", Method, 18},
+ {"(Addr).Is6", Method, 18},
+ {"(Addr).IsGlobalUnicast", Method, 18},
+ {"(Addr).IsInterfaceLocalMulticast", Method, 18},
+ {"(Addr).IsLinkLocalMulticast", Method, 18},
+ {"(Addr).IsLinkLocalUnicast", Method, 18},
+ {"(Addr).IsLoopback", Method, 18},
+ {"(Addr).IsMulticast", Method, 18},
+ {"(Addr).IsPrivate", Method, 18},
+ {"(Addr).IsUnspecified", Method, 18},
+ {"(Addr).IsValid", Method, 18},
+ {"(Addr).Less", Method, 18},
+ {"(Addr).MarshalBinary", Method, 18},
+ {"(Addr).MarshalText", Method, 18},
+ {"(Addr).Next", Method, 18},
+ {"(Addr).Prefix", Method, 18},
+ {"(Addr).Prev", Method, 18},
+ {"(Addr).String", Method, 18},
+ {"(Addr).StringExpanded", Method, 18},
+ {"(Addr).Unmap", Method, 18},
+ {"(Addr).WithZone", Method, 18},
+ {"(Addr).Zone", Method, 18},
+ {"(AddrPort).Addr", Method, 18},
+ {"(AddrPort).AppendTo", Method, 18},
+ {"(AddrPort).Compare", Method, 22},
+ {"(AddrPort).IsValid", Method, 18},
+ {"(AddrPort).MarshalBinary", Method, 18},
+ {"(AddrPort).MarshalText", Method, 18},
+ {"(AddrPort).Port", Method, 18},
+ {"(AddrPort).String", Method, 18},
+ {"(Prefix).Addr", Method, 18},
+ {"(Prefix).AppendTo", Method, 18},
+ {"(Prefix).Bits", Method, 18},
+ {"(Prefix).Contains", Method, 18},
+ {"(Prefix).IsSingleIP", Method, 18},
+ {"(Prefix).IsValid", Method, 18},
+ {"(Prefix).MarshalBinary", Method, 18},
+ {"(Prefix).MarshalText", Method, 18},
+ {"(Prefix).Masked", Method, 18},
+ {"(Prefix).Overlaps", Method, 18},
+ {"(Prefix).String", Method, 18},
+ {"Addr", Type, 18},
+ {"AddrFrom16", Func, 18},
+ {"AddrFrom4", Func, 18},
+ {"AddrFromSlice", Func, 18},
+ {"AddrPort", Type, 18},
+ {"AddrPortFrom", Func, 18},
+ {"IPv4Unspecified", Func, 18},
+ {"IPv6LinkLocalAllNodes", Func, 18},
+ {"IPv6LinkLocalAllRouters", Func, 20},
+ {"IPv6Loopback", Func, 20},
+ {"IPv6Unspecified", Func, 18},
+ {"MustParseAddr", Func, 18},
+ {"MustParseAddrPort", Func, 18},
+ {"MustParsePrefix", Func, 18},
+ {"ParseAddr", Func, 18},
+ {"ParseAddrPort", Func, 18},
+ {"ParsePrefix", Func, 18},
+ {"Prefix", Type, 18},
+ {"PrefixFrom", Func, 18},
+ },
+ "net/rpc": {
+ {"(*Client).Call", Method, 0},
+ {"(*Client).Close", Method, 0},
+ {"(*Client).Go", Method, 0},
+ {"(*Server).Accept", Method, 0},
+ {"(*Server).HandleHTTP", Method, 0},
+ {"(*Server).Register", Method, 0},
+ {"(*Server).RegisterName", Method, 0},
+ {"(*Server).ServeCodec", Method, 0},
+ {"(*Server).ServeConn", Method, 0},
+ {"(*Server).ServeHTTP", Method, 0},
+ {"(*Server).ServeRequest", Method, 0},
+ {"(ServerError).Error", Method, 0},
+ {"Accept", Func, 0},
+ {"Call", Type, 0},
+ {"Call.Args", Field, 0},
+ {"Call.Done", Field, 0},
+ {"Call.Error", Field, 0},
+ {"Call.Reply", Field, 0},
+ {"Call.ServiceMethod", Field, 0},
+ {"Client", Type, 0},
+ {"ClientCodec", Type, 0},
+ {"DefaultDebugPath", Const, 0},
+ {"DefaultRPCPath", Const, 0},
+ {"DefaultServer", Var, 0},
+ {"Dial", Func, 0},
+ {"DialHTTP", Func, 0},
+ {"DialHTTPPath", Func, 0},
+ {"ErrShutdown", Var, 0},
+ {"HandleHTTP", Func, 0},
+ {"NewClient", Func, 0},
+ {"NewClientWithCodec", Func, 0},
+ {"NewServer", Func, 0},
+ {"Register", Func, 0},
+ {"RegisterName", Func, 0},
+ {"Request", Type, 0},
+ {"Request.Seq", Field, 0},
+ {"Request.ServiceMethod", Field, 0},
+ {"Response", Type, 0},
+ {"Response.Error", Field, 0},
+ {"Response.Seq", Field, 0},
+ {"Response.ServiceMethod", Field, 0},
+ {"ServeCodec", Func, 0},
+ {"ServeConn", Func, 0},
+ {"ServeRequest", Func, 0},
+ {"Server", Type, 0},
+ {"ServerCodec", Type, 0},
+ {"ServerError", Type, 0},
+ },
+ "net/rpc/jsonrpc": {
+ {"Dial", Func, 0},
+ {"NewClient", Func, 0},
+ {"NewClientCodec", Func, 0},
+ {"NewServerCodec", Func, 0},
+ {"ServeConn", Func, 0},
+ },
+ "net/smtp": {
+ {"(*Client).Auth", Method, 0},
+ {"(*Client).Close", Method, 2},
+ {"(*Client).Data", Method, 0},
+ {"(*Client).Extension", Method, 0},
+ {"(*Client).Hello", Method, 1},
+ {"(*Client).Mail", Method, 0},
+ {"(*Client).Noop", Method, 10},
+ {"(*Client).Quit", Method, 0},
+ {"(*Client).Rcpt", Method, 0},
+ {"(*Client).Reset", Method, 0},
+ {"(*Client).StartTLS", Method, 0},
+ {"(*Client).TLSConnectionState", Method, 5},
+ {"(*Client).Verify", Method, 0},
+ {"Auth", Type, 0},
+ {"CRAMMD5Auth", Func, 0},
+ {"Client", Type, 0},
+ {"Client.Text", Field, 0},
+ {"Dial", Func, 0},
+ {"NewClient", Func, 0},
+ {"PlainAuth", Func, 0},
+ {"SendMail", Func, 0},
+ {"ServerInfo", Type, 0},
+ {"ServerInfo.Auth", Field, 0},
+ {"ServerInfo.Name", Field, 0},
+ {"ServerInfo.TLS", Field, 0},
+ },
+ "net/textproto": {
+ {"(*Conn).Close", Method, 0},
+ {"(*Conn).Cmd", Method, 0},
+ {"(*Conn).DotReader", Method, 0},
+ {"(*Conn).DotWriter", Method, 0},
+ {"(*Conn).EndRequest", Method, 0},
+ {"(*Conn).EndResponse", Method, 0},
+ {"(*Conn).Next", Method, 0},
+ {"(*Conn).PrintfLine", Method, 0},
+ {"(*Conn).ReadCodeLine", Method, 0},
+ {"(*Conn).ReadContinuedLine", Method, 0},
+ {"(*Conn).ReadContinuedLineBytes", Method, 0},
+ {"(*Conn).ReadDotBytes", Method, 0},
+ {"(*Conn).ReadDotLines", Method, 0},
+ {"(*Conn).ReadLine", Method, 0},
+ {"(*Conn).ReadLineBytes", Method, 0},
+ {"(*Conn).ReadMIMEHeader", Method, 0},
+ {"(*Conn).ReadResponse", Method, 0},
+ {"(*Conn).StartRequest", Method, 0},
+ {"(*Conn).StartResponse", Method, 0},
+ {"(*Error).Error", Method, 0},
+ {"(*Pipeline).EndRequest", Method, 0},
+ {"(*Pipeline).EndResponse", Method, 0},
+ {"(*Pipeline).Next", Method, 0},
+ {"(*Pipeline).StartRequest", Method, 0},
+ {"(*Pipeline).StartResponse", Method, 0},
+ {"(*Reader).DotReader", Method, 0},
+ {"(*Reader).ReadCodeLine", Method, 0},
+ {"(*Reader).ReadContinuedLine", Method, 0},
+ {"(*Reader).ReadContinuedLineBytes", Method, 0},
+ {"(*Reader).ReadDotBytes", Method, 0},
+ {"(*Reader).ReadDotLines", Method, 0},
+ {"(*Reader).ReadLine", Method, 0},
+ {"(*Reader).ReadLineBytes", Method, 0},
+ {"(*Reader).ReadMIMEHeader", Method, 0},
+ {"(*Reader).ReadResponse", Method, 0},
+ {"(*Writer).DotWriter", Method, 0},
+ {"(*Writer).PrintfLine", Method, 0},
+ {"(MIMEHeader).Add", Method, 0},
+ {"(MIMEHeader).Del", Method, 0},
+ {"(MIMEHeader).Get", Method, 0},
+ {"(MIMEHeader).Set", Method, 0},
+ {"(MIMEHeader).Values", Method, 14},
+ {"(ProtocolError).Error", Method, 0},
+ {"CanonicalMIMEHeaderKey", Func, 0},
+ {"Conn", Type, 0},
+ {"Conn.Pipeline", Field, 0},
+ {"Conn.Reader", Field, 0},
+ {"Conn.Writer", Field, 0},
+ {"Dial", Func, 0},
+ {"Error", Type, 0},
+ {"Error.Code", Field, 0},
+ {"Error.Msg", Field, 0},
+ {"MIMEHeader", Type, 0},
+ {"NewConn", Func, 0},
+ {"NewReader", Func, 0},
+ {"NewWriter", Func, 0},
+ {"Pipeline", Type, 0},
+ {"ProtocolError", Type, 0},
+ {"Reader", Type, 0},
+ {"Reader.R", Field, 0},
+ {"TrimBytes", Func, 1},
+ {"TrimString", Func, 1},
+ {"Writer", Type, 0},
+ {"Writer.W", Field, 0},
+ },
+ "net/url": {
+ {"(*Error).Error", Method, 0},
+ {"(*Error).Temporary", Method, 6},
+ {"(*Error).Timeout", Method, 6},
+ {"(*Error).Unwrap", Method, 13},
+ {"(*URL).EscapedFragment", Method, 15},
+ {"(*URL).EscapedPath", Method, 5},
+ {"(*URL).Hostname", Method, 8},
+ {"(*URL).IsAbs", Method, 0},
+ {"(*URL).JoinPath", Method, 19},
+ {"(*URL).MarshalBinary", Method, 8},
+ {"(*URL).Parse", Method, 0},
+ {"(*URL).Port", Method, 8},
+ {"(*URL).Query", Method, 0},
+ {"(*URL).Redacted", Method, 15},
+ {"(*URL).RequestURI", Method, 0},
+ {"(*URL).ResolveReference", Method, 0},
+ {"(*URL).String", Method, 0},
+ {"(*URL).UnmarshalBinary", Method, 8},
+ {"(*Userinfo).Password", Method, 0},
+ {"(*Userinfo).String", Method, 0},
+ {"(*Userinfo).Username", Method, 0},
+ {"(EscapeError).Error", Method, 0},
+ {"(InvalidHostError).Error", Method, 6},
+ {"(Values).Add", Method, 0},
+ {"(Values).Del", Method, 0},
+ {"(Values).Encode", Method, 0},
+ {"(Values).Get", Method, 0},
+ {"(Values).Has", Method, 17},
+ {"(Values).Set", Method, 0},
+ {"Error", Type, 0},
+ {"Error.Err", Field, 0},
+ {"Error.Op", Field, 0},
+ {"Error.URL", Field, 0},
+ {"EscapeError", Type, 0},
+ {"InvalidHostError", Type, 6},
+ {"JoinPath", Func, 19},
+ {"Parse", Func, 0},
+ {"ParseQuery", Func, 0},
+ {"ParseRequestURI", Func, 0},
+ {"PathEscape", Func, 8},
+ {"PathUnescape", Func, 8},
+ {"QueryEscape", Func, 0},
+ {"QueryUnescape", Func, 0},
+ {"URL", Type, 0},
+ {"URL.ForceQuery", Field, 7},
+ {"URL.Fragment", Field, 0},
+ {"URL.Host", Field, 0},
+ {"URL.OmitHost", Field, 19},
+ {"URL.Opaque", Field, 0},
+ {"URL.Path", Field, 0},
+ {"URL.RawFragment", Field, 15},
+ {"URL.RawPath", Field, 5},
+ {"URL.RawQuery", Field, 0},
+ {"URL.Scheme", Field, 0},
+ {"URL.User", Field, 0},
+ {"User", Func, 0},
+ {"UserPassword", Func, 0},
+ {"Userinfo", Type, 0},
+ {"Values", Type, 0},
+ },
+ "os": {
+ {"(*File).Chdir", Method, 0},
+ {"(*File).Chmod", Method, 0},
+ {"(*File).Chown", Method, 0},
+ {"(*File).Close", Method, 0},
+ {"(*File).Fd", Method, 0},
+ {"(*File).Name", Method, 0},
+ {"(*File).Read", Method, 0},
+ {"(*File).ReadAt", Method, 0},
+ {"(*File).ReadDir", Method, 16},
+ {"(*File).ReadFrom", Method, 15},
+ {"(*File).Readdir", Method, 0},
+ {"(*File).Readdirnames", Method, 0},
+ {"(*File).Seek", Method, 0},
+ {"(*File).SetDeadline", Method, 10},
+ {"(*File).SetReadDeadline", Method, 10},
+ {"(*File).SetWriteDeadline", Method, 10},
+ {"(*File).Stat", Method, 0},
+ {"(*File).Sync", Method, 0},
+ {"(*File).SyscallConn", Method, 12},
+ {"(*File).Truncate", Method, 0},
+ {"(*File).Write", Method, 0},
+ {"(*File).WriteAt", Method, 0},
+ {"(*File).WriteString", Method, 0},
+ {"(*File).WriteTo", Method, 22},
+ {"(*LinkError).Error", Method, 0},
+ {"(*LinkError).Unwrap", Method, 13},
+ {"(*PathError).Error", Method, 0},
+ {"(*PathError).Timeout", Method, 10},
+ {"(*PathError).Unwrap", Method, 13},
+ {"(*Process).Kill", Method, 0},
+ {"(*Process).Release", Method, 0},
+ {"(*Process).Signal", Method, 0},
+ {"(*Process).Wait", Method, 0},
+ {"(*ProcessState).ExitCode", Method, 12},
+ {"(*ProcessState).Exited", Method, 0},
+ {"(*ProcessState).Pid", Method, 0},
+ {"(*ProcessState).String", Method, 0},
+ {"(*ProcessState).Success", Method, 0},
+ {"(*ProcessState).Sys", Method, 0},
+ {"(*ProcessState).SysUsage", Method, 0},
+ {"(*ProcessState).SystemTime", Method, 0},
+ {"(*ProcessState).UserTime", Method, 0},
+ {"(*SyscallError).Error", Method, 0},
+ {"(*SyscallError).Timeout", Method, 10},
+ {"(*SyscallError).Unwrap", Method, 13},
+ {"(FileMode).IsDir", Method, 0},
+ {"(FileMode).IsRegular", Method, 1},
+ {"(FileMode).Perm", Method, 0},
+ {"(FileMode).String", Method, 0},
+ {"Args", Var, 0},
+ {"Chdir", Func, 0},
+ {"Chmod", Func, 0},
+ {"Chown", Func, 0},
+ {"Chtimes", Func, 0},
+ {"Clearenv", Func, 0},
+ {"Create", Func, 0},
+ {"CreateTemp", Func, 16},
+ {"DevNull", Const, 0},
+ {"DirEntry", Type, 16},
+ {"DirFS", Func, 16},
+ {"Environ", Func, 0},
+ {"ErrClosed", Var, 8},
+ {"ErrDeadlineExceeded", Var, 15},
+ {"ErrExist", Var, 0},
+ {"ErrInvalid", Var, 0},
+ {"ErrNoDeadline", Var, 10},
+ {"ErrNotExist", Var, 0},
+ {"ErrPermission", Var, 0},
+ {"ErrProcessDone", Var, 16},
+ {"Executable", Func, 8},
+ {"Exit", Func, 0},
+ {"Expand", Func, 0},
+ {"ExpandEnv", Func, 0},
+ {"File", Type, 0},
+ {"FileInfo", Type, 0},
+ {"FileMode", Type, 0},
+ {"FindProcess", Func, 0},
+ {"Getegid", Func, 0},
+ {"Getenv", Func, 0},
+ {"Geteuid", Func, 0},
+ {"Getgid", Func, 0},
+ {"Getgroups", Func, 0},
+ {"Getpagesize", Func, 0},
+ {"Getpid", Func, 0},
+ {"Getppid", Func, 0},
+ {"Getuid", Func, 0},
+ {"Getwd", Func, 0},
+ {"Hostname", Func, 0},
+ {"Interrupt", Var, 0},
+ {"IsExist", Func, 0},
+ {"IsNotExist", Func, 0},
+ {"IsPathSeparator", Func, 0},
+ {"IsPermission", Func, 0},
+ {"IsTimeout", Func, 10},
+ {"Kill", Var, 0},
+ {"Lchown", Func, 0},
+ {"Link", Func, 0},
+ {"LinkError", Type, 0},
+ {"LinkError.Err", Field, 0},
+ {"LinkError.New", Field, 0},
+ {"LinkError.Old", Field, 0},
+ {"LinkError.Op", Field, 0},
+ {"LookupEnv", Func, 5},
+ {"Lstat", Func, 0},
+ {"Mkdir", Func, 0},
+ {"MkdirAll", Func, 0},
+ {"MkdirTemp", Func, 16},
+ {"ModeAppend", Const, 0},
+ {"ModeCharDevice", Const, 0},
+ {"ModeDevice", Const, 0},
+ {"ModeDir", Const, 0},
+ {"ModeExclusive", Const, 0},
+ {"ModeIrregular", Const, 11},
+ {"ModeNamedPipe", Const, 0},
+ {"ModePerm", Const, 0},
+ {"ModeSetgid", Const, 0},
+ {"ModeSetuid", Const, 0},
+ {"ModeSocket", Const, 0},
+ {"ModeSticky", Const, 0},
+ {"ModeSymlink", Const, 0},
+ {"ModeTemporary", Const, 0},
+ {"ModeType", Const, 0},
+ {"NewFile", Func, 0},
+ {"NewSyscallError", Func, 0},
+ {"O_APPEND", Const, 0},
+ {"O_CREATE", Const, 0},
+ {"O_EXCL", Const, 0},
+ {"O_RDONLY", Const, 0},
+ {"O_RDWR", Const, 0},
+ {"O_SYNC", Const, 0},
+ {"O_TRUNC", Const, 0},
+ {"O_WRONLY", Const, 0},
+ {"Open", Func, 0},
+ {"OpenFile", Func, 0},
+ {"PathError", Type, 0},
+ {"PathError.Err", Field, 0},
+ {"PathError.Op", Field, 0},
+ {"PathError.Path", Field, 0},
+ {"PathListSeparator", Const, 0},
+ {"PathSeparator", Const, 0},
+ {"Pipe", Func, 0},
+ {"ProcAttr", Type, 0},
+ {"ProcAttr.Dir", Field, 0},
+ {"ProcAttr.Env", Field, 0},
+ {"ProcAttr.Files", Field, 0},
+ {"ProcAttr.Sys", Field, 0},
+ {"Process", Type, 0},
+ {"Process.Pid", Field, 0},
+ {"ProcessState", Type, 0},
+ {"ReadDir", Func, 16},
+ {"ReadFile", Func, 16},
+ {"Readlink", Func, 0},
+ {"Remove", Func, 0},
+ {"RemoveAll", Func, 0},
+ {"Rename", Func, 0},
+ {"SEEK_CUR", Const, 0},
+ {"SEEK_END", Const, 0},
+ {"SEEK_SET", Const, 0},
+ {"SameFile", Func, 0},
+ {"Setenv", Func, 0},
+ {"Signal", Type, 0},
+ {"StartProcess", Func, 0},
+ {"Stat", Func, 0},
+ {"Stderr", Var, 0},
+ {"Stdin", Var, 0},
+ {"Stdout", Var, 0},
+ {"Symlink", Func, 0},
+ {"SyscallError", Type, 0},
+ {"SyscallError.Err", Field, 0},
+ {"SyscallError.Syscall", Field, 0},
+ {"TempDir", Func, 0},
+ {"Truncate", Func, 0},
+ {"Unsetenv", Func, 4},
+ {"UserCacheDir", Func, 11},
+ {"UserConfigDir", Func, 13},
+ {"UserHomeDir", Func, 12},
+ {"WriteFile", Func, 16},
+ },
+ "os/exec": {
+ {"(*Cmd).CombinedOutput", Method, 0},
+ {"(*Cmd).Environ", Method, 19},
+ {"(*Cmd).Output", Method, 0},
+ {"(*Cmd).Run", Method, 0},
+ {"(*Cmd).Start", Method, 0},
+ {"(*Cmd).StderrPipe", Method, 0},
+ {"(*Cmd).StdinPipe", Method, 0},
+ {"(*Cmd).StdoutPipe", Method, 0},
+ {"(*Cmd).String", Method, 13},
+ {"(*Cmd).Wait", Method, 0},
+ {"(*Error).Error", Method, 0},
+ {"(*Error).Unwrap", Method, 13},
+ {"(*ExitError).Error", Method, 0},
+ {"(ExitError).ExitCode", Method, 12},
+ {"(ExitError).Exited", Method, 0},
+ {"(ExitError).Pid", Method, 0},
+ {"(ExitError).String", Method, 0},
+ {"(ExitError).Success", Method, 0},
+ {"(ExitError).Sys", Method, 0},
+ {"(ExitError).SysUsage", Method, 0},
+ {"(ExitError).SystemTime", Method, 0},
+ {"(ExitError).UserTime", Method, 0},
+ {"Cmd", Type, 0},
+ {"Cmd.Args", Field, 0},
+ {"Cmd.Cancel", Field, 20},
+ {"Cmd.Dir", Field, 0},
+ {"Cmd.Env", Field, 0},
+ {"Cmd.Err", Field, 19},
+ {"Cmd.ExtraFiles", Field, 0},
+ {"Cmd.Path", Field, 0},
+ {"Cmd.Process", Field, 0},
+ {"Cmd.ProcessState", Field, 0},
+ {"Cmd.Stderr", Field, 0},
+ {"Cmd.Stdin", Field, 0},
+ {"Cmd.Stdout", Field, 0},
+ {"Cmd.SysProcAttr", Field, 0},
+ {"Cmd.WaitDelay", Field, 20},
+ {"Command", Func, 0},
+ {"CommandContext", Func, 7},
+ {"ErrDot", Var, 19},
+ {"ErrNotFound", Var, 0},
+ {"ErrWaitDelay", Var, 20},
+ {"Error", Type, 0},
+ {"Error.Err", Field, 0},
+ {"Error.Name", Field, 0},
+ {"ExitError", Type, 0},
+ {"ExitError.ProcessState", Field, 0},
+ {"ExitError.Stderr", Field, 6},
+ {"LookPath", Func, 0},
+ },
+ "os/signal": {
+ {"Ignore", Func, 5},
+ {"Ignored", Func, 11},
+ {"Notify", Func, 0},
+ {"NotifyContext", Func, 16},
+ {"Reset", Func, 5},
+ {"Stop", Func, 1},
+ },
+ "os/user": {
+ {"(*User).GroupIds", Method, 7},
+ {"(UnknownGroupError).Error", Method, 7},
+ {"(UnknownGroupIdError).Error", Method, 7},
+ {"(UnknownUserError).Error", Method, 0},
+ {"(UnknownUserIdError).Error", Method, 0},
+ {"Current", Func, 0},
+ {"Group", Type, 7},
+ {"Group.Gid", Field, 7},
+ {"Group.Name", Field, 7},
+ {"Lookup", Func, 0},
+ {"LookupGroup", Func, 7},
+ {"LookupGroupId", Func, 7},
+ {"LookupId", Func, 0},
+ {"UnknownGroupError", Type, 7},
+ {"UnknownGroupIdError", Type, 7},
+ {"UnknownUserError", Type, 0},
+ {"UnknownUserIdError", Type, 0},
+ {"User", Type, 0},
+ {"User.Gid", Field, 0},
+ {"User.HomeDir", Field, 0},
+ {"User.Name", Field, 0},
+ {"User.Uid", Field, 0},
+ {"User.Username", Field, 0},
+ },
+ "path": {
+ {"Base", Func, 0},
+ {"Clean", Func, 0},
+ {"Dir", Func, 0},
+ {"ErrBadPattern", Var, 0},
+ {"Ext", Func, 0},
+ {"IsAbs", Func, 0},
+ {"Join", Func, 0},
+ {"Match", Func, 0},
+ {"Split", Func, 0},
+ },
+ "path/filepath": {
+ {"Abs", Func, 0},
+ {"Base", Func, 0},
+ {"Clean", Func, 0},
+ {"Dir", Func, 0},
+ {"ErrBadPattern", Var, 0},
+ {"EvalSymlinks", Func, 0},
+ {"Ext", Func, 0},
+ {"FromSlash", Func, 0},
+ {"Glob", Func, 0},
+ {"HasPrefix", Func, 0},
+ {"IsAbs", Func, 0},
+ {"IsLocal", Func, 20},
+ {"Join", Func, 0},
+ {"ListSeparator", Const, 0},
+ {"Match", Func, 0},
+ {"Rel", Func, 0},
+ {"Separator", Const, 0},
+ {"SkipAll", Var, 20},
+ {"SkipDir", Var, 0},
+ {"Split", Func, 0},
+ {"SplitList", Func, 0},
+ {"ToSlash", Func, 0},
+ {"VolumeName", Func, 0},
+ {"Walk", Func, 0},
+ {"WalkDir", Func, 16},
+ {"WalkFunc", Type, 0},
+ },
+ "plugin": {
+ {"(*Plugin).Lookup", Method, 8},
+ {"Open", Func, 8},
+ {"Plugin", Type, 8},
+ {"Symbol", Type, 8},
+ },
+ "reflect": {
+ {"(*MapIter).Key", Method, 12},
+ {"(*MapIter).Next", Method, 12},
+ {"(*MapIter).Reset", Method, 18},
+ {"(*MapIter).Value", Method, 12},
+ {"(*ValueError).Error", Method, 0},
+ {"(ChanDir).String", Method, 0},
+ {"(Kind).String", Method, 0},
+ {"(Method).IsExported", Method, 17},
+ {"(StructField).IsExported", Method, 17},
+ {"(StructTag).Get", Method, 0},
+ {"(StructTag).Lookup", Method, 7},
+ {"(Value).Addr", Method, 0},
+ {"(Value).Bool", Method, 0},
+ {"(Value).Bytes", Method, 0},
+ {"(Value).Call", Method, 0},
+ {"(Value).CallSlice", Method, 0},
+ {"(Value).CanAddr", Method, 0},
+ {"(Value).CanComplex", Method, 18},
+ {"(Value).CanConvert", Method, 17},
+ {"(Value).CanFloat", Method, 18},
+ {"(Value).CanInt", Method, 18},
+ {"(Value).CanInterface", Method, 0},
+ {"(Value).CanSet", Method, 0},
+ {"(Value).CanUint", Method, 18},
+ {"(Value).Cap", Method, 0},
+ {"(Value).Clear", Method, 21},
+ {"(Value).Close", Method, 0},
+ {"(Value).Comparable", Method, 20},
+ {"(Value).Complex", Method, 0},
+ {"(Value).Convert", Method, 1},
+ {"(Value).Elem", Method, 0},
+ {"(Value).Equal", Method, 20},
+ {"(Value).Field", Method, 0},
+ {"(Value).FieldByIndex", Method, 0},
+ {"(Value).FieldByIndexErr", Method, 18},
+ {"(Value).FieldByName", Method, 0},
+ {"(Value).FieldByNameFunc", Method, 0},
+ {"(Value).Float", Method, 0},
+ {"(Value).Grow", Method, 20},
+ {"(Value).Index", Method, 0},
+ {"(Value).Int", Method, 0},
+ {"(Value).Interface", Method, 0},
+ {"(Value).InterfaceData", Method, 0},
+ {"(Value).IsNil", Method, 0},
+ {"(Value).IsValid", Method, 0},
+ {"(Value).IsZero", Method, 13},
+ {"(Value).Kind", Method, 0},
+ {"(Value).Len", Method, 0},
+ {"(Value).MapIndex", Method, 0},
+ {"(Value).MapKeys", Method, 0},
+ {"(Value).MapRange", Method, 12},
+ {"(Value).Method", Method, 0},
+ {"(Value).MethodByName", Method, 0},
+ {"(Value).NumField", Method, 0},
+ {"(Value).NumMethod", Method, 0},
+ {"(Value).OverflowComplex", Method, 0},
+ {"(Value).OverflowFloat", Method, 0},
+ {"(Value).OverflowInt", Method, 0},
+ {"(Value).OverflowUint", Method, 0},
+ {"(Value).Pointer", Method, 0},
+ {"(Value).Recv", Method, 0},
+ {"(Value).Send", Method, 0},
+ {"(Value).Set", Method, 0},
+ {"(Value).SetBool", Method, 0},
+ {"(Value).SetBytes", Method, 0},
+ {"(Value).SetCap", Method, 2},
+ {"(Value).SetComplex", Method, 0},
+ {"(Value).SetFloat", Method, 0},
+ {"(Value).SetInt", Method, 0},
+ {"(Value).SetIterKey", Method, 18},
+ {"(Value).SetIterValue", Method, 18},
+ {"(Value).SetLen", Method, 0},
+ {"(Value).SetMapIndex", Method, 0},
+ {"(Value).SetPointer", Method, 0},
+ {"(Value).SetString", Method, 0},
+ {"(Value).SetUint", Method, 0},
+ {"(Value).SetZero", Method, 20},
+ {"(Value).Slice", Method, 0},
+ {"(Value).Slice3", Method, 2},
+ {"(Value).String", Method, 0},
+ {"(Value).TryRecv", Method, 0},
+ {"(Value).TrySend", Method, 0},
+ {"(Value).Type", Method, 0},
+ {"(Value).Uint", Method, 0},
+ {"(Value).UnsafeAddr", Method, 0},
+ {"(Value).UnsafePointer", Method, 18},
+ {"Append", Func, 0},
+ {"AppendSlice", Func, 0},
+ {"Array", Const, 0},
+ {"ArrayOf", Func, 5},
+ {"Bool", Const, 0},
+ {"BothDir", Const, 0},
+ {"Chan", Const, 0},
+ {"ChanDir", Type, 0},
+ {"ChanOf", Func, 1},
+ {"Complex128", Const, 0},
+ {"Complex64", Const, 0},
+ {"Copy", Func, 0},
+ {"DeepEqual", Func, 0},
+ {"Float32", Const, 0},
+ {"Float64", Const, 0},
+ {"Func", Const, 0},
+ {"FuncOf", Func, 5},
+ {"Indirect", Func, 0},
+ {"Int", Const, 0},
+ {"Int16", Const, 0},
+ {"Int32", Const, 0},
+ {"Int64", Const, 0},
+ {"Int8", Const, 0},
+ {"Interface", Const, 0},
+ {"Invalid", Const, 0},
+ {"Kind", Type, 0},
+ {"MakeChan", Func, 0},
+ {"MakeFunc", Func, 1},
+ {"MakeMap", Func, 0},
+ {"MakeMapWithSize", Func, 9},
+ {"MakeSlice", Func, 0},
+ {"Map", Const, 0},
+ {"MapIter", Type, 12},
+ {"MapOf", Func, 1},
+ {"Method", Type, 0},
+ {"Method.Func", Field, 0},
+ {"Method.Index", Field, 0},
+ {"Method.Name", Field, 0},
+ {"Method.PkgPath", Field, 0},
+ {"Method.Type", Field, 0},
+ {"New", Func, 0},
+ {"NewAt", Func, 0},
+ {"Pointer", Const, 18},
+ {"PointerTo", Func, 18},
+ {"Ptr", Const, 0},
+ {"PtrTo", Func, 0},
+ {"RecvDir", Const, 0},
+ {"Select", Func, 1},
+ {"SelectCase", Type, 1},
+ {"SelectCase.Chan", Field, 1},
+ {"SelectCase.Dir", Field, 1},
+ {"SelectCase.Send", Field, 1},
+ {"SelectDefault", Const, 1},
+ {"SelectDir", Type, 1},
+ {"SelectRecv", Const, 1},
+ {"SelectSend", Const, 1},
+ {"SendDir", Const, 0},
+ {"Slice", Const, 0},
+ {"SliceHeader", Type, 0},
+ {"SliceHeader.Cap", Field, 0},
+ {"SliceHeader.Data", Field, 0},
+ {"SliceHeader.Len", Field, 0},
+ {"SliceOf", Func, 1},
+ {"String", Const, 0},
+ {"StringHeader", Type, 0},
+ {"StringHeader.Data", Field, 0},
+ {"StringHeader.Len", Field, 0},
+ {"Struct", Const, 0},
+ {"StructField", Type, 0},
+ {"StructField.Anonymous", Field, 0},
+ {"StructField.Index", Field, 0},
+ {"StructField.Name", Field, 0},
+ {"StructField.Offset", Field, 0},
+ {"StructField.PkgPath", Field, 0},
+ {"StructField.Tag", Field, 0},
+ {"StructField.Type", Field, 0},
+ {"StructOf", Func, 7},
+ {"StructTag", Type, 0},
+ {"Swapper", Func, 8},
+ {"Type", Type, 0},
+ {"TypeFor", Func, 22},
+ {"TypeOf", Func, 0},
+ {"Uint", Const, 0},
+ {"Uint16", Const, 0},
+ {"Uint32", Const, 0},
+ {"Uint64", Const, 0},
+ {"Uint8", Const, 0},
+ {"Uintptr", Const, 0},
+ {"UnsafePointer", Const, 0},
+ {"Value", Type, 0},
+ {"ValueError", Type, 0},
+ {"ValueError.Kind", Field, 0},
+ {"ValueError.Method", Field, 0},
+ {"ValueOf", Func, 0},
+ {"VisibleFields", Func, 17},
+ {"Zero", Func, 0},
+ },
+ "regexp": {
+ {"(*Regexp).Copy", Method, 6},
+ {"(*Regexp).Expand", Method, 0},
+ {"(*Regexp).ExpandString", Method, 0},
+ {"(*Regexp).Find", Method, 0},
+ {"(*Regexp).FindAll", Method, 0},
+ {"(*Regexp).FindAllIndex", Method, 0},
+ {"(*Regexp).FindAllString", Method, 0},
+ {"(*Regexp).FindAllStringIndex", Method, 0},
+ {"(*Regexp).FindAllStringSubmatch", Method, 0},
+ {"(*Regexp).FindAllStringSubmatchIndex", Method, 0},
+ {"(*Regexp).FindAllSubmatch", Method, 0},
+ {"(*Regexp).FindAllSubmatchIndex", Method, 0},
+ {"(*Regexp).FindIndex", Method, 0},
+ {"(*Regexp).FindReaderIndex", Method, 0},
+ {"(*Regexp).FindReaderSubmatchIndex", Method, 0},
+ {"(*Regexp).FindString", Method, 0},
+ {"(*Regexp).FindStringIndex", Method, 0},
+ {"(*Regexp).FindStringSubmatch", Method, 0},
+ {"(*Regexp).FindStringSubmatchIndex", Method, 0},
+ {"(*Regexp).FindSubmatch", Method, 0},
+ {"(*Regexp).FindSubmatchIndex", Method, 0},
+ {"(*Regexp).LiteralPrefix", Method, 0},
+ {"(*Regexp).Longest", Method, 1},
+ {"(*Regexp).MarshalText", Method, 21},
+ {"(*Regexp).Match", Method, 0},
+ {"(*Regexp).MatchReader", Method, 0},
+ {"(*Regexp).MatchString", Method, 0},
+ {"(*Regexp).NumSubexp", Method, 0},
+ {"(*Regexp).ReplaceAll", Method, 0},
+ {"(*Regexp).ReplaceAllFunc", Method, 0},
+ {"(*Regexp).ReplaceAllLiteral", Method, 0},
+ {"(*Regexp).ReplaceAllLiteralString", Method, 0},
+ {"(*Regexp).ReplaceAllString", Method, 0},
+ {"(*Regexp).ReplaceAllStringFunc", Method, 0},
+ {"(*Regexp).Split", Method, 1},
+ {"(*Regexp).String", Method, 0},
+ {"(*Regexp).SubexpIndex", Method, 15},
+ {"(*Regexp).SubexpNames", Method, 0},
+ {"(*Regexp).UnmarshalText", Method, 21},
+ {"Compile", Func, 0},
+ {"CompilePOSIX", Func, 0},
+ {"Match", Func, 0},
+ {"MatchReader", Func, 0},
+ {"MatchString", Func, 0},
+ {"MustCompile", Func, 0},
+ {"MustCompilePOSIX", Func, 0},
+ {"QuoteMeta", Func, 0},
+ {"Regexp", Type, 0},
+ },
+ "regexp/syntax": {
+ {"(*Error).Error", Method, 0},
+ {"(*Inst).MatchEmptyWidth", Method, 0},
+ {"(*Inst).MatchRune", Method, 0},
+ {"(*Inst).MatchRunePos", Method, 3},
+ {"(*Inst).String", Method, 0},
+ {"(*Prog).Prefix", Method, 0},
+ {"(*Prog).StartCond", Method, 0},
+ {"(*Prog).String", Method, 0},
+ {"(*Regexp).CapNames", Method, 0},
+ {"(*Regexp).Equal", Method, 0},
+ {"(*Regexp).MaxCap", Method, 0},
+ {"(*Regexp).Simplify", Method, 0},
+ {"(*Regexp).String", Method, 0},
+ {"(ErrorCode).String", Method, 0},
+ {"(InstOp).String", Method, 3},
+ {"(Op).String", Method, 11},
+ {"ClassNL", Const, 0},
+ {"Compile", Func, 0},
+ {"DotNL", Const, 0},
+ {"EmptyBeginLine", Const, 0},
+ {"EmptyBeginText", Const, 0},
+ {"EmptyEndLine", Const, 0},
+ {"EmptyEndText", Const, 0},
+ {"EmptyNoWordBoundary", Const, 0},
+ {"EmptyOp", Type, 0},
+ {"EmptyOpContext", Func, 0},
+ {"EmptyWordBoundary", Const, 0},
+ {"ErrInternalError", Const, 0},
+ {"ErrInvalidCharClass", Const, 0},
+ {"ErrInvalidCharRange", Const, 0},
+ {"ErrInvalidEscape", Const, 0},
+ {"ErrInvalidNamedCapture", Const, 0},
+ {"ErrInvalidPerlOp", Const, 0},
+ {"ErrInvalidRepeatOp", Const, 0},
+ {"ErrInvalidRepeatSize", Const, 0},
+ {"ErrInvalidUTF8", Const, 0},
+ {"ErrLarge", Const, 20},
+ {"ErrMissingBracket", Const, 0},
+ {"ErrMissingParen", Const, 0},
+ {"ErrMissingRepeatArgument", Const, 0},
+ {"ErrNestingDepth", Const, 19},
+ {"ErrTrailingBackslash", Const, 0},
+ {"ErrUnexpectedParen", Const, 1},
+ {"Error", Type, 0},
+ {"Error.Code", Field, 0},
+ {"Error.Expr", Field, 0},
+ {"ErrorCode", Type, 0},
+ {"Flags", Type, 0},
+ {"FoldCase", Const, 0},
+ {"Inst", Type, 0},
+ {"Inst.Arg", Field, 0},
+ {"Inst.Op", Field, 0},
+ {"Inst.Out", Field, 0},
+ {"Inst.Rune", Field, 0},
+ {"InstAlt", Const, 0},
+ {"InstAltMatch", Const, 0},
+ {"InstCapture", Const, 0},
+ {"InstEmptyWidth", Const, 0},
+ {"InstFail", Const, 0},
+ {"InstMatch", Const, 0},
+ {"InstNop", Const, 0},
+ {"InstOp", Type, 0},
+ {"InstRune", Const, 0},
+ {"InstRune1", Const, 0},
+ {"InstRuneAny", Const, 0},
+ {"InstRuneAnyNotNL", Const, 0},
+ {"IsWordChar", Func, 0},
+ {"Literal", Const, 0},
+ {"MatchNL", Const, 0},
+ {"NonGreedy", Const, 0},
+ {"OneLine", Const, 0},
+ {"Op", Type, 0},
+ {"OpAlternate", Const, 0},
+ {"OpAnyChar", Const, 0},
+ {"OpAnyCharNotNL", Const, 0},
+ {"OpBeginLine", Const, 0},
+ {"OpBeginText", Const, 0},
+ {"OpCapture", Const, 0},
+ {"OpCharClass", Const, 0},
+ {"OpConcat", Const, 0},
+ {"OpEmptyMatch", Const, 0},
+ {"OpEndLine", Const, 0},
+ {"OpEndText", Const, 0},
+ {"OpLiteral", Const, 0},
+ {"OpNoMatch", Const, 0},
+ {"OpNoWordBoundary", Const, 0},
+ {"OpPlus", Const, 0},
+ {"OpQuest", Const, 0},
+ {"OpRepeat", Const, 0},
+ {"OpStar", Const, 0},
+ {"OpWordBoundary", Const, 0},
+ {"POSIX", Const, 0},
+ {"Parse", Func, 0},
+ {"Perl", Const, 0},
+ {"PerlX", Const, 0},
+ {"Prog", Type, 0},
+ {"Prog.Inst", Field, 0},
+ {"Prog.NumCap", Field, 0},
+ {"Prog.Start", Field, 0},
+ {"Regexp", Type, 0},
+ {"Regexp.Cap", Field, 0},
+ {"Regexp.Flags", Field, 0},
+ {"Regexp.Max", Field, 0},
+ {"Regexp.Min", Field, 0},
+ {"Regexp.Name", Field, 0},
+ {"Regexp.Op", Field, 0},
+ {"Regexp.Rune", Field, 0},
+ {"Regexp.Rune0", Field, 0},
+ {"Regexp.Sub", Field, 0},
+ {"Regexp.Sub0", Field, 0},
+ {"Simple", Const, 0},
+ {"UnicodeGroups", Const, 0},
+ {"WasDollar", Const, 0},
+ },
+ "runtime": {
+ {"(*BlockProfileRecord).Stack", Method, 1},
+ {"(*Frames).Next", Method, 7},
+ {"(*Func).Entry", Method, 0},
+ {"(*Func).FileLine", Method, 0},
+ {"(*Func).Name", Method, 0},
+ {"(*MemProfileRecord).InUseBytes", Method, 0},
+ {"(*MemProfileRecord).InUseObjects", Method, 0},
+ {"(*MemProfileRecord).Stack", Method, 0},
+ {"(*PanicNilError).Error", Method, 21},
+ {"(*PanicNilError).RuntimeError", Method, 21},
+ {"(*Pinner).Pin", Method, 21},
+ {"(*Pinner).Unpin", Method, 21},
+ {"(*StackRecord).Stack", Method, 0},
+ {"(*TypeAssertionError).Error", Method, 0},
+ {"(*TypeAssertionError).RuntimeError", Method, 0},
+ {"BlockProfile", Func, 1},
+ {"BlockProfileRecord", Type, 1},
+ {"BlockProfileRecord.Count", Field, 1},
+ {"BlockProfileRecord.Cycles", Field, 1},
+ {"BlockProfileRecord.StackRecord", Field, 1},
+ {"Breakpoint", Func, 0},
+ {"CPUProfile", Func, 0},
+ {"Caller", Func, 0},
+ {"Callers", Func, 0},
+ {"CallersFrames", Func, 7},
+ {"Compiler", Const, 0},
+ {"Error", Type, 0},
+ {"Frame", Type, 7},
+ {"Frame.Entry", Field, 7},
+ {"Frame.File", Field, 7},
+ {"Frame.Func", Field, 7},
+ {"Frame.Function", Field, 7},
+ {"Frame.Line", Field, 7},
+ {"Frame.PC", Field, 7},
+ {"Frames", Type, 7},
+ {"Func", Type, 0},
+ {"FuncForPC", Func, 0},
+ {"GC", Func, 0},
+ {"GOARCH", Const, 0},
+ {"GOMAXPROCS", Func, 0},
+ {"GOOS", Const, 0},
+ {"GOROOT", Func, 0},
+ {"Goexit", Func, 0},
+ {"GoroutineProfile", Func, 0},
+ {"Gosched", Func, 0},
+ {"KeepAlive", Func, 7},
+ {"LockOSThread", Func, 0},
+ {"MemProfile", Func, 0},
+ {"MemProfileRate", Var, 0},
+ {"MemProfileRecord", Type, 0},
+ {"MemProfileRecord.AllocBytes", Field, 0},
+ {"MemProfileRecord.AllocObjects", Field, 0},
+ {"MemProfileRecord.FreeBytes", Field, 0},
+ {"MemProfileRecord.FreeObjects", Field, 0},
+ {"MemProfileRecord.Stack0", Field, 0},
+ {"MemStats", Type, 0},
+ {"MemStats.Alloc", Field, 0},
+ {"MemStats.BuckHashSys", Field, 0},
+ {"MemStats.BySize", Field, 0},
+ {"MemStats.DebugGC", Field, 0},
+ {"MemStats.EnableGC", Field, 0},
+ {"MemStats.Frees", Field, 0},
+ {"MemStats.GCCPUFraction", Field, 5},
+ {"MemStats.GCSys", Field, 2},
+ {"MemStats.HeapAlloc", Field, 0},
+ {"MemStats.HeapIdle", Field, 0},
+ {"MemStats.HeapInuse", Field, 0},
+ {"MemStats.HeapObjects", Field, 0},
+ {"MemStats.HeapReleased", Field, 0},
+ {"MemStats.HeapSys", Field, 0},
+ {"MemStats.LastGC", Field, 0},
+ {"MemStats.Lookups", Field, 0},
+ {"MemStats.MCacheInuse", Field, 0},
+ {"MemStats.MCacheSys", Field, 0},
+ {"MemStats.MSpanInuse", Field, 0},
+ {"MemStats.MSpanSys", Field, 0},
+ {"MemStats.Mallocs", Field, 0},
+ {"MemStats.NextGC", Field, 0},
+ {"MemStats.NumForcedGC", Field, 8},
+ {"MemStats.NumGC", Field, 0},
+ {"MemStats.OtherSys", Field, 2},
+ {"MemStats.PauseEnd", Field, 4},
+ {"MemStats.PauseNs", Field, 0},
+ {"MemStats.PauseTotalNs", Field, 0},
+ {"MemStats.StackInuse", Field, 0},
+ {"MemStats.StackSys", Field, 0},
+ {"MemStats.Sys", Field, 0},
+ {"MemStats.TotalAlloc", Field, 0},
+ {"MutexProfile", Func, 8},
+ {"NumCPU", Func, 0},
+ {"NumCgoCall", Func, 0},
+ {"NumGoroutine", Func, 0},
+ {"PanicNilError", Type, 21},
+ {"Pinner", Type, 21},
+ {"ReadMemStats", Func, 0},
+ {"ReadTrace", Func, 5},
+ {"SetBlockProfileRate", Func, 1},
+ {"SetCPUProfileRate", Func, 0},
+ {"SetCgoTraceback", Func, 7},
+ {"SetFinalizer", Func, 0},
+ {"SetMutexProfileFraction", Func, 8},
+ {"Stack", Func, 0},
+ {"StackRecord", Type, 0},
+ {"StackRecord.Stack0", Field, 0},
+ {"StartTrace", Func, 5},
+ {"StopTrace", Func, 5},
+ {"ThreadCreateProfile", Func, 0},
+ {"TypeAssertionError", Type, 0},
+ {"UnlockOSThread", Func, 0},
+ {"Version", Func, 0},
+ },
+ "runtime/cgo": {
+ {"(Handle).Delete", Method, 17},
+ {"(Handle).Value", Method, 17},
+ {"Handle", Type, 17},
+ {"Incomplete", Type, 20},
+ {"NewHandle", Func, 17},
+ },
+ "runtime/coverage": {
+ {"ClearCounters", Func, 20},
+ {"WriteCounters", Func, 20},
+ {"WriteCountersDir", Func, 20},
+ {"WriteMeta", Func, 20},
+ {"WriteMetaDir", Func, 20},
+ },
+ "runtime/debug": {
+ {"(*BuildInfo).String", Method, 18},
+ {"BuildInfo", Type, 12},
+ {"BuildInfo.Deps", Field, 12},
+ {"BuildInfo.GoVersion", Field, 18},
+ {"BuildInfo.Main", Field, 12},
+ {"BuildInfo.Path", Field, 12},
+ {"BuildInfo.Settings", Field, 18},
+ {"BuildSetting", Type, 18},
+ {"BuildSetting.Key", Field, 18},
+ {"BuildSetting.Value", Field, 18},
+ {"FreeOSMemory", Func, 1},
+ {"GCStats", Type, 1},
+ {"GCStats.LastGC", Field, 1},
+ {"GCStats.NumGC", Field, 1},
+ {"GCStats.Pause", Field, 1},
+ {"GCStats.PauseEnd", Field, 4},
+ {"GCStats.PauseQuantiles", Field, 1},
+ {"GCStats.PauseTotal", Field, 1},
+ {"Module", Type, 12},
+ {"Module.Path", Field, 12},
+ {"Module.Replace", Field, 12},
+ {"Module.Sum", Field, 12},
+ {"Module.Version", Field, 12},
+ {"ParseBuildInfo", Func, 18},
+ {"PrintStack", Func, 0},
+ {"ReadBuildInfo", Func, 12},
+ {"ReadGCStats", Func, 1},
+ {"SetGCPercent", Func, 1},
+ {"SetMaxStack", Func, 2},
+ {"SetMaxThreads", Func, 2},
+ {"SetMemoryLimit", Func, 19},
+ {"SetPanicOnFault", Func, 3},
+ {"SetTraceback", Func, 6},
+ {"Stack", Func, 0},
+ {"WriteHeapDump", Func, 3},
+ },
+ "runtime/metrics": {
+ {"(Value).Float64", Method, 16},
+ {"(Value).Float64Histogram", Method, 16},
+ {"(Value).Kind", Method, 16},
+ {"(Value).Uint64", Method, 16},
+ {"All", Func, 16},
+ {"Description", Type, 16},
+ {"Description.Cumulative", Field, 16},
+ {"Description.Description", Field, 16},
+ {"Description.Kind", Field, 16},
+ {"Description.Name", Field, 16},
+ {"Float64Histogram", Type, 16},
+ {"Float64Histogram.Buckets", Field, 16},
+ {"Float64Histogram.Counts", Field, 16},
+ {"KindBad", Const, 16},
+ {"KindFloat64", Const, 16},
+ {"KindFloat64Histogram", Const, 16},
+ {"KindUint64", Const, 16},
+ {"Read", Func, 16},
+ {"Sample", Type, 16},
+ {"Sample.Name", Field, 16},
+ {"Sample.Value", Field, 16},
+ {"Value", Type, 16},
+ {"ValueKind", Type, 16},
+ },
+ "runtime/pprof": {
+ {"(*Profile).Add", Method, 0},
+ {"(*Profile).Count", Method, 0},
+ {"(*Profile).Name", Method, 0},
+ {"(*Profile).Remove", Method, 0},
+ {"(*Profile).WriteTo", Method, 0},
+ {"Do", Func, 9},
+ {"ForLabels", Func, 9},
+ {"Label", Func, 9},
+ {"LabelSet", Type, 9},
+ {"Labels", Func, 9},
+ {"Lookup", Func, 0},
+ {"NewProfile", Func, 0},
+ {"Profile", Type, 0},
+ {"Profiles", Func, 0},
+ {"SetGoroutineLabels", Func, 9},
+ {"StartCPUProfile", Func, 0},
+ {"StopCPUProfile", Func, 0},
+ {"WithLabels", Func, 9},
+ {"WriteHeapProfile", Func, 0},
+ },
+ "runtime/trace": {
+ {"(*Region).End", Method, 11},
+ {"(*Task).End", Method, 11},
+ {"IsEnabled", Func, 11},
+ {"Log", Func, 11},
+ {"Logf", Func, 11},
+ {"NewTask", Func, 11},
+ {"Region", Type, 11},
+ {"Start", Func, 5},
+ {"StartRegion", Func, 11},
+ {"Stop", Func, 5},
+ {"Task", Type, 11},
+ {"WithRegion", Func, 11},
+ },
+ "slices": {
+ {"BinarySearch", Func, 21},
+ {"BinarySearchFunc", Func, 21},
+ {"Clip", Func, 21},
+ {"Clone", Func, 21},
+ {"Compact", Func, 21},
+ {"CompactFunc", Func, 21},
+ {"Compare", Func, 21},
+ {"CompareFunc", Func, 21},
+ {"Concat", Func, 22},
+ {"Contains", Func, 21},
+ {"ContainsFunc", Func, 21},
+ {"Delete", Func, 21},
+ {"DeleteFunc", Func, 21},
+ {"Equal", Func, 21},
+ {"EqualFunc", Func, 21},
+ {"Grow", Func, 21},
+ {"Index", Func, 21},
+ {"IndexFunc", Func, 21},
+ {"Insert", Func, 21},
+ {"IsSorted", Func, 21},
+ {"IsSortedFunc", Func, 21},
+ {"Max", Func, 21},
+ {"MaxFunc", Func, 21},
+ {"Min", Func, 21},
+ {"MinFunc", Func, 21},
+ {"Replace", Func, 21},
+ {"Reverse", Func, 21},
+ {"Sort", Func, 21},
+ {"SortFunc", Func, 21},
+ {"SortStableFunc", Func, 21},
+ },
+ "sort": {
+ {"(Float64Slice).Len", Method, 0},
+ {"(Float64Slice).Less", Method, 0},
+ {"(Float64Slice).Search", Method, 0},
+ {"(Float64Slice).Sort", Method, 0},
+ {"(Float64Slice).Swap", Method, 0},
+ {"(IntSlice).Len", Method, 0},
+ {"(IntSlice).Less", Method, 0},
+ {"(IntSlice).Search", Method, 0},
+ {"(IntSlice).Sort", Method, 0},
+ {"(IntSlice).Swap", Method, 0},
+ {"(StringSlice).Len", Method, 0},
+ {"(StringSlice).Less", Method, 0},
+ {"(StringSlice).Search", Method, 0},
+ {"(StringSlice).Sort", Method, 0},
+ {"(StringSlice).Swap", Method, 0},
+ {"Find", Func, 19},
+ {"Float64Slice", Type, 0},
+ {"Float64s", Func, 0},
+ {"Float64sAreSorted", Func, 0},
+ {"IntSlice", Type, 0},
+ {"Interface", Type, 0},
+ {"Ints", Func, 0},
+ {"IntsAreSorted", Func, 0},
+ {"IsSorted", Func, 0},
+ {"Reverse", Func, 1},
+ {"Search", Func, 0},
+ {"SearchFloat64s", Func, 0},
+ {"SearchInts", Func, 0},
+ {"SearchStrings", Func, 0},
+ {"Slice", Func, 8},
+ {"SliceIsSorted", Func, 8},
+ {"SliceStable", Func, 8},
+ {"Sort", Func, 0},
+ {"Stable", Func, 2},
+ {"StringSlice", Type, 0},
+ {"Strings", Func, 0},
+ {"StringsAreSorted", Func, 0},
+ },
+ "strconv": {
+ {"(*NumError).Error", Method, 0},
+ {"(*NumError).Unwrap", Method, 14},
+ {"AppendBool", Func, 0},
+ {"AppendFloat", Func, 0},
+ {"AppendInt", Func, 0},
+ {"AppendQuote", Func, 0},
+ {"AppendQuoteRune", Func, 0},
+ {"AppendQuoteRuneToASCII", Func, 0},
+ {"AppendQuoteRuneToGraphic", Func, 6},
+ {"AppendQuoteToASCII", Func, 0},
+ {"AppendQuoteToGraphic", Func, 6},
+ {"AppendUint", Func, 0},
+ {"Atoi", Func, 0},
+ {"CanBackquote", Func, 0},
+ {"ErrRange", Var, 0},
+ {"ErrSyntax", Var, 0},
+ {"FormatBool", Func, 0},
+ {"FormatComplex", Func, 15},
+ {"FormatFloat", Func, 0},
+ {"FormatInt", Func, 0},
+ {"FormatUint", Func, 0},
+ {"IntSize", Const, 0},
+ {"IsGraphic", Func, 6},
+ {"IsPrint", Func, 0},
+ {"Itoa", Func, 0},
+ {"NumError", Type, 0},
+ {"NumError.Err", Field, 0},
+ {"NumError.Func", Field, 0},
+ {"NumError.Num", Field, 0},
+ {"ParseBool", Func, 0},
+ {"ParseComplex", Func, 15},
+ {"ParseFloat", Func, 0},
+ {"ParseInt", Func, 0},
+ {"ParseUint", Func, 0},
+ {"Quote", Func, 0},
+ {"QuoteRune", Func, 0},
+ {"QuoteRuneToASCII", Func, 0},
+ {"QuoteRuneToGraphic", Func, 6},
+ {"QuoteToASCII", Func, 0},
+ {"QuoteToGraphic", Func, 6},
+ {"QuotedPrefix", Func, 17},
+ {"Unquote", Func, 0},
+ {"UnquoteChar", Func, 0},
+ },
+ "strings": {
+ {"(*Builder).Cap", Method, 12},
+ {"(*Builder).Grow", Method, 10},
+ {"(*Builder).Len", Method, 10},
+ {"(*Builder).Reset", Method, 10},
+ {"(*Builder).String", Method, 10},
+ {"(*Builder).Write", Method, 10},
+ {"(*Builder).WriteByte", Method, 10},
+ {"(*Builder).WriteRune", Method, 10},
+ {"(*Builder).WriteString", Method, 10},
+ {"(*Reader).Len", Method, 0},
+ {"(*Reader).Read", Method, 0},
+ {"(*Reader).ReadAt", Method, 0},
+ {"(*Reader).ReadByte", Method, 0},
+ {"(*Reader).ReadRune", Method, 0},
+ {"(*Reader).Reset", Method, 7},
+ {"(*Reader).Seek", Method, 0},
+ {"(*Reader).Size", Method, 5},
+ {"(*Reader).UnreadByte", Method, 0},
+ {"(*Reader).UnreadRune", Method, 0},
+ {"(*Reader).WriteTo", Method, 1},
+ {"(*Replacer).Replace", Method, 0},
+ {"(*Replacer).WriteString", Method, 0},
+ {"Builder", Type, 10},
+ {"Clone", Func, 18},
+ {"Compare", Func, 5},
+ {"Contains", Func, 0},
+ {"ContainsAny", Func, 0},
+ {"ContainsFunc", Func, 21},
+ {"ContainsRune", Func, 0},
+ {"Count", Func, 0},
+ {"Cut", Func, 18},
+ {"CutPrefix", Func, 20},
+ {"CutSuffix", Func, 20},
+ {"EqualFold", Func, 0},
+ {"Fields", Func, 0},
+ {"FieldsFunc", Func, 0},
+ {"HasPrefix", Func, 0},
+ {"HasSuffix", Func, 0},
+ {"Index", Func, 0},
+ {"IndexAny", Func, 0},
+ {"IndexByte", Func, 2},
+ {"IndexFunc", Func, 0},
+ {"IndexRune", Func, 0},
+ {"Join", Func, 0},
+ {"LastIndex", Func, 0},
+ {"LastIndexAny", Func, 0},
+ {"LastIndexByte", Func, 5},
+ {"LastIndexFunc", Func, 0},
+ {"Map", Func, 0},
+ {"NewReader", Func, 0},
+ {"NewReplacer", Func, 0},
+ {"Reader", Type, 0},
+ {"Repeat", Func, 0},
+ {"Replace", Func, 0},
+ {"ReplaceAll", Func, 12},
+ {"Replacer", Type, 0},
+ {"Split", Func, 0},
+ {"SplitAfter", Func, 0},
+ {"SplitAfterN", Func, 0},
+ {"SplitN", Func, 0},
+ {"Title", Func, 0},
+ {"ToLower", Func, 0},
+ {"ToLowerSpecial", Func, 0},
+ {"ToTitle", Func, 0},
+ {"ToTitleSpecial", Func, 0},
+ {"ToUpper", Func, 0},
+ {"ToUpperSpecial", Func, 0},
+ {"ToValidUTF8", Func, 13},
+ {"Trim", Func, 0},
+ {"TrimFunc", Func, 0},
+ {"TrimLeft", Func, 0},
+ {"TrimLeftFunc", Func, 0},
+ {"TrimPrefix", Func, 1},
+ {"TrimRight", Func, 0},
+ {"TrimRightFunc", Func, 0},
+ {"TrimSpace", Func, 0},
+ {"TrimSuffix", Func, 1},
+ },
+ "sync": {
+ {"(*Cond).Broadcast", Method, 0},
+ {"(*Cond).Signal", Method, 0},
+ {"(*Cond).Wait", Method, 0},
+ {"(*Map).CompareAndDelete", Method, 20},
+ {"(*Map).CompareAndSwap", Method, 20},
+ {"(*Map).Delete", Method, 9},
+ {"(*Map).Load", Method, 9},
+ {"(*Map).LoadAndDelete", Method, 15},
+ {"(*Map).LoadOrStore", Method, 9},
+ {"(*Map).Range", Method, 9},
+ {"(*Map).Store", Method, 9},
+ {"(*Map).Swap", Method, 20},
+ {"(*Mutex).Lock", Method, 0},
+ {"(*Mutex).TryLock", Method, 18},
+ {"(*Mutex).Unlock", Method, 0},
+ {"(*Once).Do", Method, 0},
+ {"(*Pool).Get", Method, 3},
+ {"(*Pool).Put", Method, 3},
+ {"(*RWMutex).Lock", Method, 0},
+ {"(*RWMutex).RLock", Method, 0},
+ {"(*RWMutex).RLocker", Method, 0},
+ {"(*RWMutex).RUnlock", Method, 0},
+ {"(*RWMutex).TryLock", Method, 18},
+ {"(*RWMutex).TryRLock", Method, 18},
+ {"(*RWMutex).Unlock", Method, 0},
+ {"(*WaitGroup).Add", Method, 0},
+ {"(*WaitGroup).Done", Method, 0},
+ {"(*WaitGroup).Wait", Method, 0},
+ {"Cond", Type, 0},
+ {"Cond.L", Field, 0},
+ {"Locker", Type, 0},
+ {"Map", Type, 9},
+ {"Mutex", Type, 0},
+ {"NewCond", Func, 0},
+ {"Once", Type, 0},
+ {"OnceFunc", Func, 21},
+ {"OnceValue", Func, 21},
+ {"OnceValues", Func, 21},
+ {"Pool", Type, 3},
+ {"Pool.New", Field, 3},
+ {"RWMutex", Type, 0},
+ {"WaitGroup", Type, 0},
+ },
+ "sync/atomic": {
+ {"(*Bool).CompareAndSwap", Method, 19},
+ {"(*Bool).Load", Method, 19},
+ {"(*Bool).Store", Method, 19},
+ {"(*Bool).Swap", Method, 19},
+ {"(*Int32).Add", Method, 19},
+ {"(*Int32).CompareAndSwap", Method, 19},
+ {"(*Int32).Load", Method, 19},
+ {"(*Int32).Store", Method, 19},
+ {"(*Int32).Swap", Method, 19},
+ {"(*Int64).Add", Method, 19},
+ {"(*Int64).CompareAndSwap", Method, 19},
+ {"(*Int64).Load", Method, 19},
+ {"(*Int64).Store", Method, 19},
+ {"(*Int64).Swap", Method, 19},
+ {"(*Pointer).CompareAndSwap", Method, 19},
+ {"(*Pointer).Load", Method, 19},
+ {"(*Pointer).Store", Method, 19},
+ {"(*Pointer).Swap", Method, 19},
+ {"(*Uint32).Add", Method, 19},
+ {"(*Uint32).CompareAndSwap", Method, 19},
+ {"(*Uint32).Load", Method, 19},
+ {"(*Uint32).Store", Method, 19},
+ {"(*Uint32).Swap", Method, 19},
+ {"(*Uint64).Add", Method, 19},
+ {"(*Uint64).CompareAndSwap", Method, 19},
+ {"(*Uint64).Load", Method, 19},
+ {"(*Uint64).Store", Method, 19},
+ {"(*Uint64).Swap", Method, 19},
+ {"(*Uintptr).Add", Method, 19},
+ {"(*Uintptr).CompareAndSwap", Method, 19},
+ {"(*Uintptr).Load", Method, 19},
+ {"(*Uintptr).Store", Method, 19},
+ {"(*Uintptr).Swap", Method, 19},
+ {"(*Value).CompareAndSwap", Method, 17},
+ {"(*Value).Load", Method, 4},
+ {"(*Value).Store", Method, 4},
+ {"(*Value).Swap", Method, 17},
+ {"AddInt32", Func, 0},
+ {"AddInt64", Func, 0},
+ {"AddUint32", Func, 0},
+ {"AddUint64", Func, 0},
+ {"AddUintptr", Func, 0},
+ {"Bool", Type, 19},
+ {"CompareAndSwapInt32", Func, 0},
+ {"CompareAndSwapInt64", Func, 0},
+ {"CompareAndSwapPointer", Func, 0},
+ {"CompareAndSwapUint32", Func, 0},
+ {"CompareAndSwapUint64", Func, 0},
+ {"CompareAndSwapUintptr", Func, 0},
+ {"Int32", Type, 19},
+ {"Int64", Type, 19},
+ {"LoadInt32", Func, 0},
+ {"LoadInt64", Func, 0},
+ {"LoadPointer", Func, 0},
+ {"LoadUint32", Func, 0},
+ {"LoadUint64", Func, 0},
+ {"LoadUintptr", Func, 0},
+ {"Pointer", Type, 19},
+ {"StoreInt32", Func, 0},
+ {"StoreInt64", Func, 0},
+ {"StorePointer", Func, 0},
+ {"StoreUint32", Func, 0},
+ {"StoreUint64", Func, 0},
+ {"StoreUintptr", Func, 0},
+ {"SwapInt32", Func, 2},
+ {"SwapInt64", Func, 2},
+ {"SwapPointer", Func, 2},
+ {"SwapUint32", Func, 2},
+ {"SwapUint64", Func, 2},
+ {"SwapUintptr", Func, 2},
+ {"Uint32", Type, 19},
+ {"Uint64", Type, 19},
+ {"Uintptr", Type, 19},
+ {"Value", Type, 4},
+ },
+ "syscall": {
+ {"(*Cmsghdr).SetLen", Method, 0},
+ {"(*DLL).FindProc", Method, 0},
+ {"(*DLL).MustFindProc", Method, 0},
+ {"(*DLL).Release", Method, 0},
+ {"(*DLLError).Error", Method, 0},
+ {"(*DLLError).Unwrap", Method, 16},
+ {"(*Filetime).Nanoseconds", Method, 0},
+ {"(*Iovec).SetLen", Method, 0},
+ {"(*LazyDLL).Handle", Method, 0},
+ {"(*LazyDLL).Load", Method, 0},
+ {"(*LazyDLL).NewProc", Method, 0},
+ {"(*LazyProc).Addr", Method, 0},
+ {"(*LazyProc).Call", Method, 0},
+ {"(*LazyProc).Find", Method, 0},
+ {"(*Msghdr).SetControllen", Method, 0},
+ {"(*Proc).Addr", Method, 0},
+ {"(*Proc).Call", Method, 0},
+ {"(*PtraceRegs).PC", Method, 0},
+ {"(*PtraceRegs).SetPC", Method, 0},
+ {"(*RawSockaddrAny).Sockaddr", Method, 0},
+ {"(*SID).Copy", Method, 0},
+ {"(*SID).Len", Method, 0},
+ {"(*SID).LookupAccount", Method, 0},
+ {"(*SID).String", Method, 0},
+ {"(*Timespec).Nano", Method, 0},
+ {"(*Timespec).Unix", Method, 0},
+ {"(*Timeval).Nano", Method, 0},
+ {"(*Timeval).Nanoseconds", Method, 0},
+ {"(*Timeval).Unix", Method, 0},
+ {"(Errno).Error", Method, 0},
+ {"(Errno).Is", Method, 13},
+ {"(Errno).Temporary", Method, 0},
+ {"(Errno).Timeout", Method, 0},
+ {"(Signal).Signal", Method, 0},
+ {"(Signal).String", Method, 0},
+ {"(Token).Close", Method, 0},
+ {"(Token).GetTokenPrimaryGroup", Method, 0},
+ {"(Token).GetTokenUser", Method, 0},
+ {"(Token).GetUserProfileDirectory", Method, 0},
+ {"(WaitStatus).Continued", Method, 0},
+ {"(WaitStatus).CoreDump", Method, 0},
+ {"(WaitStatus).ExitStatus", Method, 0},
+ {"(WaitStatus).Exited", Method, 0},
+ {"(WaitStatus).Signal", Method, 0},
+ {"(WaitStatus).Signaled", Method, 0},
+ {"(WaitStatus).StopSignal", Method, 0},
+ {"(WaitStatus).Stopped", Method, 0},
+ {"(WaitStatus).TrapCause", Method, 0},
+ {"AF_ALG", Const, 0},
+ {"AF_APPLETALK", Const, 0},
+ {"AF_ARP", Const, 0},
+ {"AF_ASH", Const, 0},
+ {"AF_ATM", Const, 0},
+ {"AF_ATMPVC", Const, 0},
+ {"AF_ATMSVC", Const, 0},
+ {"AF_AX25", Const, 0},
+ {"AF_BLUETOOTH", Const, 0},
+ {"AF_BRIDGE", Const, 0},
+ {"AF_CAIF", Const, 0},
+ {"AF_CAN", Const, 0},
+ {"AF_CCITT", Const, 0},
+ {"AF_CHAOS", Const, 0},
+ {"AF_CNT", Const, 0},
+ {"AF_COIP", Const, 0},
+ {"AF_DATAKIT", Const, 0},
+ {"AF_DECnet", Const, 0},
+ {"AF_DLI", Const, 0},
+ {"AF_E164", Const, 0},
+ {"AF_ECMA", Const, 0},
+ {"AF_ECONET", Const, 0},
+ {"AF_ENCAP", Const, 1},
+ {"AF_FILE", Const, 0},
+ {"AF_HYLINK", Const, 0},
+ {"AF_IEEE80211", Const, 0},
+ {"AF_IEEE802154", Const, 0},
+ {"AF_IMPLINK", Const, 0},
+ {"AF_INET", Const, 0},
+ {"AF_INET6", Const, 0},
+ {"AF_INET6_SDP", Const, 3},
+ {"AF_INET_SDP", Const, 3},
+ {"AF_IPX", Const, 0},
+ {"AF_IRDA", Const, 0},
+ {"AF_ISDN", Const, 0},
+ {"AF_ISO", Const, 0},
+ {"AF_IUCV", Const, 0},
+ {"AF_KEY", Const, 0},
+ {"AF_LAT", Const, 0},
+ {"AF_LINK", Const, 0},
+ {"AF_LLC", Const, 0},
+ {"AF_LOCAL", Const, 0},
+ {"AF_MAX", Const, 0},
+ {"AF_MPLS", Const, 1},
+ {"AF_NATM", Const, 0},
+ {"AF_NDRV", Const, 0},
+ {"AF_NETBEUI", Const, 0},
+ {"AF_NETBIOS", Const, 0},
+ {"AF_NETGRAPH", Const, 0},
+ {"AF_NETLINK", Const, 0},
+ {"AF_NETROM", Const, 0},
+ {"AF_NS", Const, 0},
+ {"AF_OROUTE", Const, 1},
+ {"AF_OSI", Const, 0},
+ {"AF_PACKET", Const, 0},
+ {"AF_PHONET", Const, 0},
+ {"AF_PPP", Const, 0},
+ {"AF_PPPOX", Const, 0},
+ {"AF_PUP", Const, 0},
+ {"AF_RDS", Const, 0},
+ {"AF_RESERVED_36", Const, 0},
+ {"AF_ROSE", Const, 0},
+ {"AF_ROUTE", Const, 0},
+ {"AF_RXRPC", Const, 0},
+ {"AF_SCLUSTER", Const, 0},
+ {"AF_SECURITY", Const, 0},
+ {"AF_SIP", Const, 0},
+ {"AF_SLOW", Const, 0},
+ {"AF_SNA", Const, 0},
+ {"AF_SYSTEM", Const, 0},
+ {"AF_TIPC", Const, 0},
+ {"AF_UNIX", Const, 0},
+ {"AF_UNSPEC", Const, 0},
+ {"AF_UTUN", Const, 16},
+ {"AF_VENDOR00", Const, 0},
+ {"AF_VENDOR01", Const, 0},
+ {"AF_VENDOR02", Const, 0},
+ {"AF_VENDOR03", Const, 0},
+ {"AF_VENDOR04", Const, 0},
+ {"AF_VENDOR05", Const, 0},
+ {"AF_VENDOR06", Const, 0},
+ {"AF_VENDOR07", Const, 0},
+ {"AF_VENDOR08", Const, 0},
+ {"AF_VENDOR09", Const, 0},
+ {"AF_VENDOR10", Const, 0},
+ {"AF_VENDOR11", Const, 0},
+ {"AF_VENDOR12", Const, 0},
+ {"AF_VENDOR13", Const, 0},
+ {"AF_VENDOR14", Const, 0},
+ {"AF_VENDOR15", Const, 0},
+ {"AF_VENDOR16", Const, 0},
+ {"AF_VENDOR17", Const, 0},
+ {"AF_VENDOR18", Const, 0},
+ {"AF_VENDOR19", Const, 0},
+ {"AF_VENDOR20", Const, 0},
+ {"AF_VENDOR21", Const, 0},
+ {"AF_VENDOR22", Const, 0},
+ {"AF_VENDOR23", Const, 0},
+ {"AF_VENDOR24", Const, 0},
+ {"AF_VENDOR25", Const, 0},
+ {"AF_VENDOR26", Const, 0},
+ {"AF_VENDOR27", Const, 0},
+ {"AF_VENDOR28", Const, 0},
+ {"AF_VENDOR29", Const, 0},
+ {"AF_VENDOR30", Const, 0},
+ {"AF_VENDOR31", Const, 0},
+ {"AF_VENDOR32", Const, 0},
+ {"AF_VENDOR33", Const, 0},
+ {"AF_VENDOR34", Const, 0},
+ {"AF_VENDOR35", Const, 0},
+ {"AF_VENDOR36", Const, 0},
+ {"AF_VENDOR37", Const, 0},
+ {"AF_VENDOR38", Const, 0},
+ {"AF_VENDOR39", Const, 0},
+ {"AF_VENDOR40", Const, 0},
+ {"AF_VENDOR41", Const, 0},
+ {"AF_VENDOR42", Const, 0},
+ {"AF_VENDOR43", Const, 0},
+ {"AF_VENDOR44", Const, 0},
+ {"AF_VENDOR45", Const, 0},
+ {"AF_VENDOR46", Const, 0},
+ {"AF_VENDOR47", Const, 0},
+ {"AF_WANPIPE", Const, 0},
+ {"AF_X25", Const, 0},
+ {"AI_CANONNAME", Const, 1},
+ {"AI_NUMERICHOST", Const, 1},
+ {"AI_PASSIVE", Const, 1},
+ {"APPLICATION_ERROR", Const, 0},
+ {"ARPHRD_ADAPT", Const, 0},
+ {"ARPHRD_APPLETLK", Const, 0},
+ {"ARPHRD_ARCNET", Const, 0},
+ {"ARPHRD_ASH", Const, 0},
+ {"ARPHRD_ATM", Const, 0},
+ {"ARPHRD_AX25", Const, 0},
+ {"ARPHRD_BIF", Const, 0},
+ {"ARPHRD_CHAOS", Const, 0},
+ {"ARPHRD_CISCO", Const, 0},
+ {"ARPHRD_CSLIP", Const, 0},
+ {"ARPHRD_CSLIP6", Const, 0},
+ {"ARPHRD_DDCMP", Const, 0},
+ {"ARPHRD_DLCI", Const, 0},
+ {"ARPHRD_ECONET", Const, 0},
+ {"ARPHRD_EETHER", Const, 0},
+ {"ARPHRD_ETHER", Const, 0},
+ {"ARPHRD_EUI64", Const, 0},
+ {"ARPHRD_FCAL", Const, 0},
+ {"ARPHRD_FCFABRIC", Const, 0},
+ {"ARPHRD_FCPL", Const, 0},
+ {"ARPHRD_FCPP", Const, 0},
+ {"ARPHRD_FDDI", Const, 0},
+ {"ARPHRD_FRAD", Const, 0},
+ {"ARPHRD_FRELAY", Const, 1},
+ {"ARPHRD_HDLC", Const, 0},
+ {"ARPHRD_HIPPI", Const, 0},
+ {"ARPHRD_HWX25", Const, 0},
+ {"ARPHRD_IEEE1394", Const, 0},
+ {"ARPHRD_IEEE802", Const, 0},
+ {"ARPHRD_IEEE80211", Const, 0},
+ {"ARPHRD_IEEE80211_PRISM", Const, 0},
+ {"ARPHRD_IEEE80211_RADIOTAP", Const, 0},
+ {"ARPHRD_IEEE802154", Const, 0},
+ {"ARPHRD_IEEE802154_PHY", Const, 0},
+ {"ARPHRD_IEEE802_TR", Const, 0},
+ {"ARPHRD_INFINIBAND", Const, 0},
+ {"ARPHRD_IPDDP", Const, 0},
+ {"ARPHRD_IPGRE", Const, 0},
+ {"ARPHRD_IRDA", Const, 0},
+ {"ARPHRD_LAPB", Const, 0},
+ {"ARPHRD_LOCALTLK", Const, 0},
+ {"ARPHRD_LOOPBACK", Const, 0},
+ {"ARPHRD_METRICOM", Const, 0},
+ {"ARPHRD_NETROM", Const, 0},
+ {"ARPHRD_NONE", Const, 0},
+ {"ARPHRD_PIMREG", Const, 0},
+ {"ARPHRD_PPP", Const, 0},
+ {"ARPHRD_PRONET", Const, 0},
+ {"ARPHRD_RAWHDLC", Const, 0},
+ {"ARPHRD_ROSE", Const, 0},
+ {"ARPHRD_RSRVD", Const, 0},
+ {"ARPHRD_SIT", Const, 0},
+ {"ARPHRD_SKIP", Const, 0},
+ {"ARPHRD_SLIP", Const, 0},
+ {"ARPHRD_SLIP6", Const, 0},
+ {"ARPHRD_STRIP", Const, 1},
+ {"ARPHRD_TUNNEL", Const, 0},
+ {"ARPHRD_TUNNEL6", Const, 0},
+ {"ARPHRD_VOID", Const, 0},
+ {"ARPHRD_X25", Const, 0},
+ {"AUTHTYPE_CLIENT", Const, 0},
+ {"AUTHTYPE_SERVER", Const, 0},
+ {"Accept", Func, 0},
+ {"Accept4", Func, 1},
+ {"AcceptEx", Func, 0},
+ {"Access", Func, 0},
+ {"Acct", Func, 0},
+ {"AddrinfoW", Type, 1},
+ {"AddrinfoW.Addr", Field, 1},
+ {"AddrinfoW.Addrlen", Field, 1},
+ {"AddrinfoW.Canonname", Field, 1},
+ {"AddrinfoW.Family", Field, 1},
+ {"AddrinfoW.Flags", Field, 1},
+ {"AddrinfoW.Next", Field, 1},
+ {"AddrinfoW.Protocol", Field, 1},
+ {"AddrinfoW.Socktype", Field, 1},
+ {"Adjtime", Func, 0},
+ {"Adjtimex", Func, 0},
+ {"AllThreadsSyscall", Func, 16},
+ {"AllThreadsSyscall6", Func, 16},
+ {"AttachLsf", Func, 0},
+ {"B0", Const, 0},
+ {"B1000000", Const, 0},
+ {"B110", Const, 0},
+ {"B115200", Const, 0},
+ {"B1152000", Const, 0},
+ {"B1200", Const, 0},
+ {"B134", Const, 0},
+ {"B14400", Const, 1},
+ {"B150", Const, 0},
+ {"B1500000", Const, 0},
+ {"B1800", Const, 0},
+ {"B19200", Const, 0},
+ {"B200", Const, 0},
+ {"B2000000", Const, 0},
+ {"B230400", Const, 0},
+ {"B2400", Const, 0},
+ {"B2500000", Const, 0},
+ {"B28800", Const, 1},
+ {"B300", Const, 0},
+ {"B3000000", Const, 0},
+ {"B3500000", Const, 0},
+ {"B38400", Const, 0},
+ {"B4000000", Const, 0},
+ {"B460800", Const, 0},
+ {"B4800", Const, 0},
+ {"B50", Const, 0},
+ {"B500000", Const, 0},
+ {"B57600", Const, 0},
+ {"B576000", Const, 0},
+ {"B600", Const, 0},
+ {"B7200", Const, 1},
+ {"B75", Const, 0},
+ {"B76800", Const, 1},
+ {"B921600", Const, 0},
+ {"B9600", Const, 0},
+ {"BASE_PROTOCOL", Const, 2},
+ {"BIOCFEEDBACK", Const, 0},
+ {"BIOCFLUSH", Const, 0},
+ {"BIOCGBLEN", Const, 0},
+ {"BIOCGDIRECTION", Const, 0},
+ {"BIOCGDIRFILT", Const, 1},
+ {"BIOCGDLT", Const, 0},
+ {"BIOCGDLTLIST", Const, 0},
+ {"BIOCGETBUFMODE", Const, 0},
+ {"BIOCGETIF", Const, 0},
+ {"BIOCGETZMAX", Const, 0},
+ {"BIOCGFEEDBACK", Const, 1},
+ {"BIOCGFILDROP", Const, 1},
+ {"BIOCGHDRCMPLT", Const, 0},
+ {"BIOCGRSIG", Const, 0},
+ {"BIOCGRTIMEOUT", Const, 0},
+ {"BIOCGSEESENT", Const, 0},
+ {"BIOCGSTATS", Const, 0},
+ {"BIOCGSTATSOLD", Const, 1},
+ {"BIOCGTSTAMP", Const, 1},
+ {"BIOCIMMEDIATE", Const, 0},
+ {"BIOCLOCK", Const, 0},
+ {"BIOCPROMISC", Const, 0},
+ {"BIOCROTZBUF", Const, 0},
+ {"BIOCSBLEN", Const, 0},
+ {"BIOCSDIRECTION", Const, 0},
+ {"BIOCSDIRFILT", Const, 1},
+ {"BIOCSDLT", Const, 0},
+ {"BIOCSETBUFMODE", Const, 0},
+ {"BIOCSETF", Const, 0},
+ {"BIOCSETFNR", Const, 0},
+ {"BIOCSETIF", Const, 0},
+ {"BIOCSETWF", Const, 0},
+ {"BIOCSETZBUF", Const, 0},
+ {"BIOCSFEEDBACK", Const, 1},
+ {"BIOCSFILDROP", Const, 1},
+ {"BIOCSHDRCMPLT", Const, 0},
+ {"BIOCSRSIG", Const, 0},
+ {"BIOCSRTIMEOUT", Const, 0},
+ {"BIOCSSEESENT", Const, 0},
+ {"BIOCSTCPF", Const, 1},
+ {"BIOCSTSTAMP", Const, 1},
+ {"BIOCSUDPF", Const, 1},
+ {"BIOCVERSION", Const, 0},
+ {"BPF_A", Const, 0},
+ {"BPF_ABS", Const, 0},
+ {"BPF_ADD", Const, 0},
+ {"BPF_ALIGNMENT", Const, 0},
+ {"BPF_ALIGNMENT32", Const, 1},
+ {"BPF_ALU", Const, 0},
+ {"BPF_AND", Const, 0},
+ {"BPF_B", Const, 0},
+ {"BPF_BUFMODE_BUFFER", Const, 0},
+ {"BPF_BUFMODE_ZBUF", Const, 0},
+ {"BPF_DFLTBUFSIZE", Const, 1},
+ {"BPF_DIRECTION_IN", Const, 1},
+ {"BPF_DIRECTION_OUT", Const, 1},
+ {"BPF_DIV", Const, 0},
+ {"BPF_H", Const, 0},
+ {"BPF_IMM", Const, 0},
+ {"BPF_IND", Const, 0},
+ {"BPF_JA", Const, 0},
+ {"BPF_JEQ", Const, 0},
+ {"BPF_JGE", Const, 0},
+ {"BPF_JGT", Const, 0},
+ {"BPF_JMP", Const, 0},
+ {"BPF_JSET", Const, 0},
+ {"BPF_K", Const, 0},
+ {"BPF_LD", Const, 0},
+ {"BPF_LDX", Const, 0},
+ {"BPF_LEN", Const, 0},
+ {"BPF_LSH", Const, 0},
+ {"BPF_MAJOR_VERSION", Const, 0},
+ {"BPF_MAXBUFSIZE", Const, 0},
+ {"BPF_MAXINSNS", Const, 0},
+ {"BPF_MEM", Const, 0},
+ {"BPF_MEMWORDS", Const, 0},
+ {"BPF_MINBUFSIZE", Const, 0},
+ {"BPF_MINOR_VERSION", Const, 0},
+ {"BPF_MISC", Const, 0},
+ {"BPF_MSH", Const, 0},
+ {"BPF_MUL", Const, 0},
+ {"BPF_NEG", Const, 0},
+ {"BPF_OR", Const, 0},
+ {"BPF_RELEASE", Const, 0},
+ {"BPF_RET", Const, 0},
+ {"BPF_RSH", Const, 0},
+ {"BPF_ST", Const, 0},
+ {"BPF_STX", Const, 0},
+ {"BPF_SUB", Const, 0},
+ {"BPF_TAX", Const, 0},
+ {"BPF_TXA", Const, 0},
+ {"BPF_T_BINTIME", Const, 1},
+ {"BPF_T_BINTIME_FAST", Const, 1},
+ {"BPF_T_BINTIME_MONOTONIC", Const, 1},
+ {"BPF_T_BINTIME_MONOTONIC_FAST", Const, 1},
+ {"BPF_T_FAST", Const, 1},
+ {"BPF_T_FLAG_MASK", Const, 1},
+ {"BPF_T_FORMAT_MASK", Const, 1},
+ {"BPF_T_MICROTIME", Const, 1},
+ {"BPF_T_MICROTIME_FAST", Const, 1},
+ {"BPF_T_MICROTIME_MONOTONIC", Const, 1},
+ {"BPF_T_MICROTIME_MONOTONIC_FAST", Const, 1},
+ {"BPF_T_MONOTONIC", Const, 1},
+ {"BPF_T_MONOTONIC_FAST", Const, 1},
+ {"BPF_T_NANOTIME", Const, 1},
+ {"BPF_T_NANOTIME_FAST", Const, 1},
+ {"BPF_T_NANOTIME_MONOTONIC", Const, 1},
+ {"BPF_T_NANOTIME_MONOTONIC_FAST", Const, 1},
+ {"BPF_T_NONE", Const, 1},
+ {"BPF_T_NORMAL", Const, 1},
+ {"BPF_W", Const, 0},
+ {"BPF_X", Const, 0},
+ {"BRKINT", Const, 0},
+ {"Bind", Func, 0},
+ {"BindToDevice", Func, 0},
+ {"BpfBuflen", Func, 0},
+ {"BpfDatalink", Func, 0},
+ {"BpfHdr", Type, 0},
+ {"BpfHdr.Caplen", Field, 0},
+ {"BpfHdr.Datalen", Field, 0},
+ {"BpfHdr.Hdrlen", Field, 0},
+ {"BpfHdr.Pad_cgo_0", Field, 0},
+ {"BpfHdr.Tstamp", Field, 0},
+ {"BpfHeadercmpl", Func, 0},
+ {"BpfInsn", Type, 0},
+ {"BpfInsn.Code", Field, 0},
+ {"BpfInsn.Jf", Field, 0},
+ {"BpfInsn.Jt", Field, 0},
+ {"BpfInsn.K", Field, 0},
+ {"BpfInterface", Func, 0},
+ {"BpfJump", Func, 0},
+ {"BpfProgram", Type, 0},
+ {"BpfProgram.Insns", Field, 0},
+ {"BpfProgram.Len", Field, 0},
+ {"BpfProgram.Pad_cgo_0", Field, 0},
+ {"BpfStat", Type, 0},
+ {"BpfStat.Capt", Field, 2},
+ {"BpfStat.Drop", Field, 0},
+ {"BpfStat.Padding", Field, 2},
+ {"BpfStat.Recv", Field, 0},
+ {"BpfStats", Func, 0},
+ {"BpfStmt", Func, 0},
+ {"BpfTimeout", Func, 0},
+ {"BpfTimeval", Type, 2},
+ {"BpfTimeval.Sec", Field, 2},
+ {"BpfTimeval.Usec", Field, 2},
+ {"BpfVersion", Type, 0},
+ {"BpfVersion.Major", Field, 0},
+ {"BpfVersion.Minor", Field, 0},
+ {"BpfZbuf", Type, 0},
+ {"BpfZbuf.Bufa", Field, 0},
+ {"BpfZbuf.Bufb", Field, 0},
+ {"BpfZbuf.Buflen", Field, 0},
+ {"BpfZbufHeader", Type, 0},
+ {"BpfZbufHeader.Kernel_gen", Field, 0},
+ {"BpfZbufHeader.Kernel_len", Field, 0},
+ {"BpfZbufHeader.User_gen", Field, 0},
+ {"BpfZbufHeader.X_bzh_pad", Field, 0},
+ {"ByHandleFileInformation", Type, 0},
+ {"ByHandleFileInformation.CreationTime", Field, 0},
+ {"ByHandleFileInformation.FileAttributes", Field, 0},
+ {"ByHandleFileInformation.FileIndexHigh", Field, 0},
+ {"ByHandleFileInformation.FileIndexLow", Field, 0},
+ {"ByHandleFileInformation.FileSizeHigh", Field, 0},
+ {"ByHandleFileInformation.FileSizeLow", Field, 0},
+ {"ByHandleFileInformation.LastAccessTime", Field, 0},
+ {"ByHandleFileInformation.LastWriteTime", Field, 0},
+ {"ByHandleFileInformation.NumberOfLinks", Field, 0},
+ {"ByHandleFileInformation.VolumeSerialNumber", Field, 0},
+ {"BytePtrFromString", Func, 1},
+ {"ByteSliceFromString", Func, 1},
+ {"CCR0_FLUSH", Const, 1},
+ {"CERT_CHAIN_POLICY_AUTHENTICODE", Const, 0},
+ {"CERT_CHAIN_POLICY_AUTHENTICODE_TS", Const, 0},
+ {"CERT_CHAIN_POLICY_BASE", Const, 0},
+ {"CERT_CHAIN_POLICY_BASIC_CONSTRAINTS", Const, 0},
+ {"CERT_CHAIN_POLICY_EV", Const, 0},
+ {"CERT_CHAIN_POLICY_MICROSOFT_ROOT", Const, 0},
+ {"CERT_CHAIN_POLICY_NT_AUTH", Const, 0},
+ {"CERT_CHAIN_POLICY_SSL", Const, 0},
+ {"CERT_E_CN_NO_MATCH", Const, 0},
+ {"CERT_E_EXPIRED", Const, 0},
+ {"CERT_E_PURPOSE", Const, 0},
+ {"CERT_E_ROLE", Const, 0},
+ {"CERT_E_UNTRUSTEDROOT", Const, 0},
+ {"CERT_STORE_ADD_ALWAYS", Const, 0},
+ {"CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG", Const, 0},
+ {"CERT_STORE_PROV_MEMORY", Const, 0},
+ {"CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT", Const, 0},
+ {"CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT", Const, 0},
+ {"CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT", Const, 0},
+ {"CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT", Const, 0},
+ {"CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT", Const, 0},
+ {"CERT_TRUST_INVALID_BASIC_CONSTRAINTS", Const, 0},
+ {"CERT_TRUST_INVALID_EXTENSION", Const, 0},
+ {"CERT_TRUST_INVALID_NAME_CONSTRAINTS", Const, 0},
+ {"CERT_TRUST_INVALID_POLICY_CONSTRAINTS", Const, 0},
+ {"CERT_TRUST_IS_CYCLIC", Const, 0},
+ {"CERT_TRUST_IS_EXPLICIT_DISTRUST", Const, 0},
+ {"CERT_TRUST_IS_NOT_SIGNATURE_VALID", Const, 0},
+ {"CERT_TRUST_IS_NOT_TIME_VALID", Const, 0},
+ {"CERT_TRUST_IS_NOT_VALID_FOR_USAGE", Const, 0},
+ {"CERT_TRUST_IS_OFFLINE_REVOCATION", Const, 0},
+ {"CERT_TRUST_IS_REVOKED", Const, 0},
+ {"CERT_TRUST_IS_UNTRUSTED_ROOT", Const, 0},
+ {"CERT_TRUST_NO_ERROR", Const, 0},
+ {"CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY", Const, 0},
+ {"CERT_TRUST_REVOCATION_STATUS_UNKNOWN", Const, 0},
+ {"CFLUSH", Const, 1},
+ {"CLOCAL", Const, 0},
+ {"CLONE_CHILD_CLEARTID", Const, 2},
+ {"CLONE_CHILD_SETTID", Const, 2},
+ {"CLONE_CLEAR_SIGHAND", Const, 20},
+ {"CLONE_CSIGNAL", Const, 3},
+ {"CLONE_DETACHED", Const, 2},
+ {"CLONE_FILES", Const, 2},
+ {"CLONE_FS", Const, 2},
+ {"CLONE_INTO_CGROUP", Const, 20},
+ {"CLONE_IO", Const, 2},
+ {"CLONE_NEWCGROUP", Const, 20},
+ {"CLONE_NEWIPC", Const, 2},
+ {"CLONE_NEWNET", Const, 2},
+ {"CLONE_NEWNS", Const, 2},
+ {"CLONE_NEWPID", Const, 2},
+ {"CLONE_NEWTIME", Const, 20},
+ {"CLONE_NEWUSER", Const, 2},
+ {"CLONE_NEWUTS", Const, 2},
+ {"CLONE_PARENT", Const, 2},
+ {"CLONE_PARENT_SETTID", Const, 2},
+ {"CLONE_PID", Const, 3},
+ {"CLONE_PIDFD", Const, 20},
+ {"CLONE_PTRACE", Const, 2},
+ {"CLONE_SETTLS", Const, 2},
+ {"CLONE_SIGHAND", Const, 2},
+ {"CLONE_SYSVSEM", Const, 2},
+ {"CLONE_THREAD", Const, 2},
+ {"CLONE_UNTRACED", Const, 2},
+ {"CLONE_VFORK", Const, 2},
+ {"CLONE_VM", Const, 2},
+ {"CPUID_CFLUSH", Const, 1},
+ {"CREAD", Const, 0},
+ {"CREATE_ALWAYS", Const, 0},
+ {"CREATE_NEW", Const, 0},
+ {"CREATE_NEW_PROCESS_GROUP", Const, 1},
+ {"CREATE_UNICODE_ENVIRONMENT", Const, 0},
+ {"CRYPT_DEFAULT_CONTAINER_OPTIONAL", Const, 0},
+ {"CRYPT_DELETEKEYSET", Const, 0},
+ {"CRYPT_MACHINE_KEYSET", Const, 0},
+ {"CRYPT_NEWKEYSET", Const, 0},
+ {"CRYPT_SILENT", Const, 0},
+ {"CRYPT_VERIFYCONTEXT", Const, 0},
+ {"CS5", Const, 0},
+ {"CS6", Const, 0},
+ {"CS7", Const, 0},
+ {"CS8", Const, 0},
+ {"CSIZE", Const, 0},
+ {"CSTART", Const, 1},
+ {"CSTATUS", Const, 1},
+ {"CSTOP", Const, 1},
+ {"CSTOPB", Const, 0},
+ {"CSUSP", Const, 1},
+ {"CTL_MAXNAME", Const, 0},
+ {"CTL_NET", Const, 0},
+ {"CTL_QUERY", Const, 1},
+ {"CTRL_BREAK_EVENT", Const, 1},
+ {"CTRL_CLOSE_EVENT", Const, 14},
+ {"CTRL_C_EVENT", Const, 1},
+ {"CTRL_LOGOFF_EVENT", Const, 14},
+ {"CTRL_SHUTDOWN_EVENT", Const, 14},
+ {"CancelIo", Func, 0},
+ {"CancelIoEx", Func, 1},
+ {"CertAddCertificateContextToStore", Func, 0},
+ {"CertChainContext", Type, 0},
+ {"CertChainContext.ChainCount", Field, 0},
+ {"CertChainContext.Chains", Field, 0},
+ {"CertChainContext.HasRevocationFreshnessTime", Field, 0},
+ {"CertChainContext.LowerQualityChainCount", Field, 0},
+ {"CertChainContext.LowerQualityChains", Field, 0},
+ {"CertChainContext.RevocationFreshnessTime", Field, 0},
+ {"CertChainContext.Size", Field, 0},
+ {"CertChainContext.TrustStatus", Field, 0},
+ {"CertChainElement", Type, 0},
+ {"CertChainElement.ApplicationUsage", Field, 0},
+ {"CertChainElement.CertContext", Field, 0},
+ {"CertChainElement.ExtendedErrorInfo", Field, 0},
+ {"CertChainElement.IssuanceUsage", Field, 0},
+ {"CertChainElement.RevocationInfo", Field, 0},
+ {"CertChainElement.Size", Field, 0},
+ {"CertChainElement.TrustStatus", Field, 0},
+ {"CertChainPara", Type, 0},
+ {"CertChainPara.CacheResync", Field, 0},
+ {"CertChainPara.CheckRevocationFreshnessTime", Field, 0},
+ {"CertChainPara.RequestedUsage", Field, 0},
+ {"CertChainPara.RequstedIssuancePolicy", Field, 0},
+ {"CertChainPara.RevocationFreshnessTime", Field, 0},
+ {"CertChainPara.Size", Field, 0},
+ {"CertChainPara.URLRetrievalTimeout", Field, 0},
+ {"CertChainPolicyPara", Type, 0},
+ {"CertChainPolicyPara.ExtraPolicyPara", Field, 0},
+ {"CertChainPolicyPara.Flags", Field, 0},
+ {"CertChainPolicyPara.Size", Field, 0},
+ {"CertChainPolicyStatus", Type, 0},
+ {"CertChainPolicyStatus.ChainIndex", Field, 0},
+ {"CertChainPolicyStatus.ElementIndex", Field, 0},
+ {"CertChainPolicyStatus.Error", Field, 0},
+ {"CertChainPolicyStatus.ExtraPolicyStatus", Field, 0},
+ {"CertChainPolicyStatus.Size", Field, 0},
+ {"CertCloseStore", Func, 0},
+ {"CertContext", Type, 0},
+ {"CertContext.CertInfo", Field, 0},
+ {"CertContext.EncodedCert", Field, 0},
+ {"CertContext.EncodingType", Field, 0},
+ {"CertContext.Length", Field, 0},
+ {"CertContext.Store", Field, 0},
+ {"CertCreateCertificateContext", Func, 0},
+ {"CertEnhKeyUsage", Type, 0},
+ {"CertEnhKeyUsage.Length", Field, 0},
+ {"CertEnhKeyUsage.UsageIdentifiers", Field, 0},
+ {"CertEnumCertificatesInStore", Func, 0},
+ {"CertFreeCertificateChain", Func, 0},
+ {"CertFreeCertificateContext", Func, 0},
+ {"CertGetCertificateChain", Func, 0},
+ {"CertInfo", Type, 11},
+ {"CertOpenStore", Func, 0},
+ {"CertOpenSystemStore", Func, 0},
+ {"CertRevocationCrlInfo", Type, 11},
+ {"CertRevocationInfo", Type, 0},
+ {"CertRevocationInfo.CrlInfo", Field, 0},
+ {"CertRevocationInfo.FreshnessTime", Field, 0},
+ {"CertRevocationInfo.HasFreshnessTime", Field, 0},
+ {"CertRevocationInfo.OidSpecificInfo", Field, 0},
+ {"CertRevocationInfo.RevocationOid", Field, 0},
+ {"CertRevocationInfo.RevocationResult", Field, 0},
+ {"CertRevocationInfo.Size", Field, 0},
+ {"CertSimpleChain", Type, 0},
+ {"CertSimpleChain.Elements", Field, 0},
+ {"CertSimpleChain.HasRevocationFreshnessTime", Field, 0},
+ {"CertSimpleChain.NumElements", Field, 0},
+ {"CertSimpleChain.RevocationFreshnessTime", Field, 0},
+ {"CertSimpleChain.Size", Field, 0},
+ {"CertSimpleChain.TrustListInfo", Field, 0},
+ {"CertSimpleChain.TrustStatus", Field, 0},
+ {"CertTrustListInfo", Type, 11},
+ {"CertTrustStatus", Type, 0},
+ {"CertTrustStatus.ErrorStatus", Field, 0},
+ {"CertTrustStatus.InfoStatus", Field, 0},
+ {"CertUsageMatch", Type, 0},
+ {"CertUsageMatch.Type", Field, 0},
+ {"CertUsageMatch.Usage", Field, 0},
+ {"CertVerifyCertificateChainPolicy", Func, 0},
+ {"Chdir", Func, 0},
+ {"CheckBpfVersion", Func, 0},
+ {"Chflags", Func, 0},
+ {"Chmod", Func, 0},
+ {"Chown", Func, 0},
+ {"Chroot", Func, 0},
+ {"Clearenv", Func, 0},
+ {"Close", Func, 0},
+ {"CloseHandle", Func, 0},
+ {"CloseOnExec", Func, 0},
+ {"Closesocket", Func, 0},
+ {"CmsgLen", Func, 0},
+ {"CmsgSpace", Func, 0},
+ {"Cmsghdr", Type, 0},
+ {"Cmsghdr.Len", Field, 0},
+ {"Cmsghdr.Level", Field, 0},
+ {"Cmsghdr.Type", Field, 0},
+ {"Cmsghdr.X__cmsg_data", Field, 0},
+ {"CommandLineToArgv", Func, 0},
+ {"ComputerName", Func, 0},
+ {"Conn", Type, 9},
+ {"Connect", Func, 0},
+ {"ConnectEx", Func, 1},
+ {"ConvertSidToStringSid", Func, 0},
+ {"ConvertStringSidToSid", Func, 0},
+ {"CopySid", Func, 0},
+ {"Creat", Func, 0},
+ {"CreateDirectory", Func, 0},
+ {"CreateFile", Func, 0},
+ {"CreateFileMapping", Func, 0},
+ {"CreateHardLink", Func, 4},
+ {"CreateIoCompletionPort", Func, 0},
+ {"CreatePipe", Func, 0},
+ {"CreateProcess", Func, 0},
+ {"CreateProcessAsUser", Func, 10},
+ {"CreateSymbolicLink", Func, 4},
+ {"CreateToolhelp32Snapshot", Func, 4},
+ {"Credential", Type, 0},
+ {"Credential.Gid", Field, 0},
+ {"Credential.Groups", Field, 0},
+ {"Credential.NoSetGroups", Field, 9},
+ {"Credential.Uid", Field, 0},
+ {"CryptAcquireContext", Func, 0},
+ {"CryptGenRandom", Func, 0},
+ {"CryptReleaseContext", Func, 0},
+ {"DIOCBSFLUSH", Const, 1},
+ {"DIOCOSFPFLUSH", Const, 1},
+ {"DLL", Type, 0},
+ {"DLL.Handle", Field, 0},
+ {"DLL.Name", Field, 0},
+ {"DLLError", Type, 0},
+ {"DLLError.Err", Field, 0},
+ {"DLLError.Msg", Field, 0},
+ {"DLLError.ObjName", Field, 0},
+ {"DLT_A429", Const, 0},
+ {"DLT_A653_ICM", Const, 0},
+ {"DLT_AIRONET_HEADER", Const, 0},
+ {"DLT_AOS", Const, 1},
+ {"DLT_APPLE_IP_OVER_IEEE1394", Const, 0},
+ {"DLT_ARCNET", Const, 0},
+ {"DLT_ARCNET_LINUX", Const, 0},
+ {"DLT_ATM_CLIP", Const, 0},
+ {"DLT_ATM_RFC1483", Const, 0},
+ {"DLT_AURORA", Const, 0},
+ {"DLT_AX25", Const, 0},
+ {"DLT_AX25_KISS", Const, 0},
+ {"DLT_BACNET_MS_TP", Const, 0},
+ {"DLT_BLUETOOTH_HCI_H4", Const, 0},
+ {"DLT_BLUETOOTH_HCI_H4_WITH_PHDR", Const, 0},
+ {"DLT_CAN20B", Const, 0},
+ {"DLT_CAN_SOCKETCAN", Const, 1},
+ {"DLT_CHAOS", Const, 0},
+ {"DLT_CHDLC", Const, 0},
+ {"DLT_CISCO_IOS", Const, 0},
+ {"DLT_C_HDLC", Const, 0},
+ {"DLT_C_HDLC_WITH_DIR", Const, 0},
+ {"DLT_DBUS", Const, 1},
+ {"DLT_DECT", Const, 1},
+ {"DLT_DOCSIS", Const, 0},
+ {"DLT_DVB_CI", Const, 1},
+ {"DLT_ECONET", Const, 0},
+ {"DLT_EN10MB", Const, 0},
+ {"DLT_EN3MB", Const, 0},
+ {"DLT_ENC", Const, 0},
+ {"DLT_ERF", Const, 0},
+ {"DLT_ERF_ETH", Const, 0},
+ {"DLT_ERF_POS", Const, 0},
+ {"DLT_FC_2", Const, 1},
+ {"DLT_FC_2_WITH_FRAME_DELIMS", Const, 1},
+ {"DLT_FDDI", Const, 0},
+ {"DLT_FLEXRAY", Const, 0},
+ {"DLT_FRELAY", Const, 0},
+ {"DLT_FRELAY_WITH_DIR", Const, 0},
+ {"DLT_GCOM_SERIAL", Const, 0},
+ {"DLT_GCOM_T1E1", Const, 0},
+ {"DLT_GPF_F", Const, 0},
+ {"DLT_GPF_T", Const, 0},
+ {"DLT_GPRS_LLC", Const, 0},
+ {"DLT_GSMTAP_ABIS", Const, 1},
+ {"DLT_GSMTAP_UM", Const, 1},
+ {"DLT_HDLC", Const, 1},
+ {"DLT_HHDLC", Const, 0},
+ {"DLT_HIPPI", Const, 1},
+ {"DLT_IBM_SN", Const, 0},
+ {"DLT_IBM_SP", Const, 0},
+ {"DLT_IEEE802", Const, 0},
+ {"DLT_IEEE802_11", Const, 0},
+ {"DLT_IEEE802_11_RADIO", Const, 0},
+ {"DLT_IEEE802_11_RADIO_AVS", Const, 0},
+ {"DLT_IEEE802_15_4", Const, 0},
+ {"DLT_IEEE802_15_4_LINUX", Const, 0},
+ {"DLT_IEEE802_15_4_NOFCS", Const, 1},
+ {"DLT_IEEE802_15_4_NONASK_PHY", Const, 0},
+ {"DLT_IEEE802_16_MAC_CPS", Const, 0},
+ {"DLT_IEEE802_16_MAC_CPS_RADIO", Const, 0},
+ {"DLT_IPFILTER", Const, 0},
+ {"DLT_IPMB", Const, 0},
+ {"DLT_IPMB_LINUX", Const, 0},
+ {"DLT_IPNET", Const, 1},
+ {"DLT_IPOIB", Const, 1},
+ {"DLT_IPV4", Const, 1},
+ {"DLT_IPV6", Const, 1},
+ {"DLT_IP_OVER_FC", Const, 0},
+ {"DLT_JUNIPER_ATM1", Const, 0},
+ {"DLT_JUNIPER_ATM2", Const, 0},
+ {"DLT_JUNIPER_ATM_CEMIC", Const, 1},
+ {"DLT_JUNIPER_CHDLC", Const, 0},
+ {"DLT_JUNIPER_ES", Const, 0},
+ {"DLT_JUNIPER_ETHER", Const, 0},
+ {"DLT_JUNIPER_FIBRECHANNEL", Const, 1},
+ {"DLT_JUNIPER_FRELAY", Const, 0},
+ {"DLT_JUNIPER_GGSN", Const, 0},
+ {"DLT_JUNIPER_ISM", Const, 0},
+ {"DLT_JUNIPER_MFR", Const, 0},
+ {"DLT_JUNIPER_MLFR", Const, 0},
+ {"DLT_JUNIPER_MLPPP", Const, 0},
+ {"DLT_JUNIPER_MONITOR", Const, 0},
+ {"DLT_JUNIPER_PIC_PEER", Const, 0},
+ {"DLT_JUNIPER_PPP", Const, 0},
+ {"DLT_JUNIPER_PPPOE", Const, 0},
+ {"DLT_JUNIPER_PPPOE_ATM", Const, 0},
+ {"DLT_JUNIPER_SERVICES", Const, 0},
+ {"DLT_JUNIPER_SRX_E2E", Const, 1},
+ {"DLT_JUNIPER_ST", Const, 0},
+ {"DLT_JUNIPER_VP", Const, 0},
+ {"DLT_JUNIPER_VS", Const, 1},
+ {"DLT_LAPB_WITH_DIR", Const, 0},
+ {"DLT_LAPD", Const, 0},
+ {"DLT_LIN", Const, 0},
+ {"DLT_LINUX_EVDEV", Const, 1},
+ {"DLT_LINUX_IRDA", Const, 0},
+ {"DLT_LINUX_LAPD", Const, 0},
+ {"DLT_LINUX_PPP_WITHDIRECTION", Const, 0},
+ {"DLT_LINUX_SLL", Const, 0},
+ {"DLT_LOOP", Const, 0},
+ {"DLT_LTALK", Const, 0},
+ {"DLT_MATCHING_MAX", Const, 1},
+ {"DLT_MATCHING_MIN", Const, 1},
+ {"DLT_MFR", Const, 0},
+ {"DLT_MOST", Const, 0},
+ {"DLT_MPEG_2_TS", Const, 1},
+ {"DLT_MPLS", Const, 1},
+ {"DLT_MTP2", Const, 0},
+ {"DLT_MTP2_WITH_PHDR", Const, 0},
+ {"DLT_MTP3", Const, 0},
+ {"DLT_MUX27010", Const, 1},
+ {"DLT_NETANALYZER", Const, 1},
+ {"DLT_NETANALYZER_TRANSPARENT", Const, 1},
+ {"DLT_NFC_LLCP", Const, 1},
+ {"DLT_NFLOG", Const, 1},
+ {"DLT_NG40", Const, 1},
+ {"DLT_NULL", Const, 0},
+ {"DLT_PCI_EXP", Const, 0},
+ {"DLT_PFLOG", Const, 0},
+ {"DLT_PFSYNC", Const, 0},
+ {"DLT_PPI", Const, 0},
+ {"DLT_PPP", Const, 0},
+ {"DLT_PPP_BSDOS", Const, 0},
+ {"DLT_PPP_ETHER", Const, 0},
+ {"DLT_PPP_PPPD", Const, 0},
+ {"DLT_PPP_SERIAL", Const, 0},
+ {"DLT_PPP_WITH_DIR", Const, 0},
+ {"DLT_PPP_WITH_DIRECTION", Const, 0},
+ {"DLT_PRISM_HEADER", Const, 0},
+ {"DLT_PRONET", Const, 0},
+ {"DLT_RAIF1", Const, 0},
+ {"DLT_RAW", Const, 0},
+ {"DLT_RAWAF_MASK", Const, 1},
+ {"DLT_RIO", Const, 0},
+ {"DLT_SCCP", Const, 0},
+ {"DLT_SITA", Const, 0},
+ {"DLT_SLIP", Const, 0},
+ {"DLT_SLIP_BSDOS", Const, 0},
+ {"DLT_STANAG_5066_D_PDU", Const, 1},
+ {"DLT_SUNATM", Const, 0},
+ {"DLT_SYMANTEC_FIREWALL", Const, 0},
+ {"DLT_TZSP", Const, 0},
+ {"DLT_USB", Const, 0},
+ {"DLT_USB_LINUX", Const, 0},
+ {"DLT_USB_LINUX_MMAPPED", Const, 1},
+ {"DLT_USER0", Const, 0},
+ {"DLT_USER1", Const, 0},
+ {"DLT_USER10", Const, 0},
+ {"DLT_USER11", Const, 0},
+ {"DLT_USER12", Const, 0},
+ {"DLT_USER13", Const, 0},
+ {"DLT_USER14", Const, 0},
+ {"DLT_USER15", Const, 0},
+ {"DLT_USER2", Const, 0},
+ {"DLT_USER3", Const, 0},
+ {"DLT_USER4", Const, 0},
+ {"DLT_USER5", Const, 0},
+ {"DLT_USER6", Const, 0},
+ {"DLT_USER7", Const, 0},
+ {"DLT_USER8", Const, 0},
+ {"DLT_USER9", Const, 0},
+ {"DLT_WIHART", Const, 1},
+ {"DLT_X2E_SERIAL", Const, 0},
+ {"DLT_X2E_XORAYA", Const, 0},
+ {"DNSMXData", Type, 0},
+ {"DNSMXData.NameExchange", Field, 0},
+ {"DNSMXData.Pad", Field, 0},
+ {"DNSMXData.Preference", Field, 0},
+ {"DNSPTRData", Type, 0},
+ {"DNSPTRData.Host", Field, 0},
+ {"DNSRecord", Type, 0},
+ {"DNSRecord.Data", Field, 0},
+ {"DNSRecord.Dw", Field, 0},
+ {"DNSRecord.Length", Field, 0},
+ {"DNSRecord.Name", Field, 0},
+ {"DNSRecord.Next", Field, 0},
+ {"DNSRecord.Reserved", Field, 0},
+ {"DNSRecord.Ttl", Field, 0},
+ {"DNSRecord.Type", Field, 0},
+ {"DNSSRVData", Type, 0},
+ {"DNSSRVData.Pad", Field, 0},
+ {"DNSSRVData.Port", Field, 0},
+ {"DNSSRVData.Priority", Field, 0},
+ {"DNSSRVData.Target", Field, 0},
+ {"DNSSRVData.Weight", Field, 0},
+ {"DNSTXTData", Type, 0},
+ {"DNSTXTData.StringArray", Field, 0},
+ {"DNSTXTData.StringCount", Field, 0},
+ {"DNS_INFO_NO_RECORDS", Const, 4},
+ {"DNS_TYPE_A", Const, 0},
+ {"DNS_TYPE_A6", Const, 0},
+ {"DNS_TYPE_AAAA", Const, 0},
+ {"DNS_TYPE_ADDRS", Const, 0},
+ {"DNS_TYPE_AFSDB", Const, 0},
+ {"DNS_TYPE_ALL", Const, 0},
+ {"DNS_TYPE_ANY", Const, 0},
+ {"DNS_TYPE_ATMA", Const, 0},
+ {"DNS_TYPE_AXFR", Const, 0},
+ {"DNS_TYPE_CERT", Const, 0},
+ {"DNS_TYPE_CNAME", Const, 0},
+ {"DNS_TYPE_DHCID", Const, 0},
+ {"DNS_TYPE_DNAME", Const, 0},
+ {"DNS_TYPE_DNSKEY", Const, 0},
+ {"DNS_TYPE_DS", Const, 0},
+ {"DNS_TYPE_EID", Const, 0},
+ {"DNS_TYPE_GID", Const, 0},
+ {"DNS_TYPE_GPOS", Const, 0},
+ {"DNS_TYPE_HINFO", Const, 0},
+ {"DNS_TYPE_ISDN", Const, 0},
+ {"DNS_TYPE_IXFR", Const, 0},
+ {"DNS_TYPE_KEY", Const, 0},
+ {"DNS_TYPE_KX", Const, 0},
+ {"DNS_TYPE_LOC", Const, 0},
+ {"DNS_TYPE_MAILA", Const, 0},
+ {"DNS_TYPE_MAILB", Const, 0},
+ {"DNS_TYPE_MB", Const, 0},
+ {"DNS_TYPE_MD", Const, 0},
+ {"DNS_TYPE_MF", Const, 0},
+ {"DNS_TYPE_MG", Const, 0},
+ {"DNS_TYPE_MINFO", Const, 0},
+ {"DNS_TYPE_MR", Const, 0},
+ {"DNS_TYPE_MX", Const, 0},
+ {"DNS_TYPE_NAPTR", Const, 0},
+ {"DNS_TYPE_NBSTAT", Const, 0},
+ {"DNS_TYPE_NIMLOC", Const, 0},
+ {"DNS_TYPE_NS", Const, 0},
+ {"DNS_TYPE_NSAP", Const, 0},
+ {"DNS_TYPE_NSAPPTR", Const, 0},
+ {"DNS_TYPE_NSEC", Const, 0},
+ {"DNS_TYPE_NULL", Const, 0},
+ {"DNS_TYPE_NXT", Const, 0},
+ {"DNS_TYPE_OPT", Const, 0},
+ {"DNS_TYPE_PTR", Const, 0},
+ {"DNS_TYPE_PX", Const, 0},
+ {"DNS_TYPE_RP", Const, 0},
+ {"DNS_TYPE_RRSIG", Const, 0},
+ {"DNS_TYPE_RT", Const, 0},
+ {"DNS_TYPE_SIG", Const, 0},
+ {"DNS_TYPE_SINK", Const, 0},
+ {"DNS_TYPE_SOA", Const, 0},
+ {"DNS_TYPE_SRV", Const, 0},
+ {"DNS_TYPE_TEXT", Const, 0},
+ {"DNS_TYPE_TKEY", Const, 0},
+ {"DNS_TYPE_TSIG", Const, 0},
+ {"DNS_TYPE_UID", Const, 0},
+ {"DNS_TYPE_UINFO", Const, 0},
+ {"DNS_TYPE_UNSPEC", Const, 0},
+ {"DNS_TYPE_WINS", Const, 0},
+ {"DNS_TYPE_WINSR", Const, 0},
+ {"DNS_TYPE_WKS", Const, 0},
+ {"DNS_TYPE_X25", Const, 0},
+ {"DT_BLK", Const, 0},
+ {"DT_CHR", Const, 0},
+ {"DT_DIR", Const, 0},
+ {"DT_FIFO", Const, 0},
+ {"DT_LNK", Const, 0},
+ {"DT_REG", Const, 0},
+ {"DT_SOCK", Const, 0},
+ {"DT_UNKNOWN", Const, 0},
+ {"DT_WHT", Const, 0},
+ {"DUPLICATE_CLOSE_SOURCE", Const, 0},
+ {"DUPLICATE_SAME_ACCESS", Const, 0},
+ {"DeleteFile", Func, 0},
+ {"DetachLsf", Func, 0},
+ {"DeviceIoControl", Func, 4},
+ {"Dirent", Type, 0},
+ {"Dirent.Fileno", Field, 0},
+ {"Dirent.Ino", Field, 0},
+ {"Dirent.Name", Field, 0},
+ {"Dirent.Namlen", Field, 0},
+ {"Dirent.Off", Field, 0},
+ {"Dirent.Pad0", Field, 12},
+ {"Dirent.Pad1", Field, 12},
+ {"Dirent.Pad_cgo_0", Field, 0},
+ {"Dirent.Reclen", Field, 0},
+ {"Dirent.Seekoff", Field, 0},
+ {"Dirent.Type", Field, 0},
+ {"Dirent.X__d_padding", Field, 3},
+ {"DnsNameCompare", Func, 4},
+ {"DnsQuery", Func, 0},
+ {"DnsRecordListFree", Func, 0},
+ {"DnsSectionAdditional", Const, 4},
+ {"DnsSectionAnswer", Const, 4},
+ {"DnsSectionAuthority", Const, 4},
+ {"DnsSectionQuestion", Const, 4},
+ {"Dup", Func, 0},
+ {"Dup2", Func, 0},
+ {"Dup3", Func, 2},
+ {"DuplicateHandle", Func, 0},
+ {"E2BIG", Const, 0},
+ {"EACCES", Const, 0},
+ {"EADDRINUSE", Const, 0},
+ {"EADDRNOTAVAIL", Const, 0},
+ {"EADV", Const, 0},
+ {"EAFNOSUPPORT", Const, 0},
+ {"EAGAIN", Const, 0},
+ {"EALREADY", Const, 0},
+ {"EAUTH", Const, 0},
+ {"EBADARCH", Const, 0},
+ {"EBADE", Const, 0},
+ {"EBADEXEC", Const, 0},
+ {"EBADF", Const, 0},
+ {"EBADFD", Const, 0},
+ {"EBADMACHO", Const, 0},
+ {"EBADMSG", Const, 0},
+ {"EBADR", Const, 0},
+ {"EBADRPC", Const, 0},
+ {"EBADRQC", Const, 0},
+ {"EBADSLT", Const, 0},
+ {"EBFONT", Const, 0},
+ {"EBUSY", Const, 0},
+ {"ECANCELED", Const, 0},
+ {"ECAPMODE", Const, 1},
+ {"ECHILD", Const, 0},
+ {"ECHO", Const, 0},
+ {"ECHOCTL", Const, 0},
+ {"ECHOE", Const, 0},
+ {"ECHOK", Const, 0},
+ {"ECHOKE", Const, 0},
+ {"ECHONL", Const, 0},
+ {"ECHOPRT", Const, 0},
+ {"ECHRNG", Const, 0},
+ {"ECOMM", Const, 0},
+ {"ECONNABORTED", Const, 0},
+ {"ECONNREFUSED", Const, 0},
+ {"ECONNRESET", Const, 0},
+ {"EDEADLK", Const, 0},
+ {"EDEADLOCK", Const, 0},
+ {"EDESTADDRREQ", Const, 0},
+ {"EDEVERR", Const, 0},
+ {"EDOM", Const, 0},
+ {"EDOOFUS", Const, 0},
+ {"EDOTDOT", Const, 0},
+ {"EDQUOT", Const, 0},
+ {"EEXIST", Const, 0},
+ {"EFAULT", Const, 0},
+ {"EFBIG", Const, 0},
+ {"EFER_LMA", Const, 1},
+ {"EFER_LME", Const, 1},
+ {"EFER_NXE", Const, 1},
+ {"EFER_SCE", Const, 1},
+ {"EFTYPE", Const, 0},
+ {"EHOSTDOWN", Const, 0},
+ {"EHOSTUNREACH", Const, 0},
+ {"EHWPOISON", Const, 0},
+ {"EIDRM", Const, 0},
+ {"EILSEQ", Const, 0},
+ {"EINPROGRESS", Const, 0},
+ {"EINTR", Const, 0},
+ {"EINVAL", Const, 0},
+ {"EIO", Const, 0},
+ {"EIPSEC", Const, 1},
+ {"EISCONN", Const, 0},
+ {"EISDIR", Const, 0},
+ {"EISNAM", Const, 0},
+ {"EKEYEXPIRED", Const, 0},
+ {"EKEYREJECTED", Const, 0},
+ {"EKEYREVOKED", Const, 0},
+ {"EL2HLT", Const, 0},
+ {"EL2NSYNC", Const, 0},
+ {"EL3HLT", Const, 0},
+ {"EL3RST", Const, 0},
+ {"ELAST", Const, 0},
+ {"ELF_NGREG", Const, 0},
+ {"ELF_PRARGSZ", Const, 0},
+ {"ELIBACC", Const, 0},
+ {"ELIBBAD", Const, 0},
+ {"ELIBEXEC", Const, 0},
+ {"ELIBMAX", Const, 0},
+ {"ELIBSCN", Const, 0},
+ {"ELNRNG", Const, 0},
+ {"ELOOP", Const, 0},
+ {"EMEDIUMTYPE", Const, 0},
+ {"EMFILE", Const, 0},
+ {"EMLINK", Const, 0},
+ {"EMSGSIZE", Const, 0},
+ {"EMT_TAGOVF", Const, 1},
+ {"EMULTIHOP", Const, 0},
+ {"EMUL_ENABLED", Const, 1},
+ {"EMUL_LINUX", Const, 1},
+ {"EMUL_LINUX32", Const, 1},
+ {"EMUL_MAXID", Const, 1},
+ {"EMUL_NATIVE", Const, 1},
+ {"ENAMETOOLONG", Const, 0},
+ {"ENAVAIL", Const, 0},
+ {"ENDRUNDISC", Const, 1},
+ {"ENEEDAUTH", Const, 0},
+ {"ENETDOWN", Const, 0},
+ {"ENETRESET", Const, 0},
+ {"ENETUNREACH", Const, 0},
+ {"ENFILE", Const, 0},
+ {"ENOANO", Const, 0},
+ {"ENOATTR", Const, 0},
+ {"ENOBUFS", Const, 0},
+ {"ENOCSI", Const, 0},
+ {"ENODATA", Const, 0},
+ {"ENODEV", Const, 0},
+ {"ENOENT", Const, 0},
+ {"ENOEXEC", Const, 0},
+ {"ENOKEY", Const, 0},
+ {"ENOLCK", Const, 0},
+ {"ENOLINK", Const, 0},
+ {"ENOMEDIUM", Const, 0},
+ {"ENOMEM", Const, 0},
+ {"ENOMSG", Const, 0},
+ {"ENONET", Const, 0},
+ {"ENOPKG", Const, 0},
+ {"ENOPOLICY", Const, 0},
+ {"ENOPROTOOPT", Const, 0},
+ {"ENOSPC", Const, 0},
+ {"ENOSR", Const, 0},
+ {"ENOSTR", Const, 0},
+ {"ENOSYS", Const, 0},
+ {"ENOTBLK", Const, 0},
+ {"ENOTCAPABLE", Const, 0},
+ {"ENOTCONN", Const, 0},
+ {"ENOTDIR", Const, 0},
+ {"ENOTEMPTY", Const, 0},
+ {"ENOTNAM", Const, 0},
+ {"ENOTRECOVERABLE", Const, 0},
+ {"ENOTSOCK", Const, 0},
+ {"ENOTSUP", Const, 0},
+ {"ENOTTY", Const, 0},
+ {"ENOTUNIQ", Const, 0},
+ {"ENXIO", Const, 0},
+ {"EN_SW_CTL_INF", Const, 1},
+ {"EN_SW_CTL_PREC", Const, 1},
+ {"EN_SW_CTL_ROUND", Const, 1},
+ {"EN_SW_DATACHAIN", Const, 1},
+ {"EN_SW_DENORM", Const, 1},
+ {"EN_SW_INVOP", Const, 1},
+ {"EN_SW_OVERFLOW", Const, 1},
+ {"EN_SW_PRECLOSS", Const, 1},
+ {"EN_SW_UNDERFLOW", Const, 1},
+ {"EN_SW_ZERODIV", Const, 1},
+ {"EOPNOTSUPP", Const, 0},
+ {"EOVERFLOW", Const, 0},
+ {"EOWNERDEAD", Const, 0},
+ {"EPERM", Const, 0},
+ {"EPFNOSUPPORT", Const, 0},
+ {"EPIPE", Const, 0},
+ {"EPOLLERR", Const, 0},
+ {"EPOLLET", Const, 0},
+ {"EPOLLHUP", Const, 0},
+ {"EPOLLIN", Const, 0},
+ {"EPOLLMSG", Const, 0},
+ {"EPOLLONESHOT", Const, 0},
+ {"EPOLLOUT", Const, 0},
+ {"EPOLLPRI", Const, 0},
+ {"EPOLLRDBAND", Const, 0},
+ {"EPOLLRDHUP", Const, 0},
+ {"EPOLLRDNORM", Const, 0},
+ {"EPOLLWRBAND", Const, 0},
+ {"EPOLLWRNORM", Const, 0},
+ {"EPOLL_CLOEXEC", Const, 0},
+ {"EPOLL_CTL_ADD", Const, 0},
+ {"EPOLL_CTL_DEL", Const, 0},
+ {"EPOLL_CTL_MOD", Const, 0},
+ {"EPOLL_NONBLOCK", Const, 0},
+ {"EPROCLIM", Const, 0},
+ {"EPROCUNAVAIL", Const, 0},
+ {"EPROGMISMATCH", Const, 0},
+ {"EPROGUNAVAIL", Const, 0},
+ {"EPROTO", Const, 0},
+ {"EPROTONOSUPPORT", Const, 0},
+ {"EPROTOTYPE", Const, 0},
+ {"EPWROFF", Const, 0},
+ {"EQFULL", Const, 16},
+ {"ERANGE", Const, 0},
+ {"EREMCHG", Const, 0},
+ {"EREMOTE", Const, 0},
+ {"EREMOTEIO", Const, 0},
+ {"ERESTART", Const, 0},
+ {"ERFKILL", Const, 0},
+ {"EROFS", Const, 0},
+ {"ERPCMISMATCH", Const, 0},
+ {"ERROR_ACCESS_DENIED", Const, 0},
+ {"ERROR_ALREADY_EXISTS", Const, 0},
+ {"ERROR_BROKEN_PIPE", Const, 0},
+ {"ERROR_BUFFER_OVERFLOW", Const, 0},
+ {"ERROR_DIR_NOT_EMPTY", Const, 8},
+ {"ERROR_ENVVAR_NOT_FOUND", Const, 0},
+ {"ERROR_FILE_EXISTS", Const, 0},
+ {"ERROR_FILE_NOT_FOUND", Const, 0},
+ {"ERROR_HANDLE_EOF", Const, 2},
+ {"ERROR_INSUFFICIENT_BUFFER", Const, 0},
+ {"ERROR_IO_PENDING", Const, 0},
+ {"ERROR_MOD_NOT_FOUND", Const, 0},
+ {"ERROR_MORE_DATA", Const, 3},
+ {"ERROR_NETNAME_DELETED", Const, 3},
+ {"ERROR_NOT_FOUND", Const, 1},
+ {"ERROR_NO_MORE_FILES", Const, 0},
+ {"ERROR_OPERATION_ABORTED", Const, 0},
+ {"ERROR_PATH_NOT_FOUND", Const, 0},
+ {"ERROR_PRIVILEGE_NOT_HELD", Const, 4},
+ {"ERROR_PROC_NOT_FOUND", Const, 0},
+ {"ESHLIBVERS", Const, 0},
+ {"ESHUTDOWN", Const, 0},
+ {"ESOCKTNOSUPPORT", Const, 0},
+ {"ESPIPE", Const, 0},
+ {"ESRCH", Const, 0},
+ {"ESRMNT", Const, 0},
+ {"ESTALE", Const, 0},
+ {"ESTRPIPE", Const, 0},
+ {"ETHERCAP_JUMBO_MTU", Const, 1},
+ {"ETHERCAP_VLAN_HWTAGGING", Const, 1},
+ {"ETHERCAP_VLAN_MTU", Const, 1},
+ {"ETHERMIN", Const, 1},
+ {"ETHERMTU", Const, 1},
+ {"ETHERMTU_JUMBO", Const, 1},
+ {"ETHERTYPE_8023", Const, 1},
+ {"ETHERTYPE_AARP", Const, 1},
+ {"ETHERTYPE_ACCTON", Const, 1},
+ {"ETHERTYPE_AEONIC", Const, 1},
+ {"ETHERTYPE_ALPHA", Const, 1},
+ {"ETHERTYPE_AMBER", Const, 1},
+ {"ETHERTYPE_AMOEBA", Const, 1},
+ {"ETHERTYPE_AOE", Const, 1},
+ {"ETHERTYPE_APOLLO", Const, 1},
+ {"ETHERTYPE_APOLLODOMAIN", Const, 1},
+ {"ETHERTYPE_APPLETALK", Const, 1},
+ {"ETHERTYPE_APPLITEK", Const, 1},
+ {"ETHERTYPE_ARGONAUT", Const, 1},
+ {"ETHERTYPE_ARP", Const, 1},
+ {"ETHERTYPE_AT", Const, 1},
+ {"ETHERTYPE_ATALK", Const, 1},
+ {"ETHERTYPE_ATOMIC", Const, 1},
+ {"ETHERTYPE_ATT", Const, 1},
+ {"ETHERTYPE_ATTSTANFORD", Const, 1},
+ {"ETHERTYPE_AUTOPHON", Const, 1},
+ {"ETHERTYPE_AXIS", Const, 1},
+ {"ETHERTYPE_BCLOOP", Const, 1},
+ {"ETHERTYPE_BOFL", Const, 1},
+ {"ETHERTYPE_CABLETRON", Const, 1},
+ {"ETHERTYPE_CHAOS", Const, 1},
+ {"ETHERTYPE_COMDESIGN", Const, 1},
+ {"ETHERTYPE_COMPUGRAPHIC", Const, 1},
+ {"ETHERTYPE_COUNTERPOINT", Const, 1},
+ {"ETHERTYPE_CRONUS", Const, 1},
+ {"ETHERTYPE_CRONUSVLN", Const, 1},
+ {"ETHERTYPE_DCA", Const, 1},
+ {"ETHERTYPE_DDE", Const, 1},
+ {"ETHERTYPE_DEBNI", Const, 1},
+ {"ETHERTYPE_DECAM", Const, 1},
+ {"ETHERTYPE_DECCUST", Const, 1},
+ {"ETHERTYPE_DECDIAG", Const, 1},
+ {"ETHERTYPE_DECDNS", Const, 1},
+ {"ETHERTYPE_DECDTS", Const, 1},
+ {"ETHERTYPE_DECEXPER", Const, 1},
+ {"ETHERTYPE_DECLAST", Const, 1},
+ {"ETHERTYPE_DECLTM", Const, 1},
+ {"ETHERTYPE_DECMUMPS", Const, 1},
+ {"ETHERTYPE_DECNETBIOS", Const, 1},
+ {"ETHERTYPE_DELTACON", Const, 1},
+ {"ETHERTYPE_DIDDLE", Const, 1},
+ {"ETHERTYPE_DLOG1", Const, 1},
+ {"ETHERTYPE_DLOG2", Const, 1},
+ {"ETHERTYPE_DN", Const, 1},
+ {"ETHERTYPE_DOGFIGHT", Const, 1},
+ {"ETHERTYPE_DSMD", Const, 1},
+ {"ETHERTYPE_ECMA", Const, 1},
+ {"ETHERTYPE_ENCRYPT", Const, 1},
+ {"ETHERTYPE_ES", Const, 1},
+ {"ETHERTYPE_EXCELAN", Const, 1},
+ {"ETHERTYPE_EXPERDATA", Const, 1},
+ {"ETHERTYPE_FLIP", Const, 1},
+ {"ETHERTYPE_FLOWCONTROL", Const, 1},
+ {"ETHERTYPE_FRARP", Const, 1},
+ {"ETHERTYPE_GENDYN", Const, 1},
+ {"ETHERTYPE_HAYES", Const, 1},
+ {"ETHERTYPE_HIPPI_FP", Const, 1},
+ {"ETHERTYPE_HITACHI", Const, 1},
+ {"ETHERTYPE_HP", Const, 1},
+ {"ETHERTYPE_IEEEPUP", Const, 1},
+ {"ETHERTYPE_IEEEPUPAT", Const, 1},
+ {"ETHERTYPE_IMLBL", Const, 1},
+ {"ETHERTYPE_IMLBLDIAG", Const, 1},
+ {"ETHERTYPE_IP", Const, 1},
+ {"ETHERTYPE_IPAS", Const, 1},
+ {"ETHERTYPE_IPV6", Const, 1},
+ {"ETHERTYPE_IPX", Const, 1},
+ {"ETHERTYPE_IPXNEW", Const, 1},
+ {"ETHERTYPE_KALPANA", Const, 1},
+ {"ETHERTYPE_LANBRIDGE", Const, 1},
+ {"ETHERTYPE_LANPROBE", Const, 1},
+ {"ETHERTYPE_LAT", Const, 1},
+ {"ETHERTYPE_LBACK", Const, 1},
+ {"ETHERTYPE_LITTLE", Const, 1},
+ {"ETHERTYPE_LLDP", Const, 1},
+ {"ETHERTYPE_LOGICRAFT", Const, 1},
+ {"ETHERTYPE_LOOPBACK", Const, 1},
+ {"ETHERTYPE_MATRA", Const, 1},
+ {"ETHERTYPE_MAX", Const, 1},
+ {"ETHERTYPE_MERIT", Const, 1},
+ {"ETHERTYPE_MICP", Const, 1},
+ {"ETHERTYPE_MOPDL", Const, 1},
+ {"ETHERTYPE_MOPRC", Const, 1},
+ {"ETHERTYPE_MOTOROLA", Const, 1},
+ {"ETHERTYPE_MPLS", Const, 1},
+ {"ETHERTYPE_MPLS_MCAST", Const, 1},
+ {"ETHERTYPE_MUMPS", Const, 1},
+ {"ETHERTYPE_NBPCC", Const, 1},
+ {"ETHERTYPE_NBPCLAIM", Const, 1},
+ {"ETHERTYPE_NBPCLREQ", Const, 1},
+ {"ETHERTYPE_NBPCLRSP", Const, 1},
+ {"ETHERTYPE_NBPCREQ", Const, 1},
+ {"ETHERTYPE_NBPCRSP", Const, 1},
+ {"ETHERTYPE_NBPDG", Const, 1},
+ {"ETHERTYPE_NBPDGB", Const, 1},
+ {"ETHERTYPE_NBPDLTE", Const, 1},
+ {"ETHERTYPE_NBPRAR", Const, 1},
+ {"ETHERTYPE_NBPRAS", Const, 1},
+ {"ETHERTYPE_NBPRST", Const, 1},
+ {"ETHERTYPE_NBPSCD", Const, 1},
+ {"ETHERTYPE_NBPVCD", Const, 1},
+ {"ETHERTYPE_NBS", Const, 1},
+ {"ETHERTYPE_NCD", Const, 1},
+ {"ETHERTYPE_NESTAR", Const, 1},
+ {"ETHERTYPE_NETBEUI", Const, 1},
+ {"ETHERTYPE_NOVELL", Const, 1},
+ {"ETHERTYPE_NS", Const, 1},
+ {"ETHERTYPE_NSAT", Const, 1},
+ {"ETHERTYPE_NSCOMPAT", Const, 1},
+ {"ETHERTYPE_NTRAILER", Const, 1},
+ {"ETHERTYPE_OS9", Const, 1},
+ {"ETHERTYPE_OS9NET", Const, 1},
+ {"ETHERTYPE_PACER", Const, 1},
+ {"ETHERTYPE_PAE", Const, 1},
+ {"ETHERTYPE_PCS", Const, 1},
+ {"ETHERTYPE_PLANNING", Const, 1},
+ {"ETHERTYPE_PPP", Const, 1},
+ {"ETHERTYPE_PPPOE", Const, 1},
+ {"ETHERTYPE_PPPOEDISC", Const, 1},
+ {"ETHERTYPE_PRIMENTS", Const, 1},
+ {"ETHERTYPE_PUP", Const, 1},
+ {"ETHERTYPE_PUPAT", Const, 1},
+ {"ETHERTYPE_QINQ", Const, 1},
+ {"ETHERTYPE_RACAL", Const, 1},
+ {"ETHERTYPE_RATIONAL", Const, 1},
+ {"ETHERTYPE_RAWFR", Const, 1},
+ {"ETHERTYPE_RCL", Const, 1},
+ {"ETHERTYPE_RDP", Const, 1},
+ {"ETHERTYPE_RETIX", Const, 1},
+ {"ETHERTYPE_REVARP", Const, 1},
+ {"ETHERTYPE_SCA", Const, 1},
+ {"ETHERTYPE_SECTRA", Const, 1},
+ {"ETHERTYPE_SECUREDATA", Const, 1},
+ {"ETHERTYPE_SGITW", Const, 1},
+ {"ETHERTYPE_SG_BOUNCE", Const, 1},
+ {"ETHERTYPE_SG_DIAG", Const, 1},
+ {"ETHERTYPE_SG_NETGAMES", Const, 1},
+ {"ETHERTYPE_SG_RESV", Const, 1},
+ {"ETHERTYPE_SIMNET", Const, 1},
+ {"ETHERTYPE_SLOW", Const, 1},
+ {"ETHERTYPE_SLOWPROTOCOLS", Const, 1},
+ {"ETHERTYPE_SNA", Const, 1},
+ {"ETHERTYPE_SNMP", Const, 1},
+ {"ETHERTYPE_SONIX", Const, 1},
+ {"ETHERTYPE_SPIDER", Const, 1},
+ {"ETHERTYPE_SPRITE", Const, 1},
+ {"ETHERTYPE_STP", Const, 1},
+ {"ETHERTYPE_TALARIS", Const, 1},
+ {"ETHERTYPE_TALARISMC", Const, 1},
+ {"ETHERTYPE_TCPCOMP", Const, 1},
+ {"ETHERTYPE_TCPSM", Const, 1},
+ {"ETHERTYPE_TEC", Const, 1},
+ {"ETHERTYPE_TIGAN", Const, 1},
+ {"ETHERTYPE_TRAIL", Const, 1},
+ {"ETHERTYPE_TRANSETHER", Const, 1},
+ {"ETHERTYPE_TYMSHARE", Const, 1},
+ {"ETHERTYPE_UBBST", Const, 1},
+ {"ETHERTYPE_UBDEBUG", Const, 1},
+ {"ETHERTYPE_UBDIAGLOOP", Const, 1},
+ {"ETHERTYPE_UBDL", Const, 1},
+ {"ETHERTYPE_UBNIU", Const, 1},
+ {"ETHERTYPE_UBNMC", Const, 1},
+ {"ETHERTYPE_VALID", Const, 1},
+ {"ETHERTYPE_VARIAN", Const, 1},
+ {"ETHERTYPE_VAXELN", Const, 1},
+ {"ETHERTYPE_VEECO", Const, 1},
+ {"ETHERTYPE_VEXP", Const, 1},
+ {"ETHERTYPE_VGLAB", Const, 1},
+ {"ETHERTYPE_VINES", Const, 1},
+ {"ETHERTYPE_VINESECHO", Const, 1},
+ {"ETHERTYPE_VINESLOOP", Const, 1},
+ {"ETHERTYPE_VITAL", Const, 1},
+ {"ETHERTYPE_VLAN", Const, 1},
+ {"ETHERTYPE_VLTLMAN", Const, 1},
+ {"ETHERTYPE_VPROD", Const, 1},
+ {"ETHERTYPE_VURESERVED", Const, 1},
+ {"ETHERTYPE_WATERLOO", Const, 1},
+ {"ETHERTYPE_WELLFLEET", Const, 1},
+ {"ETHERTYPE_X25", Const, 1},
+ {"ETHERTYPE_X75", Const, 1},
+ {"ETHERTYPE_XNSSM", Const, 1},
+ {"ETHERTYPE_XTP", Const, 1},
+ {"ETHER_ADDR_LEN", Const, 1},
+ {"ETHER_ALIGN", Const, 1},
+ {"ETHER_CRC_LEN", Const, 1},
+ {"ETHER_CRC_POLY_BE", Const, 1},
+ {"ETHER_CRC_POLY_LE", Const, 1},
+ {"ETHER_HDR_LEN", Const, 1},
+ {"ETHER_MAX_DIX_LEN", Const, 1},
+ {"ETHER_MAX_LEN", Const, 1},
+ {"ETHER_MAX_LEN_JUMBO", Const, 1},
+ {"ETHER_MIN_LEN", Const, 1},
+ {"ETHER_PPPOE_ENCAP_LEN", Const, 1},
+ {"ETHER_TYPE_LEN", Const, 1},
+ {"ETHER_VLAN_ENCAP_LEN", Const, 1},
+ {"ETH_P_1588", Const, 0},
+ {"ETH_P_8021Q", Const, 0},
+ {"ETH_P_802_2", Const, 0},
+ {"ETH_P_802_3", Const, 0},
+ {"ETH_P_AARP", Const, 0},
+ {"ETH_P_ALL", Const, 0},
+ {"ETH_P_AOE", Const, 0},
+ {"ETH_P_ARCNET", Const, 0},
+ {"ETH_P_ARP", Const, 0},
+ {"ETH_P_ATALK", Const, 0},
+ {"ETH_P_ATMFATE", Const, 0},
+ {"ETH_P_ATMMPOA", Const, 0},
+ {"ETH_P_AX25", Const, 0},
+ {"ETH_P_BPQ", Const, 0},
+ {"ETH_P_CAIF", Const, 0},
+ {"ETH_P_CAN", Const, 0},
+ {"ETH_P_CONTROL", Const, 0},
+ {"ETH_P_CUST", Const, 0},
+ {"ETH_P_DDCMP", Const, 0},
+ {"ETH_P_DEC", Const, 0},
+ {"ETH_P_DIAG", Const, 0},
+ {"ETH_P_DNA_DL", Const, 0},
+ {"ETH_P_DNA_RC", Const, 0},
+ {"ETH_P_DNA_RT", Const, 0},
+ {"ETH_P_DSA", Const, 0},
+ {"ETH_P_ECONET", Const, 0},
+ {"ETH_P_EDSA", Const, 0},
+ {"ETH_P_FCOE", Const, 0},
+ {"ETH_P_FIP", Const, 0},
+ {"ETH_P_HDLC", Const, 0},
+ {"ETH_P_IEEE802154", Const, 0},
+ {"ETH_P_IEEEPUP", Const, 0},
+ {"ETH_P_IEEEPUPAT", Const, 0},
+ {"ETH_P_IP", Const, 0},
+ {"ETH_P_IPV6", Const, 0},
+ {"ETH_P_IPX", Const, 0},
+ {"ETH_P_IRDA", Const, 0},
+ {"ETH_P_LAT", Const, 0},
+ {"ETH_P_LINK_CTL", Const, 0},
+ {"ETH_P_LOCALTALK", Const, 0},
+ {"ETH_P_LOOP", Const, 0},
+ {"ETH_P_MOBITEX", Const, 0},
+ {"ETH_P_MPLS_MC", Const, 0},
+ {"ETH_P_MPLS_UC", Const, 0},
+ {"ETH_P_PAE", Const, 0},
+ {"ETH_P_PAUSE", Const, 0},
+ {"ETH_P_PHONET", Const, 0},
+ {"ETH_P_PPPTALK", Const, 0},
+ {"ETH_P_PPP_DISC", Const, 0},
+ {"ETH_P_PPP_MP", Const, 0},
+ {"ETH_P_PPP_SES", Const, 0},
+ {"ETH_P_PUP", Const, 0},
+ {"ETH_P_PUPAT", Const, 0},
+ {"ETH_P_RARP", Const, 0},
+ {"ETH_P_SCA", Const, 0},
+ {"ETH_P_SLOW", Const, 0},
+ {"ETH_P_SNAP", Const, 0},
+ {"ETH_P_TEB", Const, 0},
+ {"ETH_P_TIPC", Const, 0},
+ {"ETH_P_TRAILER", Const, 0},
+ {"ETH_P_TR_802_2", Const, 0},
+ {"ETH_P_WAN_PPP", Const, 0},
+ {"ETH_P_WCCP", Const, 0},
+ {"ETH_P_X25", Const, 0},
+ {"ETIME", Const, 0},
+ {"ETIMEDOUT", Const, 0},
+ {"ETOOMANYREFS", Const, 0},
+ {"ETXTBSY", Const, 0},
+ {"EUCLEAN", Const, 0},
+ {"EUNATCH", Const, 0},
+ {"EUSERS", Const, 0},
+ {"EVFILT_AIO", Const, 0},
+ {"EVFILT_FS", Const, 0},
+ {"EVFILT_LIO", Const, 0},
+ {"EVFILT_MACHPORT", Const, 0},
+ {"EVFILT_PROC", Const, 0},
+ {"EVFILT_READ", Const, 0},
+ {"EVFILT_SIGNAL", Const, 0},
+ {"EVFILT_SYSCOUNT", Const, 0},
+ {"EVFILT_THREADMARKER", Const, 0},
+ {"EVFILT_TIMER", Const, 0},
+ {"EVFILT_USER", Const, 0},
+ {"EVFILT_VM", Const, 0},
+ {"EVFILT_VNODE", Const, 0},
+ {"EVFILT_WRITE", Const, 0},
+ {"EV_ADD", Const, 0},
+ {"EV_CLEAR", Const, 0},
+ {"EV_DELETE", Const, 0},
+ {"EV_DISABLE", Const, 0},
+ {"EV_DISPATCH", Const, 0},
+ {"EV_DROP", Const, 3},
+ {"EV_ENABLE", Const, 0},
+ {"EV_EOF", Const, 0},
+ {"EV_ERROR", Const, 0},
+ {"EV_FLAG0", Const, 0},
+ {"EV_FLAG1", Const, 0},
+ {"EV_ONESHOT", Const, 0},
+ {"EV_OOBAND", Const, 0},
+ {"EV_POLL", Const, 0},
+ {"EV_RECEIPT", Const, 0},
+ {"EV_SYSFLAGS", Const, 0},
+ {"EWINDOWS", Const, 0},
+ {"EWOULDBLOCK", Const, 0},
+ {"EXDEV", Const, 0},
+ {"EXFULL", Const, 0},
+ {"EXTA", Const, 0},
+ {"EXTB", Const, 0},
+ {"EXTPROC", Const, 0},
+ {"Environ", Func, 0},
+ {"EpollCreate", Func, 0},
+ {"EpollCreate1", Func, 0},
+ {"EpollCtl", Func, 0},
+ {"EpollEvent", Type, 0},
+ {"EpollEvent.Events", Field, 0},
+ {"EpollEvent.Fd", Field, 0},
+ {"EpollEvent.Pad", Field, 0},
+ {"EpollEvent.PadFd", Field, 0},
+ {"EpollWait", Func, 0},
+ {"Errno", Type, 0},
+ {"EscapeArg", Func, 0},
+ {"Exchangedata", Func, 0},
+ {"Exec", Func, 0},
+ {"Exit", Func, 0},
+ {"ExitProcess", Func, 0},
+ {"FD_CLOEXEC", Const, 0},
+ {"FD_SETSIZE", Const, 0},
+ {"FILE_ACTION_ADDED", Const, 0},
+ {"FILE_ACTION_MODIFIED", Const, 0},
+ {"FILE_ACTION_REMOVED", Const, 0},
+ {"FILE_ACTION_RENAMED_NEW_NAME", Const, 0},
+ {"FILE_ACTION_RENAMED_OLD_NAME", Const, 0},
+ {"FILE_APPEND_DATA", Const, 0},
+ {"FILE_ATTRIBUTE_ARCHIVE", Const, 0},
+ {"FILE_ATTRIBUTE_DIRECTORY", Const, 0},
+ {"FILE_ATTRIBUTE_HIDDEN", Const, 0},
+ {"FILE_ATTRIBUTE_NORMAL", Const, 0},
+ {"FILE_ATTRIBUTE_READONLY", Const, 0},
+ {"FILE_ATTRIBUTE_REPARSE_POINT", Const, 4},
+ {"FILE_ATTRIBUTE_SYSTEM", Const, 0},
+ {"FILE_BEGIN", Const, 0},
+ {"FILE_CURRENT", Const, 0},
+ {"FILE_END", Const, 0},
+ {"FILE_FLAG_BACKUP_SEMANTICS", Const, 0},
+ {"FILE_FLAG_OPEN_REPARSE_POINT", Const, 4},
+ {"FILE_FLAG_OVERLAPPED", Const, 0},
+ {"FILE_LIST_DIRECTORY", Const, 0},
+ {"FILE_MAP_COPY", Const, 0},
+ {"FILE_MAP_EXECUTE", Const, 0},
+ {"FILE_MAP_READ", Const, 0},
+ {"FILE_MAP_WRITE", Const, 0},
+ {"FILE_NOTIFY_CHANGE_ATTRIBUTES", Const, 0},
+ {"FILE_NOTIFY_CHANGE_CREATION", Const, 0},
+ {"FILE_NOTIFY_CHANGE_DIR_NAME", Const, 0},
+ {"FILE_NOTIFY_CHANGE_FILE_NAME", Const, 0},
+ {"FILE_NOTIFY_CHANGE_LAST_ACCESS", Const, 0},
+ {"FILE_NOTIFY_CHANGE_LAST_WRITE", Const, 0},
+ {"FILE_NOTIFY_CHANGE_SIZE", Const, 0},
+ {"FILE_SHARE_DELETE", Const, 0},
+ {"FILE_SHARE_READ", Const, 0},
+ {"FILE_SHARE_WRITE", Const, 0},
+ {"FILE_SKIP_COMPLETION_PORT_ON_SUCCESS", Const, 2},
+ {"FILE_SKIP_SET_EVENT_ON_HANDLE", Const, 2},
+ {"FILE_TYPE_CHAR", Const, 0},
+ {"FILE_TYPE_DISK", Const, 0},
+ {"FILE_TYPE_PIPE", Const, 0},
+ {"FILE_TYPE_REMOTE", Const, 0},
+ {"FILE_TYPE_UNKNOWN", Const, 0},
+ {"FILE_WRITE_ATTRIBUTES", Const, 0},
+ {"FLUSHO", Const, 0},
+ {"FORMAT_MESSAGE_ALLOCATE_BUFFER", Const, 0},
+ {"FORMAT_MESSAGE_ARGUMENT_ARRAY", Const, 0},
+ {"FORMAT_MESSAGE_FROM_HMODULE", Const, 0},
+ {"FORMAT_MESSAGE_FROM_STRING", Const, 0},
+ {"FORMAT_MESSAGE_FROM_SYSTEM", Const, 0},
+ {"FORMAT_MESSAGE_IGNORE_INSERTS", Const, 0},
+ {"FORMAT_MESSAGE_MAX_WIDTH_MASK", Const, 0},
+ {"FSCTL_GET_REPARSE_POINT", Const, 4},
+ {"F_ADDFILESIGS", Const, 0},
+ {"F_ADDSIGS", Const, 0},
+ {"F_ALLOCATEALL", Const, 0},
+ {"F_ALLOCATECONTIG", Const, 0},
+ {"F_CANCEL", Const, 0},
+ {"F_CHKCLEAN", Const, 0},
+ {"F_CLOSEM", Const, 1},
+ {"F_DUP2FD", Const, 0},
+ {"F_DUP2FD_CLOEXEC", Const, 1},
+ {"F_DUPFD", Const, 0},
+ {"F_DUPFD_CLOEXEC", Const, 0},
+ {"F_EXLCK", Const, 0},
+ {"F_FINDSIGS", Const, 16},
+ {"F_FLUSH_DATA", Const, 0},
+ {"F_FREEZE_FS", Const, 0},
+ {"F_FSCTL", Const, 1},
+ {"F_FSDIRMASK", Const, 1},
+ {"F_FSIN", Const, 1},
+ {"F_FSINOUT", Const, 1},
+ {"F_FSOUT", Const, 1},
+ {"F_FSPRIV", Const, 1},
+ {"F_FSVOID", Const, 1},
+ {"F_FULLFSYNC", Const, 0},
+ {"F_GETCODEDIR", Const, 16},
+ {"F_GETFD", Const, 0},
+ {"F_GETFL", Const, 0},
+ {"F_GETLEASE", Const, 0},
+ {"F_GETLK", Const, 0},
+ {"F_GETLK64", Const, 0},
+ {"F_GETLKPID", Const, 0},
+ {"F_GETNOSIGPIPE", Const, 0},
+ {"F_GETOWN", Const, 0},
+ {"F_GETOWN_EX", Const, 0},
+ {"F_GETPATH", Const, 0},
+ {"F_GETPATH_MTMINFO", Const, 0},
+ {"F_GETPIPE_SZ", Const, 0},
+ {"F_GETPROTECTIONCLASS", Const, 0},
+ {"F_GETPROTECTIONLEVEL", Const, 16},
+ {"F_GETSIG", Const, 0},
+ {"F_GLOBAL_NOCACHE", Const, 0},
+ {"F_LOCK", Const, 0},
+ {"F_LOG2PHYS", Const, 0},
+ {"F_LOG2PHYS_EXT", Const, 0},
+ {"F_MARKDEPENDENCY", Const, 0},
+ {"F_MAXFD", Const, 1},
+ {"F_NOCACHE", Const, 0},
+ {"F_NODIRECT", Const, 0},
+ {"F_NOTIFY", Const, 0},
+ {"F_OGETLK", Const, 0},
+ {"F_OK", Const, 0},
+ {"F_OSETLK", Const, 0},
+ {"F_OSETLKW", Const, 0},
+ {"F_PARAM_MASK", Const, 1},
+ {"F_PARAM_MAX", Const, 1},
+ {"F_PATHPKG_CHECK", Const, 0},
+ {"F_PEOFPOSMODE", Const, 0},
+ {"F_PREALLOCATE", Const, 0},
+ {"F_RDADVISE", Const, 0},
+ {"F_RDAHEAD", Const, 0},
+ {"F_RDLCK", Const, 0},
+ {"F_READAHEAD", Const, 0},
+ {"F_READBOOTSTRAP", Const, 0},
+ {"F_SETBACKINGSTORE", Const, 0},
+ {"F_SETFD", Const, 0},
+ {"F_SETFL", Const, 0},
+ {"F_SETLEASE", Const, 0},
+ {"F_SETLK", Const, 0},
+ {"F_SETLK64", Const, 0},
+ {"F_SETLKW", Const, 0},
+ {"F_SETLKW64", Const, 0},
+ {"F_SETLKWTIMEOUT", Const, 16},
+ {"F_SETLK_REMOTE", Const, 0},
+ {"F_SETNOSIGPIPE", Const, 0},
+ {"F_SETOWN", Const, 0},
+ {"F_SETOWN_EX", Const, 0},
+ {"F_SETPIPE_SZ", Const, 0},
+ {"F_SETPROTECTIONCLASS", Const, 0},
+ {"F_SETSIG", Const, 0},
+ {"F_SETSIZE", Const, 0},
+ {"F_SHLCK", Const, 0},
+ {"F_SINGLE_WRITER", Const, 16},
+ {"F_TEST", Const, 0},
+ {"F_THAW_FS", Const, 0},
+ {"F_TLOCK", Const, 0},
+ {"F_TRANSCODEKEY", Const, 16},
+ {"F_ULOCK", Const, 0},
+ {"F_UNLCK", Const, 0},
+ {"F_UNLCKSYS", Const, 0},
+ {"F_VOLPOSMODE", Const, 0},
+ {"F_WRITEBOOTSTRAP", Const, 0},
+ {"F_WRLCK", Const, 0},
+ {"Faccessat", Func, 0},
+ {"Fallocate", Func, 0},
+ {"Fbootstraptransfer_t", Type, 0},
+ {"Fbootstraptransfer_t.Buffer", Field, 0},
+ {"Fbootstraptransfer_t.Length", Field, 0},
+ {"Fbootstraptransfer_t.Offset", Field, 0},
+ {"Fchdir", Func, 0},
+ {"Fchflags", Func, 0},
+ {"Fchmod", Func, 0},
+ {"Fchmodat", Func, 0},
+ {"Fchown", Func, 0},
+ {"Fchownat", Func, 0},
+ {"FcntlFlock", Func, 3},
+ {"FdSet", Type, 0},
+ {"FdSet.Bits", Field, 0},
+ {"FdSet.X__fds_bits", Field, 0},
+ {"Fdatasync", Func, 0},
+ {"FileNotifyInformation", Type, 0},
+ {"FileNotifyInformation.Action", Field, 0},
+ {"FileNotifyInformation.FileName", Field, 0},
+ {"FileNotifyInformation.FileNameLength", Field, 0},
+ {"FileNotifyInformation.NextEntryOffset", Field, 0},
+ {"Filetime", Type, 0},
+ {"Filetime.HighDateTime", Field, 0},
+ {"Filetime.LowDateTime", Field, 0},
+ {"FindClose", Func, 0},
+ {"FindFirstFile", Func, 0},
+ {"FindNextFile", Func, 0},
+ {"Flock", Func, 0},
+ {"Flock_t", Type, 0},
+ {"Flock_t.Len", Field, 0},
+ {"Flock_t.Pad_cgo_0", Field, 0},
+ {"Flock_t.Pad_cgo_1", Field, 3},
+ {"Flock_t.Pid", Field, 0},
+ {"Flock_t.Start", Field, 0},
+ {"Flock_t.Sysid", Field, 0},
+ {"Flock_t.Type", Field, 0},
+ {"Flock_t.Whence", Field, 0},
+ {"FlushBpf", Func, 0},
+ {"FlushFileBuffers", Func, 0},
+ {"FlushViewOfFile", Func, 0},
+ {"ForkExec", Func, 0},
+ {"ForkLock", Var, 0},
+ {"FormatMessage", Func, 0},
+ {"Fpathconf", Func, 0},
+ {"FreeAddrInfoW", Func, 1},
+ {"FreeEnvironmentStrings", Func, 0},
+ {"FreeLibrary", Func, 0},
+ {"Fsid", Type, 0},
+ {"Fsid.Val", Field, 0},
+ {"Fsid.X__fsid_val", Field, 2},
+ {"Fsid.X__val", Field, 0},
+ {"Fstat", Func, 0},
+ {"Fstatat", Func, 12},
+ {"Fstatfs", Func, 0},
+ {"Fstore_t", Type, 0},
+ {"Fstore_t.Bytesalloc", Field, 0},
+ {"Fstore_t.Flags", Field, 0},
+ {"Fstore_t.Length", Field, 0},
+ {"Fstore_t.Offset", Field, 0},
+ {"Fstore_t.Posmode", Field, 0},
+ {"Fsync", Func, 0},
+ {"Ftruncate", Func, 0},
+ {"FullPath", Func, 4},
+ {"Futimes", Func, 0},
+ {"Futimesat", Func, 0},
+ {"GENERIC_ALL", Const, 0},
+ {"GENERIC_EXECUTE", Const, 0},
+ {"GENERIC_READ", Const, 0},
+ {"GENERIC_WRITE", Const, 0},
+ {"GUID", Type, 1},
+ {"GUID.Data1", Field, 1},
+ {"GUID.Data2", Field, 1},
+ {"GUID.Data3", Field, 1},
+ {"GUID.Data4", Field, 1},
+ {"GetAcceptExSockaddrs", Func, 0},
+ {"GetAdaptersInfo", Func, 0},
+ {"GetAddrInfoW", Func, 1},
+ {"GetCommandLine", Func, 0},
+ {"GetComputerName", Func, 0},
+ {"GetConsoleMode", Func, 1},
+ {"GetCurrentDirectory", Func, 0},
+ {"GetCurrentProcess", Func, 0},
+ {"GetEnvironmentStrings", Func, 0},
+ {"GetEnvironmentVariable", Func, 0},
+ {"GetExitCodeProcess", Func, 0},
+ {"GetFileAttributes", Func, 0},
+ {"GetFileAttributesEx", Func, 0},
+ {"GetFileExInfoStandard", Const, 0},
+ {"GetFileExMaxInfoLevel", Const, 0},
+ {"GetFileInformationByHandle", Func, 0},
+ {"GetFileType", Func, 0},
+ {"GetFullPathName", Func, 0},
+ {"GetHostByName", Func, 0},
+ {"GetIfEntry", Func, 0},
+ {"GetLastError", Func, 0},
+ {"GetLengthSid", Func, 0},
+ {"GetLongPathName", Func, 0},
+ {"GetProcAddress", Func, 0},
+ {"GetProcessTimes", Func, 0},
+ {"GetProtoByName", Func, 0},
+ {"GetQueuedCompletionStatus", Func, 0},
+ {"GetServByName", Func, 0},
+ {"GetShortPathName", Func, 0},
+ {"GetStartupInfo", Func, 0},
+ {"GetStdHandle", Func, 0},
+ {"GetSystemTimeAsFileTime", Func, 0},
+ {"GetTempPath", Func, 0},
+ {"GetTimeZoneInformation", Func, 0},
+ {"GetTokenInformation", Func, 0},
+ {"GetUserNameEx", Func, 0},
+ {"GetUserProfileDirectory", Func, 0},
+ {"GetVersion", Func, 0},
+ {"Getcwd", Func, 0},
+ {"Getdents", Func, 0},
+ {"Getdirentries", Func, 0},
+ {"Getdtablesize", Func, 0},
+ {"Getegid", Func, 0},
+ {"Getenv", Func, 0},
+ {"Geteuid", Func, 0},
+ {"Getfsstat", Func, 0},
+ {"Getgid", Func, 0},
+ {"Getgroups", Func, 0},
+ {"Getpagesize", Func, 0},
+ {"Getpeername", Func, 0},
+ {"Getpgid", Func, 0},
+ {"Getpgrp", Func, 0},
+ {"Getpid", Func, 0},
+ {"Getppid", Func, 0},
+ {"Getpriority", Func, 0},
+ {"Getrlimit", Func, 0},
+ {"Getrusage", Func, 0},
+ {"Getsid", Func, 0},
+ {"Getsockname", Func, 0},
+ {"Getsockopt", Func, 1},
+ {"GetsockoptByte", Func, 0},
+ {"GetsockoptICMPv6Filter", Func, 2},
+ {"GetsockoptIPMreq", Func, 0},
+ {"GetsockoptIPMreqn", Func, 0},
+ {"GetsockoptIPv6MTUInfo", Func, 2},
+ {"GetsockoptIPv6Mreq", Func, 0},
+ {"GetsockoptInet4Addr", Func, 0},
+ {"GetsockoptInt", Func, 0},
+ {"GetsockoptUcred", Func, 1},
+ {"Gettid", Func, 0},
+ {"Gettimeofday", Func, 0},
+ {"Getuid", Func, 0},
+ {"Getwd", Func, 0},
+ {"Getxattr", Func, 1},
+ {"HANDLE_FLAG_INHERIT", Const, 0},
+ {"HKEY_CLASSES_ROOT", Const, 0},
+ {"HKEY_CURRENT_CONFIG", Const, 0},
+ {"HKEY_CURRENT_USER", Const, 0},
+ {"HKEY_DYN_DATA", Const, 0},
+ {"HKEY_LOCAL_MACHINE", Const, 0},
+ {"HKEY_PERFORMANCE_DATA", Const, 0},
+ {"HKEY_USERS", Const, 0},
+ {"HUPCL", Const, 0},
+ {"Handle", Type, 0},
+ {"Hostent", Type, 0},
+ {"Hostent.AddrList", Field, 0},
+ {"Hostent.AddrType", Field, 0},
+ {"Hostent.Aliases", Field, 0},
+ {"Hostent.Length", Field, 0},
+ {"Hostent.Name", Field, 0},
+ {"ICANON", Const, 0},
+ {"ICMP6_FILTER", Const, 2},
+ {"ICMPV6_FILTER", Const, 2},
+ {"ICMPv6Filter", Type, 2},
+ {"ICMPv6Filter.Data", Field, 2},
+ {"ICMPv6Filter.Filt", Field, 2},
+ {"ICRNL", Const, 0},
+ {"IEXTEN", Const, 0},
+ {"IFAN_ARRIVAL", Const, 1},
+ {"IFAN_DEPARTURE", Const, 1},
+ {"IFA_ADDRESS", Const, 0},
+ {"IFA_ANYCAST", Const, 0},
+ {"IFA_BROADCAST", Const, 0},
+ {"IFA_CACHEINFO", Const, 0},
+ {"IFA_F_DADFAILED", Const, 0},
+ {"IFA_F_DEPRECATED", Const, 0},
+ {"IFA_F_HOMEADDRESS", Const, 0},
+ {"IFA_F_NODAD", Const, 0},
+ {"IFA_F_OPTIMISTIC", Const, 0},
+ {"IFA_F_PERMANENT", Const, 0},
+ {"IFA_F_SECONDARY", Const, 0},
+ {"IFA_F_TEMPORARY", Const, 0},
+ {"IFA_F_TENTATIVE", Const, 0},
+ {"IFA_LABEL", Const, 0},
+ {"IFA_LOCAL", Const, 0},
+ {"IFA_MAX", Const, 0},
+ {"IFA_MULTICAST", Const, 0},
+ {"IFA_ROUTE", Const, 1},
+ {"IFA_UNSPEC", Const, 0},
+ {"IFF_ALLMULTI", Const, 0},
+ {"IFF_ALTPHYS", Const, 0},
+ {"IFF_AUTOMEDIA", Const, 0},
+ {"IFF_BROADCAST", Const, 0},
+ {"IFF_CANTCHANGE", Const, 0},
+ {"IFF_CANTCONFIG", Const, 1},
+ {"IFF_DEBUG", Const, 0},
+ {"IFF_DRV_OACTIVE", Const, 0},
+ {"IFF_DRV_RUNNING", Const, 0},
+ {"IFF_DYING", Const, 0},
+ {"IFF_DYNAMIC", Const, 0},
+ {"IFF_LINK0", Const, 0},
+ {"IFF_LINK1", Const, 0},
+ {"IFF_LINK2", Const, 0},
+ {"IFF_LOOPBACK", Const, 0},
+ {"IFF_MASTER", Const, 0},
+ {"IFF_MONITOR", Const, 0},
+ {"IFF_MULTICAST", Const, 0},
+ {"IFF_NOARP", Const, 0},
+ {"IFF_NOTRAILERS", Const, 0},
+ {"IFF_NO_PI", Const, 0},
+ {"IFF_OACTIVE", Const, 0},
+ {"IFF_ONE_QUEUE", Const, 0},
+ {"IFF_POINTOPOINT", Const, 0},
+ {"IFF_POINTTOPOINT", Const, 0},
+ {"IFF_PORTSEL", Const, 0},
+ {"IFF_PPROMISC", Const, 0},
+ {"IFF_PROMISC", Const, 0},
+ {"IFF_RENAMING", Const, 0},
+ {"IFF_RUNNING", Const, 0},
+ {"IFF_SIMPLEX", Const, 0},
+ {"IFF_SLAVE", Const, 0},
+ {"IFF_SMART", Const, 0},
+ {"IFF_STATICARP", Const, 0},
+ {"IFF_TAP", Const, 0},
+ {"IFF_TUN", Const, 0},
+ {"IFF_TUN_EXCL", Const, 0},
+ {"IFF_UP", Const, 0},
+ {"IFF_VNET_HDR", Const, 0},
+ {"IFLA_ADDRESS", Const, 0},
+ {"IFLA_BROADCAST", Const, 0},
+ {"IFLA_COST", Const, 0},
+ {"IFLA_IFALIAS", Const, 0},
+ {"IFLA_IFNAME", Const, 0},
+ {"IFLA_LINK", Const, 0},
+ {"IFLA_LINKINFO", Const, 0},
+ {"IFLA_LINKMODE", Const, 0},
+ {"IFLA_MAP", Const, 0},
+ {"IFLA_MASTER", Const, 0},
+ {"IFLA_MAX", Const, 0},
+ {"IFLA_MTU", Const, 0},
+ {"IFLA_NET_NS_PID", Const, 0},
+ {"IFLA_OPERSTATE", Const, 0},
+ {"IFLA_PRIORITY", Const, 0},
+ {"IFLA_PROTINFO", Const, 0},
+ {"IFLA_QDISC", Const, 0},
+ {"IFLA_STATS", Const, 0},
+ {"IFLA_TXQLEN", Const, 0},
+ {"IFLA_UNSPEC", Const, 0},
+ {"IFLA_WEIGHT", Const, 0},
+ {"IFLA_WIRELESS", Const, 0},
+ {"IFNAMSIZ", Const, 0},
+ {"IFT_1822", Const, 0},
+ {"IFT_A12MPPSWITCH", Const, 0},
+ {"IFT_AAL2", Const, 0},
+ {"IFT_AAL5", Const, 0},
+ {"IFT_ADSL", Const, 0},
+ {"IFT_AFLANE8023", Const, 0},
+ {"IFT_AFLANE8025", Const, 0},
+ {"IFT_ARAP", Const, 0},
+ {"IFT_ARCNET", Const, 0},
+ {"IFT_ARCNETPLUS", Const, 0},
+ {"IFT_ASYNC", Const, 0},
+ {"IFT_ATM", Const, 0},
+ {"IFT_ATMDXI", Const, 0},
+ {"IFT_ATMFUNI", Const, 0},
+ {"IFT_ATMIMA", Const, 0},
+ {"IFT_ATMLOGICAL", Const, 0},
+ {"IFT_ATMRADIO", Const, 0},
+ {"IFT_ATMSUBINTERFACE", Const, 0},
+ {"IFT_ATMVCIENDPT", Const, 0},
+ {"IFT_ATMVIRTUAL", Const, 0},
+ {"IFT_BGPPOLICYACCOUNTING", Const, 0},
+ {"IFT_BLUETOOTH", Const, 1},
+ {"IFT_BRIDGE", Const, 0},
+ {"IFT_BSC", Const, 0},
+ {"IFT_CARP", Const, 0},
+ {"IFT_CCTEMUL", Const, 0},
+ {"IFT_CELLULAR", Const, 0},
+ {"IFT_CEPT", Const, 0},
+ {"IFT_CES", Const, 0},
+ {"IFT_CHANNEL", Const, 0},
+ {"IFT_CNR", Const, 0},
+ {"IFT_COFFEE", Const, 0},
+ {"IFT_COMPOSITELINK", Const, 0},
+ {"IFT_DCN", Const, 0},
+ {"IFT_DIGITALPOWERLINE", Const, 0},
+ {"IFT_DIGITALWRAPPEROVERHEADCHANNEL", Const, 0},
+ {"IFT_DLSW", Const, 0},
+ {"IFT_DOCSCABLEDOWNSTREAM", Const, 0},
+ {"IFT_DOCSCABLEMACLAYER", Const, 0},
+ {"IFT_DOCSCABLEUPSTREAM", Const, 0},
+ {"IFT_DOCSCABLEUPSTREAMCHANNEL", Const, 1},
+ {"IFT_DS0", Const, 0},
+ {"IFT_DS0BUNDLE", Const, 0},
+ {"IFT_DS1FDL", Const, 0},
+ {"IFT_DS3", Const, 0},
+ {"IFT_DTM", Const, 0},
+ {"IFT_DUMMY", Const, 1},
+ {"IFT_DVBASILN", Const, 0},
+ {"IFT_DVBASIOUT", Const, 0},
+ {"IFT_DVBRCCDOWNSTREAM", Const, 0},
+ {"IFT_DVBRCCMACLAYER", Const, 0},
+ {"IFT_DVBRCCUPSTREAM", Const, 0},
+ {"IFT_ECONET", Const, 1},
+ {"IFT_ENC", Const, 0},
+ {"IFT_EON", Const, 0},
+ {"IFT_EPLRS", Const, 0},
+ {"IFT_ESCON", Const, 0},
+ {"IFT_ETHER", Const, 0},
+ {"IFT_FAITH", Const, 0},
+ {"IFT_FAST", Const, 0},
+ {"IFT_FASTETHER", Const, 0},
+ {"IFT_FASTETHERFX", Const, 0},
+ {"IFT_FDDI", Const, 0},
+ {"IFT_FIBRECHANNEL", Const, 0},
+ {"IFT_FRAMERELAYINTERCONNECT", Const, 0},
+ {"IFT_FRAMERELAYMPI", Const, 0},
+ {"IFT_FRDLCIENDPT", Const, 0},
+ {"IFT_FRELAY", Const, 0},
+ {"IFT_FRELAYDCE", Const, 0},
+ {"IFT_FRF16MFRBUNDLE", Const, 0},
+ {"IFT_FRFORWARD", Const, 0},
+ {"IFT_G703AT2MB", Const, 0},
+ {"IFT_G703AT64K", Const, 0},
+ {"IFT_GIF", Const, 0},
+ {"IFT_GIGABITETHERNET", Const, 0},
+ {"IFT_GR303IDT", Const, 0},
+ {"IFT_GR303RDT", Const, 0},
+ {"IFT_H323GATEKEEPER", Const, 0},
+ {"IFT_H323PROXY", Const, 0},
+ {"IFT_HDH1822", Const, 0},
+ {"IFT_HDLC", Const, 0},
+ {"IFT_HDSL2", Const, 0},
+ {"IFT_HIPERLAN2", Const, 0},
+ {"IFT_HIPPI", Const, 0},
+ {"IFT_HIPPIINTERFACE", Const, 0},
+ {"IFT_HOSTPAD", Const, 0},
+ {"IFT_HSSI", Const, 0},
+ {"IFT_HY", Const, 0},
+ {"IFT_IBM370PARCHAN", Const, 0},
+ {"IFT_IDSL", Const, 0},
+ {"IFT_IEEE1394", Const, 0},
+ {"IFT_IEEE80211", Const, 0},
+ {"IFT_IEEE80212", Const, 0},
+ {"IFT_IEEE8023ADLAG", Const, 0},
+ {"IFT_IFGSN", Const, 0},
+ {"IFT_IMT", Const, 0},
+ {"IFT_INFINIBAND", Const, 1},
+ {"IFT_INTERLEAVE", Const, 0},
+ {"IFT_IP", Const, 0},
+ {"IFT_IPFORWARD", Const, 0},
+ {"IFT_IPOVERATM", Const, 0},
+ {"IFT_IPOVERCDLC", Const, 0},
+ {"IFT_IPOVERCLAW", Const, 0},
+ {"IFT_IPSWITCH", Const, 0},
+ {"IFT_IPXIP", Const, 0},
+ {"IFT_ISDN", Const, 0},
+ {"IFT_ISDNBASIC", Const, 0},
+ {"IFT_ISDNPRIMARY", Const, 0},
+ {"IFT_ISDNS", Const, 0},
+ {"IFT_ISDNU", Const, 0},
+ {"IFT_ISO88022LLC", Const, 0},
+ {"IFT_ISO88023", Const, 0},
+ {"IFT_ISO88024", Const, 0},
+ {"IFT_ISO88025", Const, 0},
+ {"IFT_ISO88025CRFPINT", Const, 0},
+ {"IFT_ISO88025DTR", Const, 0},
+ {"IFT_ISO88025FIBER", Const, 0},
+ {"IFT_ISO88026", Const, 0},
+ {"IFT_ISUP", Const, 0},
+ {"IFT_L2VLAN", Const, 0},
+ {"IFT_L3IPVLAN", Const, 0},
+ {"IFT_L3IPXVLAN", Const, 0},
+ {"IFT_LAPB", Const, 0},
+ {"IFT_LAPD", Const, 0},
+ {"IFT_LAPF", Const, 0},
+ {"IFT_LINEGROUP", Const, 1},
+ {"IFT_LOCALTALK", Const, 0},
+ {"IFT_LOOP", Const, 0},
+ {"IFT_MEDIAMAILOVERIP", Const, 0},
+ {"IFT_MFSIGLINK", Const, 0},
+ {"IFT_MIOX25", Const, 0},
+ {"IFT_MODEM", Const, 0},
+ {"IFT_MPC", Const, 0},
+ {"IFT_MPLS", Const, 0},
+ {"IFT_MPLSTUNNEL", Const, 0},
+ {"IFT_MSDSL", Const, 0},
+ {"IFT_MVL", Const, 0},
+ {"IFT_MYRINET", Const, 0},
+ {"IFT_NFAS", Const, 0},
+ {"IFT_NSIP", Const, 0},
+ {"IFT_OPTICALCHANNEL", Const, 0},
+ {"IFT_OPTICALTRANSPORT", Const, 0},
+ {"IFT_OTHER", Const, 0},
+ {"IFT_P10", Const, 0},
+ {"IFT_P80", Const, 0},
+ {"IFT_PARA", Const, 0},
+ {"IFT_PDP", Const, 0},
+ {"IFT_PFLOG", Const, 0},
+ {"IFT_PFLOW", Const, 1},
+ {"IFT_PFSYNC", Const, 0},
+ {"IFT_PLC", Const, 0},
+ {"IFT_PON155", Const, 1},
+ {"IFT_PON622", Const, 1},
+ {"IFT_POS", Const, 0},
+ {"IFT_PPP", Const, 0},
+ {"IFT_PPPMULTILINKBUNDLE", Const, 0},
+ {"IFT_PROPATM", Const, 1},
+ {"IFT_PROPBWAP2MP", Const, 0},
+ {"IFT_PROPCNLS", Const, 0},
+ {"IFT_PROPDOCSWIRELESSDOWNSTREAM", Const, 0},
+ {"IFT_PROPDOCSWIRELESSMACLAYER", Const, 0},
+ {"IFT_PROPDOCSWIRELESSUPSTREAM", Const, 0},
+ {"IFT_PROPMUX", Const, 0},
+ {"IFT_PROPVIRTUAL", Const, 0},
+ {"IFT_PROPWIRELESSP2P", Const, 0},
+ {"IFT_PTPSERIAL", Const, 0},
+ {"IFT_PVC", Const, 0},
+ {"IFT_Q2931", Const, 1},
+ {"IFT_QLLC", Const, 0},
+ {"IFT_RADIOMAC", Const, 0},
+ {"IFT_RADSL", Const, 0},
+ {"IFT_REACHDSL", Const, 0},
+ {"IFT_RFC1483", Const, 0},
+ {"IFT_RS232", Const, 0},
+ {"IFT_RSRB", Const, 0},
+ {"IFT_SDLC", Const, 0},
+ {"IFT_SDSL", Const, 0},
+ {"IFT_SHDSL", Const, 0},
+ {"IFT_SIP", Const, 0},
+ {"IFT_SIPSIG", Const, 1},
+ {"IFT_SIPTG", Const, 1},
+ {"IFT_SLIP", Const, 0},
+ {"IFT_SMDSDXI", Const, 0},
+ {"IFT_SMDSICIP", Const, 0},
+ {"IFT_SONET", Const, 0},
+ {"IFT_SONETOVERHEADCHANNEL", Const, 0},
+ {"IFT_SONETPATH", Const, 0},
+ {"IFT_SONETVT", Const, 0},
+ {"IFT_SRP", Const, 0},
+ {"IFT_SS7SIGLINK", Const, 0},
+ {"IFT_STACKTOSTACK", Const, 0},
+ {"IFT_STARLAN", Const, 0},
+ {"IFT_STF", Const, 0},
+ {"IFT_T1", Const, 0},
+ {"IFT_TDLC", Const, 0},
+ {"IFT_TELINK", Const, 1},
+ {"IFT_TERMPAD", Const, 0},
+ {"IFT_TR008", Const, 0},
+ {"IFT_TRANSPHDLC", Const, 0},
+ {"IFT_TUNNEL", Const, 0},
+ {"IFT_ULTRA", Const, 0},
+ {"IFT_USB", Const, 0},
+ {"IFT_V11", Const, 0},
+ {"IFT_V35", Const, 0},
+ {"IFT_V36", Const, 0},
+ {"IFT_V37", Const, 0},
+ {"IFT_VDSL", Const, 0},
+ {"IFT_VIRTUALIPADDRESS", Const, 0},
+ {"IFT_VIRTUALTG", Const, 1},
+ {"IFT_VOICEDID", Const, 1},
+ {"IFT_VOICEEM", Const, 0},
+ {"IFT_VOICEEMFGD", Const, 1},
+ {"IFT_VOICEENCAP", Const, 0},
+ {"IFT_VOICEFGDEANA", Const, 1},
+ {"IFT_VOICEFXO", Const, 0},
+ {"IFT_VOICEFXS", Const, 0},
+ {"IFT_VOICEOVERATM", Const, 0},
+ {"IFT_VOICEOVERCABLE", Const, 1},
+ {"IFT_VOICEOVERFRAMERELAY", Const, 0},
+ {"IFT_VOICEOVERIP", Const, 0},
+ {"IFT_X213", Const, 0},
+ {"IFT_X25", Const, 0},
+ {"IFT_X25DDN", Const, 0},
+ {"IFT_X25HUNTGROUP", Const, 0},
+ {"IFT_X25MLP", Const, 0},
+ {"IFT_X25PLE", Const, 0},
+ {"IFT_XETHER", Const, 0},
+ {"IGNBRK", Const, 0},
+ {"IGNCR", Const, 0},
+ {"IGNORE", Const, 0},
+ {"IGNPAR", Const, 0},
+ {"IMAXBEL", Const, 0},
+ {"INFINITE", Const, 0},
+ {"INLCR", Const, 0},
+ {"INPCK", Const, 0},
+ {"INVALID_FILE_ATTRIBUTES", Const, 0},
+ {"IN_ACCESS", Const, 0},
+ {"IN_ALL_EVENTS", Const, 0},
+ {"IN_ATTRIB", Const, 0},
+ {"IN_CLASSA_HOST", Const, 0},
+ {"IN_CLASSA_MAX", Const, 0},
+ {"IN_CLASSA_NET", Const, 0},
+ {"IN_CLASSA_NSHIFT", Const, 0},
+ {"IN_CLASSB_HOST", Const, 0},
+ {"IN_CLASSB_MAX", Const, 0},
+ {"IN_CLASSB_NET", Const, 0},
+ {"IN_CLASSB_NSHIFT", Const, 0},
+ {"IN_CLASSC_HOST", Const, 0},
+ {"IN_CLASSC_NET", Const, 0},
+ {"IN_CLASSC_NSHIFT", Const, 0},
+ {"IN_CLASSD_HOST", Const, 0},
+ {"IN_CLASSD_NET", Const, 0},
+ {"IN_CLASSD_NSHIFT", Const, 0},
+ {"IN_CLOEXEC", Const, 0},
+ {"IN_CLOSE", Const, 0},
+ {"IN_CLOSE_NOWRITE", Const, 0},
+ {"IN_CLOSE_WRITE", Const, 0},
+ {"IN_CREATE", Const, 0},
+ {"IN_DELETE", Const, 0},
+ {"IN_DELETE_SELF", Const, 0},
+ {"IN_DONT_FOLLOW", Const, 0},
+ {"IN_EXCL_UNLINK", Const, 0},
+ {"IN_IGNORED", Const, 0},
+ {"IN_ISDIR", Const, 0},
+ {"IN_LINKLOCALNETNUM", Const, 0},
+ {"IN_LOOPBACKNET", Const, 0},
+ {"IN_MASK_ADD", Const, 0},
+ {"IN_MODIFY", Const, 0},
+ {"IN_MOVE", Const, 0},
+ {"IN_MOVED_FROM", Const, 0},
+ {"IN_MOVED_TO", Const, 0},
+ {"IN_MOVE_SELF", Const, 0},
+ {"IN_NONBLOCK", Const, 0},
+ {"IN_ONESHOT", Const, 0},
+ {"IN_ONLYDIR", Const, 0},
+ {"IN_OPEN", Const, 0},
+ {"IN_Q_OVERFLOW", Const, 0},
+ {"IN_RFC3021_HOST", Const, 1},
+ {"IN_RFC3021_MASK", Const, 1},
+ {"IN_RFC3021_NET", Const, 1},
+ {"IN_RFC3021_NSHIFT", Const, 1},
+ {"IN_UNMOUNT", Const, 0},
+ {"IOC_IN", Const, 1},
+ {"IOC_INOUT", Const, 1},
+ {"IOC_OUT", Const, 1},
+ {"IOC_VENDOR", Const, 3},
+ {"IOC_WS2", Const, 1},
+ {"IO_REPARSE_TAG_SYMLINK", Const, 4},
+ {"IPMreq", Type, 0},
+ {"IPMreq.Interface", Field, 0},
+ {"IPMreq.Multiaddr", Field, 0},
+ {"IPMreqn", Type, 0},
+ {"IPMreqn.Address", Field, 0},
+ {"IPMreqn.Ifindex", Field, 0},
+ {"IPMreqn.Multiaddr", Field, 0},
+ {"IPPROTO_3PC", Const, 0},
+ {"IPPROTO_ADFS", Const, 0},
+ {"IPPROTO_AH", Const, 0},
+ {"IPPROTO_AHIP", Const, 0},
+ {"IPPROTO_APES", Const, 0},
+ {"IPPROTO_ARGUS", Const, 0},
+ {"IPPROTO_AX25", Const, 0},
+ {"IPPROTO_BHA", Const, 0},
+ {"IPPROTO_BLT", Const, 0},
+ {"IPPROTO_BRSATMON", Const, 0},
+ {"IPPROTO_CARP", Const, 0},
+ {"IPPROTO_CFTP", Const, 0},
+ {"IPPROTO_CHAOS", Const, 0},
+ {"IPPROTO_CMTP", Const, 0},
+ {"IPPROTO_COMP", Const, 0},
+ {"IPPROTO_CPHB", Const, 0},
+ {"IPPROTO_CPNX", Const, 0},
+ {"IPPROTO_DCCP", Const, 0},
+ {"IPPROTO_DDP", Const, 0},
+ {"IPPROTO_DGP", Const, 0},
+ {"IPPROTO_DIVERT", Const, 0},
+ {"IPPROTO_DIVERT_INIT", Const, 3},
+ {"IPPROTO_DIVERT_RESP", Const, 3},
+ {"IPPROTO_DONE", Const, 0},
+ {"IPPROTO_DSTOPTS", Const, 0},
+ {"IPPROTO_EGP", Const, 0},
+ {"IPPROTO_EMCON", Const, 0},
+ {"IPPROTO_ENCAP", Const, 0},
+ {"IPPROTO_EON", Const, 0},
+ {"IPPROTO_ESP", Const, 0},
+ {"IPPROTO_ETHERIP", Const, 0},
+ {"IPPROTO_FRAGMENT", Const, 0},
+ {"IPPROTO_GGP", Const, 0},
+ {"IPPROTO_GMTP", Const, 0},
+ {"IPPROTO_GRE", Const, 0},
+ {"IPPROTO_HELLO", Const, 0},
+ {"IPPROTO_HMP", Const, 0},
+ {"IPPROTO_HOPOPTS", Const, 0},
+ {"IPPROTO_ICMP", Const, 0},
+ {"IPPROTO_ICMPV6", Const, 0},
+ {"IPPROTO_IDP", Const, 0},
+ {"IPPROTO_IDPR", Const, 0},
+ {"IPPROTO_IDRP", Const, 0},
+ {"IPPROTO_IGMP", Const, 0},
+ {"IPPROTO_IGP", Const, 0},
+ {"IPPROTO_IGRP", Const, 0},
+ {"IPPROTO_IL", Const, 0},
+ {"IPPROTO_INLSP", Const, 0},
+ {"IPPROTO_INP", Const, 0},
+ {"IPPROTO_IP", Const, 0},
+ {"IPPROTO_IPCOMP", Const, 0},
+ {"IPPROTO_IPCV", Const, 0},
+ {"IPPROTO_IPEIP", Const, 0},
+ {"IPPROTO_IPIP", Const, 0},
+ {"IPPROTO_IPPC", Const, 0},
+ {"IPPROTO_IPV4", Const, 0},
+ {"IPPROTO_IPV6", Const, 0},
+ {"IPPROTO_IPV6_ICMP", Const, 1},
+ {"IPPROTO_IRTP", Const, 0},
+ {"IPPROTO_KRYPTOLAN", Const, 0},
+ {"IPPROTO_LARP", Const, 0},
+ {"IPPROTO_LEAF1", Const, 0},
+ {"IPPROTO_LEAF2", Const, 0},
+ {"IPPROTO_MAX", Const, 0},
+ {"IPPROTO_MAXID", Const, 0},
+ {"IPPROTO_MEAS", Const, 0},
+ {"IPPROTO_MH", Const, 1},
+ {"IPPROTO_MHRP", Const, 0},
+ {"IPPROTO_MICP", Const, 0},
+ {"IPPROTO_MOBILE", Const, 0},
+ {"IPPROTO_MPLS", Const, 1},
+ {"IPPROTO_MTP", Const, 0},
+ {"IPPROTO_MUX", Const, 0},
+ {"IPPROTO_ND", Const, 0},
+ {"IPPROTO_NHRP", Const, 0},
+ {"IPPROTO_NONE", Const, 0},
+ {"IPPROTO_NSP", Const, 0},
+ {"IPPROTO_NVPII", Const, 0},
+ {"IPPROTO_OLD_DIVERT", Const, 0},
+ {"IPPROTO_OSPFIGP", Const, 0},
+ {"IPPROTO_PFSYNC", Const, 0},
+ {"IPPROTO_PGM", Const, 0},
+ {"IPPROTO_PIGP", Const, 0},
+ {"IPPROTO_PIM", Const, 0},
+ {"IPPROTO_PRM", Const, 0},
+ {"IPPROTO_PUP", Const, 0},
+ {"IPPROTO_PVP", Const, 0},
+ {"IPPROTO_RAW", Const, 0},
+ {"IPPROTO_RCCMON", Const, 0},
+ {"IPPROTO_RDP", Const, 0},
+ {"IPPROTO_ROUTING", Const, 0},
+ {"IPPROTO_RSVP", Const, 0},
+ {"IPPROTO_RVD", Const, 0},
+ {"IPPROTO_SATEXPAK", Const, 0},
+ {"IPPROTO_SATMON", Const, 0},
+ {"IPPROTO_SCCSP", Const, 0},
+ {"IPPROTO_SCTP", Const, 0},
+ {"IPPROTO_SDRP", Const, 0},
+ {"IPPROTO_SEND", Const, 1},
+ {"IPPROTO_SEP", Const, 0},
+ {"IPPROTO_SKIP", Const, 0},
+ {"IPPROTO_SPACER", Const, 0},
+ {"IPPROTO_SRPC", Const, 0},
+ {"IPPROTO_ST", Const, 0},
+ {"IPPROTO_SVMTP", Const, 0},
+ {"IPPROTO_SWIPE", Const, 0},
+ {"IPPROTO_TCF", Const, 0},
+ {"IPPROTO_TCP", Const, 0},
+ {"IPPROTO_TLSP", Const, 0},
+ {"IPPROTO_TP", Const, 0},
+ {"IPPROTO_TPXX", Const, 0},
+ {"IPPROTO_TRUNK1", Const, 0},
+ {"IPPROTO_TRUNK2", Const, 0},
+ {"IPPROTO_TTP", Const, 0},
+ {"IPPROTO_UDP", Const, 0},
+ {"IPPROTO_UDPLITE", Const, 0},
+ {"IPPROTO_VINES", Const, 0},
+ {"IPPROTO_VISA", Const, 0},
+ {"IPPROTO_VMTP", Const, 0},
+ {"IPPROTO_VRRP", Const, 1},
+ {"IPPROTO_WBEXPAK", Const, 0},
+ {"IPPROTO_WBMON", Const, 0},
+ {"IPPROTO_WSN", Const, 0},
+ {"IPPROTO_XNET", Const, 0},
+ {"IPPROTO_XTP", Const, 0},
+ {"IPV6_2292DSTOPTS", Const, 0},
+ {"IPV6_2292HOPLIMIT", Const, 0},
+ {"IPV6_2292HOPOPTS", Const, 0},
+ {"IPV6_2292NEXTHOP", Const, 0},
+ {"IPV6_2292PKTINFO", Const, 0},
+ {"IPV6_2292PKTOPTIONS", Const, 0},
+ {"IPV6_2292RTHDR", Const, 0},
+ {"IPV6_ADDRFORM", Const, 0},
+ {"IPV6_ADD_MEMBERSHIP", Const, 0},
+ {"IPV6_AUTHHDR", Const, 0},
+ {"IPV6_AUTH_LEVEL", Const, 1},
+ {"IPV6_AUTOFLOWLABEL", Const, 0},
+ {"IPV6_BINDANY", Const, 0},
+ {"IPV6_BINDV6ONLY", Const, 0},
+ {"IPV6_BOUND_IF", Const, 0},
+ {"IPV6_CHECKSUM", Const, 0},
+ {"IPV6_DEFAULT_MULTICAST_HOPS", Const, 0},
+ {"IPV6_DEFAULT_MULTICAST_LOOP", Const, 0},
+ {"IPV6_DEFHLIM", Const, 0},
+ {"IPV6_DONTFRAG", Const, 0},
+ {"IPV6_DROP_MEMBERSHIP", Const, 0},
+ {"IPV6_DSTOPTS", Const, 0},
+ {"IPV6_ESP_NETWORK_LEVEL", Const, 1},
+ {"IPV6_ESP_TRANS_LEVEL", Const, 1},
+ {"IPV6_FAITH", Const, 0},
+ {"IPV6_FLOWINFO_MASK", Const, 0},
+ {"IPV6_FLOWLABEL_MASK", Const, 0},
+ {"IPV6_FRAGTTL", Const, 0},
+ {"IPV6_FW_ADD", Const, 0},
+ {"IPV6_FW_DEL", Const, 0},
+ {"IPV6_FW_FLUSH", Const, 0},
+ {"IPV6_FW_GET", Const, 0},
+ {"IPV6_FW_ZERO", Const, 0},
+ {"IPV6_HLIMDEC", Const, 0},
+ {"IPV6_HOPLIMIT", Const, 0},
+ {"IPV6_HOPOPTS", Const, 0},
+ {"IPV6_IPCOMP_LEVEL", Const, 1},
+ {"IPV6_IPSEC_POLICY", Const, 0},
+ {"IPV6_JOIN_ANYCAST", Const, 0},
+ {"IPV6_JOIN_GROUP", Const, 0},
+ {"IPV6_LEAVE_ANYCAST", Const, 0},
+ {"IPV6_LEAVE_GROUP", Const, 0},
+ {"IPV6_MAXHLIM", Const, 0},
+ {"IPV6_MAXOPTHDR", Const, 0},
+ {"IPV6_MAXPACKET", Const, 0},
+ {"IPV6_MAX_GROUP_SRC_FILTER", Const, 0},
+ {"IPV6_MAX_MEMBERSHIPS", Const, 0},
+ {"IPV6_MAX_SOCK_SRC_FILTER", Const, 0},
+ {"IPV6_MIN_MEMBERSHIPS", Const, 0},
+ {"IPV6_MMTU", Const, 0},
+ {"IPV6_MSFILTER", Const, 0},
+ {"IPV6_MTU", Const, 0},
+ {"IPV6_MTU_DISCOVER", Const, 0},
+ {"IPV6_MULTICAST_HOPS", Const, 0},
+ {"IPV6_MULTICAST_IF", Const, 0},
+ {"IPV6_MULTICAST_LOOP", Const, 0},
+ {"IPV6_NEXTHOP", Const, 0},
+ {"IPV6_OPTIONS", Const, 1},
+ {"IPV6_PATHMTU", Const, 0},
+ {"IPV6_PIPEX", Const, 1},
+ {"IPV6_PKTINFO", Const, 0},
+ {"IPV6_PMTUDISC_DO", Const, 0},
+ {"IPV6_PMTUDISC_DONT", Const, 0},
+ {"IPV6_PMTUDISC_PROBE", Const, 0},
+ {"IPV6_PMTUDISC_WANT", Const, 0},
+ {"IPV6_PORTRANGE", Const, 0},
+ {"IPV6_PORTRANGE_DEFAULT", Const, 0},
+ {"IPV6_PORTRANGE_HIGH", Const, 0},
+ {"IPV6_PORTRANGE_LOW", Const, 0},
+ {"IPV6_PREFER_TEMPADDR", Const, 0},
+ {"IPV6_RECVDSTOPTS", Const, 0},
+ {"IPV6_RECVDSTPORT", Const, 3},
+ {"IPV6_RECVERR", Const, 0},
+ {"IPV6_RECVHOPLIMIT", Const, 0},
+ {"IPV6_RECVHOPOPTS", Const, 0},
+ {"IPV6_RECVPATHMTU", Const, 0},
+ {"IPV6_RECVPKTINFO", Const, 0},
+ {"IPV6_RECVRTHDR", Const, 0},
+ {"IPV6_RECVTCLASS", Const, 0},
+ {"IPV6_ROUTER_ALERT", Const, 0},
+ {"IPV6_RTABLE", Const, 1},
+ {"IPV6_RTHDR", Const, 0},
+ {"IPV6_RTHDRDSTOPTS", Const, 0},
+ {"IPV6_RTHDR_LOOSE", Const, 0},
+ {"IPV6_RTHDR_STRICT", Const, 0},
+ {"IPV6_RTHDR_TYPE_0", Const, 0},
+ {"IPV6_RXDSTOPTS", Const, 0},
+ {"IPV6_RXHOPOPTS", Const, 0},
+ {"IPV6_SOCKOPT_RESERVED1", Const, 0},
+ {"IPV6_TCLASS", Const, 0},
+ {"IPV6_UNICAST_HOPS", Const, 0},
+ {"IPV6_USE_MIN_MTU", Const, 0},
+ {"IPV6_V6ONLY", Const, 0},
+ {"IPV6_VERSION", Const, 0},
+ {"IPV6_VERSION_MASK", Const, 0},
+ {"IPV6_XFRM_POLICY", Const, 0},
+ {"IP_ADD_MEMBERSHIP", Const, 0},
+ {"IP_ADD_SOURCE_MEMBERSHIP", Const, 0},
+ {"IP_AUTH_LEVEL", Const, 1},
+ {"IP_BINDANY", Const, 0},
+ {"IP_BLOCK_SOURCE", Const, 0},
+ {"IP_BOUND_IF", Const, 0},
+ {"IP_DEFAULT_MULTICAST_LOOP", Const, 0},
+ {"IP_DEFAULT_MULTICAST_TTL", Const, 0},
+ {"IP_DF", Const, 0},
+ {"IP_DIVERTFL", Const, 3},
+ {"IP_DONTFRAG", Const, 0},
+ {"IP_DROP_MEMBERSHIP", Const, 0},
+ {"IP_DROP_SOURCE_MEMBERSHIP", Const, 0},
+ {"IP_DUMMYNET3", Const, 0},
+ {"IP_DUMMYNET_CONFIGURE", Const, 0},
+ {"IP_DUMMYNET_DEL", Const, 0},
+ {"IP_DUMMYNET_FLUSH", Const, 0},
+ {"IP_DUMMYNET_GET", Const, 0},
+ {"IP_EF", Const, 1},
+ {"IP_ERRORMTU", Const, 1},
+ {"IP_ESP_NETWORK_LEVEL", Const, 1},
+ {"IP_ESP_TRANS_LEVEL", Const, 1},
+ {"IP_FAITH", Const, 0},
+ {"IP_FREEBIND", Const, 0},
+ {"IP_FW3", Const, 0},
+ {"IP_FW_ADD", Const, 0},
+ {"IP_FW_DEL", Const, 0},
+ {"IP_FW_FLUSH", Const, 0},
+ {"IP_FW_GET", Const, 0},
+ {"IP_FW_NAT_CFG", Const, 0},
+ {"IP_FW_NAT_DEL", Const, 0},
+ {"IP_FW_NAT_GET_CONFIG", Const, 0},
+ {"IP_FW_NAT_GET_LOG", Const, 0},
+ {"IP_FW_RESETLOG", Const, 0},
+ {"IP_FW_TABLE_ADD", Const, 0},
+ {"IP_FW_TABLE_DEL", Const, 0},
+ {"IP_FW_TABLE_FLUSH", Const, 0},
+ {"IP_FW_TABLE_GETSIZE", Const, 0},
+ {"IP_FW_TABLE_LIST", Const, 0},
+ {"IP_FW_ZERO", Const, 0},
+ {"IP_HDRINCL", Const, 0},
+ {"IP_IPCOMP_LEVEL", Const, 1},
+ {"IP_IPSECFLOWINFO", Const, 1},
+ {"IP_IPSEC_LOCAL_AUTH", Const, 1},
+ {"IP_IPSEC_LOCAL_CRED", Const, 1},
+ {"IP_IPSEC_LOCAL_ID", Const, 1},
+ {"IP_IPSEC_POLICY", Const, 0},
+ {"IP_IPSEC_REMOTE_AUTH", Const, 1},
+ {"IP_IPSEC_REMOTE_CRED", Const, 1},
+ {"IP_IPSEC_REMOTE_ID", Const, 1},
+ {"IP_MAXPACKET", Const, 0},
+ {"IP_MAX_GROUP_SRC_FILTER", Const, 0},
+ {"IP_MAX_MEMBERSHIPS", Const, 0},
+ {"IP_MAX_SOCK_MUTE_FILTER", Const, 0},
+ {"IP_MAX_SOCK_SRC_FILTER", Const, 0},
+ {"IP_MAX_SOURCE_FILTER", Const, 0},
+ {"IP_MF", Const, 0},
+ {"IP_MINFRAGSIZE", Const, 1},
+ {"IP_MINTTL", Const, 0},
+ {"IP_MIN_MEMBERSHIPS", Const, 0},
+ {"IP_MSFILTER", Const, 0},
+ {"IP_MSS", Const, 0},
+ {"IP_MTU", Const, 0},
+ {"IP_MTU_DISCOVER", Const, 0},
+ {"IP_MULTICAST_IF", Const, 0},
+ {"IP_MULTICAST_IFINDEX", Const, 0},
+ {"IP_MULTICAST_LOOP", Const, 0},
+ {"IP_MULTICAST_TTL", Const, 0},
+ {"IP_MULTICAST_VIF", Const, 0},
+ {"IP_NAT__XXX", Const, 0},
+ {"IP_OFFMASK", Const, 0},
+ {"IP_OLD_FW_ADD", Const, 0},
+ {"IP_OLD_FW_DEL", Const, 0},
+ {"IP_OLD_FW_FLUSH", Const, 0},
+ {"IP_OLD_FW_GET", Const, 0},
+ {"IP_OLD_FW_RESETLOG", Const, 0},
+ {"IP_OLD_FW_ZERO", Const, 0},
+ {"IP_ONESBCAST", Const, 0},
+ {"IP_OPTIONS", Const, 0},
+ {"IP_ORIGDSTADDR", Const, 0},
+ {"IP_PASSSEC", Const, 0},
+ {"IP_PIPEX", Const, 1},
+ {"IP_PKTINFO", Const, 0},
+ {"IP_PKTOPTIONS", Const, 0},
+ {"IP_PMTUDISC", Const, 0},
+ {"IP_PMTUDISC_DO", Const, 0},
+ {"IP_PMTUDISC_DONT", Const, 0},
+ {"IP_PMTUDISC_PROBE", Const, 0},
+ {"IP_PMTUDISC_WANT", Const, 0},
+ {"IP_PORTRANGE", Const, 0},
+ {"IP_PORTRANGE_DEFAULT", Const, 0},
+ {"IP_PORTRANGE_HIGH", Const, 0},
+ {"IP_PORTRANGE_LOW", Const, 0},
+ {"IP_RECVDSTADDR", Const, 0},
+ {"IP_RECVDSTPORT", Const, 1},
+ {"IP_RECVERR", Const, 0},
+ {"IP_RECVIF", Const, 0},
+ {"IP_RECVOPTS", Const, 0},
+ {"IP_RECVORIGDSTADDR", Const, 0},
+ {"IP_RECVPKTINFO", Const, 0},
+ {"IP_RECVRETOPTS", Const, 0},
+ {"IP_RECVRTABLE", Const, 1},
+ {"IP_RECVTOS", Const, 0},
+ {"IP_RECVTTL", Const, 0},
+ {"IP_RETOPTS", Const, 0},
+ {"IP_RF", Const, 0},
+ {"IP_ROUTER_ALERT", Const, 0},
+ {"IP_RSVP_OFF", Const, 0},
+ {"IP_RSVP_ON", Const, 0},
+ {"IP_RSVP_VIF_OFF", Const, 0},
+ {"IP_RSVP_VIF_ON", Const, 0},
+ {"IP_RTABLE", Const, 1},
+ {"IP_SENDSRCADDR", Const, 0},
+ {"IP_STRIPHDR", Const, 0},
+ {"IP_TOS", Const, 0},
+ {"IP_TRAFFIC_MGT_BACKGROUND", Const, 0},
+ {"IP_TRANSPARENT", Const, 0},
+ {"IP_TTL", Const, 0},
+ {"IP_UNBLOCK_SOURCE", Const, 0},
+ {"IP_XFRM_POLICY", Const, 0},
+ {"IPv6MTUInfo", Type, 2},
+ {"IPv6MTUInfo.Addr", Field, 2},
+ {"IPv6MTUInfo.Mtu", Field, 2},
+ {"IPv6Mreq", Type, 0},
+ {"IPv6Mreq.Interface", Field, 0},
+ {"IPv6Mreq.Multiaddr", Field, 0},
+ {"ISIG", Const, 0},
+ {"ISTRIP", Const, 0},
+ {"IUCLC", Const, 0},
+ {"IUTF8", Const, 0},
+ {"IXANY", Const, 0},
+ {"IXOFF", Const, 0},
+ {"IXON", Const, 0},
+ {"IfAddrmsg", Type, 0},
+ {"IfAddrmsg.Family", Field, 0},
+ {"IfAddrmsg.Flags", Field, 0},
+ {"IfAddrmsg.Index", Field, 0},
+ {"IfAddrmsg.Prefixlen", Field, 0},
+ {"IfAddrmsg.Scope", Field, 0},
+ {"IfAnnounceMsghdr", Type, 1},
+ {"IfAnnounceMsghdr.Hdrlen", Field, 2},
+ {"IfAnnounceMsghdr.Index", Field, 1},
+ {"IfAnnounceMsghdr.Msglen", Field, 1},
+ {"IfAnnounceMsghdr.Name", Field, 1},
+ {"IfAnnounceMsghdr.Type", Field, 1},
+ {"IfAnnounceMsghdr.Version", Field, 1},
+ {"IfAnnounceMsghdr.What", Field, 1},
+ {"IfData", Type, 0},
+ {"IfData.Addrlen", Field, 0},
+ {"IfData.Baudrate", Field, 0},
+ {"IfData.Capabilities", Field, 2},
+ {"IfData.Collisions", Field, 0},
+ {"IfData.Datalen", Field, 0},
+ {"IfData.Epoch", Field, 0},
+ {"IfData.Hdrlen", Field, 0},
+ {"IfData.Hwassist", Field, 0},
+ {"IfData.Ibytes", Field, 0},
+ {"IfData.Ierrors", Field, 0},
+ {"IfData.Imcasts", Field, 0},
+ {"IfData.Ipackets", Field, 0},
+ {"IfData.Iqdrops", Field, 0},
+ {"IfData.Lastchange", Field, 0},
+ {"IfData.Link_state", Field, 0},
+ {"IfData.Mclpool", Field, 2},
+ {"IfData.Metric", Field, 0},
+ {"IfData.Mtu", Field, 0},
+ {"IfData.Noproto", Field, 0},
+ {"IfData.Obytes", Field, 0},
+ {"IfData.Oerrors", Field, 0},
+ {"IfData.Omcasts", Field, 0},
+ {"IfData.Opackets", Field, 0},
+ {"IfData.Pad", Field, 2},
+ {"IfData.Pad_cgo_0", Field, 2},
+ {"IfData.Pad_cgo_1", Field, 2},
+ {"IfData.Physical", Field, 0},
+ {"IfData.Recvquota", Field, 0},
+ {"IfData.Recvtiming", Field, 0},
+ {"IfData.Reserved1", Field, 0},
+ {"IfData.Reserved2", Field, 0},
+ {"IfData.Spare_char1", Field, 0},
+ {"IfData.Spare_char2", Field, 0},
+ {"IfData.Type", Field, 0},
+ {"IfData.Typelen", Field, 0},
+ {"IfData.Unused1", Field, 0},
+ {"IfData.Unused2", Field, 0},
+ {"IfData.Xmitquota", Field, 0},
+ {"IfData.Xmittiming", Field, 0},
+ {"IfInfomsg", Type, 0},
+ {"IfInfomsg.Change", Field, 0},
+ {"IfInfomsg.Family", Field, 0},
+ {"IfInfomsg.Flags", Field, 0},
+ {"IfInfomsg.Index", Field, 0},
+ {"IfInfomsg.Type", Field, 0},
+ {"IfInfomsg.X__ifi_pad", Field, 0},
+ {"IfMsghdr", Type, 0},
+ {"IfMsghdr.Addrs", Field, 0},
+ {"IfMsghdr.Data", Field, 0},
+ {"IfMsghdr.Flags", Field, 0},
+ {"IfMsghdr.Hdrlen", Field, 2},
+ {"IfMsghdr.Index", Field, 0},
+ {"IfMsghdr.Msglen", Field, 0},
+ {"IfMsghdr.Pad1", Field, 2},
+ {"IfMsghdr.Pad2", Field, 2},
+ {"IfMsghdr.Pad_cgo_0", Field, 0},
+ {"IfMsghdr.Pad_cgo_1", Field, 2},
+ {"IfMsghdr.Tableid", Field, 2},
+ {"IfMsghdr.Type", Field, 0},
+ {"IfMsghdr.Version", Field, 0},
+ {"IfMsghdr.Xflags", Field, 2},
+ {"IfaMsghdr", Type, 0},
+ {"IfaMsghdr.Addrs", Field, 0},
+ {"IfaMsghdr.Flags", Field, 0},
+ {"IfaMsghdr.Hdrlen", Field, 2},
+ {"IfaMsghdr.Index", Field, 0},
+ {"IfaMsghdr.Metric", Field, 0},
+ {"IfaMsghdr.Msglen", Field, 0},
+ {"IfaMsghdr.Pad1", Field, 2},
+ {"IfaMsghdr.Pad2", Field, 2},
+ {"IfaMsghdr.Pad_cgo_0", Field, 0},
+ {"IfaMsghdr.Tableid", Field, 2},
+ {"IfaMsghdr.Type", Field, 0},
+ {"IfaMsghdr.Version", Field, 0},
+ {"IfmaMsghdr", Type, 0},
+ {"IfmaMsghdr.Addrs", Field, 0},
+ {"IfmaMsghdr.Flags", Field, 0},
+ {"IfmaMsghdr.Index", Field, 0},
+ {"IfmaMsghdr.Msglen", Field, 0},
+ {"IfmaMsghdr.Pad_cgo_0", Field, 0},
+ {"IfmaMsghdr.Type", Field, 0},
+ {"IfmaMsghdr.Version", Field, 0},
+ {"IfmaMsghdr2", Type, 0},
+ {"IfmaMsghdr2.Addrs", Field, 0},
+ {"IfmaMsghdr2.Flags", Field, 0},
+ {"IfmaMsghdr2.Index", Field, 0},
+ {"IfmaMsghdr2.Msglen", Field, 0},
+ {"IfmaMsghdr2.Pad_cgo_0", Field, 0},
+ {"IfmaMsghdr2.Refcount", Field, 0},
+ {"IfmaMsghdr2.Type", Field, 0},
+ {"IfmaMsghdr2.Version", Field, 0},
+ {"ImplementsGetwd", Const, 0},
+ {"Inet4Pktinfo", Type, 0},
+ {"Inet4Pktinfo.Addr", Field, 0},
+ {"Inet4Pktinfo.Ifindex", Field, 0},
+ {"Inet4Pktinfo.Spec_dst", Field, 0},
+ {"Inet6Pktinfo", Type, 0},
+ {"Inet6Pktinfo.Addr", Field, 0},
+ {"Inet6Pktinfo.Ifindex", Field, 0},
+ {"InotifyAddWatch", Func, 0},
+ {"InotifyEvent", Type, 0},
+ {"InotifyEvent.Cookie", Field, 0},
+ {"InotifyEvent.Len", Field, 0},
+ {"InotifyEvent.Mask", Field, 0},
+ {"InotifyEvent.Name", Field, 0},
+ {"InotifyEvent.Wd", Field, 0},
+ {"InotifyInit", Func, 0},
+ {"InotifyInit1", Func, 0},
+ {"InotifyRmWatch", Func, 0},
+ {"InterfaceAddrMessage", Type, 0},
+ {"InterfaceAddrMessage.Data", Field, 0},
+ {"InterfaceAddrMessage.Header", Field, 0},
+ {"InterfaceAnnounceMessage", Type, 1},
+ {"InterfaceAnnounceMessage.Header", Field, 1},
+ {"InterfaceInfo", Type, 0},
+ {"InterfaceInfo.Address", Field, 0},
+ {"InterfaceInfo.BroadcastAddress", Field, 0},
+ {"InterfaceInfo.Flags", Field, 0},
+ {"InterfaceInfo.Netmask", Field, 0},
+ {"InterfaceMessage", Type, 0},
+ {"InterfaceMessage.Data", Field, 0},
+ {"InterfaceMessage.Header", Field, 0},
+ {"InterfaceMulticastAddrMessage", Type, 0},
+ {"InterfaceMulticastAddrMessage.Data", Field, 0},
+ {"InterfaceMulticastAddrMessage.Header", Field, 0},
+ {"InvalidHandle", Const, 0},
+ {"Ioperm", Func, 0},
+ {"Iopl", Func, 0},
+ {"Iovec", Type, 0},
+ {"Iovec.Base", Field, 0},
+ {"Iovec.Len", Field, 0},
+ {"IpAdapterInfo", Type, 0},
+ {"IpAdapterInfo.AdapterName", Field, 0},
+ {"IpAdapterInfo.Address", Field, 0},
+ {"IpAdapterInfo.AddressLength", Field, 0},
+ {"IpAdapterInfo.ComboIndex", Field, 0},
+ {"IpAdapterInfo.CurrentIpAddress", Field, 0},
+ {"IpAdapterInfo.Description", Field, 0},
+ {"IpAdapterInfo.DhcpEnabled", Field, 0},
+ {"IpAdapterInfo.DhcpServer", Field, 0},
+ {"IpAdapterInfo.GatewayList", Field, 0},
+ {"IpAdapterInfo.HaveWins", Field, 0},
+ {"IpAdapterInfo.Index", Field, 0},
+ {"IpAdapterInfo.IpAddressList", Field, 0},
+ {"IpAdapterInfo.LeaseExpires", Field, 0},
+ {"IpAdapterInfo.LeaseObtained", Field, 0},
+ {"IpAdapterInfo.Next", Field, 0},
+ {"IpAdapterInfo.PrimaryWinsServer", Field, 0},
+ {"IpAdapterInfo.SecondaryWinsServer", Field, 0},
+ {"IpAdapterInfo.Type", Field, 0},
+ {"IpAddrString", Type, 0},
+ {"IpAddrString.Context", Field, 0},
+ {"IpAddrString.IpAddress", Field, 0},
+ {"IpAddrString.IpMask", Field, 0},
+ {"IpAddrString.Next", Field, 0},
+ {"IpAddressString", Type, 0},
+ {"IpAddressString.String", Field, 0},
+ {"IpMaskString", Type, 0},
+ {"IpMaskString.String", Field, 2},
+ {"Issetugid", Func, 0},
+ {"KEY_ALL_ACCESS", Const, 0},
+ {"KEY_CREATE_LINK", Const, 0},
+ {"KEY_CREATE_SUB_KEY", Const, 0},
+ {"KEY_ENUMERATE_SUB_KEYS", Const, 0},
+ {"KEY_EXECUTE", Const, 0},
+ {"KEY_NOTIFY", Const, 0},
+ {"KEY_QUERY_VALUE", Const, 0},
+ {"KEY_READ", Const, 0},
+ {"KEY_SET_VALUE", Const, 0},
+ {"KEY_WOW64_32KEY", Const, 0},
+ {"KEY_WOW64_64KEY", Const, 0},
+ {"KEY_WRITE", Const, 0},
+ {"Kevent", Func, 0},
+ {"Kevent_t", Type, 0},
+ {"Kevent_t.Data", Field, 0},
+ {"Kevent_t.Fflags", Field, 0},
+ {"Kevent_t.Filter", Field, 0},
+ {"Kevent_t.Flags", Field, 0},
+ {"Kevent_t.Ident", Field, 0},
+ {"Kevent_t.Pad_cgo_0", Field, 2},
+ {"Kevent_t.Udata", Field, 0},
+ {"Kill", Func, 0},
+ {"Klogctl", Func, 0},
+ {"Kqueue", Func, 0},
+ {"LANG_ENGLISH", Const, 0},
+ {"LAYERED_PROTOCOL", Const, 2},
+ {"LCNT_OVERLOAD_FLUSH", Const, 1},
+ {"LINUX_REBOOT_CMD_CAD_OFF", Const, 0},
+ {"LINUX_REBOOT_CMD_CAD_ON", Const, 0},
+ {"LINUX_REBOOT_CMD_HALT", Const, 0},
+ {"LINUX_REBOOT_CMD_KEXEC", Const, 0},
+ {"LINUX_REBOOT_CMD_POWER_OFF", Const, 0},
+ {"LINUX_REBOOT_CMD_RESTART", Const, 0},
+ {"LINUX_REBOOT_CMD_RESTART2", Const, 0},
+ {"LINUX_REBOOT_CMD_SW_SUSPEND", Const, 0},
+ {"LINUX_REBOOT_MAGIC1", Const, 0},
+ {"LINUX_REBOOT_MAGIC2", Const, 0},
+ {"LOCK_EX", Const, 0},
+ {"LOCK_NB", Const, 0},
+ {"LOCK_SH", Const, 0},
+ {"LOCK_UN", Const, 0},
+ {"LazyDLL", Type, 0},
+ {"LazyDLL.Name", Field, 0},
+ {"LazyProc", Type, 0},
+ {"LazyProc.Name", Field, 0},
+ {"Lchown", Func, 0},
+ {"Linger", Type, 0},
+ {"Linger.Linger", Field, 0},
+ {"Linger.Onoff", Field, 0},
+ {"Link", Func, 0},
+ {"Listen", Func, 0},
+ {"Listxattr", Func, 1},
+ {"LoadCancelIoEx", Func, 1},
+ {"LoadConnectEx", Func, 1},
+ {"LoadCreateSymbolicLink", Func, 4},
+ {"LoadDLL", Func, 0},
+ {"LoadGetAddrInfo", Func, 1},
+ {"LoadLibrary", Func, 0},
+ {"LoadSetFileCompletionNotificationModes", Func, 2},
+ {"LocalFree", Func, 0},
+ {"Log2phys_t", Type, 0},
+ {"Log2phys_t.Contigbytes", Field, 0},
+ {"Log2phys_t.Devoffset", Field, 0},
+ {"Log2phys_t.Flags", Field, 0},
+ {"LookupAccountName", Func, 0},
+ {"LookupAccountSid", Func, 0},
+ {"LookupSID", Func, 0},
+ {"LsfJump", Func, 0},
+ {"LsfSocket", Func, 0},
+ {"LsfStmt", Func, 0},
+ {"Lstat", Func, 0},
+ {"MADV_AUTOSYNC", Const, 1},
+ {"MADV_CAN_REUSE", Const, 0},
+ {"MADV_CORE", Const, 1},
+ {"MADV_DOFORK", Const, 0},
+ {"MADV_DONTFORK", Const, 0},
+ {"MADV_DONTNEED", Const, 0},
+ {"MADV_FREE", Const, 0},
+ {"MADV_FREE_REUSABLE", Const, 0},
+ {"MADV_FREE_REUSE", Const, 0},
+ {"MADV_HUGEPAGE", Const, 0},
+ {"MADV_HWPOISON", Const, 0},
+ {"MADV_MERGEABLE", Const, 0},
+ {"MADV_NOCORE", Const, 1},
+ {"MADV_NOHUGEPAGE", Const, 0},
+ {"MADV_NORMAL", Const, 0},
+ {"MADV_NOSYNC", Const, 1},
+ {"MADV_PROTECT", Const, 1},
+ {"MADV_RANDOM", Const, 0},
+ {"MADV_REMOVE", Const, 0},
+ {"MADV_SEQUENTIAL", Const, 0},
+ {"MADV_SPACEAVAIL", Const, 3},
+ {"MADV_UNMERGEABLE", Const, 0},
+ {"MADV_WILLNEED", Const, 0},
+ {"MADV_ZERO_WIRED_PAGES", Const, 0},
+ {"MAP_32BIT", Const, 0},
+ {"MAP_ALIGNED_SUPER", Const, 3},
+ {"MAP_ALIGNMENT_16MB", Const, 3},
+ {"MAP_ALIGNMENT_1TB", Const, 3},
+ {"MAP_ALIGNMENT_256TB", Const, 3},
+ {"MAP_ALIGNMENT_4GB", Const, 3},
+ {"MAP_ALIGNMENT_64KB", Const, 3},
+ {"MAP_ALIGNMENT_64PB", Const, 3},
+ {"MAP_ALIGNMENT_MASK", Const, 3},
+ {"MAP_ALIGNMENT_SHIFT", Const, 3},
+ {"MAP_ANON", Const, 0},
+ {"MAP_ANONYMOUS", Const, 0},
+ {"MAP_COPY", Const, 0},
+ {"MAP_DENYWRITE", Const, 0},
+ {"MAP_EXECUTABLE", Const, 0},
+ {"MAP_FILE", Const, 0},
+ {"MAP_FIXED", Const, 0},
+ {"MAP_FLAGMASK", Const, 3},
+ {"MAP_GROWSDOWN", Const, 0},
+ {"MAP_HASSEMAPHORE", Const, 0},
+ {"MAP_HUGETLB", Const, 0},
+ {"MAP_INHERIT", Const, 3},
+ {"MAP_INHERIT_COPY", Const, 3},
+ {"MAP_INHERIT_DEFAULT", Const, 3},
+ {"MAP_INHERIT_DONATE_COPY", Const, 3},
+ {"MAP_INHERIT_NONE", Const, 3},
+ {"MAP_INHERIT_SHARE", Const, 3},
+ {"MAP_JIT", Const, 0},
+ {"MAP_LOCKED", Const, 0},
+ {"MAP_NOCACHE", Const, 0},
+ {"MAP_NOCORE", Const, 1},
+ {"MAP_NOEXTEND", Const, 0},
+ {"MAP_NONBLOCK", Const, 0},
+ {"MAP_NORESERVE", Const, 0},
+ {"MAP_NOSYNC", Const, 1},
+ {"MAP_POPULATE", Const, 0},
+ {"MAP_PREFAULT_READ", Const, 1},
+ {"MAP_PRIVATE", Const, 0},
+ {"MAP_RENAME", Const, 0},
+ {"MAP_RESERVED0080", Const, 0},
+ {"MAP_RESERVED0100", Const, 1},
+ {"MAP_SHARED", Const, 0},
+ {"MAP_STACK", Const, 0},
+ {"MAP_TRYFIXED", Const, 3},
+ {"MAP_TYPE", Const, 0},
+ {"MAP_WIRED", Const, 3},
+ {"MAXIMUM_REPARSE_DATA_BUFFER_SIZE", Const, 4},
+ {"MAXLEN_IFDESCR", Const, 0},
+ {"MAXLEN_PHYSADDR", Const, 0},
+ {"MAX_ADAPTER_ADDRESS_LENGTH", Const, 0},
+ {"MAX_ADAPTER_DESCRIPTION_LENGTH", Const, 0},
+ {"MAX_ADAPTER_NAME_LENGTH", Const, 0},
+ {"MAX_COMPUTERNAME_LENGTH", Const, 0},
+ {"MAX_INTERFACE_NAME_LEN", Const, 0},
+ {"MAX_LONG_PATH", Const, 0},
+ {"MAX_PATH", Const, 0},
+ {"MAX_PROTOCOL_CHAIN", Const, 2},
+ {"MCL_CURRENT", Const, 0},
+ {"MCL_FUTURE", Const, 0},
+ {"MNT_DETACH", Const, 0},
+ {"MNT_EXPIRE", Const, 0},
+ {"MNT_FORCE", Const, 0},
+ {"MSG_BCAST", Const, 1},
+ {"MSG_CMSG_CLOEXEC", Const, 0},
+ {"MSG_COMPAT", Const, 0},
+ {"MSG_CONFIRM", Const, 0},
+ {"MSG_CONTROLMBUF", Const, 1},
+ {"MSG_CTRUNC", Const, 0},
+ {"MSG_DONTROUTE", Const, 0},
+ {"MSG_DONTWAIT", Const, 0},
+ {"MSG_EOF", Const, 0},
+ {"MSG_EOR", Const, 0},
+ {"MSG_ERRQUEUE", Const, 0},
+ {"MSG_FASTOPEN", Const, 1},
+ {"MSG_FIN", Const, 0},
+ {"MSG_FLUSH", Const, 0},
+ {"MSG_HAVEMORE", Const, 0},
+ {"MSG_HOLD", Const, 0},
+ {"MSG_IOVUSRSPACE", Const, 1},
+ {"MSG_LENUSRSPACE", Const, 1},
+ {"MSG_MCAST", Const, 1},
+ {"MSG_MORE", Const, 0},
+ {"MSG_NAMEMBUF", Const, 1},
+ {"MSG_NBIO", Const, 0},
+ {"MSG_NEEDSA", Const, 0},
+ {"MSG_NOSIGNAL", Const, 0},
+ {"MSG_NOTIFICATION", Const, 0},
+ {"MSG_OOB", Const, 0},
+ {"MSG_PEEK", Const, 0},
+ {"MSG_PROXY", Const, 0},
+ {"MSG_RCVMORE", Const, 0},
+ {"MSG_RST", Const, 0},
+ {"MSG_SEND", Const, 0},
+ {"MSG_SYN", Const, 0},
+ {"MSG_TRUNC", Const, 0},
+ {"MSG_TRYHARD", Const, 0},
+ {"MSG_USERFLAGS", Const, 1},
+ {"MSG_WAITALL", Const, 0},
+ {"MSG_WAITFORONE", Const, 0},
+ {"MSG_WAITSTREAM", Const, 0},
+ {"MS_ACTIVE", Const, 0},
+ {"MS_ASYNC", Const, 0},
+ {"MS_BIND", Const, 0},
+ {"MS_DEACTIVATE", Const, 0},
+ {"MS_DIRSYNC", Const, 0},
+ {"MS_INVALIDATE", Const, 0},
+ {"MS_I_VERSION", Const, 0},
+ {"MS_KERNMOUNT", Const, 0},
+ {"MS_KILLPAGES", Const, 0},
+ {"MS_MANDLOCK", Const, 0},
+ {"MS_MGC_MSK", Const, 0},
+ {"MS_MGC_VAL", Const, 0},
+ {"MS_MOVE", Const, 0},
+ {"MS_NOATIME", Const, 0},
+ {"MS_NODEV", Const, 0},
+ {"MS_NODIRATIME", Const, 0},
+ {"MS_NOEXEC", Const, 0},
+ {"MS_NOSUID", Const, 0},
+ {"MS_NOUSER", Const, 0},
+ {"MS_POSIXACL", Const, 0},
+ {"MS_PRIVATE", Const, 0},
+ {"MS_RDONLY", Const, 0},
+ {"MS_REC", Const, 0},
+ {"MS_RELATIME", Const, 0},
+ {"MS_REMOUNT", Const, 0},
+ {"MS_RMT_MASK", Const, 0},
+ {"MS_SHARED", Const, 0},
+ {"MS_SILENT", Const, 0},
+ {"MS_SLAVE", Const, 0},
+ {"MS_STRICTATIME", Const, 0},
+ {"MS_SYNC", Const, 0},
+ {"MS_SYNCHRONOUS", Const, 0},
+ {"MS_UNBINDABLE", Const, 0},
+ {"Madvise", Func, 0},
+ {"MapViewOfFile", Func, 0},
+ {"MaxTokenInfoClass", Const, 0},
+ {"Mclpool", Type, 2},
+ {"Mclpool.Alive", Field, 2},
+ {"Mclpool.Cwm", Field, 2},
+ {"Mclpool.Grown", Field, 2},
+ {"Mclpool.Hwm", Field, 2},
+ {"Mclpool.Lwm", Field, 2},
+ {"MibIfRow", Type, 0},
+ {"MibIfRow.AdminStatus", Field, 0},
+ {"MibIfRow.Descr", Field, 0},
+ {"MibIfRow.DescrLen", Field, 0},
+ {"MibIfRow.InDiscards", Field, 0},
+ {"MibIfRow.InErrors", Field, 0},
+ {"MibIfRow.InNUcastPkts", Field, 0},
+ {"MibIfRow.InOctets", Field, 0},
+ {"MibIfRow.InUcastPkts", Field, 0},
+ {"MibIfRow.InUnknownProtos", Field, 0},
+ {"MibIfRow.Index", Field, 0},
+ {"MibIfRow.LastChange", Field, 0},
+ {"MibIfRow.Mtu", Field, 0},
+ {"MibIfRow.Name", Field, 0},
+ {"MibIfRow.OperStatus", Field, 0},
+ {"MibIfRow.OutDiscards", Field, 0},
+ {"MibIfRow.OutErrors", Field, 0},
+ {"MibIfRow.OutNUcastPkts", Field, 0},
+ {"MibIfRow.OutOctets", Field, 0},
+ {"MibIfRow.OutQLen", Field, 0},
+ {"MibIfRow.OutUcastPkts", Field, 0},
+ {"MibIfRow.PhysAddr", Field, 0},
+ {"MibIfRow.PhysAddrLen", Field, 0},
+ {"MibIfRow.Speed", Field, 0},
+ {"MibIfRow.Type", Field, 0},
+ {"Mkdir", Func, 0},
+ {"Mkdirat", Func, 0},
+ {"Mkfifo", Func, 0},
+ {"Mknod", Func, 0},
+ {"Mknodat", Func, 0},
+ {"Mlock", Func, 0},
+ {"Mlockall", Func, 0},
+ {"Mmap", Func, 0},
+ {"Mount", Func, 0},
+ {"MoveFile", Func, 0},
+ {"Mprotect", Func, 0},
+ {"Msghdr", Type, 0},
+ {"Msghdr.Control", Field, 0},
+ {"Msghdr.Controllen", Field, 0},
+ {"Msghdr.Flags", Field, 0},
+ {"Msghdr.Iov", Field, 0},
+ {"Msghdr.Iovlen", Field, 0},
+ {"Msghdr.Name", Field, 0},
+ {"Msghdr.Namelen", Field, 0},
+ {"Msghdr.Pad_cgo_0", Field, 0},
+ {"Msghdr.Pad_cgo_1", Field, 0},
+ {"Munlock", Func, 0},
+ {"Munlockall", Func, 0},
+ {"Munmap", Func, 0},
+ {"MustLoadDLL", Func, 0},
+ {"NAME_MAX", Const, 0},
+ {"NETLINK_ADD_MEMBERSHIP", Const, 0},
+ {"NETLINK_AUDIT", Const, 0},
+ {"NETLINK_BROADCAST_ERROR", Const, 0},
+ {"NETLINK_CONNECTOR", Const, 0},
+ {"NETLINK_DNRTMSG", Const, 0},
+ {"NETLINK_DROP_MEMBERSHIP", Const, 0},
+ {"NETLINK_ECRYPTFS", Const, 0},
+ {"NETLINK_FIB_LOOKUP", Const, 0},
+ {"NETLINK_FIREWALL", Const, 0},
+ {"NETLINK_GENERIC", Const, 0},
+ {"NETLINK_INET_DIAG", Const, 0},
+ {"NETLINK_IP6_FW", Const, 0},
+ {"NETLINK_ISCSI", Const, 0},
+ {"NETLINK_KOBJECT_UEVENT", Const, 0},
+ {"NETLINK_NETFILTER", Const, 0},
+ {"NETLINK_NFLOG", Const, 0},
+ {"NETLINK_NO_ENOBUFS", Const, 0},
+ {"NETLINK_PKTINFO", Const, 0},
+ {"NETLINK_RDMA", Const, 0},
+ {"NETLINK_ROUTE", Const, 0},
+ {"NETLINK_SCSITRANSPORT", Const, 0},
+ {"NETLINK_SELINUX", Const, 0},
+ {"NETLINK_UNUSED", Const, 0},
+ {"NETLINK_USERSOCK", Const, 0},
+ {"NETLINK_XFRM", Const, 0},
+ {"NET_RT_DUMP", Const, 0},
+ {"NET_RT_DUMP2", Const, 0},
+ {"NET_RT_FLAGS", Const, 0},
+ {"NET_RT_IFLIST", Const, 0},
+ {"NET_RT_IFLIST2", Const, 0},
+ {"NET_RT_IFLISTL", Const, 1},
+ {"NET_RT_IFMALIST", Const, 0},
+ {"NET_RT_MAXID", Const, 0},
+ {"NET_RT_OIFLIST", Const, 1},
+ {"NET_RT_OOIFLIST", Const, 1},
+ {"NET_RT_STAT", Const, 0},
+ {"NET_RT_STATS", Const, 1},
+ {"NET_RT_TABLE", Const, 1},
+ {"NET_RT_TRASH", Const, 0},
+ {"NLA_ALIGNTO", Const, 0},
+ {"NLA_F_NESTED", Const, 0},
+ {"NLA_F_NET_BYTEORDER", Const, 0},
+ {"NLA_HDRLEN", Const, 0},
+ {"NLMSG_ALIGNTO", Const, 0},
+ {"NLMSG_DONE", Const, 0},
+ {"NLMSG_ERROR", Const, 0},
+ {"NLMSG_HDRLEN", Const, 0},
+ {"NLMSG_MIN_TYPE", Const, 0},
+ {"NLMSG_NOOP", Const, 0},
+ {"NLMSG_OVERRUN", Const, 0},
+ {"NLM_F_ACK", Const, 0},
+ {"NLM_F_APPEND", Const, 0},
+ {"NLM_F_ATOMIC", Const, 0},
+ {"NLM_F_CREATE", Const, 0},
+ {"NLM_F_DUMP", Const, 0},
+ {"NLM_F_ECHO", Const, 0},
+ {"NLM_F_EXCL", Const, 0},
+ {"NLM_F_MATCH", Const, 0},
+ {"NLM_F_MULTI", Const, 0},
+ {"NLM_F_REPLACE", Const, 0},
+ {"NLM_F_REQUEST", Const, 0},
+ {"NLM_F_ROOT", Const, 0},
+ {"NOFLSH", Const, 0},
+ {"NOTE_ABSOLUTE", Const, 0},
+ {"NOTE_ATTRIB", Const, 0},
+ {"NOTE_BACKGROUND", Const, 16},
+ {"NOTE_CHILD", Const, 0},
+ {"NOTE_CRITICAL", Const, 16},
+ {"NOTE_DELETE", Const, 0},
+ {"NOTE_EOF", Const, 1},
+ {"NOTE_EXEC", Const, 0},
+ {"NOTE_EXIT", Const, 0},
+ {"NOTE_EXITSTATUS", Const, 0},
+ {"NOTE_EXIT_CSERROR", Const, 16},
+ {"NOTE_EXIT_DECRYPTFAIL", Const, 16},
+ {"NOTE_EXIT_DETAIL", Const, 16},
+ {"NOTE_EXIT_DETAIL_MASK", Const, 16},
+ {"NOTE_EXIT_MEMORY", Const, 16},
+ {"NOTE_EXIT_REPARENTED", Const, 16},
+ {"NOTE_EXTEND", Const, 0},
+ {"NOTE_FFAND", Const, 0},
+ {"NOTE_FFCOPY", Const, 0},
+ {"NOTE_FFCTRLMASK", Const, 0},
+ {"NOTE_FFLAGSMASK", Const, 0},
+ {"NOTE_FFNOP", Const, 0},
+ {"NOTE_FFOR", Const, 0},
+ {"NOTE_FORK", Const, 0},
+ {"NOTE_LEEWAY", Const, 16},
+ {"NOTE_LINK", Const, 0},
+ {"NOTE_LOWAT", Const, 0},
+ {"NOTE_NONE", Const, 0},
+ {"NOTE_NSECONDS", Const, 0},
+ {"NOTE_PCTRLMASK", Const, 0},
+ {"NOTE_PDATAMASK", Const, 0},
+ {"NOTE_REAP", Const, 0},
+ {"NOTE_RENAME", Const, 0},
+ {"NOTE_RESOURCEEND", Const, 0},
+ {"NOTE_REVOKE", Const, 0},
+ {"NOTE_SECONDS", Const, 0},
+ {"NOTE_SIGNAL", Const, 0},
+ {"NOTE_TRACK", Const, 0},
+ {"NOTE_TRACKERR", Const, 0},
+ {"NOTE_TRIGGER", Const, 0},
+ {"NOTE_TRUNCATE", Const, 1},
+ {"NOTE_USECONDS", Const, 0},
+ {"NOTE_VM_ERROR", Const, 0},
+ {"NOTE_VM_PRESSURE", Const, 0},
+ {"NOTE_VM_PRESSURE_SUDDEN_TERMINATE", Const, 0},
+ {"NOTE_VM_PRESSURE_TERMINATE", Const, 0},
+ {"NOTE_WRITE", Const, 0},
+ {"NameCanonical", Const, 0},
+ {"NameCanonicalEx", Const, 0},
+ {"NameDisplay", Const, 0},
+ {"NameDnsDomain", Const, 0},
+ {"NameFullyQualifiedDN", Const, 0},
+ {"NameSamCompatible", Const, 0},
+ {"NameServicePrincipal", Const, 0},
+ {"NameUniqueId", Const, 0},
+ {"NameUnknown", Const, 0},
+ {"NameUserPrincipal", Const, 0},
+ {"Nanosleep", Func, 0},
+ {"NetApiBufferFree", Func, 0},
+ {"NetGetJoinInformation", Func, 2},
+ {"NetSetupDomainName", Const, 2},
+ {"NetSetupUnjoined", Const, 2},
+ {"NetSetupUnknownStatus", Const, 2},
+ {"NetSetupWorkgroupName", Const, 2},
+ {"NetUserGetInfo", Func, 0},
+ {"NetlinkMessage", Type, 0},
+ {"NetlinkMessage.Data", Field, 0},
+ {"NetlinkMessage.Header", Field, 0},
+ {"NetlinkRIB", Func, 0},
+ {"NetlinkRouteAttr", Type, 0},
+ {"NetlinkRouteAttr.Attr", Field, 0},
+ {"NetlinkRouteAttr.Value", Field, 0},
+ {"NetlinkRouteRequest", Type, 0},
+ {"NetlinkRouteRequest.Data", Field, 0},
+ {"NetlinkRouteRequest.Header", Field, 0},
+ {"NewCallback", Func, 0},
+ {"NewCallbackCDecl", Func, 3},
+ {"NewLazyDLL", Func, 0},
+ {"NlAttr", Type, 0},
+ {"NlAttr.Len", Field, 0},
+ {"NlAttr.Type", Field, 0},
+ {"NlMsgerr", Type, 0},
+ {"NlMsgerr.Error", Field, 0},
+ {"NlMsgerr.Msg", Field, 0},
+ {"NlMsghdr", Type, 0},
+ {"NlMsghdr.Flags", Field, 0},
+ {"NlMsghdr.Len", Field, 0},
+ {"NlMsghdr.Pid", Field, 0},
+ {"NlMsghdr.Seq", Field, 0},
+ {"NlMsghdr.Type", Field, 0},
+ {"NsecToFiletime", Func, 0},
+ {"NsecToTimespec", Func, 0},
+ {"NsecToTimeval", Func, 0},
+ {"Ntohs", Func, 0},
+ {"OCRNL", Const, 0},
+ {"OFDEL", Const, 0},
+ {"OFILL", Const, 0},
+ {"OFIOGETBMAP", Const, 1},
+ {"OID_PKIX_KP_SERVER_AUTH", Var, 0},
+ {"OID_SERVER_GATED_CRYPTO", Var, 0},
+ {"OID_SGC_NETSCAPE", Var, 0},
+ {"OLCUC", Const, 0},
+ {"ONLCR", Const, 0},
+ {"ONLRET", Const, 0},
+ {"ONOCR", Const, 0},
+ {"ONOEOT", Const, 1},
+ {"OPEN_ALWAYS", Const, 0},
+ {"OPEN_EXISTING", Const, 0},
+ {"OPOST", Const, 0},
+ {"O_ACCMODE", Const, 0},
+ {"O_ALERT", Const, 0},
+ {"O_ALT_IO", Const, 1},
+ {"O_APPEND", Const, 0},
+ {"O_ASYNC", Const, 0},
+ {"O_CLOEXEC", Const, 0},
+ {"O_CREAT", Const, 0},
+ {"O_DIRECT", Const, 0},
+ {"O_DIRECTORY", Const, 0},
+ {"O_DP_GETRAWENCRYPTED", Const, 16},
+ {"O_DSYNC", Const, 0},
+ {"O_EVTONLY", Const, 0},
+ {"O_EXCL", Const, 0},
+ {"O_EXEC", Const, 0},
+ {"O_EXLOCK", Const, 0},
+ {"O_FSYNC", Const, 0},
+ {"O_LARGEFILE", Const, 0},
+ {"O_NDELAY", Const, 0},
+ {"O_NOATIME", Const, 0},
+ {"O_NOCTTY", Const, 0},
+ {"O_NOFOLLOW", Const, 0},
+ {"O_NONBLOCK", Const, 0},
+ {"O_NOSIGPIPE", Const, 1},
+ {"O_POPUP", Const, 0},
+ {"O_RDONLY", Const, 0},
+ {"O_RDWR", Const, 0},
+ {"O_RSYNC", Const, 0},
+ {"O_SHLOCK", Const, 0},
+ {"O_SYMLINK", Const, 0},
+ {"O_SYNC", Const, 0},
+ {"O_TRUNC", Const, 0},
+ {"O_TTY_INIT", Const, 0},
+ {"O_WRONLY", Const, 0},
+ {"Open", Func, 0},
+ {"OpenCurrentProcessToken", Func, 0},
+ {"OpenProcess", Func, 0},
+ {"OpenProcessToken", Func, 0},
+ {"Openat", Func, 0},
+ {"Overlapped", Type, 0},
+ {"Overlapped.HEvent", Field, 0},
+ {"Overlapped.Internal", Field, 0},
+ {"Overlapped.InternalHigh", Field, 0},
+ {"Overlapped.Offset", Field, 0},
+ {"Overlapped.OffsetHigh", Field, 0},
+ {"PACKET_ADD_MEMBERSHIP", Const, 0},
+ {"PACKET_BROADCAST", Const, 0},
+ {"PACKET_DROP_MEMBERSHIP", Const, 0},
+ {"PACKET_FASTROUTE", Const, 0},
+ {"PACKET_HOST", Const, 0},
+ {"PACKET_LOOPBACK", Const, 0},
+ {"PACKET_MR_ALLMULTI", Const, 0},
+ {"PACKET_MR_MULTICAST", Const, 0},
+ {"PACKET_MR_PROMISC", Const, 0},
+ {"PACKET_MULTICAST", Const, 0},
+ {"PACKET_OTHERHOST", Const, 0},
+ {"PACKET_OUTGOING", Const, 0},
+ {"PACKET_RECV_OUTPUT", Const, 0},
+ {"PACKET_RX_RING", Const, 0},
+ {"PACKET_STATISTICS", Const, 0},
+ {"PAGE_EXECUTE_READ", Const, 0},
+ {"PAGE_EXECUTE_READWRITE", Const, 0},
+ {"PAGE_EXECUTE_WRITECOPY", Const, 0},
+ {"PAGE_READONLY", Const, 0},
+ {"PAGE_READWRITE", Const, 0},
+ {"PAGE_WRITECOPY", Const, 0},
+ {"PARENB", Const, 0},
+ {"PARMRK", Const, 0},
+ {"PARODD", Const, 0},
+ {"PENDIN", Const, 0},
+ {"PFL_HIDDEN", Const, 2},
+ {"PFL_MATCHES_PROTOCOL_ZERO", Const, 2},
+ {"PFL_MULTIPLE_PROTO_ENTRIES", Const, 2},
+ {"PFL_NETWORKDIRECT_PROVIDER", Const, 2},
+ {"PFL_RECOMMENDED_PROTO_ENTRY", Const, 2},
+ {"PF_FLUSH", Const, 1},
+ {"PKCS_7_ASN_ENCODING", Const, 0},
+ {"PMC5_PIPELINE_FLUSH", Const, 1},
+ {"PRIO_PGRP", Const, 2},
+ {"PRIO_PROCESS", Const, 2},
+ {"PRIO_USER", Const, 2},
+ {"PRI_IOFLUSH", Const, 1},
+ {"PROCESS_QUERY_INFORMATION", Const, 0},
+ {"PROCESS_TERMINATE", Const, 2},
+ {"PROT_EXEC", Const, 0},
+ {"PROT_GROWSDOWN", Const, 0},
+ {"PROT_GROWSUP", Const, 0},
+ {"PROT_NONE", Const, 0},
+ {"PROT_READ", Const, 0},
+ {"PROT_WRITE", Const, 0},
+ {"PROV_DH_SCHANNEL", Const, 0},
+ {"PROV_DSS", Const, 0},
+ {"PROV_DSS_DH", Const, 0},
+ {"PROV_EC_ECDSA_FULL", Const, 0},
+ {"PROV_EC_ECDSA_SIG", Const, 0},
+ {"PROV_EC_ECNRA_FULL", Const, 0},
+ {"PROV_EC_ECNRA_SIG", Const, 0},
+ {"PROV_FORTEZZA", Const, 0},
+ {"PROV_INTEL_SEC", Const, 0},
+ {"PROV_MS_EXCHANGE", Const, 0},
+ {"PROV_REPLACE_OWF", Const, 0},
+ {"PROV_RNG", Const, 0},
+ {"PROV_RSA_AES", Const, 0},
+ {"PROV_RSA_FULL", Const, 0},
+ {"PROV_RSA_SCHANNEL", Const, 0},
+ {"PROV_RSA_SIG", Const, 0},
+ {"PROV_SPYRUS_LYNKS", Const, 0},
+ {"PROV_SSL", Const, 0},
+ {"PR_CAPBSET_DROP", Const, 0},
+ {"PR_CAPBSET_READ", Const, 0},
+ {"PR_CLEAR_SECCOMP_FILTER", Const, 0},
+ {"PR_ENDIAN_BIG", Const, 0},
+ {"PR_ENDIAN_LITTLE", Const, 0},
+ {"PR_ENDIAN_PPC_LITTLE", Const, 0},
+ {"PR_FPEMU_NOPRINT", Const, 0},
+ {"PR_FPEMU_SIGFPE", Const, 0},
+ {"PR_FP_EXC_ASYNC", Const, 0},
+ {"PR_FP_EXC_DISABLED", Const, 0},
+ {"PR_FP_EXC_DIV", Const, 0},
+ {"PR_FP_EXC_INV", Const, 0},
+ {"PR_FP_EXC_NONRECOV", Const, 0},
+ {"PR_FP_EXC_OVF", Const, 0},
+ {"PR_FP_EXC_PRECISE", Const, 0},
+ {"PR_FP_EXC_RES", Const, 0},
+ {"PR_FP_EXC_SW_ENABLE", Const, 0},
+ {"PR_FP_EXC_UND", Const, 0},
+ {"PR_GET_DUMPABLE", Const, 0},
+ {"PR_GET_ENDIAN", Const, 0},
+ {"PR_GET_FPEMU", Const, 0},
+ {"PR_GET_FPEXC", Const, 0},
+ {"PR_GET_KEEPCAPS", Const, 0},
+ {"PR_GET_NAME", Const, 0},
+ {"PR_GET_PDEATHSIG", Const, 0},
+ {"PR_GET_SECCOMP", Const, 0},
+ {"PR_GET_SECCOMP_FILTER", Const, 0},
+ {"PR_GET_SECUREBITS", Const, 0},
+ {"PR_GET_TIMERSLACK", Const, 0},
+ {"PR_GET_TIMING", Const, 0},
+ {"PR_GET_TSC", Const, 0},
+ {"PR_GET_UNALIGN", Const, 0},
+ {"PR_MCE_KILL", Const, 0},
+ {"PR_MCE_KILL_CLEAR", Const, 0},
+ {"PR_MCE_KILL_DEFAULT", Const, 0},
+ {"PR_MCE_KILL_EARLY", Const, 0},
+ {"PR_MCE_KILL_GET", Const, 0},
+ {"PR_MCE_KILL_LATE", Const, 0},
+ {"PR_MCE_KILL_SET", Const, 0},
+ {"PR_SECCOMP_FILTER_EVENT", Const, 0},
+ {"PR_SECCOMP_FILTER_SYSCALL", Const, 0},
+ {"PR_SET_DUMPABLE", Const, 0},
+ {"PR_SET_ENDIAN", Const, 0},
+ {"PR_SET_FPEMU", Const, 0},
+ {"PR_SET_FPEXC", Const, 0},
+ {"PR_SET_KEEPCAPS", Const, 0},
+ {"PR_SET_NAME", Const, 0},
+ {"PR_SET_PDEATHSIG", Const, 0},
+ {"PR_SET_PTRACER", Const, 0},
+ {"PR_SET_SECCOMP", Const, 0},
+ {"PR_SET_SECCOMP_FILTER", Const, 0},
+ {"PR_SET_SECUREBITS", Const, 0},
+ {"PR_SET_TIMERSLACK", Const, 0},
+ {"PR_SET_TIMING", Const, 0},
+ {"PR_SET_TSC", Const, 0},
+ {"PR_SET_UNALIGN", Const, 0},
+ {"PR_TASK_PERF_EVENTS_DISABLE", Const, 0},
+ {"PR_TASK_PERF_EVENTS_ENABLE", Const, 0},
+ {"PR_TIMING_STATISTICAL", Const, 0},
+ {"PR_TIMING_TIMESTAMP", Const, 0},
+ {"PR_TSC_ENABLE", Const, 0},
+ {"PR_TSC_SIGSEGV", Const, 0},
+ {"PR_UNALIGN_NOPRINT", Const, 0},
+ {"PR_UNALIGN_SIGBUS", Const, 0},
+ {"PTRACE_ARCH_PRCTL", Const, 0},
+ {"PTRACE_ATTACH", Const, 0},
+ {"PTRACE_CONT", Const, 0},
+ {"PTRACE_DETACH", Const, 0},
+ {"PTRACE_EVENT_CLONE", Const, 0},
+ {"PTRACE_EVENT_EXEC", Const, 0},
+ {"PTRACE_EVENT_EXIT", Const, 0},
+ {"PTRACE_EVENT_FORK", Const, 0},
+ {"PTRACE_EVENT_VFORK", Const, 0},
+ {"PTRACE_EVENT_VFORK_DONE", Const, 0},
+ {"PTRACE_GETCRUNCHREGS", Const, 0},
+ {"PTRACE_GETEVENTMSG", Const, 0},
+ {"PTRACE_GETFPREGS", Const, 0},
+ {"PTRACE_GETFPXREGS", Const, 0},
+ {"PTRACE_GETHBPREGS", Const, 0},
+ {"PTRACE_GETREGS", Const, 0},
+ {"PTRACE_GETREGSET", Const, 0},
+ {"PTRACE_GETSIGINFO", Const, 0},
+ {"PTRACE_GETVFPREGS", Const, 0},
+ {"PTRACE_GETWMMXREGS", Const, 0},
+ {"PTRACE_GET_THREAD_AREA", Const, 0},
+ {"PTRACE_KILL", Const, 0},
+ {"PTRACE_OLDSETOPTIONS", Const, 0},
+ {"PTRACE_O_MASK", Const, 0},
+ {"PTRACE_O_TRACECLONE", Const, 0},
+ {"PTRACE_O_TRACEEXEC", Const, 0},
+ {"PTRACE_O_TRACEEXIT", Const, 0},
+ {"PTRACE_O_TRACEFORK", Const, 0},
+ {"PTRACE_O_TRACESYSGOOD", Const, 0},
+ {"PTRACE_O_TRACEVFORK", Const, 0},
+ {"PTRACE_O_TRACEVFORKDONE", Const, 0},
+ {"PTRACE_PEEKDATA", Const, 0},
+ {"PTRACE_PEEKTEXT", Const, 0},
+ {"PTRACE_PEEKUSR", Const, 0},
+ {"PTRACE_POKEDATA", Const, 0},
+ {"PTRACE_POKETEXT", Const, 0},
+ {"PTRACE_POKEUSR", Const, 0},
+ {"PTRACE_SETCRUNCHREGS", Const, 0},
+ {"PTRACE_SETFPREGS", Const, 0},
+ {"PTRACE_SETFPXREGS", Const, 0},
+ {"PTRACE_SETHBPREGS", Const, 0},
+ {"PTRACE_SETOPTIONS", Const, 0},
+ {"PTRACE_SETREGS", Const, 0},
+ {"PTRACE_SETREGSET", Const, 0},
+ {"PTRACE_SETSIGINFO", Const, 0},
+ {"PTRACE_SETVFPREGS", Const, 0},
+ {"PTRACE_SETWMMXREGS", Const, 0},
+ {"PTRACE_SET_SYSCALL", Const, 0},
+ {"PTRACE_SET_THREAD_AREA", Const, 0},
+ {"PTRACE_SINGLEBLOCK", Const, 0},
+ {"PTRACE_SINGLESTEP", Const, 0},
+ {"PTRACE_SYSCALL", Const, 0},
+ {"PTRACE_SYSEMU", Const, 0},
+ {"PTRACE_SYSEMU_SINGLESTEP", Const, 0},
+ {"PTRACE_TRACEME", Const, 0},
+ {"PT_ATTACH", Const, 0},
+ {"PT_ATTACHEXC", Const, 0},
+ {"PT_CONTINUE", Const, 0},
+ {"PT_DATA_ADDR", Const, 0},
+ {"PT_DENY_ATTACH", Const, 0},
+ {"PT_DETACH", Const, 0},
+ {"PT_FIRSTMACH", Const, 0},
+ {"PT_FORCEQUOTA", Const, 0},
+ {"PT_KILL", Const, 0},
+ {"PT_MASK", Const, 1},
+ {"PT_READ_D", Const, 0},
+ {"PT_READ_I", Const, 0},
+ {"PT_READ_U", Const, 0},
+ {"PT_SIGEXC", Const, 0},
+ {"PT_STEP", Const, 0},
+ {"PT_TEXT_ADDR", Const, 0},
+ {"PT_TEXT_END_ADDR", Const, 0},
+ {"PT_THUPDATE", Const, 0},
+ {"PT_TRACE_ME", Const, 0},
+ {"PT_WRITE_D", Const, 0},
+ {"PT_WRITE_I", Const, 0},
+ {"PT_WRITE_U", Const, 0},
+ {"ParseDirent", Func, 0},
+ {"ParseNetlinkMessage", Func, 0},
+ {"ParseNetlinkRouteAttr", Func, 0},
+ {"ParseRoutingMessage", Func, 0},
+ {"ParseRoutingSockaddr", Func, 0},
+ {"ParseSocketControlMessage", Func, 0},
+ {"ParseUnixCredentials", Func, 0},
+ {"ParseUnixRights", Func, 0},
+ {"PathMax", Const, 0},
+ {"Pathconf", Func, 0},
+ {"Pause", Func, 0},
+ {"Pipe", Func, 0},
+ {"Pipe2", Func, 1},
+ {"PivotRoot", Func, 0},
+ {"Pointer", Type, 11},
+ {"PostQueuedCompletionStatus", Func, 0},
+ {"Pread", Func, 0},
+ {"Proc", Type, 0},
+ {"Proc.Dll", Field, 0},
+ {"Proc.Name", Field, 0},
+ {"ProcAttr", Type, 0},
+ {"ProcAttr.Dir", Field, 0},
+ {"ProcAttr.Env", Field, 0},
+ {"ProcAttr.Files", Field, 0},
+ {"ProcAttr.Sys", Field, 0},
+ {"Process32First", Func, 4},
+ {"Process32Next", Func, 4},
+ {"ProcessEntry32", Type, 4},
+ {"ProcessEntry32.DefaultHeapID", Field, 4},
+ {"ProcessEntry32.ExeFile", Field, 4},
+ {"ProcessEntry32.Flags", Field, 4},
+ {"ProcessEntry32.ModuleID", Field, 4},
+ {"ProcessEntry32.ParentProcessID", Field, 4},
+ {"ProcessEntry32.PriClassBase", Field, 4},
+ {"ProcessEntry32.ProcessID", Field, 4},
+ {"ProcessEntry32.Size", Field, 4},
+ {"ProcessEntry32.Threads", Field, 4},
+ {"ProcessEntry32.Usage", Field, 4},
+ {"ProcessInformation", Type, 0},
+ {"ProcessInformation.Process", Field, 0},
+ {"ProcessInformation.ProcessId", Field, 0},
+ {"ProcessInformation.Thread", Field, 0},
+ {"ProcessInformation.ThreadId", Field, 0},
+ {"Protoent", Type, 0},
+ {"Protoent.Aliases", Field, 0},
+ {"Protoent.Name", Field, 0},
+ {"Protoent.Proto", Field, 0},
+ {"PtraceAttach", Func, 0},
+ {"PtraceCont", Func, 0},
+ {"PtraceDetach", Func, 0},
+ {"PtraceGetEventMsg", Func, 0},
+ {"PtraceGetRegs", Func, 0},
+ {"PtracePeekData", Func, 0},
+ {"PtracePeekText", Func, 0},
+ {"PtracePokeData", Func, 0},
+ {"PtracePokeText", Func, 0},
+ {"PtraceRegs", Type, 0},
+ {"PtraceRegs.Cs", Field, 0},
+ {"PtraceRegs.Ds", Field, 0},
+ {"PtraceRegs.Eax", Field, 0},
+ {"PtraceRegs.Ebp", Field, 0},
+ {"PtraceRegs.Ebx", Field, 0},
+ {"PtraceRegs.Ecx", Field, 0},
+ {"PtraceRegs.Edi", Field, 0},
+ {"PtraceRegs.Edx", Field, 0},
+ {"PtraceRegs.Eflags", Field, 0},
+ {"PtraceRegs.Eip", Field, 0},
+ {"PtraceRegs.Es", Field, 0},
+ {"PtraceRegs.Esi", Field, 0},
+ {"PtraceRegs.Esp", Field, 0},
+ {"PtraceRegs.Fs", Field, 0},
+ {"PtraceRegs.Fs_base", Field, 0},
+ {"PtraceRegs.Gs", Field, 0},
+ {"PtraceRegs.Gs_base", Field, 0},
+ {"PtraceRegs.Orig_eax", Field, 0},
+ {"PtraceRegs.Orig_rax", Field, 0},
+ {"PtraceRegs.R10", Field, 0},
+ {"PtraceRegs.R11", Field, 0},
+ {"PtraceRegs.R12", Field, 0},
+ {"PtraceRegs.R13", Field, 0},
+ {"PtraceRegs.R14", Field, 0},
+ {"PtraceRegs.R15", Field, 0},
+ {"PtraceRegs.R8", Field, 0},
+ {"PtraceRegs.R9", Field, 0},
+ {"PtraceRegs.Rax", Field, 0},
+ {"PtraceRegs.Rbp", Field, 0},
+ {"PtraceRegs.Rbx", Field, 0},
+ {"PtraceRegs.Rcx", Field, 0},
+ {"PtraceRegs.Rdi", Field, 0},
+ {"PtraceRegs.Rdx", Field, 0},
+ {"PtraceRegs.Rip", Field, 0},
+ {"PtraceRegs.Rsi", Field, 0},
+ {"PtraceRegs.Rsp", Field, 0},
+ {"PtraceRegs.Ss", Field, 0},
+ {"PtraceRegs.Uregs", Field, 0},
+ {"PtraceRegs.Xcs", Field, 0},
+ {"PtraceRegs.Xds", Field, 0},
+ {"PtraceRegs.Xes", Field, 0},
+ {"PtraceRegs.Xfs", Field, 0},
+ {"PtraceRegs.Xgs", Field, 0},
+ {"PtraceRegs.Xss", Field, 0},
+ {"PtraceSetOptions", Func, 0},
+ {"PtraceSetRegs", Func, 0},
+ {"PtraceSingleStep", Func, 0},
+ {"PtraceSyscall", Func, 1},
+ {"Pwrite", Func, 0},
+ {"REG_BINARY", Const, 0},
+ {"REG_DWORD", Const, 0},
+ {"REG_DWORD_BIG_ENDIAN", Const, 0},
+ {"REG_DWORD_LITTLE_ENDIAN", Const, 0},
+ {"REG_EXPAND_SZ", Const, 0},
+ {"REG_FULL_RESOURCE_DESCRIPTOR", Const, 0},
+ {"REG_LINK", Const, 0},
+ {"REG_MULTI_SZ", Const, 0},
+ {"REG_NONE", Const, 0},
+ {"REG_QWORD", Const, 0},
+ {"REG_QWORD_LITTLE_ENDIAN", Const, 0},
+ {"REG_RESOURCE_LIST", Const, 0},
+ {"REG_RESOURCE_REQUIREMENTS_LIST", Const, 0},
+ {"REG_SZ", Const, 0},
+ {"RLIMIT_AS", Const, 0},
+ {"RLIMIT_CORE", Const, 0},
+ {"RLIMIT_CPU", Const, 0},
+ {"RLIMIT_CPU_USAGE_MONITOR", Const, 16},
+ {"RLIMIT_DATA", Const, 0},
+ {"RLIMIT_FSIZE", Const, 0},
+ {"RLIMIT_NOFILE", Const, 0},
+ {"RLIMIT_STACK", Const, 0},
+ {"RLIM_INFINITY", Const, 0},
+ {"RTAX_ADVMSS", Const, 0},
+ {"RTAX_AUTHOR", Const, 0},
+ {"RTAX_BRD", Const, 0},
+ {"RTAX_CWND", Const, 0},
+ {"RTAX_DST", Const, 0},
+ {"RTAX_FEATURES", Const, 0},
+ {"RTAX_FEATURE_ALLFRAG", Const, 0},
+ {"RTAX_FEATURE_ECN", Const, 0},
+ {"RTAX_FEATURE_SACK", Const, 0},
+ {"RTAX_FEATURE_TIMESTAMP", Const, 0},
+ {"RTAX_GATEWAY", Const, 0},
+ {"RTAX_GENMASK", Const, 0},
+ {"RTAX_HOPLIMIT", Const, 0},
+ {"RTAX_IFA", Const, 0},
+ {"RTAX_IFP", Const, 0},
+ {"RTAX_INITCWND", Const, 0},
+ {"RTAX_INITRWND", Const, 0},
+ {"RTAX_LABEL", Const, 1},
+ {"RTAX_LOCK", Const, 0},
+ {"RTAX_MAX", Const, 0},
+ {"RTAX_MTU", Const, 0},
+ {"RTAX_NETMASK", Const, 0},
+ {"RTAX_REORDERING", Const, 0},
+ {"RTAX_RTO_MIN", Const, 0},
+ {"RTAX_RTT", Const, 0},
+ {"RTAX_RTTVAR", Const, 0},
+ {"RTAX_SRC", Const, 1},
+ {"RTAX_SRCMASK", Const, 1},
+ {"RTAX_SSTHRESH", Const, 0},
+ {"RTAX_TAG", Const, 1},
+ {"RTAX_UNSPEC", Const, 0},
+ {"RTAX_WINDOW", Const, 0},
+ {"RTA_ALIGNTO", Const, 0},
+ {"RTA_AUTHOR", Const, 0},
+ {"RTA_BRD", Const, 0},
+ {"RTA_CACHEINFO", Const, 0},
+ {"RTA_DST", Const, 0},
+ {"RTA_FLOW", Const, 0},
+ {"RTA_GATEWAY", Const, 0},
+ {"RTA_GENMASK", Const, 0},
+ {"RTA_IFA", Const, 0},
+ {"RTA_IFP", Const, 0},
+ {"RTA_IIF", Const, 0},
+ {"RTA_LABEL", Const, 1},
+ {"RTA_MAX", Const, 0},
+ {"RTA_METRICS", Const, 0},
+ {"RTA_MULTIPATH", Const, 0},
+ {"RTA_NETMASK", Const, 0},
+ {"RTA_OIF", Const, 0},
+ {"RTA_PREFSRC", Const, 0},
+ {"RTA_PRIORITY", Const, 0},
+ {"RTA_SRC", Const, 0},
+ {"RTA_SRCMASK", Const, 1},
+ {"RTA_TABLE", Const, 0},
+ {"RTA_TAG", Const, 1},
+ {"RTA_UNSPEC", Const, 0},
+ {"RTCF_DIRECTSRC", Const, 0},
+ {"RTCF_DOREDIRECT", Const, 0},
+ {"RTCF_LOG", Const, 0},
+ {"RTCF_MASQ", Const, 0},
+ {"RTCF_NAT", Const, 0},
+ {"RTCF_VALVE", Const, 0},
+ {"RTF_ADDRCLASSMASK", Const, 0},
+ {"RTF_ADDRCONF", Const, 0},
+ {"RTF_ALLONLINK", Const, 0},
+ {"RTF_ANNOUNCE", Const, 1},
+ {"RTF_BLACKHOLE", Const, 0},
+ {"RTF_BROADCAST", Const, 0},
+ {"RTF_CACHE", Const, 0},
+ {"RTF_CLONED", Const, 1},
+ {"RTF_CLONING", Const, 0},
+ {"RTF_CONDEMNED", Const, 0},
+ {"RTF_DEFAULT", Const, 0},
+ {"RTF_DELCLONE", Const, 0},
+ {"RTF_DONE", Const, 0},
+ {"RTF_DYNAMIC", Const, 0},
+ {"RTF_FLOW", Const, 0},
+ {"RTF_FMASK", Const, 0},
+ {"RTF_GATEWAY", Const, 0},
+ {"RTF_GWFLAG_COMPAT", Const, 3},
+ {"RTF_HOST", Const, 0},
+ {"RTF_IFREF", Const, 0},
+ {"RTF_IFSCOPE", Const, 0},
+ {"RTF_INTERFACE", Const, 0},
+ {"RTF_IRTT", Const, 0},
+ {"RTF_LINKRT", Const, 0},
+ {"RTF_LLDATA", Const, 0},
+ {"RTF_LLINFO", Const, 0},
+ {"RTF_LOCAL", Const, 0},
+ {"RTF_MASK", Const, 1},
+ {"RTF_MODIFIED", Const, 0},
+ {"RTF_MPATH", Const, 1},
+ {"RTF_MPLS", Const, 1},
+ {"RTF_MSS", Const, 0},
+ {"RTF_MTU", Const, 0},
+ {"RTF_MULTICAST", Const, 0},
+ {"RTF_NAT", Const, 0},
+ {"RTF_NOFORWARD", Const, 0},
+ {"RTF_NONEXTHOP", Const, 0},
+ {"RTF_NOPMTUDISC", Const, 0},
+ {"RTF_PERMANENT_ARP", Const, 1},
+ {"RTF_PINNED", Const, 0},
+ {"RTF_POLICY", Const, 0},
+ {"RTF_PRCLONING", Const, 0},
+ {"RTF_PROTO1", Const, 0},
+ {"RTF_PROTO2", Const, 0},
+ {"RTF_PROTO3", Const, 0},
+ {"RTF_PROXY", Const, 16},
+ {"RTF_REINSTATE", Const, 0},
+ {"RTF_REJECT", Const, 0},
+ {"RTF_RNH_LOCKED", Const, 0},
+ {"RTF_ROUTER", Const, 16},
+ {"RTF_SOURCE", Const, 1},
+ {"RTF_SRC", Const, 1},
+ {"RTF_STATIC", Const, 0},
+ {"RTF_STICKY", Const, 0},
+ {"RTF_THROW", Const, 0},
+ {"RTF_TUNNEL", Const, 1},
+ {"RTF_UP", Const, 0},
+ {"RTF_USETRAILERS", Const, 1},
+ {"RTF_WASCLONED", Const, 0},
+ {"RTF_WINDOW", Const, 0},
+ {"RTF_XRESOLVE", Const, 0},
+ {"RTM_ADD", Const, 0},
+ {"RTM_BASE", Const, 0},
+ {"RTM_CHANGE", Const, 0},
+ {"RTM_CHGADDR", Const, 1},
+ {"RTM_DELACTION", Const, 0},
+ {"RTM_DELADDR", Const, 0},
+ {"RTM_DELADDRLABEL", Const, 0},
+ {"RTM_DELETE", Const, 0},
+ {"RTM_DELLINK", Const, 0},
+ {"RTM_DELMADDR", Const, 0},
+ {"RTM_DELNEIGH", Const, 0},
+ {"RTM_DELQDISC", Const, 0},
+ {"RTM_DELROUTE", Const, 0},
+ {"RTM_DELRULE", Const, 0},
+ {"RTM_DELTCLASS", Const, 0},
+ {"RTM_DELTFILTER", Const, 0},
+ {"RTM_DESYNC", Const, 1},
+ {"RTM_F_CLONED", Const, 0},
+ {"RTM_F_EQUALIZE", Const, 0},
+ {"RTM_F_NOTIFY", Const, 0},
+ {"RTM_F_PREFIX", Const, 0},
+ {"RTM_GET", Const, 0},
+ {"RTM_GET2", Const, 0},
+ {"RTM_GETACTION", Const, 0},
+ {"RTM_GETADDR", Const, 0},
+ {"RTM_GETADDRLABEL", Const, 0},
+ {"RTM_GETANYCAST", Const, 0},
+ {"RTM_GETDCB", Const, 0},
+ {"RTM_GETLINK", Const, 0},
+ {"RTM_GETMULTICAST", Const, 0},
+ {"RTM_GETNEIGH", Const, 0},
+ {"RTM_GETNEIGHTBL", Const, 0},
+ {"RTM_GETQDISC", Const, 0},
+ {"RTM_GETROUTE", Const, 0},
+ {"RTM_GETRULE", Const, 0},
+ {"RTM_GETTCLASS", Const, 0},
+ {"RTM_GETTFILTER", Const, 0},
+ {"RTM_IEEE80211", Const, 0},
+ {"RTM_IFANNOUNCE", Const, 0},
+ {"RTM_IFINFO", Const, 0},
+ {"RTM_IFINFO2", Const, 0},
+ {"RTM_LLINFO_UPD", Const, 1},
+ {"RTM_LOCK", Const, 0},
+ {"RTM_LOSING", Const, 0},
+ {"RTM_MAX", Const, 0},
+ {"RTM_MAXSIZE", Const, 1},
+ {"RTM_MISS", Const, 0},
+ {"RTM_NEWACTION", Const, 0},
+ {"RTM_NEWADDR", Const, 0},
+ {"RTM_NEWADDRLABEL", Const, 0},
+ {"RTM_NEWLINK", Const, 0},
+ {"RTM_NEWMADDR", Const, 0},
+ {"RTM_NEWMADDR2", Const, 0},
+ {"RTM_NEWNDUSEROPT", Const, 0},
+ {"RTM_NEWNEIGH", Const, 0},
+ {"RTM_NEWNEIGHTBL", Const, 0},
+ {"RTM_NEWPREFIX", Const, 0},
+ {"RTM_NEWQDISC", Const, 0},
+ {"RTM_NEWROUTE", Const, 0},
+ {"RTM_NEWRULE", Const, 0},
+ {"RTM_NEWTCLASS", Const, 0},
+ {"RTM_NEWTFILTER", Const, 0},
+ {"RTM_NR_FAMILIES", Const, 0},
+ {"RTM_NR_MSGTYPES", Const, 0},
+ {"RTM_OIFINFO", Const, 1},
+ {"RTM_OLDADD", Const, 0},
+ {"RTM_OLDDEL", Const, 0},
+ {"RTM_OOIFINFO", Const, 1},
+ {"RTM_REDIRECT", Const, 0},
+ {"RTM_RESOLVE", Const, 0},
+ {"RTM_RTTUNIT", Const, 0},
+ {"RTM_SETDCB", Const, 0},
+ {"RTM_SETGATE", Const, 1},
+ {"RTM_SETLINK", Const, 0},
+ {"RTM_SETNEIGHTBL", Const, 0},
+ {"RTM_VERSION", Const, 0},
+ {"RTNH_ALIGNTO", Const, 0},
+ {"RTNH_F_DEAD", Const, 0},
+ {"RTNH_F_ONLINK", Const, 0},
+ {"RTNH_F_PERVASIVE", Const, 0},
+ {"RTNLGRP_IPV4_IFADDR", Const, 1},
+ {"RTNLGRP_IPV4_MROUTE", Const, 1},
+ {"RTNLGRP_IPV4_ROUTE", Const, 1},
+ {"RTNLGRP_IPV4_RULE", Const, 1},
+ {"RTNLGRP_IPV6_IFADDR", Const, 1},
+ {"RTNLGRP_IPV6_IFINFO", Const, 1},
+ {"RTNLGRP_IPV6_MROUTE", Const, 1},
+ {"RTNLGRP_IPV6_PREFIX", Const, 1},
+ {"RTNLGRP_IPV6_ROUTE", Const, 1},
+ {"RTNLGRP_IPV6_RULE", Const, 1},
+ {"RTNLGRP_LINK", Const, 1},
+ {"RTNLGRP_ND_USEROPT", Const, 1},
+ {"RTNLGRP_NEIGH", Const, 1},
+ {"RTNLGRP_NONE", Const, 1},
+ {"RTNLGRP_NOTIFY", Const, 1},
+ {"RTNLGRP_TC", Const, 1},
+ {"RTN_ANYCAST", Const, 0},
+ {"RTN_BLACKHOLE", Const, 0},
+ {"RTN_BROADCAST", Const, 0},
+ {"RTN_LOCAL", Const, 0},
+ {"RTN_MAX", Const, 0},
+ {"RTN_MULTICAST", Const, 0},
+ {"RTN_NAT", Const, 0},
+ {"RTN_PROHIBIT", Const, 0},
+ {"RTN_THROW", Const, 0},
+ {"RTN_UNICAST", Const, 0},
+ {"RTN_UNREACHABLE", Const, 0},
+ {"RTN_UNSPEC", Const, 0},
+ {"RTN_XRESOLVE", Const, 0},
+ {"RTPROT_BIRD", Const, 0},
+ {"RTPROT_BOOT", Const, 0},
+ {"RTPROT_DHCP", Const, 0},
+ {"RTPROT_DNROUTED", Const, 0},
+ {"RTPROT_GATED", Const, 0},
+ {"RTPROT_KERNEL", Const, 0},
+ {"RTPROT_MRT", Const, 0},
+ {"RTPROT_NTK", Const, 0},
+ {"RTPROT_RA", Const, 0},
+ {"RTPROT_REDIRECT", Const, 0},
+ {"RTPROT_STATIC", Const, 0},
+ {"RTPROT_UNSPEC", Const, 0},
+ {"RTPROT_XORP", Const, 0},
+ {"RTPROT_ZEBRA", Const, 0},
+ {"RTV_EXPIRE", Const, 0},
+ {"RTV_HOPCOUNT", Const, 0},
+ {"RTV_MTU", Const, 0},
+ {"RTV_RPIPE", Const, 0},
+ {"RTV_RTT", Const, 0},
+ {"RTV_RTTVAR", Const, 0},
+ {"RTV_SPIPE", Const, 0},
+ {"RTV_SSTHRESH", Const, 0},
+ {"RTV_WEIGHT", Const, 0},
+ {"RT_CACHING_CONTEXT", Const, 1},
+ {"RT_CLASS_DEFAULT", Const, 0},
+ {"RT_CLASS_LOCAL", Const, 0},
+ {"RT_CLASS_MAIN", Const, 0},
+ {"RT_CLASS_MAX", Const, 0},
+ {"RT_CLASS_UNSPEC", Const, 0},
+ {"RT_DEFAULT_FIB", Const, 1},
+ {"RT_NORTREF", Const, 1},
+ {"RT_SCOPE_HOST", Const, 0},
+ {"RT_SCOPE_LINK", Const, 0},
+ {"RT_SCOPE_NOWHERE", Const, 0},
+ {"RT_SCOPE_SITE", Const, 0},
+ {"RT_SCOPE_UNIVERSE", Const, 0},
+ {"RT_TABLEID_MAX", Const, 1},
+ {"RT_TABLE_COMPAT", Const, 0},
+ {"RT_TABLE_DEFAULT", Const, 0},
+ {"RT_TABLE_LOCAL", Const, 0},
+ {"RT_TABLE_MAIN", Const, 0},
+ {"RT_TABLE_MAX", Const, 0},
+ {"RT_TABLE_UNSPEC", Const, 0},
+ {"RUSAGE_CHILDREN", Const, 0},
+ {"RUSAGE_SELF", Const, 0},
+ {"RUSAGE_THREAD", Const, 0},
+ {"Radvisory_t", Type, 0},
+ {"Radvisory_t.Count", Field, 0},
+ {"Radvisory_t.Offset", Field, 0},
+ {"Radvisory_t.Pad_cgo_0", Field, 0},
+ {"RawConn", Type, 9},
+ {"RawSockaddr", Type, 0},
+ {"RawSockaddr.Data", Field, 0},
+ {"RawSockaddr.Family", Field, 0},
+ {"RawSockaddr.Len", Field, 0},
+ {"RawSockaddrAny", Type, 0},
+ {"RawSockaddrAny.Addr", Field, 0},
+ {"RawSockaddrAny.Pad", Field, 0},
+ {"RawSockaddrDatalink", Type, 0},
+ {"RawSockaddrDatalink.Alen", Field, 0},
+ {"RawSockaddrDatalink.Data", Field, 0},
+ {"RawSockaddrDatalink.Family", Field, 0},
+ {"RawSockaddrDatalink.Index", Field, 0},
+ {"RawSockaddrDatalink.Len", Field, 0},
+ {"RawSockaddrDatalink.Nlen", Field, 0},
+ {"RawSockaddrDatalink.Pad_cgo_0", Field, 2},
+ {"RawSockaddrDatalink.Slen", Field, 0},
+ {"RawSockaddrDatalink.Type", Field, 0},
+ {"RawSockaddrInet4", Type, 0},
+ {"RawSockaddrInet4.Addr", Field, 0},
+ {"RawSockaddrInet4.Family", Field, 0},
+ {"RawSockaddrInet4.Len", Field, 0},
+ {"RawSockaddrInet4.Port", Field, 0},
+ {"RawSockaddrInet4.Zero", Field, 0},
+ {"RawSockaddrInet6", Type, 0},
+ {"RawSockaddrInet6.Addr", Field, 0},
+ {"RawSockaddrInet6.Family", Field, 0},
+ {"RawSockaddrInet6.Flowinfo", Field, 0},
+ {"RawSockaddrInet6.Len", Field, 0},
+ {"RawSockaddrInet6.Port", Field, 0},
+ {"RawSockaddrInet6.Scope_id", Field, 0},
+ {"RawSockaddrLinklayer", Type, 0},
+ {"RawSockaddrLinklayer.Addr", Field, 0},
+ {"RawSockaddrLinklayer.Family", Field, 0},
+ {"RawSockaddrLinklayer.Halen", Field, 0},
+ {"RawSockaddrLinklayer.Hatype", Field, 0},
+ {"RawSockaddrLinklayer.Ifindex", Field, 0},
+ {"RawSockaddrLinklayer.Pkttype", Field, 0},
+ {"RawSockaddrLinklayer.Protocol", Field, 0},
+ {"RawSockaddrNetlink", Type, 0},
+ {"RawSockaddrNetlink.Family", Field, 0},
+ {"RawSockaddrNetlink.Groups", Field, 0},
+ {"RawSockaddrNetlink.Pad", Field, 0},
+ {"RawSockaddrNetlink.Pid", Field, 0},
+ {"RawSockaddrUnix", Type, 0},
+ {"RawSockaddrUnix.Family", Field, 0},
+ {"RawSockaddrUnix.Len", Field, 0},
+ {"RawSockaddrUnix.Pad_cgo_0", Field, 2},
+ {"RawSockaddrUnix.Path", Field, 0},
+ {"RawSyscall", Func, 0},
+ {"RawSyscall6", Func, 0},
+ {"Read", Func, 0},
+ {"ReadConsole", Func, 1},
+ {"ReadDirectoryChanges", Func, 0},
+ {"ReadDirent", Func, 0},
+ {"ReadFile", Func, 0},
+ {"Readlink", Func, 0},
+ {"Reboot", Func, 0},
+ {"Recvfrom", Func, 0},
+ {"Recvmsg", Func, 0},
+ {"RegCloseKey", Func, 0},
+ {"RegEnumKeyEx", Func, 0},
+ {"RegOpenKeyEx", Func, 0},
+ {"RegQueryInfoKey", Func, 0},
+ {"RegQueryValueEx", Func, 0},
+ {"RemoveDirectory", Func, 0},
+ {"Removexattr", Func, 1},
+ {"Rename", Func, 0},
+ {"Renameat", Func, 0},
+ {"Revoke", Func, 0},
+ {"Rlimit", Type, 0},
+ {"Rlimit.Cur", Field, 0},
+ {"Rlimit.Max", Field, 0},
+ {"Rmdir", Func, 0},
+ {"RouteMessage", Type, 0},
+ {"RouteMessage.Data", Field, 0},
+ {"RouteMessage.Header", Field, 0},
+ {"RouteRIB", Func, 0},
+ {"RoutingMessage", Type, 0},
+ {"RtAttr", Type, 0},
+ {"RtAttr.Len", Field, 0},
+ {"RtAttr.Type", Field, 0},
+ {"RtGenmsg", Type, 0},
+ {"RtGenmsg.Family", Field, 0},
+ {"RtMetrics", Type, 0},
+ {"RtMetrics.Expire", Field, 0},
+ {"RtMetrics.Filler", Field, 0},
+ {"RtMetrics.Hopcount", Field, 0},
+ {"RtMetrics.Locks", Field, 0},
+ {"RtMetrics.Mtu", Field, 0},
+ {"RtMetrics.Pad", Field, 3},
+ {"RtMetrics.Pksent", Field, 0},
+ {"RtMetrics.Recvpipe", Field, 0},
+ {"RtMetrics.Refcnt", Field, 2},
+ {"RtMetrics.Rtt", Field, 0},
+ {"RtMetrics.Rttvar", Field, 0},
+ {"RtMetrics.Sendpipe", Field, 0},
+ {"RtMetrics.Ssthresh", Field, 0},
+ {"RtMetrics.Weight", Field, 0},
+ {"RtMsg", Type, 0},
+ {"RtMsg.Dst_len", Field, 0},
+ {"RtMsg.Family", Field, 0},
+ {"RtMsg.Flags", Field, 0},
+ {"RtMsg.Protocol", Field, 0},
+ {"RtMsg.Scope", Field, 0},
+ {"RtMsg.Src_len", Field, 0},
+ {"RtMsg.Table", Field, 0},
+ {"RtMsg.Tos", Field, 0},
+ {"RtMsg.Type", Field, 0},
+ {"RtMsghdr", Type, 0},
+ {"RtMsghdr.Addrs", Field, 0},
+ {"RtMsghdr.Errno", Field, 0},
+ {"RtMsghdr.Flags", Field, 0},
+ {"RtMsghdr.Fmask", Field, 0},
+ {"RtMsghdr.Hdrlen", Field, 2},
+ {"RtMsghdr.Index", Field, 0},
+ {"RtMsghdr.Inits", Field, 0},
+ {"RtMsghdr.Mpls", Field, 2},
+ {"RtMsghdr.Msglen", Field, 0},
+ {"RtMsghdr.Pad_cgo_0", Field, 0},
+ {"RtMsghdr.Pad_cgo_1", Field, 2},
+ {"RtMsghdr.Pid", Field, 0},
+ {"RtMsghdr.Priority", Field, 2},
+ {"RtMsghdr.Rmx", Field, 0},
+ {"RtMsghdr.Seq", Field, 0},
+ {"RtMsghdr.Tableid", Field, 2},
+ {"RtMsghdr.Type", Field, 0},
+ {"RtMsghdr.Use", Field, 0},
+ {"RtMsghdr.Version", Field, 0},
+ {"RtNexthop", Type, 0},
+ {"RtNexthop.Flags", Field, 0},
+ {"RtNexthop.Hops", Field, 0},
+ {"RtNexthop.Ifindex", Field, 0},
+ {"RtNexthop.Len", Field, 0},
+ {"Rusage", Type, 0},
+ {"Rusage.CreationTime", Field, 0},
+ {"Rusage.ExitTime", Field, 0},
+ {"Rusage.Idrss", Field, 0},
+ {"Rusage.Inblock", Field, 0},
+ {"Rusage.Isrss", Field, 0},
+ {"Rusage.Ixrss", Field, 0},
+ {"Rusage.KernelTime", Field, 0},
+ {"Rusage.Majflt", Field, 0},
+ {"Rusage.Maxrss", Field, 0},
+ {"Rusage.Minflt", Field, 0},
+ {"Rusage.Msgrcv", Field, 0},
+ {"Rusage.Msgsnd", Field, 0},
+ {"Rusage.Nivcsw", Field, 0},
+ {"Rusage.Nsignals", Field, 0},
+ {"Rusage.Nswap", Field, 0},
+ {"Rusage.Nvcsw", Field, 0},
+ {"Rusage.Oublock", Field, 0},
+ {"Rusage.Stime", Field, 0},
+ {"Rusage.UserTime", Field, 0},
+ {"Rusage.Utime", Field, 0},
+ {"SCM_BINTIME", Const, 0},
+ {"SCM_CREDENTIALS", Const, 0},
+ {"SCM_CREDS", Const, 0},
+ {"SCM_RIGHTS", Const, 0},
+ {"SCM_TIMESTAMP", Const, 0},
+ {"SCM_TIMESTAMPING", Const, 0},
+ {"SCM_TIMESTAMPNS", Const, 0},
+ {"SCM_TIMESTAMP_MONOTONIC", Const, 0},
+ {"SHUT_RD", Const, 0},
+ {"SHUT_RDWR", Const, 0},
+ {"SHUT_WR", Const, 0},
+ {"SID", Type, 0},
+ {"SIDAndAttributes", Type, 0},
+ {"SIDAndAttributes.Attributes", Field, 0},
+ {"SIDAndAttributes.Sid", Field, 0},
+ {"SIGABRT", Const, 0},
+ {"SIGALRM", Const, 0},
+ {"SIGBUS", Const, 0},
+ {"SIGCHLD", Const, 0},
+ {"SIGCLD", Const, 0},
+ {"SIGCONT", Const, 0},
+ {"SIGEMT", Const, 0},
+ {"SIGFPE", Const, 0},
+ {"SIGHUP", Const, 0},
+ {"SIGILL", Const, 0},
+ {"SIGINFO", Const, 0},
+ {"SIGINT", Const, 0},
+ {"SIGIO", Const, 0},
+ {"SIGIOT", Const, 0},
+ {"SIGKILL", Const, 0},
+ {"SIGLIBRT", Const, 1},
+ {"SIGLWP", Const, 0},
+ {"SIGPIPE", Const, 0},
+ {"SIGPOLL", Const, 0},
+ {"SIGPROF", Const, 0},
+ {"SIGPWR", Const, 0},
+ {"SIGQUIT", Const, 0},
+ {"SIGSEGV", Const, 0},
+ {"SIGSTKFLT", Const, 0},
+ {"SIGSTOP", Const, 0},
+ {"SIGSYS", Const, 0},
+ {"SIGTERM", Const, 0},
+ {"SIGTHR", Const, 0},
+ {"SIGTRAP", Const, 0},
+ {"SIGTSTP", Const, 0},
+ {"SIGTTIN", Const, 0},
+ {"SIGTTOU", Const, 0},
+ {"SIGUNUSED", Const, 0},
+ {"SIGURG", Const, 0},
+ {"SIGUSR1", Const, 0},
+ {"SIGUSR2", Const, 0},
+ {"SIGVTALRM", Const, 0},
+ {"SIGWINCH", Const, 0},
+ {"SIGXCPU", Const, 0},
+ {"SIGXFSZ", Const, 0},
+ {"SIOCADDDLCI", Const, 0},
+ {"SIOCADDMULTI", Const, 0},
+ {"SIOCADDRT", Const, 0},
+ {"SIOCAIFADDR", Const, 0},
+ {"SIOCAIFGROUP", Const, 0},
+ {"SIOCALIFADDR", Const, 0},
+ {"SIOCARPIPLL", Const, 0},
+ {"SIOCATMARK", Const, 0},
+ {"SIOCAUTOADDR", Const, 0},
+ {"SIOCAUTONETMASK", Const, 0},
+ {"SIOCBRDGADD", Const, 1},
+ {"SIOCBRDGADDS", Const, 1},
+ {"SIOCBRDGARL", Const, 1},
+ {"SIOCBRDGDADDR", Const, 1},
+ {"SIOCBRDGDEL", Const, 1},
+ {"SIOCBRDGDELS", Const, 1},
+ {"SIOCBRDGFLUSH", Const, 1},
+ {"SIOCBRDGFRL", Const, 1},
+ {"SIOCBRDGGCACHE", Const, 1},
+ {"SIOCBRDGGFD", Const, 1},
+ {"SIOCBRDGGHT", Const, 1},
+ {"SIOCBRDGGIFFLGS", Const, 1},
+ {"SIOCBRDGGMA", Const, 1},
+ {"SIOCBRDGGPARAM", Const, 1},
+ {"SIOCBRDGGPRI", Const, 1},
+ {"SIOCBRDGGRL", Const, 1},
+ {"SIOCBRDGGSIFS", Const, 1},
+ {"SIOCBRDGGTO", Const, 1},
+ {"SIOCBRDGIFS", Const, 1},
+ {"SIOCBRDGRTS", Const, 1},
+ {"SIOCBRDGSADDR", Const, 1},
+ {"SIOCBRDGSCACHE", Const, 1},
+ {"SIOCBRDGSFD", Const, 1},
+ {"SIOCBRDGSHT", Const, 1},
+ {"SIOCBRDGSIFCOST", Const, 1},
+ {"SIOCBRDGSIFFLGS", Const, 1},
+ {"SIOCBRDGSIFPRIO", Const, 1},
+ {"SIOCBRDGSMA", Const, 1},
+ {"SIOCBRDGSPRI", Const, 1},
+ {"SIOCBRDGSPROTO", Const, 1},
+ {"SIOCBRDGSTO", Const, 1},
+ {"SIOCBRDGSTXHC", Const, 1},
+ {"SIOCDARP", Const, 0},
+ {"SIOCDELDLCI", Const, 0},
+ {"SIOCDELMULTI", Const, 0},
+ {"SIOCDELRT", Const, 0},
+ {"SIOCDEVPRIVATE", Const, 0},
+ {"SIOCDIFADDR", Const, 0},
+ {"SIOCDIFGROUP", Const, 0},
+ {"SIOCDIFPHYADDR", Const, 0},
+ {"SIOCDLIFADDR", Const, 0},
+ {"SIOCDRARP", Const, 0},
+ {"SIOCGARP", Const, 0},
+ {"SIOCGDRVSPEC", Const, 0},
+ {"SIOCGETKALIVE", Const, 1},
+ {"SIOCGETLABEL", Const, 1},
+ {"SIOCGETPFLOW", Const, 1},
+ {"SIOCGETPFSYNC", Const, 1},
+ {"SIOCGETSGCNT", Const, 0},
+ {"SIOCGETVIFCNT", Const, 0},
+ {"SIOCGETVLAN", Const, 0},
+ {"SIOCGHIWAT", Const, 0},
+ {"SIOCGIFADDR", Const, 0},
+ {"SIOCGIFADDRPREF", Const, 1},
+ {"SIOCGIFALIAS", Const, 1},
+ {"SIOCGIFALTMTU", Const, 0},
+ {"SIOCGIFASYNCMAP", Const, 0},
+ {"SIOCGIFBOND", Const, 0},
+ {"SIOCGIFBR", Const, 0},
+ {"SIOCGIFBRDADDR", Const, 0},
+ {"SIOCGIFCAP", Const, 0},
+ {"SIOCGIFCONF", Const, 0},
+ {"SIOCGIFCOUNT", Const, 0},
+ {"SIOCGIFDATA", Const, 1},
+ {"SIOCGIFDESCR", Const, 0},
+ {"SIOCGIFDEVMTU", Const, 0},
+ {"SIOCGIFDLT", Const, 1},
+ {"SIOCGIFDSTADDR", Const, 0},
+ {"SIOCGIFENCAP", Const, 0},
+ {"SIOCGIFFIB", Const, 1},
+ {"SIOCGIFFLAGS", Const, 0},
+ {"SIOCGIFGATTR", Const, 1},
+ {"SIOCGIFGENERIC", Const, 0},
+ {"SIOCGIFGMEMB", Const, 0},
+ {"SIOCGIFGROUP", Const, 0},
+ {"SIOCGIFHARDMTU", Const, 3},
+ {"SIOCGIFHWADDR", Const, 0},
+ {"SIOCGIFINDEX", Const, 0},
+ {"SIOCGIFKPI", Const, 0},
+ {"SIOCGIFMAC", Const, 0},
+ {"SIOCGIFMAP", Const, 0},
+ {"SIOCGIFMEDIA", Const, 0},
+ {"SIOCGIFMEM", Const, 0},
+ {"SIOCGIFMETRIC", Const, 0},
+ {"SIOCGIFMTU", Const, 0},
+ {"SIOCGIFNAME", Const, 0},
+ {"SIOCGIFNETMASK", Const, 0},
+ {"SIOCGIFPDSTADDR", Const, 0},
+ {"SIOCGIFPFLAGS", Const, 0},
+ {"SIOCGIFPHYS", Const, 0},
+ {"SIOCGIFPRIORITY", Const, 1},
+ {"SIOCGIFPSRCADDR", Const, 0},
+ {"SIOCGIFRDOMAIN", Const, 1},
+ {"SIOCGIFRTLABEL", Const, 1},
+ {"SIOCGIFSLAVE", Const, 0},
+ {"SIOCGIFSTATUS", Const, 0},
+ {"SIOCGIFTIMESLOT", Const, 1},
+ {"SIOCGIFTXQLEN", Const, 0},
+ {"SIOCGIFVLAN", Const, 0},
+ {"SIOCGIFWAKEFLAGS", Const, 0},
+ {"SIOCGIFXFLAGS", Const, 1},
+ {"SIOCGLIFADDR", Const, 0},
+ {"SIOCGLIFPHYADDR", Const, 0},
+ {"SIOCGLIFPHYRTABLE", Const, 1},
+ {"SIOCGLIFPHYTTL", Const, 3},
+ {"SIOCGLINKSTR", Const, 1},
+ {"SIOCGLOWAT", Const, 0},
+ {"SIOCGPGRP", Const, 0},
+ {"SIOCGPRIVATE_0", Const, 0},
+ {"SIOCGPRIVATE_1", Const, 0},
+ {"SIOCGRARP", Const, 0},
+ {"SIOCGSPPPPARAMS", Const, 3},
+ {"SIOCGSTAMP", Const, 0},
+ {"SIOCGSTAMPNS", Const, 0},
+ {"SIOCGVH", Const, 1},
+ {"SIOCGVNETID", Const, 3},
+ {"SIOCIFCREATE", Const, 0},
+ {"SIOCIFCREATE2", Const, 0},
+ {"SIOCIFDESTROY", Const, 0},
+ {"SIOCIFGCLONERS", Const, 0},
+ {"SIOCINITIFADDR", Const, 1},
+ {"SIOCPROTOPRIVATE", Const, 0},
+ {"SIOCRSLVMULTI", Const, 0},
+ {"SIOCRTMSG", Const, 0},
+ {"SIOCSARP", Const, 0},
+ {"SIOCSDRVSPEC", Const, 0},
+ {"SIOCSETKALIVE", Const, 1},
+ {"SIOCSETLABEL", Const, 1},
+ {"SIOCSETPFLOW", Const, 1},
+ {"SIOCSETPFSYNC", Const, 1},
+ {"SIOCSETVLAN", Const, 0},
+ {"SIOCSHIWAT", Const, 0},
+ {"SIOCSIFADDR", Const, 0},
+ {"SIOCSIFADDRPREF", Const, 1},
+ {"SIOCSIFALTMTU", Const, 0},
+ {"SIOCSIFASYNCMAP", Const, 0},
+ {"SIOCSIFBOND", Const, 0},
+ {"SIOCSIFBR", Const, 0},
+ {"SIOCSIFBRDADDR", Const, 0},
+ {"SIOCSIFCAP", Const, 0},
+ {"SIOCSIFDESCR", Const, 0},
+ {"SIOCSIFDSTADDR", Const, 0},
+ {"SIOCSIFENCAP", Const, 0},
+ {"SIOCSIFFIB", Const, 1},
+ {"SIOCSIFFLAGS", Const, 0},
+ {"SIOCSIFGATTR", Const, 1},
+ {"SIOCSIFGENERIC", Const, 0},
+ {"SIOCSIFHWADDR", Const, 0},
+ {"SIOCSIFHWBROADCAST", Const, 0},
+ {"SIOCSIFKPI", Const, 0},
+ {"SIOCSIFLINK", Const, 0},
+ {"SIOCSIFLLADDR", Const, 0},
+ {"SIOCSIFMAC", Const, 0},
+ {"SIOCSIFMAP", Const, 0},
+ {"SIOCSIFMEDIA", Const, 0},
+ {"SIOCSIFMEM", Const, 0},
+ {"SIOCSIFMETRIC", Const, 0},
+ {"SIOCSIFMTU", Const, 0},
+ {"SIOCSIFNAME", Const, 0},
+ {"SIOCSIFNETMASK", Const, 0},
+ {"SIOCSIFPFLAGS", Const, 0},
+ {"SIOCSIFPHYADDR", Const, 0},
+ {"SIOCSIFPHYS", Const, 0},
+ {"SIOCSIFPRIORITY", Const, 1},
+ {"SIOCSIFRDOMAIN", Const, 1},
+ {"SIOCSIFRTLABEL", Const, 1},
+ {"SIOCSIFRVNET", Const, 0},
+ {"SIOCSIFSLAVE", Const, 0},
+ {"SIOCSIFTIMESLOT", Const, 1},
+ {"SIOCSIFTXQLEN", Const, 0},
+ {"SIOCSIFVLAN", Const, 0},
+ {"SIOCSIFVNET", Const, 0},
+ {"SIOCSIFXFLAGS", Const, 1},
+ {"SIOCSLIFPHYADDR", Const, 0},
+ {"SIOCSLIFPHYRTABLE", Const, 1},
+ {"SIOCSLIFPHYTTL", Const, 3},
+ {"SIOCSLINKSTR", Const, 1},
+ {"SIOCSLOWAT", Const, 0},
+ {"SIOCSPGRP", Const, 0},
+ {"SIOCSRARP", Const, 0},
+ {"SIOCSSPPPPARAMS", Const, 3},
+ {"SIOCSVH", Const, 1},
+ {"SIOCSVNETID", Const, 3},
+ {"SIOCZIFDATA", Const, 1},
+ {"SIO_GET_EXTENSION_FUNCTION_POINTER", Const, 1},
+ {"SIO_GET_INTERFACE_LIST", Const, 0},
+ {"SIO_KEEPALIVE_VALS", Const, 3},
+ {"SIO_UDP_CONNRESET", Const, 4},
+ {"SOCK_CLOEXEC", Const, 0},
+ {"SOCK_DCCP", Const, 0},
+ {"SOCK_DGRAM", Const, 0},
+ {"SOCK_FLAGS_MASK", Const, 1},
+ {"SOCK_MAXADDRLEN", Const, 0},
+ {"SOCK_NONBLOCK", Const, 0},
+ {"SOCK_NOSIGPIPE", Const, 1},
+ {"SOCK_PACKET", Const, 0},
+ {"SOCK_RAW", Const, 0},
+ {"SOCK_RDM", Const, 0},
+ {"SOCK_SEQPACKET", Const, 0},
+ {"SOCK_STREAM", Const, 0},
+ {"SOL_AAL", Const, 0},
+ {"SOL_ATM", Const, 0},
+ {"SOL_DECNET", Const, 0},
+ {"SOL_ICMPV6", Const, 0},
+ {"SOL_IP", Const, 0},
+ {"SOL_IPV6", Const, 0},
+ {"SOL_IRDA", Const, 0},
+ {"SOL_PACKET", Const, 0},
+ {"SOL_RAW", Const, 0},
+ {"SOL_SOCKET", Const, 0},
+ {"SOL_TCP", Const, 0},
+ {"SOL_X25", Const, 0},
+ {"SOMAXCONN", Const, 0},
+ {"SO_ACCEPTCONN", Const, 0},
+ {"SO_ACCEPTFILTER", Const, 0},
+ {"SO_ATTACH_FILTER", Const, 0},
+ {"SO_BINDANY", Const, 1},
+ {"SO_BINDTODEVICE", Const, 0},
+ {"SO_BINTIME", Const, 0},
+ {"SO_BROADCAST", Const, 0},
+ {"SO_BSDCOMPAT", Const, 0},
+ {"SO_DEBUG", Const, 0},
+ {"SO_DETACH_FILTER", Const, 0},
+ {"SO_DOMAIN", Const, 0},
+ {"SO_DONTROUTE", Const, 0},
+ {"SO_DONTTRUNC", Const, 0},
+ {"SO_ERROR", Const, 0},
+ {"SO_KEEPALIVE", Const, 0},
+ {"SO_LABEL", Const, 0},
+ {"SO_LINGER", Const, 0},
+ {"SO_LINGER_SEC", Const, 0},
+ {"SO_LISTENINCQLEN", Const, 0},
+ {"SO_LISTENQLEN", Const, 0},
+ {"SO_LISTENQLIMIT", Const, 0},
+ {"SO_MARK", Const, 0},
+ {"SO_NETPROC", Const, 1},
+ {"SO_NKE", Const, 0},
+ {"SO_NOADDRERR", Const, 0},
+ {"SO_NOHEADER", Const, 1},
+ {"SO_NOSIGPIPE", Const, 0},
+ {"SO_NOTIFYCONFLICT", Const, 0},
+ {"SO_NO_CHECK", Const, 0},
+ {"SO_NO_DDP", Const, 0},
+ {"SO_NO_OFFLOAD", Const, 0},
+ {"SO_NP_EXTENSIONS", Const, 0},
+ {"SO_NREAD", Const, 0},
+ {"SO_NUMRCVPKT", Const, 16},
+ {"SO_NWRITE", Const, 0},
+ {"SO_OOBINLINE", Const, 0},
+ {"SO_OVERFLOWED", Const, 1},
+ {"SO_PASSCRED", Const, 0},
+ {"SO_PASSSEC", Const, 0},
+ {"SO_PEERCRED", Const, 0},
+ {"SO_PEERLABEL", Const, 0},
+ {"SO_PEERNAME", Const, 0},
+ {"SO_PEERSEC", Const, 0},
+ {"SO_PRIORITY", Const, 0},
+ {"SO_PROTOCOL", Const, 0},
+ {"SO_PROTOTYPE", Const, 1},
+ {"SO_RANDOMPORT", Const, 0},
+ {"SO_RCVBUF", Const, 0},
+ {"SO_RCVBUFFORCE", Const, 0},
+ {"SO_RCVLOWAT", Const, 0},
+ {"SO_RCVTIMEO", Const, 0},
+ {"SO_RESTRICTIONS", Const, 0},
+ {"SO_RESTRICT_DENYIN", Const, 0},
+ {"SO_RESTRICT_DENYOUT", Const, 0},
+ {"SO_RESTRICT_DENYSET", Const, 0},
+ {"SO_REUSEADDR", Const, 0},
+ {"SO_REUSEPORT", Const, 0},
+ {"SO_REUSESHAREUID", Const, 0},
+ {"SO_RTABLE", Const, 1},
+ {"SO_RXQ_OVFL", Const, 0},
+ {"SO_SECURITY_AUTHENTICATION", Const, 0},
+ {"SO_SECURITY_ENCRYPTION_NETWORK", Const, 0},
+ {"SO_SECURITY_ENCRYPTION_TRANSPORT", Const, 0},
+ {"SO_SETFIB", Const, 0},
+ {"SO_SNDBUF", Const, 0},
+ {"SO_SNDBUFFORCE", Const, 0},
+ {"SO_SNDLOWAT", Const, 0},
+ {"SO_SNDTIMEO", Const, 0},
+ {"SO_SPLICE", Const, 1},
+ {"SO_TIMESTAMP", Const, 0},
+ {"SO_TIMESTAMPING", Const, 0},
+ {"SO_TIMESTAMPNS", Const, 0},
+ {"SO_TIMESTAMP_MONOTONIC", Const, 0},
+ {"SO_TYPE", Const, 0},
+ {"SO_UPCALLCLOSEWAIT", Const, 0},
+ {"SO_UPDATE_ACCEPT_CONTEXT", Const, 0},
+ {"SO_UPDATE_CONNECT_CONTEXT", Const, 1},
+ {"SO_USELOOPBACK", Const, 0},
+ {"SO_USER_COOKIE", Const, 1},
+ {"SO_VENDOR", Const, 3},
+ {"SO_WANTMORE", Const, 0},
+ {"SO_WANTOOBFLAG", Const, 0},
+ {"SSLExtraCertChainPolicyPara", Type, 0},
+ {"SSLExtraCertChainPolicyPara.AuthType", Field, 0},
+ {"SSLExtraCertChainPolicyPara.Checks", Field, 0},
+ {"SSLExtraCertChainPolicyPara.ServerName", Field, 0},
+ {"SSLExtraCertChainPolicyPara.Size", Field, 0},
+ {"STANDARD_RIGHTS_ALL", Const, 0},
+ {"STANDARD_RIGHTS_EXECUTE", Const, 0},
+ {"STANDARD_RIGHTS_READ", Const, 0},
+ {"STANDARD_RIGHTS_REQUIRED", Const, 0},
+ {"STANDARD_RIGHTS_WRITE", Const, 0},
+ {"STARTF_USESHOWWINDOW", Const, 0},
+ {"STARTF_USESTDHANDLES", Const, 0},
+ {"STD_ERROR_HANDLE", Const, 0},
+ {"STD_INPUT_HANDLE", Const, 0},
+ {"STD_OUTPUT_HANDLE", Const, 0},
+ {"SUBLANG_ENGLISH_US", Const, 0},
+ {"SW_FORCEMINIMIZE", Const, 0},
+ {"SW_HIDE", Const, 0},
+ {"SW_MAXIMIZE", Const, 0},
+ {"SW_MINIMIZE", Const, 0},
+ {"SW_NORMAL", Const, 0},
+ {"SW_RESTORE", Const, 0},
+ {"SW_SHOW", Const, 0},
+ {"SW_SHOWDEFAULT", Const, 0},
+ {"SW_SHOWMAXIMIZED", Const, 0},
+ {"SW_SHOWMINIMIZED", Const, 0},
+ {"SW_SHOWMINNOACTIVE", Const, 0},
+ {"SW_SHOWNA", Const, 0},
+ {"SW_SHOWNOACTIVATE", Const, 0},
+ {"SW_SHOWNORMAL", Const, 0},
+ {"SYMBOLIC_LINK_FLAG_DIRECTORY", Const, 4},
+ {"SYNCHRONIZE", Const, 0},
+ {"SYSCTL_VERSION", Const, 1},
+ {"SYSCTL_VERS_0", Const, 1},
+ {"SYSCTL_VERS_1", Const, 1},
+ {"SYSCTL_VERS_MASK", Const, 1},
+ {"SYS_ABORT2", Const, 0},
+ {"SYS_ACCEPT", Const, 0},
+ {"SYS_ACCEPT4", Const, 0},
+ {"SYS_ACCEPT_NOCANCEL", Const, 0},
+ {"SYS_ACCESS", Const, 0},
+ {"SYS_ACCESS_EXTENDED", Const, 0},
+ {"SYS_ACCT", Const, 0},
+ {"SYS_ADD_KEY", Const, 0},
+ {"SYS_ADD_PROFIL", Const, 0},
+ {"SYS_ADJFREQ", Const, 1},
+ {"SYS_ADJTIME", Const, 0},
+ {"SYS_ADJTIMEX", Const, 0},
+ {"SYS_AFS_SYSCALL", Const, 0},
+ {"SYS_AIO_CANCEL", Const, 0},
+ {"SYS_AIO_ERROR", Const, 0},
+ {"SYS_AIO_FSYNC", Const, 0},
+ {"SYS_AIO_MLOCK", Const, 14},
+ {"SYS_AIO_READ", Const, 0},
+ {"SYS_AIO_RETURN", Const, 0},
+ {"SYS_AIO_SUSPEND", Const, 0},
+ {"SYS_AIO_SUSPEND_NOCANCEL", Const, 0},
+ {"SYS_AIO_WAITCOMPLETE", Const, 14},
+ {"SYS_AIO_WRITE", Const, 0},
+ {"SYS_ALARM", Const, 0},
+ {"SYS_ARCH_PRCTL", Const, 0},
+ {"SYS_ARM_FADVISE64_64", Const, 0},
+ {"SYS_ARM_SYNC_FILE_RANGE", Const, 0},
+ {"SYS_ATGETMSG", Const, 0},
+ {"SYS_ATPGETREQ", Const, 0},
+ {"SYS_ATPGETRSP", Const, 0},
+ {"SYS_ATPSNDREQ", Const, 0},
+ {"SYS_ATPSNDRSP", Const, 0},
+ {"SYS_ATPUTMSG", Const, 0},
+ {"SYS_ATSOCKET", Const, 0},
+ {"SYS_AUDIT", Const, 0},
+ {"SYS_AUDITCTL", Const, 0},
+ {"SYS_AUDITON", Const, 0},
+ {"SYS_AUDIT_SESSION_JOIN", Const, 0},
+ {"SYS_AUDIT_SESSION_PORT", Const, 0},
+ {"SYS_AUDIT_SESSION_SELF", Const, 0},
+ {"SYS_BDFLUSH", Const, 0},
+ {"SYS_BIND", Const, 0},
+ {"SYS_BINDAT", Const, 3},
+ {"SYS_BREAK", Const, 0},
+ {"SYS_BRK", Const, 0},
+ {"SYS_BSDTHREAD_CREATE", Const, 0},
+ {"SYS_BSDTHREAD_REGISTER", Const, 0},
+ {"SYS_BSDTHREAD_TERMINATE", Const, 0},
+ {"SYS_CAPGET", Const, 0},
+ {"SYS_CAPSET", Const, 0},
+ {"SYS_CAP_ENTER", Const, 0},
+ {"SYS_CAP_FCNTLS_GET", Const, 1},
+ {"SYS_CAP_FCNTLS_LIMIT", Const, 1},
+ {"SYS_CAP_GETMODE", Const, 0},
+ {"SYS_CAP_GETRIGHTS", Const, 0},
+ {"SYS_CAP_IOCTLS_GET", Const, 1},
+ {"SYS_CAP_IOCTLS_LIMIT", Const, 1},
+ {"SYS_CAP_NEW", Const, 0},
+ {"SYS_CAP_RIGHTS_GET", Const, 1},
+ {"SYS_CAP_RIGHTS_LIMIT", Const, 1},
+ {"SYS_CHDIR", Const, 0},
+ {"SYS_CHFLAGS", Const, 0},
+ {"SYS_CHFLAGSAT", Const, 3},
+ {"SYS_CHMOD", Const, 0},
+ {"SYS_CHMOD_EXTENDED", Const, 0},
+ {"SYS_CHOWN", Const, 0},
+ {"SYS_CHOWN32", Const, 0},
+ {"SYS_CHROOT", Const, 0},
+ {"SYS_CHUD", Const, 0},
+ {"SYS_CLOCK_ADJTIME", Const, 0},
+ {"SYS_CLOCK_GETCPUCLOCKID2", Const, 1},
+ {"SYS_CLOCK_GETRES", Const, 0},
+ {"SYS_CLOCK_GETTIME", Const, 0},
+ {"SYS_CLOCK_NANOSLEEP", Const, 0},
+ {"SYS_CLOCK_SETTIME", Const, 0},
+ {"SYS_CLONE", Const, 0},
+ {"SYS_CLOSE", Const, 0},
+ {"SYS_CLOSEFROM", Const, 0},
+ {"SYS_CLOSE_NOCANCEL", Const, 0},
+ {"SYS_CONNECT", Const, 0},
+ {"SYS_CONNECTAT", Const, 3},
+ {"SYS_CONNECT_NOCANCEL", Const, 0},
+ {"SYS_COPYFILE", Const, 0},
+ {"SYS_CPUSET", Const, 0},
+ {"SYS_CPUSET_GETAFFINITY", Const, 0},
+ {"SYS_CPUSET_GETID", Const, 0},
+ {"SYS_CPUSET_SETAFFINITY", Const, 0},
+ {"SYS_CPUSET_SETID", Const, 0},
+ {"SYS_CREAT", Const, 0},
+ {"SYS_CREATE_MODULE", Const, 0},
+ {"SYS_CSOPS", Const, 0},
+ {"SYS_CSOPS_AUDITTOKEN", Const, 16},
+ {"SYS_DELETE", Const, 0},
+ {"SYS_DELETE_MODULE", Const, 0},
+ {"SYS_DUP", Const, 0},
+ {"SYS_DUP2", Const, 0},
+ {"SYS_DUP3", Const, 0},
+ {"SYS_EACCESS", Const, 0},
+ {"SYS_EPOLL_CREATE", Const, 0},
+ {"SYS_EPOLL_CREATE1", Const, 0},
+ {"SYS_EPOLL_CTL", Const, 0},
+ {"SYS_EPOLL_CTL_OLD", Const, 0},
+ {"SYS_EPOLL_PWAIT", Const, 0},
+ {"SYS_EPOLL_WAIT", Const, 0},
+ {"SYS_EPOLL_WAIT_OLD", Const, 0},
+ {"SYS_EVENTFD", Const, 0},
+ {"SYS_EVENTFD2", Const, 0},
+ {"SYS_EXCHANGEDATA", Const, 0},
+ {"SYS_EXECVE", Const, 0},
+ {"SYS_EXIT", Const, 0},
+ {"SYS_EXIT_GROUP", Const, 0},
+ {"SYS_EXTATTRCTL", Const, 0},
+ {"SYS_EXTATTR_DELETE_FD", Const, 0},
+ {"SYS_EXTATTR_DELETE_FILE", Const, 0},
+ {"SYS_EXTATTR_DELETE_LINK", Const, 0},
+ {"SYS_EXTATTR_GET_FD", Const, 0},
+ {"SYS_EXTATTR_GET_FILE", Const, 0},
+ {"SYS_EXTATTR_GET_LINK", Const, 0},
+ {"SYS_EXTATTR_LIST_FD", Const, 0},
+ {"SYS_EXTATTR_LIST_FILE", Const, 0},
+ {"SYS_EXTATTR_LIST_LINK", Const, 0},
+ {"SYS_EXTATTR_SET_FD", Const, 0},
+ {"SYS_EXTATTR_SET_FILE", Const, 0},
+ {"SYS_EXTATTR_SET_LINK", Const, 0},
+ {"SYS_FACCESSAT", Const, 0},
+ {"SYS_FADVISE64", Const, 0},
+ {"SYS_FADVISE64_64", Const, 0},
+ {"SYS_FALLOCATE", Const, 0},
+ {"SYS_FANOTIFY_INIT", Const, 0},
+ {"SYS_FANOTIFY_MARK", Const, 0},
+ {"SYS_FCHDIR", Const, 0},
+ {"SYS_FCHFLAGS", Const, 0},
+ {"SYS_FCHMOD", Const, 0},
+ {"SYS_FCHMODAT", Const, 0},
+ {"SYS_FCHMOD_EXTENDED", Const, 0},
+ {"SYS_FCHOWN", Const, 0},
+ {"SYS_FCHOWN32", Const, 0},
+ {"SYS_FCHOWNAT", Const, 0},
+ {"SYS_FCHROOT", Const, 1},
+ {"SYS_FCNTL", Const, 0},
+ {"SYS_FCNTL64", Const, 0},
+ {"SYS_FCNTL_NOCANCEL", Const, 0},
+ {"SYS_FDATASYNC", Const, 0},
+ {"SYS_FEXECVE", Const, 0},
+ {"SYS_FFCLOCK_GETCOUNTER", Const, 0},
+ {"SYS_FFCLOCK_GETESTIMATE", Const, 0},
+ {"SYS_FFCLOCK_SETESTIMATE", Const, 0},
+ {"SYS_FFSCTL", Const, 0},
+ {"SYS_FGETATTRLIST", Const, 0},
+ {"SYS_FGETXATTR", Const, 0},
+ {"SYS_FHOPEN", Const, 0},
+ {"SYS_FHSTAT", Const, 0},
+ {"SYS_FHSTATFS", Const, 0},
+ {"SYS_FILEPORT_MAKEFD", Const, 0},
+ {"SYS_FILEPORT_MAKEPORT", Const, 0},
+ {"SYS_FKTRACE", Const, 1},
+ {"SYS_FLISTXATTR", Const, 0},
+ {"SYS_FLOCK", Const, 0},
+ {"SYS_FORK", Const, 0},
+ {"SYS_FPATHCONF", Const, 0},
+ {"SYS_FREEBSD6_FTRUNCATE", Const, 0},
+ {"SYS_FREEBSD6_LSEEK", Const, 0},
+ {"SYS_FREEBSD6_MMAP", Const, 0},
+ {"SYS_FREEBSD6_PREAD", Const, 0},
+ {"SYS_FREEBSD6_PWRITE", Const, 0},
+ {"SYS_FREEBSD6_TRUNCATE", Const, 0},
+ {"SYS_FREMOVEXATTR", Const, 0},
+ {"SYS_FSCTL", Const, 0},
+ {"SYS_FSETATTRLIST", Const, 0},
+ {"SYS_FSETXATTR", Const, 0},
+ {"SYS_FSGETPATH", Const, 0},
+ {"SYS_FSTAT", Const, 0},
+ {"SYS_FSTAT64", Const, 0},
+ {"SYS_FSTAT64_EXTENDED", Const, 0},
+ {"SYS_FSTATAT", Const, 0},
+ {"SYS_FSTATAT64", Const, 0},
+ {"SYS_FSTATFS", Const, 0},
+ {"SYS_FSTATFS64", Const, 0},
+ {"SYS_FSTATV", Const, 0},
+ {"SYS_FSTATVFS1", Const, 1},
+ {"SYS_FSTAT_EXTENDED", Const, 0},
+ {"SYS_FSYNC", Const, 0},
+ {"SYS_FSYNC_NOCANCEL", Const, 0},
+ {"SYS_FSYNC_RANGE", Const, 1},
+ {"SYS_FTIME", Const, 0},
+ {"SYS_FTRUNCATE", Const, 0},
+ {"SYS_FTRUNCATE64", Const, 0},
+ {"SYS_FUTEX", Const, 0},
+ {"SYS_FUTIMENS", Const, 1},
+ {"SYS_FUTIMES", Const, 0},
+ {"SYS_FUTIMESAT", Const, 0},
+ {"SYS_GETATTRLIST", Const, 0},
+ {"SYS_GETAUDIT", Const, 0},
+ {"SYS_GETAUDIT_ADDR", Const, 0},
+ {"SYS_GETAUID", Const, 0},
+ {"SYS_GETCONTEXT", Const, 0},
+ {"SYS_GETCPU", Const, 0},
+ {"SYS_GETCWD", Const, 0},
+ {"SYS_GETDENTS", Const, 0},
+ {"SYS_GETDENTS64", Const, 0},
+ {"SYS_GETDIRENTRIES", Const, 0},
+ {"SYS_GETDIRENTRIES64", Const, 0},
+ {"SYS_GETDIRENTRIESATTR", Const, 0},
+ {"SYS_GETDTABLECOUNT", Const, 1},
+ {"SYS_GETDTABLESIZE", Const, 0},
+ {"SYS_GETEGID", Const, 0},
+ {"SYS_GETEGID32", Const, 0},
+ {"SYS_GETEUID", Const, 0},
+ {"SYS_GETEUID32", Const, 0},
+ {"SYS_GETFH", Const, 0},
+ {"SYS_GETFSSTAT", Const, 0},
+ {"SYS_GETFSSTAT64", Const, 0},
+ {"SYS_GETGID", Const, 0},
+ {"SYS_GETGID32", Const, 0},
+ {"SYS_GETGROUPS", Const, 0},
+ {"SYS_GETGROUPS32", Const, 0},
+ {"SYS_GETHOSTUUID", Const, 0},
+ {"SYS_GETITIMER", Const, 0},
+ {"SYS_GETLCID", Const, 0},
+ {"SYS_GETLOGIN", Const, 0},
+ {"SYS_GETLOGINCLASS", Const, 0},
+ {"SYS_GETPEERNAME", Const, 0},
+ {"SYS_GETPGID", Const, 0},
+ {"SYS_GETPGRP", Const, 0},
+ {"SYS_GETPID", Const, 0},
+ {"SYS_GETPMSG", Const, 0},
+ {"SYS_GETPPID", Const, 0},
+ {"SYS_GETPRIORITY", Const, 0},
+ {"SYS_GETRESGID", Const, 0},
+ {"SYS_GETRESGID32", Const, 0},
+ {"SYS_GETRESUID", Const, 0},
+ {"SYS_GETRESUID32", Const, 0},
+ {"SYS_GETRLIMIT", Const, 0},
+ {"SYS_GETRTABLE", Const, 1},
+ {"SYS_GETRUSAGE", Const, 0},
+ {"SYS_GETSGROUPS", Const, 0},
+ {"SYS_GETSID", Const, 0},
+ {"SYS_GETSOCKNAME", Const, 0},
+ {"SYS_GETSOCKOPT", Const, 0},
+ {"SYS_GETTHRID", Const, 1},
+ {"SYS_GETTID", Const, 0},
+ {"SYS_GETTIMEOFDAY", Const, 0},
+ {"SYS_GETUID", Const, 0},
+ {"SYS_GETUID32", Const, 0},
+ {"SYS_GETVFSSTAT", Const, 1},
+ {"SYS_GETWGROUPS", Const, 0},
+ {"SYS_GETXATTR", Const, 0},
+ {"SYS_GET_KERNEL_SYMS", Const, 0},
+ {"SYS_GET_MEMPOLICY", Const, 0},
+ {"SYS_GET_ROBUST_LIST", Const, 0},
+ {"SYS_GET_THREAD_AREA", Const, 0},
+ {"SYS_GSSD_SYSCALL", Const, 14},
+ {"SYS_GTTY", Const, 0},
+ {"SYS_IDENTITYSVC", Const, 0},
+ {"SYS_IDLE", Const, 0},
+ {"SYS_INITGROUPS", Const, 0},
+ {"SYS_INIT_MODULE", Const, 0},
+ {"SYS_INOTIFY_ADD_WATCH", Const, 0},
+ {"SYS_INOTIFY_INIT", Const, 0},
+ {"SYS_INOTIFY_INIT1", Const, 0},
+ {"SYS_INOTIFY_RM_WATCH", Const, 0},
+ {"SYS_IOCTL", Const, 0},
+ {"SYS_IOPERM", Const, 0},
+ {"SYS_IOPL", Const, 0},
+ {"SYS_IOPOLICYSYS", Const, 0},
+ {"SYS_IOPRIO_GET", Const, 0},
+ {"SYS_IOPRIO_SET", Const, 0},
+ {"SYS_IO_CANCEL", Const, 0},
+ {"SYS_IO_DESTROY", Const, 0},
+ {"SYS_IO_GETEVENTS", Const, 0},
+ {"SYS_IO_SETUP", Const, 0},
+ {"SYS_IO_SUBMIT", Const, 0},
+ {"SYS_IPC", Const, 0},
+ {"SYS_ISSETUGID", Const, 0},
+ {"SYS_JAIL", Const, 0},
+ {"SYS_JAIL_ATTACH", Const, 0},
+ {"SYS_JAIL_GET", Const, 0},
+ {"SYS_JAIL_REMOVE", Const, 0},
+ {"SYS_JAIL_SET", Const, 0},
+ {"SYS_KAS_INFO", Const, 16},
+ {"SYS_KDEBUG_TRACE", Const, 0},
+ {"SYS_KENV", Const, 0},
+ {"SYS_KEVENT", Const, 0},
+ {"SYS_KEVENT64", Const, 0},
+ {"SYS_KEXEC_LOAD", Const, 0},
+ {"SYS_KEYCTL", Const, 0},
+ {"SYS_KILL", Const, 0},
+ {"SYS_KLDFIND", Const, 0},
+ {"SYS_KLDFIRSTMOD", Const, 0},
+ {"SYS_KLDLOAD", Const, 0},
+ {"SYS_KLDNEXT", Const, 0},
+ {"SYS_KLDSTAT", Const, 0},
+ {"SYS_KLDSYM", Const, 0},
+ {"SYS_KLDUNLOAD", Const, 0},
+ {"SYS_KLDUNLOADF", Const, 0},
+ {"SYS_KMQ_NOTIFY", Const, 14},
+ {"SYS_KMQ_OPEN", Const, 14},
+ {"SYS_KMQ_SETATTR", Const, 14},
+ {"SYS_KMQ_TIMEDRECEIVE", Const, 14},
+ {"SYS_KMQ_TIMEDSEND", Const, 14},
+ {"SYS_KMQ_UNLINK", Const, 14},
+ {"SYS_KQUEUE", Const, 0},
+ {"SYS_KQUEUE1", Const, 1},
+ {"SYS_KSEM_CLOSE", Const, 14},
+ {"SYS_KSEM_DESTROY", Const, 14},
+ {"SYS_KSEM_GETVALUE", Const, 14},
+ {"SYS_KSEM_INIT", Const, 14},
+ {"SYS_KSEM_OPEN", Const, 14},
+ {"SYS_KSEM_POST", Const, 14},
+ {"SYS_KSEM_TIMEDWAIT", Const, 14},
+ {"SYS_KSEM_TRYWAIT", Const, 14},
+ {"SYS_KSEM_UNLINK", Const, 14},
+ {"SYS_KSEM_WAIT", Const, 14},
+ {"SYS_KTIMER_CREATE", Const, 0},
+ {"SYS_KTIMER_DELETE", Const, 0},
+ {"SYS_KTIMER_GETOVERRUN", Const, 0},
+ {"SYS_KTIMER_GETTIME", Const, 0},
+ {"SYS_KTIMER_SETTIME", Const, 0},
+ {"SYS_KTRACE", Const, 0},
+ {"SYS_LCHFLAGS", Const, 0},
+ {"SYS_LCHMOD", Const, 0},
+ {"SYS_LCHOWN", Const, 0},
+ {"SYS_LCHOWN32", Const, 0},
+ {"SYS_LEDGER", Const, 16},
+ {"SYS_LGETFH", Const, 0},
+ {"SYS_LGETXATTR", Const, 0},
+ {"SYS_LINK", Const, 0},
+ {"SYS_LINKAT", Const, 0},
+ {"SYS_LIO_LISTIO", Const, 0},
+ {"SYS_LISTEN", Const, 0},
+ {"SYS_LISTXATTR", Const, 0},
+ {"SYS_LLISTXATTR", Const, 0},
+ {"SYS_LOCK", Const, 0},
+ {"SYS_LOOKUP_DCOOKIE", Const, 0},
+ {"SYS_LPATHCONF", Const, 0},
+ {"SYS_LREMOVEXATTR", Const, 0},
+ {"SYS_LSEEK", Const, 0},
+ {"SYS_LSETXATTR", Const, 0},
+ {"SYS_LSTAT", Const, 0},
+ {"SYS_LSTAT64", Const, 0},
+ {"SYS_LSTAT64_EXTENDED", Const, 0},
+ {"SYS_LSTATV", Const, 0},
+ {"SYS_LSTAT_EXTENDED", Const, 0},
+ {"SYS_LUTIMES", Const, 0},
+ {"SYS_MAC_SYSCALL", Const, 0},
+ {"SYS_MADVISE", Const, 0},
+ {"SYS_MADVISE1", Const, 0},
+ {"SYS_MAXSYSCALL", Const, 0},
+ {"SYS_MBIND", Const, 0},
+ {"SYS_MIGRATE_PAGES", Const, 0},
+ {"SYS_MINCORE", Const, 0},
+ {"SYS_MINHERIT", Const, 0},
+ {"SYS_MKCOMPLEX", Const, 0},
+ {"SYS_MKDIR", Const, 0},
+ {"SYS_MKDIRAT", Const, 0},
+ {"SYS_MKDIR_EXTENDED", Const, 0},
+ {"SYS_MKFIFO", Const, 0},
+ {"SYS_MKFIFOAT", Const, 0},
+ {"SYS_MKFIFO_EXTENDED", Const, 0},
+ {"SYS_MKNOD", Const, 0},
+ {"SYS_MKNODAT", Const, 0},
+ {"SYS_MLOCK", Const, 0},
+ {"SYS_MLOCKALL", Const, 0},
+ {"SYS_MMAP", Const, 0},
+ {"SYS_MMAP2", Const, 0},
+ {"SYS_MODCTL", Const, 1},
+ {"SYS_MODFIND", Const, 0},
+ {"SYS_MODFNEXT", Const, 0},
+ {"SYS_MODIFY_LDT", Const, 0},
+ {"SYS_MODNEXT", Const, 0},
+ {"SYS_MODSTAT", Const, 0},
+ {"SYS_MODWATCH", Const, 0},
+ {"SYS_MOUNT", Const, 0},
+ {"SYS_MOVE_PAGES", Const, 0},
+ {"SYS_MPROTECT", Const, 0},
+ {"SYS_MPX", Const, 0},
+ {"SYS_MQUERY", Const, 1},
+ {"SYS_MQ_GETSETATTR", Const, 0},
+ {"SYS_MQ_NOTIFY", Const, 0},
+ {"SYS_MQ_OPEN", Const, 0},
+ {"SYS_MQ_TIMEDRECEIVE", Const, 0},
+ {"SYS_MQ_TIMEDSEND", Const, 0},
+ {"SYS_MQ_UNLINK", Const, 0},
+ {"SYS_MREMAP", Const, 0},
+ {"SYS_MSGCTL", Const, 0},
+ {"SYS_MSGGET", Const, 0},
+ {"SYS_MSGRCV", Const, 0},
+ {"SYS_MSGRCV_NOCANCEL", Const, 0},
+ {"SYS_MSGSND", Const, 0},
+ {"SYS_MSGSND_NOCANCEL", Const, 0},
+ {"SYS_MSGSYS", Const, 0},
+ {"SYS_MSYNC", Const, 0},
+ {"SYS_MSYNC_NOCANCEL", Const, 0},
+ {"SYS_MUNLOCK", Const, 0},
+ {"SYS_MUNLOCKALL", Const, 0},
+ {"SYS_MUNMAP", Const, 0},
+ {"SYS_NAME_TO_HANDLE_AT", Const, 0},
+ {"SYS_NANOSLEEP", Const, 0},
+ {"SYS_NEWFSTATAT", Const, 0},
+ {"SYS_NFSCLNT", Const, 0},
+ {"SYS_NFSSERVCTL", Const, 0},
+ {"SYS_NFSSVC", Const, 0},
+ {"SYS_NFSTAT", Const, 0},
+ {"SYS_NICE", Const, 0},
+ {"SYS_NLM_SYSCALL", Const, 14},
+ {"SYS_NLSTAT", Const, 0},
+ {"SYS_NMOUNT", Const, 0},
+ {"SYS_NSTAT", Const, 0},
+ {"SYS_NTP_ADJTIME", Const, 0},
+ {"SYS_NTP_GETTIME", Const, 0},
+ {"SYS_NUMA_GETAFFINITY", Const, 14},
+ {"SYS_NUMA_SETAFFINITY", Const, 14},
+ {"SYS_OABI_SYSCALL_BASE", Const, 0},
+ {"SYS_OBREAK", Const, 0},
+ {"SYS_OLDFSTAT", Const, 0},
+ {"SYS_OLDLSTAT", Const, 0},
+ {"SYS_OLDOLDUNAME", Const, 0},
+ {"SYS_OLDSTAT", Const, 0},
+ {"SYS_OLDUNAME", Const, 0},
+ {"SYS_OPEN", Const, 0},
+ {"SYS_OPENAT", Const, 0},
+ {"SYS_OPENBSD_POLL", Const, 0},
+ {"SYS_OPEN_BY_HANDLE_AT", Const, 0},
+ {"SYS_OPEN_DPROTECTED_NP", Const, 16},
+ {"SYS_OPEN_EXTENDED", Const, 0},
+ {"SYS_OPEN_NOCANCEL", Const, 0},
+ {"SYS_OVADVISE", Const, 0},
+ {"SYS_PACCEPT", Const, 1},
+ {"SYS_PATHCONF", Const, 0},
+ {"SYS_PAUSE", Const, 0},
+ {"SYS_PCICONFIG_IOBASE", Const, 0},
+ {"SYS_PCICONFIG_READ", Const, 0},
+ {"SYS_PCICONFIG_WRITE", Const, 0},
+ {"SYS_PDFORK", Const, 0},
+ {"SYS_PDGETPID", Const, 0},
+ {"SYS_PDKILL", Const, 0},
+ {"SYS_PERF_EVENT_OPEN", Const, 0},
+ {"SYS_PERSONALITY", Const, 0},
+ {"SYS_PID_HIBERNATE", Const, 0},
+ {"SYS_PID_RESUME", Const, 0},
+ {"SYS_PID_SHUTDOWN_SOCKETS", Const, 0},
+ {"SYS_PID_SUSPEND", Const, 0},
+ {"SYS_PIPE", Const, 0},
+ {"SYS_PIPE2", Const, 0},
+ {"SYS_PIVOT_ROOT", Const, 0},
+ {"SYS_PMC_CONTROL", Const, 1},
+ {"SYS_PMC_GET_INFO", Const, 1},
+ {"SYS_POLL", Const, 0},
+ {"SYS_POLLTS", Const, 1},
+ {"SYS_POLL_NOCANCEL", Const, 0},
+ {"SYS_POSIX_FADVISE", Const, 0},
+ {"SYS_POSIX_FALLOCATE", Const, 0},
+ {"SYS_POSIX_OPENPT", Const, 0},
+ {"SYS_POSIX_SPAWN", Const, 0},
+ {"SYS_PPOLL", Const, 0},
+ {"SYS_PRCTL", Const, 0},
+ {"SYS_PREAD", Const, 0},
+ {"SYS_PREAD64", Const, 0},
+ {"SYS_PREADV", Const, 0},
+ {"SYS_PREAD_NOCANCEL", Const, 0},
+ {"SYS_PRLIMIT64", Const, 0},
+ {"SYS_PROCCTL", Const, 3},
+ {"SYS_PROCESS_POLICY", Const, 0},
+ {"SYS_PROCESS_VM_READV", Const, 0},
+ {"SYS_PROCESS_VM_WRITEV", Const, 0},
+ {"SYS_PROC_INFO", Const, 0},
+ {"SYS_PROF", Const, 0},
+ {"SYS_PROFIL", Const, 0},
+ {"SYS_PSELECT", Const, 0},
+ {"SYS_PSELECT6", Const, 0},
+ {"SYS_PSET_ASSIGN", Const, 1},
+ {"SYS_PSET_CREATE", Const, 1},
+ {"SYS_PSET_DESTROY", Const, 1},
+ {"SYS_PSYNCH_CVBROAD", Const, 0},
+ {"SYS_PSYNCH_CVCLRPREPOST", Const, 0},
+ {"SYS_PSYNCH_CVSIGNAL", Const, 0},
+ {"SYS_PSYNCH_CVWAIT", Const, 0},
+ {"SYS_PSYNCH_MUTEXDROP", Const, 0},
+ {"SYS_PSYNCH_MUTEXWAIT", Const, 0},
+ {"SYS_PSYNCH_RW_DOWNGRADE", Const, 0},
+ {"SYS_PSYNCH_RW_LONGRDLOCK", Const, 0},
+ {"SYS_PSYNCH_RW_RDLOCK", Const, 0},
+ {"SYS_PSYNCH_RW_UNLOCK", Const, 0},
+ {"SYS_PSYNCH_RW_UNLOCK2", Const, 0},
+ {"SYS_PSYNCH_RW_UPGRADE", Const, 0},
+ {"SYS_PSYNCH_RW_WRLOCK", Const, 0},
+ {"SYS_PSYNCH_RW_YIELDWRLOCK", Const, 0},
+ {"SYS_PTRACE", Const, 0},
+ {"SYS_PUTPMSG", Const, 0},
+ {"SYS_PWRITE", Const, 0},
+ {"SYS_PWRITE64", Const, 0},
+ {"SYS_PWRITEV", Const, 0},
+ {"SYS_PWRITE_NOCANCEL", Const, 0},
+ {"SYS_QUERY_MODULE", Const, 0},
+ {"SYS_QUOTACTL", Const, 0},
+ {"SYS_RASCTL", Const, 1},
+ {"SYS_RCTL_ADD_RULE", Const, 0},
+ {"SYS_RCTL_GET_LIMITS", Const, 0},
+ {"SYS_RCTL_GET_RACCT", Const, 0},
+ {"SYS_RCTL_GET_RULES", Const, 0},
+ {"SYS_RCTL_REMOVE_RULE", Const, 0},
+ {"SYS_READ", Const, 0},
+ {"SYS_READAHEAD", Const, 0},
+ {"SYS_READDIR", Const, 0},
+ {"SYS_READLINK", Const, 0},
+ {"SYS_READLINKAT", Const, 0},
+ {"SYS_READV", Const, 0},
+ {"SYS_READV_NOCANCEL", Const, 0},
+ {"SYS_READ_NOCANCEL", Const, 0},
+ {"SYS_REBOOT", Const, 0},
+ {"SYS_RECV", Const, 0},
+ {"SYS_RECVFROM", Const, 0},
+ {"SYS_RECVFROM_NOCANCEL", Const, 0},
+ {"SYS_RECVMMSG", Const, 0},
+ {"SYS_RECVMSG", Const, 0},
+ {"SYS_RECVMSG_NOCANCEL", Const, 0},
+ {"SYS_REMAP_FILE_PAGES", Const, 0},
+ {"SYS_REMOVEXATTR", Const, 0},
+ {"SYS_RENAME", Const, 0},
+ {"SYS_RENAMEAT", Const, 0},
+ {"SYS_REQUEST_KEY", Const, 0},
+ {"SYS_RESTART_SYSCALL", Const, 0},
+ {"SYS_REVOKE", Const, 0},
+ {"SYS_RFORK", Const, 0},
+ {"SYS_RMDIR", Const, 0},
+ {"SYS_RTPRIO", Const, 0},
+ {"SYS_RTPRIO_THREAD", Const, 0},
+ {"SYS_RT_SIGACTION", Const, 0},
+ {"SYS_RT_SIGPENDING", Const, 0},
+ {"SYS_RT_SIGPROCMASK", Const, 0},
+ {"SYS_RT_SIGQUEUEINFO", Const, 0},
+ {"SYS_RT_SIGRETURN", Const, 0},
+ {"SYS_RT_SIGSUSPEND", Const, 0},
+ {"SYS_RT_SIGTIMEDWAIT", Const, 0},
+ {"SYS_RT_TGSIGQUEUEINFO", Const, 0},
+ {"SYS_SBRK", Const, 0},
+ {"SYS_SCHED_GETAFFINITY", Const, 0},
+ {"SYS_SCHED_GETPARAM", Const, 0},
+ {"SYS_SCHED_GETSCHEDULER", Const, 0},
+ {"SYS_SCHED_GET_PRIORITY_MAX", Const, 0},
+ {"SYS_SCHED_GET_PRIORITY_MIN", Const, 0},
+ {"SYS_SCHED_RR_GET_INTERVAL", Const, 0},
+ {"SYS_SCHED_SETAFFINITY", Const, 0},
+ {"SYS_SCHED_SETPARAM", Const, 0},
+ {"SYS_SCHED_SETSCHEDULER", Const, 0},
+ {"SYS_SCHED_YIELD", Const, 0},
+ {"SYS_SCTP_GENERIC_RECVMSG", Const, 0},
+ {"SYS_SCTP_GENERIC_SENDMSG", Const, 0},
+ {"SYS_SCTP_GENERIC_SENDMSG_IOV", Const, 0},
+ {"SYS_SCTP_PEELOFF", Const, 0},
+ {"SYS_SEARCHFS", Const, 0},
+ {"SYS_SECURITY", Const, 0},
+ {"SYS_SELECT", Const, 0},
+ {"SYS_SELECT_NOCANCEL", Const, 0},
+ {"SYS_SEMCONFIG", Const, 1},
+ {"SYS_SEMCTL", Const, 0},
+ {"SYS_SEMGET", Const, 0},
+ {"SYS_SEMOP", Const, 0},
+ {"SYS_SEMSYS", Const, 0},
+ {"SYS_SEMTIMEDOP", Const, 0},
+ {"SYS_SEM_CLOSE", Const, 0},
+ {"SYS_SEM_DESTROY", Const, 0},
+ {"SYS_SEM_GETVALUE", Const, 0},
+ {"SYS_SEM_INIT", Const, 0},
+ {"SYS_SEM_OPEN", Const, 0},
+ {"SYS_SEM_POST", Const, 0},
+ {"SYS_SEM_TRYWAIT", Const, 0},
+ {"SYS_SEM_UNLINK", Const, 0},
+ {"SYS_SEM_WAIT", Const, 0},
+ {"SYS_SEM_WAIT_NOCANCEL", Const, 0},
+ {"SYS_SEND", Const, 0},
+ {"SYS_SENDFILE", Const, 0},
+ {"SYS_SENDFILE64", Const, 0},
+ {"SYS_SENDMMSG", Const, 0},
+ {"SYS_SENDMSG", Const, 0},
+ {"SYS_SENDMSG_NOCANCEL", Const, 0},
+ {"SYS_SENDTO", Const, 0},
+ {"SYS_SENDTO_NOCANCEL", Const, 0},
+ {"SYS_SETATTRLIST", Const, 0},
+ {"SYS_SETAUDIT", Const, 0},
+ {"SYS_SETAUDIT_ADDR", Const, 0},
+ {"SYS_SETAUID", Const, 0},
+ {"SYS_SETCONTEXT", Const, 0},
+ {"SYS_SETDOMAINNAME", Const, 0},
+ {"SYS_SETEGID", Const, 0},
+ {"SYS_SETEUID", Const, 0},
+ {"SYS_SETFIB", Const, 0},
+ {"SYS_SETFSGID", Const, 0},
+ {"SYS_SETFSGID32", Const, 0},
+ {"SYS_SETFSUID", Const, 0},
+ {"SYS_SETFSUID32", Const, 0},
+ {"SYS_SETGID", Const, 0},
+ {"SYS_SETGID32", Const, 0},
+ {"SYS_SETGROUPS", Const, 0},
+ {"SYS_SETGROUPS32", Const, 0},
+ {"SYS_SETHOSTNAME", Const, 0},
+ {"SYS_SETITIMER", Const, 0},
+ {"SYS_SETLCID", Const, 0},
+ {"SYS_SETLOGIN", Const, 0},
+ {"SYS_SETLOGINCLASS", Const, 0},
+ {"SYS_SETNS", Const, 0},
+ {"SYS_SETPGID", Const, 0},
+ {"SYS_SETPRIORITY", Const, 0},
+ {"SYS_SETPRIVEXEC", Const, 0},
+ {"SYS_SETREGID", Const, 0},
+ {"SYS_SETREGID32", Const, 0},
+ {"SYS_SETRESGID", Const, 0},
+ {"SYS_SETRESGID32", Const, 0},
+ {"SYS_SETRESUID", Const, 0},
+ {"SYS_SETRESUID32", Const, 0},
+ {"SYS_SETREUID", Const, 0},
+ {"SYS_SETREUID32", Const, 0},
+ {"SYS_SETRLIMIT", Const, 0},
+ {"SYS_SETRTABLE", Const, 1},
+ {"SYS_SETSGROUPS", Const, 0},
+ {"SYS_SETSID", Const, 0},
+ {"SYS_SETSOCKOPT", Const, 0},
+ {"SYS_SETTID", Const, 0},
+ {"SYS_SETTID_WITH_PID", Const, 0},
+ {"SYS_SETTIMEOFDAY", Const, 0},
+ {"SYS_SETUID", Const, 0},
+ {"SYS_SETUID32", Const, 0},
+ {"SYS_SETWGROUPS", Const, 0},
+ {"SYS_SETXATTR", Const, 0},
+ {"SYS_SET_MEMPOLICY", Const, 0},
+ {"SYS_SET_ROBUST_LIST", Const, 0},
+ {"SYS_SET_THREAD_AREA", Const, 0},
+ {"SYS_SET_TID_ADDRESS", Const, 0},
+ {"SYS_SGETMASK", Const, 0},
+ {"SYS_SHARED_REGION_CHECK_NP", Const, 0},
+ {"SYS_SHARED_REGION_MAP_AND_SLIDE_NP", Const, 0},
+ {"SYS_SHMAT", Const, 0},
+ {"SYS_SHMCTL", Const, 0},
+ {"SYS_SHMDT", Const, 0},
+ {"SYS_SHMGET", Const, 0},
+ {"SYS_SHMSYS", Const, 0},
+ {"SYS_SHM_OPEN", Const, 0},
+ {"SYS_SHM_UNLINK", Const, 0},
+ {"SYS_SHUTDOWN", Const, 0},
+ {"SYS_SIGACTION", Const, 0},
+ {"SYS_SIGALTSTACK", Const, 0},
+ {"SYS_SIGNAL", Const, 0},
+ {"SYS_SIGNALFD", Const, 0},
+ {"SYS_SIGNALFD4", Const, 0},
+ {"SYS_SIGPENDING", Const, 0},
+ {"SYS_SIGPROCMASK", Const, 0},
+ {"SYS_SIGQUEUE", Const, 0},
+ {"SYS_SIGQUEUEINFO", Const, 1},
+ {"SYS_SIGRETURN", Const, 0},
+ {"SYS_SIGSUSPEND", Const, 0},
+ {"SYS_SIGSUSPEND_NOCANCEL", Const, 0},
+ {"SYS_SIGTIMEDWAIT", Const, 0},
+ {"SYS_SIGWAIT", Const, 0},
+ {"SYS_SIGWAITINFO", Const, 0},
+ {"SYS_SOCKET", Const, 0},
+ {"SYS_SOCKETCALL", Const, 0},
+ {"SYS_SOCKETPAIR", Const, 0},
+ {"SYS_SPLICE", Const, 0},
+ {"SYS_SSETMASK", Const, 0},
+ {"SYS_SSTK", Const, 0},
+ {"SYS_STACK_SNAPSHOT", Const, 0},
+ {"SYS_STAT", Const, 0},
+ {"SYS_STAT64", Const, 0},
+ {"SYS_STAT64_EXTENDED", Const, 0},
+ {"SYS_STATFS", Const, 0},
+ {"SYS_STATFS64", Const, 0},
+ {"SYS_STATV", Const, 0},
+ {"SYS_STATVFS1", Const, 1},
+ {"SYS_STAT_EXTENDED", Const, 0},
+ {"SYS_STIME", Const, 0},
+ {"SYS_STTY", Const, 0},
+ {"SYS_SWAPCONTEXT", Const, 0},
+ {"SYS_SWAPCTL", Const, 1},
+ {"SYS_SWAPOFF", Const, 0},
+ {"SYS_SWAPON", Const, 0},
+ {"SYS_SYMLINK", Const, 0},
+ {"SYS_SYMLINKAT", Const, 0},
+ {"SYS_SYNC", Const, 0},
+ {"SYS_SYNCFS", Const, 0},
+ {"SYS_SYNC_FILE_RANGE", Const, 0},
+ {"SYS_SYSARCH", Const, 0},
+ {"SYS_SYSCALL", Const, 0},
+ {"SYS_SYSCALL_BASE", Const, 0},
+ {"SYS_SYSFS", Const, 0},
+ {"SYS_SYSINFO", Const, 0},
+ {"SYS_SYSLOG", Const, 0},
+ {"SYS_TEE", Const, 0},
+ {"SYS_TGKILL", Const, 0},
+ {"SYS_THREAD_SELFID", Const, 0},
+ {"SYS_THR_CREATE", Const, 0},
+ {"SYS_THR_EXIT", Const, 0},
+ {"SYS_THR_KILL", Const, 0},
+ {"SYS_THR_KILL2", Const, 0},
+ {"SYS_THR_NEW", Const, 0},
+ {"SYS_THR_SELF", Const, 0},
+ {"SYS_THR_SET_NAME", Const, 0},
+ {"SYS_THR_SUSPEND", Const, 0},
+ {"SYS_THR_WAKE", Const, 0},
+ {"SYS_TIME", Const, 0},
+ {"SYS_TIMERFD_CREATE", Const, 0},
+ {"SYS_TIMERFD_GETTIME", Const, 0},
+ {"SYS_TIMERFD_SETTIME", Const, 0},
+ {"SYS_TIMER_CREATE", Const, 0},
+ {"SYS_TIMER_DELETE", Const, 0},
+ {"SYS_TIMER_GETOVERRUN", Const, 0},
+ {"SYS_TIMER_GETTIME", Const, 0},
+ {"SYS_TIMER_SETTIME", Const, 0},
+ {"SYS_TIMES", Const, 0},
+ {"SYS_TKILL", Const, 0},
+ {"SYS_TRUNCATE", Const, 0},
+ {"SYS_TRUNCATE64", Const, 0},
+ {"SYS_TUXCALL", Const, 0},
+ {"SYS_UGETRLIMIT", Const, 0},
+ {"SYS_ULIMIT", Const, 0},
+ {"SYS_UMASK", Const, 0},
+ {"SYS_UMASK_EXTENDED", Const, 0},
+ {"SYS_UMOUNT", Const, 0},
+ {"SYS_UMOUNT2", Const, 0},
+ {"SYS_UNAME", Const, 0},
+ {"SYS_UNDELETE", Const, 0},
+ {"SYS_UNLINK", Const, 0},
+ {"SYS_UNLINKAT", Const, 0},
+ {"SYS_UNMOUNT", Const, 0},
+ {"SYS_UNSHARE", Const, 0},
+ {"SYS_USELIB", Const, 0},
+ {"SYS_USTAT", Const, 0},
+ {"SYS_UTIME", Const, 0},
+ {"SYS_UTIMENSAT", Const, 0},
+ {"SYS_UTIMES", Const, 0},
+ {"SYS_UTRACE", Const, 0},
+ {"SYS_UUIDGEN", Const, 0},
+ {"SYS_VADVISE", Const, 1},
+ {"SYS_VFORK", Const, 0},
+ {"SYS_VHANGUP", Const, 0},
+ {"SYS_VM86", Const, 0},
+ {"SYS_VM86OLD", Const, 0},
+ {"SYS_VMSPLICE", Const, 0},
+ {"SYS_VM_PRESSURE_MONITOR", Const, 0},
+ {"SYS_VSERVER", Const, 0},
+ {"SYS_WAIT4", Const, 0},
+ {"SYS_WAIT4_NOCANCEL", Const, 0},
+ {"SYS_WAIT6", Const, 1},
+ {"SYS_WAITEVENT", Const, 0},
+ {"SYS_WAITID", Const, 0},
+ {"SYS_WAITID_NOCANCEL", Const, 0},
+ {"SYS_WAITPID", Const, 0},
+ {"SYS_WATCHEVENT", Const, 0},
+ {"SYS_WORKQ_KERNRETURN", Const, 0},
+ {"SYS_WORKQ_OPEN", Const, 0},
+ {"SYS_WRITE", Const, 0},
+ {"SYS_WRITEV", Const, 0},
+ {"SYS_WRITEV_NOCANCEL", Const, 0},
+ {"SYS_WRITE_NOCANCEL", Const, 0},
+ {"SYS_YIELD", Const, 0},
+ {"SYS__LLSEEK", Const, 0},
+ {"SYS__LWP_CONTINUE", Const, 1},
+ {"SYS__LWP_CREATE", Const, 1},
+ {"SYS__LWP_CTL", Const, 1},
+ {"SYS__LWP_DETACH", Const, 1},
+ {"SYS__LWP_EXIT", Const, 1},
+ {"SYS__LWP_GETNAME", Const, 1},
+ {"SYS__LWP_GETPRIVATE", Const, 1},
+ {"SYS__LWP_KILL", Const, 1},
+ {"SYS__LWP_PARK", Const, 1},
+ {"SYS__LWP_SELF", Const, 1},
+ {"SYS__LWP_SETNAME", Const, 1},
+ {"SYS__LWP_SETPRIVATE", Const, 1},
+ {"SYS__LWP_SUSPEND", Const, 1},
+ {"SYS__LWP_UNPARK", Const, 1},
+ {"SYS__LWP_UNPARK_ALL", Const, 1},
+ {"SYS__LWP_WAIT", Const, 1},
+ {"SYS__LWP_WAKEUP", Const, 1},
+ {"SYS__NEWSELECT", Const, 0},
+ {"SYS__PSET_BIND", Const, 1},
+ {"SYS__SCHED_GETAFFINITY", Const, 1},
+ {"SYS__SCHED_GETPARAM", Const, 1},
+ {"SYS__SCHED_SETAFFINITY", Const, 1},
+ {"SYS__SCHED_SETPARAM", Const, 1},
+ {"SYS__SYSCTL", Const, 0},
+ {"SYS__UMTX_LOCK", Const, 0},
+ {"SYS__UMTX_OP", Const, 0},
+ {"SYS__UMTX_UNLOCK", Const, 0},
+ {"SYS___ACL_ACLCHECK_FD", Const, 0},
+ {"SYS___ACL_ACLCHECK_FILE", Const, 0},
+ {"SYS___ACL_ACLCHECK_LINK", Const, 0},
+ {"SYS___ACL_DELETE_FD", Const, 0},
+ {"SYS___ACL_DELETE_FILE", Const, 0},
+ {"SYS___ACL_DELETE_LINK", Const, 0},
+ {"SYS___ACL_GET_FD", Const, 0},
+ {"SYS___ACL_GET_FILE", Const, 0},
+ {"SYS___ACL_GET_LINK", Const, 0},
+ {"SYS___ACL_SET_FD", Const, 0},
+ {"SYS___ACL_SET_FILE", Const, 0},
+ {"SYS___ACL_SET_LINK", Const, 0},
+ {"SYS___CAP_RIGHTS_GET", Const, 14},
+ {"SYS___CLONE", Const, 1},
+ {"SYS___DISABLE_THREADSIGNAL", Const, 0},
+ {"SYS___GETCWD", Const, 0},
+ {"SYS___GETLOGIN", Const, 1},
+ {"SYS___GET_TCB", Const, 1},
+ {"SYS___MAC_EXECVE", Const, 0},
+ {"SYS___MAC_GETFSSTAT", Const, 0},
+ {"SYS___MAC_GET_FD", Const, 0},
+ {"SYS___MAC_GET_FILE", Const, 0},
+ {"SYS___MAC_GET_LCID", Const, 0},
+ {"SYS___MAC_GET_LCTX", Const, 0},
+ {"SYS___MAC_GET_LINK", Const, 0},
+ {"SYS___MAC_GET_MOUNT", Const, 0},
+ {"SYS___MAC_GET_PID", Const, 0},
+ {"SYS___MAC_GET_PROC", Const, 0},
+ {"SYS___MAC_MOUNT", Const, 0},
+ {"SYS___MAC_SET_FD", Const, 0},
+ {"SYS___MAC_SET_FILE", Const, 0},
+ {"SYS___MAC_SET_LCTX", Const, 0},
+ {"SYS___MAC_SET_LINK", Const, 0},
+ {"SYS___MAC_SET_PROC", Const, 0},
+ {"SYS___MAC_SYSCALL", Const, 0},
+ {"SYS___OLD_SEMWAIT_SIGNAL", Const, 0},
+ {"SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL", Const, 0},
+ {"SYS___POSIX_CHOWN", Const, 1},
+ {"SYS___POSIX_FCHOWN", Const, 1},
+ {"SYS___POSIX_LCHOWN", Const, 1},
+ {"SYS___POSIX_RENAME", Const, 1},
+ {"SYS___PTHREAD_CANCELED", Const, 0},
+ {"SYS___PTHREAD_CHDIR", Const, 0},
+ {"SYS___PTHREAD_FCHDIR", Const, 0},
+ {"SYS___PTHREAD_KILL", Const, 0},
+ {"SYS___PTHREAD_MARKCANCEL", Const, 0},
+ {"SYS___PTHREAD_SIGMASK", Const, 0},
+ {"SYS___QUOTACTL", Const, 1},
+ {"SYS___SEMCTL", Const, 1},
+ {"SYS___SEMWAIT_SIGNAL", Const, 0},
+ {"SYS___SEMWAIT_SIGNAL_NOCANCEL", Const, 0},
+ {"SYS___SETLOGIN", Const, 1},
+ {"SYS___SETUGID", Const, 0},
+ {"SYS___SET_TCB", Const, 1},
+ {"SYS___SIGACTION_SIGTRAMP", Const, 1},
+ {"SYS___SIGTIMEDWAIT", Const, 1},
+ {"SYS___SIGWAIT", Const, 0},
+ {"SYS___SIGWAIT_NOCANCEL", Const, 0},
+ {"SYS___SYSCTL", Const, 0},
+ {"SYS___TFORK", Const, 1},
+ {"SYS___THREXIT", Const, 1},
+ {"SYS___THRSIGDIVERT", Const, 1},
+ {"SYS___THRSLEEP", Const, 1},
+ {"SYS___THRWAKEUP", Const, 1},
+ {"S_ARCH1", Const, 1},
+ {"S_ARCH2", Const, 1},
+ {"S_BLKSIZE", Const, 0},
+ {"S_IEXEC", Const, 0},
+ {"S_IFBLK", Const, 0},
+ {"S_IFCHR", Const, 0},
+ {"S_IFDIR", Const, 0},
+ {"S_IFIFO", Const, 0},
+ {"S_IFLNK", Const, 0},
+ {"S_IFMT", Const, 0},
+ {"S_IFREG", Const, 0},
+ {"S_IFSOCK", Const, 0},
+ {"S_IFWHT", Const, 0},
+ {"S_IREAD", Const, 0},
+ {"S_IRGRP", Const, 0},
+ {"S_IROTH", Const, 0},
+ {"S_IRUSR", Const, 0},
+ {"S_IRWXG", Const, 0},
+ {"S_IRWXO", Const, 0},
+ {"S_IRWXU", Const, 0},
+ {"S_ISGID", Const, 0},
+ {"S_ISTXT", Const, 0},
+ {"S_ISUID", Const, 0},
+ {"S_ISVTX", Const, 0},
+ {"S_IWGRP", Const, 0},
+ {"S_IWOTH", Const, 0},
+ {"S_IWRITE", Const, 0},
+ {"S_IWUSR", Const, 0},
+ {"S_IXGRP", Const, 0},
+ {"S_IXOTH", Const, 0},
+ {"S_IXUSR", Const, 0},
+ {"S_LOGIN_SET", Const, 1},
+ {"SecurityAttributes", Type, 0},
+ {"SecurityAttributes.InheritHandle", Field, 0},
+ {"SecurityAttributes.Length", Field, 0},
+ {"SecurityAttributes.SecurityDescriptor", Field, 0},
+ {"Seek", Func, 0},
+ {"Select", Func, 0},
+ {"Sendfile", Func, 0},
+ {"Sendmsg", Func, 0},
+ {"SendmsgN", Func, 3},
+ {"Sendto", Func, 0},
+ {"Servent", Type, 0},
+ {"Servent.Aliases", Field, 0},
+ {"Servent.Name", Field, 0},
+ {"Servent.Port", Field, 0},
+ {"Servent.Proto", Field, 0},
+ {"SetBpf", Func, 0},
+ {"SetBpfBuflen", Func, 0},
+ {"SetBpfDatalink", Func, 0},
+ {"SetBpfHeadercmpl", Func, 0},
+ {"SetBpfImmediate", Func, 0},
+ {"SetBpfInterface", Func, 0},
+ {"SetBpfPromisc", Func, 0},
+ {"SetBpfTimeout", Func, 0},
+ {"SetCurrentDirectory", Func, 0},
+ {"SetEndOfFile", Func, 0},
+ {"SetEnvironmentVariable", Func, 0},
+ {"SetFileAttributes", Func, 0},
+ {"SetFileCompletionNotificationModes", Func, 2},
+ {"SetFilePointer", Func, 0},
+ {"SetFileTime", Func, 0},
+ {"SetHandleInformation", Func, 0},
+ {"SetKevent", Func, 0},
+ {"SetLsfPromisc", Func, 0},
+ {"SetNonblock", Func, 0},
+ {"Setdomainname", Func, 0},
+ {"Setegid", Func, 0},
+ {"Setenv", Func, 0},
+ {"Seteuid", Func, 0},
+ {"Setfsgid", Func, 0},
+ {"Setfsuid", Func, 0},
+ {"Setgid", Func, 0},
+ {"Setgroups", Func, 0},
+ {"Sethostname", Func, 0},
+ {"Setlogin", Func, 0},
+ {"Setpgid", Func, 0},
+ {"Setpriority", Func, 0},
+ {"Setprivexec", Func, 0},
+ {"Setregid", Func, 0},
+ {"Setresgid", Func, 0},
+ {"Setresuid", Func, 0},
+ {"Setreuid", Func, 0},
+ {"Setrlimit", Func, 0},
+ {"Setsid", Func, 0},
+ {"Setsockopt", Func, 0},
+ {"SetsockoptByte", Func, 0},
+ {"SetsockoptICMPv6Filter", Func, 2},
+ {"SetsockoptIPMreq", Func, 0},
+ {"SetsockoptIPMreqn", Func, 0},
+ {"SetsockoptIPv6Mreq", Func, 0},
+ {"SetsockoptInet4Addr", Func, 0},
+ {"SetsockoptInt", Func, 0},
+ {"SetsockoptLinger", Func, 0},
+ {"SetsockoptString", Func, 0},
+ {"SetsockoptTimeval", Func, 0},
+ {"Settimeofday", Func, 0},
+ {"Setuid", Func, 0},
+ {"Setxattr", Func, 1},
+ {"Shutdown", Func, 0},
+ {"SidTypeAlias", Const, 0},
+ {"SidTypeComputer", Const, 0},
+ {"SidTypeDeletedAccount", Const, 0},
+ {"SidTypeDomain", Const, 0},
+ {"SidTypeGroup", Const, 0},
+ {"SidTypeInvalid", Const, 0},
+ {"SidTypeLabel", Const, 0},
+ {"SidTypeUnknown", Const, 0},
+ {"SidTypeUser", Const, 0},
+ {"SidTypeWellKnownGroup", Const, 0},
+ {"Signal", Type, 0},
+ {"SizeofBpfHdr", Const, 0},
+ {"SizeofBpfInsn", Const, 0},
+ {"SizeofBpfProgram", Const, 0},
+ {"SizeofBpfStat", Const, 0},
+ {"SizeofBpfVersion", Const, 0},
+ {"SizeofBpfZbuf", Const, 0},
+ {"SizeofBpfZbufHeader", Const, 0},
+ {"SizeofCmsghdr", Const, 0},
+ {"SizeofICMPv6Filter", Const, 2},
+ {"SizeofIPMreq", Const, 0},
+ {"SizeofIPMreqn", Const, 0},
+ {"SizeofIPv6MTUInfo", Const, 2},
+ {"SizeofIPv6Mreq", Const, 0},
+ {"SizeofIfAddrmsg", Const, 0},
+ {"SizeofIfAnnounceMsghdr", Const, 1},
+ {"SizeofIfData", Const, 0},
+ {"SizeofIfInfomsg", Const, 0},
+ {"SizeofIfMsghdr", Const, 0},
+ {"SizeofIfaMsghdr", Const, 0},
+ {"SizeofIfmaMsghdr", Const, 0},
+ {"SizeofIfmaMsghdr2", Const, 0},
+ {"SizeofInet4Pktinfo", Const, 0},
+ {"SizeofInet6Pktinfo", Const, 0},
+ {"SizeofInotifyEvent", Const, 0},
+ {"SizeofLinger", Const, 0},
+ {"SizeofMsghdr", Const, 0},
+ {"SizeofNlAttr", Const, 0},
+ {"SizeofNlMsgerr", Const, 0},
+ {"SizeofNlMsghdr", Const, 0},
+ {"SizeofRtAttr", Const, 0},
+ {"SizeofRtGenmsg", Const, 0},
+ {"SizeofRtMetrics", Const, 0},
+ {"SizeofRtMsg", Const, 0},
+ {"SizeofRtMsghdr", Const, 0},
+ {"SizeofRtNexthop", Const, 0},
+ {"SizeofSockFilter", Const, 0},
+ {"SizeofSockFprog", Const, 0},
+ {"SizeofSockaddrAny", Const, 0},
+ {"SizeofSockaddrDatalink", Const, 0},
+ {"SizeofSockaddrInet4", Const, 0},
+ {"SizeofSockaddrInet6", Const, 0},
+ {"SizeofSockaddrLinklayer", Const, 0},
+ {"SizeofSockaddrNetlink", Const, 0},
+ {"SizeofSockaddrUnix", Const, 0},
+ {"SizeofTCPInfo", Const, 1},
+ {"SizeofUcred", Const, 0},
+ {"SlicePtrFromStrings", Func, 1},
+ {"SockFilter", Type, 0},
+ {"SockFilter.Code", Field, 0},
+ {"SockFilter.Jf", Field, 0},
+ {"SockFilter.Jt", Field, 0},
+ {"SockFilter.K", Field, 0},
+ {"SockFprog", Type, 0},
+ {"SockFprog.Filter", Field, 0},
+ {"SockFprog.Len", Field, 0},
+ {"SockFprog.Pad_cgo_0", Field, 0},
+ {"Sockaddr", Type, 0},
+ {"SockaddrDatalink", Type, 0},
+ {"SockaddrDatalink.Alen", Field, 0},
+ {"SockaddrDatalink.Data", Field, 0},
+ {"SockaddrDatalink.Family", Field, 0},
+ {"SockaddrDatalink.Index", Field, 0},
+ {"SockaddrDatalink.Len", Field, 0},
+ {"SockaddrDatalink.Nlen", Field, 0},
+ {"SockaddrDatalink.Slen", Field, 0},
+ {"SockaddrDatalink.Type", Field, 0},
+ {"SockaddrGen", Type, 0},
+ {"SockaddrInet4", Type, 0},
+ {"SockaddrInet4.Addr", Field, 0},
+ {"SockaddrInet4.Port", Field, 0},
+ {"SockaddrInet6", Type, 0},
+ {"SockaddrInet6.Addr", Field, 0},
+ {"SockaddrInet6.Port", Field, 0},
+ {"SockaddrInet6.ZoneId", Field, 0},
+ {"SockaddrLinklayer", Type, 0},
+ {"SockaddrLinklayer.Addr", Field, 0},
+ {"SockaddrLinklayer.Halen", Field, 0},
+ {"SockaddrLinklayer.Hatype", Field, 0},
+ {"SockaddrLinklayer.Ifindex", Field, 0},
+ {"SockaddrLinklayer.Pkttype", Field, 0},
+ {"SockaddrLinklayer.Protocol", Field, 0},
+ {"SockaddrNetlink", Type, 0},
+ {"SockaddrNetlink.Family", Field, 0},
+ {"SockaddrNetlink.Groups", Field, 0},
+ {"SockaddrNetlink.Pad", Field, 0},
+ {"SockaddrNetlink.Pid", Field, 0},
+ {"SockaddrUnix", Type, 0},
+ {"SockaddrUnix.Name", Field, 0},
+ {"Socket", Func, 0},
+ {"SocketControlMessage", Type, 0},
+ {"SocketControlMessage.Data", Field, 0},
+ {"SocketControlMessage.Header", Field, 0},
+ {"SocketDisableIPv6", Var, 0},
+ {"Socketpair", Func, 0},
+ {"Splice", Func, 0},
+ {"StartProcess", Func, 0},
+ {"StartupInfo", Type, 0},
+ {"StartupInfo.Cb", Field, 0},
+ {"StartupInfo.Desktop", Field, 0},
+ {"StartupInfo.FillAttribute", Field, 0},
+ {"StartupInfo.Flags", Field, 0},
+ {"StartupInfo.ShowWindow", Field, 0},
+ {"StartupInfo.StdErr", Field, 0},
+ {"StartupInfo.StdInput", Field, 0},
+ {"StartupInfo.StdOutput", Field, 0},
+ {"StartupInfo.Title", Field, 0},
+ {"StartupInfo.X", Field, 0},
+ {"StartupInfo.XCountChars", Field, 0},
+ {"StartupInfo.XSize", Field, 0},
+ {"StartupInfo.Y", Field, 0},
+ {"StartupInfo.YCountChars", Field, 0},
+ {"StartupInfo.YSize", Field, 0},
+ {"Stat", Func, 0},
+ {"Stat_t", Type, 0},
+ {"Stat_t.Atim", Field, 0},
+ {"Stat_t.Atim_ext", Field, 12},
+ {"Stat_t.Atimespec", Field, 0},
+ {"Stat_t.Birthtimespec", Field, 0},
+ {"Stat_t.Blksize", Field, 0},
+ {"Stat_t.Blocks", Field, 0},
+ {"Stat_t.Btim_ext", Field, 12},
+ {"Stat_t.Ctim", Field, 0},
+ {"Stat_t.Ctim_ext", Field, 12},
+ {"Stat_t.Ctimespec", Field, 0},
+ {"Stat_t.Dev", Field, 0},
+ {"Stat_t.Flags", Field, 0},
+ {"Stat_t.Gen", Field, 0},
+ {"Stat_t.Gid", Field, 0},
+ {"Stat_t.Ino", Field, 0},
+ {"Stat_t.Lspare", Field, 0},
+ {"Stat_t.Lspare0", Field, 2},
+ {"Stat_t.Lspare1", Field, 2},
+ {"Stat_t.Mode", Field, 0},
+ {"Stat_t.Mtim", Field, 0},
+ {"Stat_t.Mtim_ext", Field, 12},
+ {"Stat_t.Mtimespec", Field, 0},
+ {"Stat_t.Nlink", Field, 0},
+ {"Stat_t.Pad_cgo_0", Field, 0},
+ {"Stat_t.Pad_cgo_1", Field, 0},
+ {"Stat_t.Pad_cgo_2", Field, 0},
+ {"Stat_t.Padding0", Field, 12},
+ {"Stat_t.Padding1", Field, 12},
+ {"Stat_t.Qspare", Field, 0},
+ {"Stat_t.Rdev", Field, 0},
+ {"Stat_t.Size", Field, 0},
+ {"Stat_t.Spare", Field, 2},
+ {"Stat_t.Uid", Field, 0},
+ {"Stat_t.X__pad0", Field, 0},
+ {"Stat_t.X__pad1", Field, 0},
+ {"Stat_t.X__pad2", Field, 0},
+ {"Stat_t.X__st_birthtim", Field, 2},
+ {"Stat_t.X__st_ino", Field, 0},
+ {"Stat_t.X__unused", Field, 0},
+ {"Statfs", Func, 0},
+ {"Statfs_t", Type, 0},
+ {"Statfs_t.Asyncreads", Field, 0},
+ {"Statfs_t.Asyncwrites", Field, 0},
+ {"Statfs_t.Bavail", Field, 0},
+ {"Statfs_t.Bfree", Field, 0},
+ {"Statfs_t.Blocks", Field, 0},
+ {"Statfs_t.Bsize", Field, 0},
+ {"Statfs_t.Charspare", Field, 0},
+ {"Statfs_t.F_asyncreads", Field, 2},
+ {"Statfs_t.F_asyncwrites", Field, 2},
+ {"Statfs_t.F_bavail", Field, 2},
+ {"Statfs_t.F_bfree", Field, 2},
+ {"Statfs_t.F_blocks", Field, 2},
+ {"Statfs_t.F_bsize", Field, 2},
+ {"Statfs_t.F_ctime", Field, 2},
+ {"Statfs_t.F_favail", Field, 2},
+ {"Statfs_t.F_ffree", Field, 2},
+ {"Statfs_t.F_files", Field, 2},
+ {"Statfs_t.F_flags", Field, 2},
+ {"Statfs_t.F_fsid", Field, 2},
+ {"Statfs_t.F_fstypename", Field, 2},
+ {"Statfs_t.F_iosize", Field, 2},
+ {"Statfs_t.F_mntfromname", Field, 2},
+ {"Statfs_t.F_mntfromspec", Field, 3},
+ {"Statfs_t.F_mntonname", Field, 2},
+ {"Statfs_t.F_namemax", Field, 2},
+ {"Statfs_t.F_owner", Field, 2},
+ {"Statfs_t.F_spare", Field, 2},
+ {"Statfs_t.F_syncreads", Field, 2},
+ {"Statfs_t.F_syncwrites", Field, 2},
+ {"Statfs_t.Ffree", Field, 0},
+ {"Statfs_t.Files", Field, 0},
+ {"Statfs_t.Flags", Field, 0},
+ {"Statfs_t.Frsize", Field, 0},
+ {"Statfs_t.Fsid", Field, 0},
+ {"Statfs_t.Fssubtype", Field, 0},
+ {"Statfs_t.Fstypename", Field, 0},
+ {"Statfs_t.Iosize", Field, 0},
+ {"Statfs_t.Mntfromname", Field, 0},
+ {"Statfs_t.Mntonname", Field, 0},
+ {"Statfs_t.Mount_info", Field, 2},
+ {"Statfs_t.Namelen", Field, 0},
+ {"Statfs_t.Namemax", Field, 0},
+ {"Statfs_t.Owner", Field, 0},
+ {"Statfs_t.Pad_cgo_0", Field, 0},
+ {"Statfs_t.Pad_cgo_1", Field, 2},
+ {"Statfs_t.Reserved", Field, 0},
+ {"Statfs_t.Spare", Field, 0},
+ {"Statfs_t.Syncreads", Field, 0},
+ {"Statfs_t.Syncwrites", Field, 0},
+ {"Statfs_t.Type", Field, 0},
+ {"Statfs_t.Version", Field, 0},
+ {"Stderr", Var, 0},
+ {"Stdin", Var, 0},
+ {"Stdout", Var, 0},
+ {"StringBytePtr", Func, 0},
+ {"StringByteSlice", Func, 0},
+ {"StringSlicePtr", Func, 0},
+ {"StringToSid", Func, 0},
+ {"StringToUTF16", Func, 0},
+ {"StringToUTF16Ptr", Func, 0},
+ {"Symlink", Func, 0},
+ {"Sync", Func, 0},
+ {"SyncFileRange", Func, 0},
+ {"SysProcAttr", Type, 0},
+ {"SysProcAttr.AdditionalInheritedHandles", Field, 17},
+ {"SysProcAttr.AmbientCaps", Field, 9},
+ {"SysProcAttr.CgroupFD", Field, 20},
+ {"SysProcAttr.Chroot", Field, 0},
+ {"SysProcAttr.Cloneflags", Field, 2},
+ {"SysProcAttr.CmdLine", Field, 0},
+ {"SysProcAttr.CreationFlags", Field, 1},
+ {"SysProcAttr.Credential", Field, 0},
+ {"SysProcAttr.Ctty", Field, 1},
+ {"SysProcAttr.Foreground", Field, 5},
+ {"SysProcAttr.GidMappings", Field, 4},
+ {"SysProcAttr.GidMappingsEnableSetgroups", Field, 5},
+ {"SysProcAttr.HideWindow", Field, 0},
+ {"SysProcAttr.Jail", Field, 21},
+ {"SysProcAttr.NoInheritHandles", Field, 16},
+ {"SysProcAttr.Noctty", Field, 0},
+ {"SysProcAttr.ParentProcess", Field, 17},
+ {"SysProcAttr.Pdeathsig", Field, 0},
+ {"SysProcAttr.Pgid", Field, 5},
+ {"SysProcAttr.PidFD", Field, 22},
+ {"SysProcAttr.ProcessAttributes", Field, 13},
+ {"SysProcAttr.Ptrace", Field, 0},
+ {"SysProcAttr.Setctty", Field, 0},
+ {"SysProcAttr.Setpgid", Field, 0},
+ {"SysProcAttr.Setsid", Field, 0},
+ {"SysProcAttr.ThreadAttributes", Field, 13},
+ {"SysProcAttr.Token", Field, 10},
+ {"SysProcAttr.UidMappings", Field, 4},
+ {"SysProcAttr.Unshareflags", Field, 7},
+ {"SysProcAttr.UseCgroupFD", Field, 20},
+ {"SysProcIDMap", Type, 4},
+ {"SysProcIDMap.ContainerID", Field, 4},
+ {"SysProcIDMap.HostID", Field, 4},
+ {"SysProcIDMap.Size", Field, 4},
+ {"Syscall", Func, 0},
+ {"Syscall12", Func, 0},
+ {"Syscall15", Func, 0},
+ {"Syscall18", Func, 12},
+ {"Syscall6", Func, 0},
+ {"Syscall9", Func, 0},
+ {"SyscallN", Func, 18},
+ {"Sysctl", Func, 0},
+ {"SysctlUint32", Func, 0},
+ {"Sysctlnode", Type, 2},
+ {"Sysctlnode.Flags", Field, 2},
+ {"Sysctlnode.Name", Field, 2},
+ {"Sysctlnode.Num", Field, 2},
+ {"Sysctlnode.Un", Field, 2},
+ {"Sysctlnode.Ver", Field, 2},
+ {"Sysctlnode.X__rsvd", Field, 2},
+ {"Sysctlnode.X_sysctl_desc", Field, 2},
+ {"Sysctlnode.X_sysctl_func", Field, 2},
+ {"Sysctlnode.X_sysctl_parent", Field, 2},
+ {"Sysctlnode.X_sysctl_size", Field, 2},
+ {"Sysinfo", Func, 0},
+ {"Sysinfo_t", Type, 0},
+ {"Sysinfo_t.Bufferram", Field, 0},
+ {"Sysinfo_t.Freehigh", Field, 0},
+ {"Sysinfo_t.Freeram", Field, 0},
+ {"Sysinfo_t.Freeswap", Field, 0},
+ {"Sysinfo_t.Loads", Field, 0},
+ {"Sysinfo_t.Pad", Field, 0},
+ {"Sysinfo_t.Pad_cgo_0", Field, 0},
+ {"Sysinfo_t.Pad_cgo_1", Field, 0},
+ {"Sysinfo_t.Procs", Field, 0},
+ {"Sysinfo_t.Sharedram", Field, 0},
+ {"Sysinfo_t.Totalhigh", Field, 0},
+ {"Sysinfo_t.Totalram", Field, 0},
+ {"Sysinfo_t.Totalswap", Field, 0},
+ {"Sysinfo_t.Unit", Field, 0},
+ {"Sysinfo_t.Uptime", Field, 0},
+ {"Sysinfo_t.X_f", Field, 0},
+ {"Systemtime", Type, 0},
+ {"Systemtime.Day", Field, 0},
+ {"Systemtime.DayOfWeek", Field, 0},
+ {"Systemtime.Hour", Field, 0},
+ {"Systemtime.Milliseconds", Field, 0},
+ {"Systemtime.Minute", Field, 0},
+ {"Systemtime.Month", Field, 0},
+ {"Systemtime.Second", Field, 0},
+ {"Systemtime.Year", Field, 0},
+ {"TCGETS", Const, 0},
+ {"TCIFLUSH", Const, 1},
+ {"TCIOFLUSH", Const, 1},
+ {"TCOFLUSH", Const, 1},
+ {"TCPInfo", Type, 1},
+ {"TCPInfo.Advmss", Field, 1},
+ {"TCPInfo.Ato", Field, 1},
+ {"TCPInfo.Backoff", Field, 1},
+ {"TCPInfo.Ca_state", Field, 1},
+ {"TCPInfo.Fackets", Field, 1},
+ {"TCPInfo.Last_ack_recv", Field, 1},
+ {"TCPInfo.Last_ack_sent", Field, 1},
+ {"TCPInfo.Last_data_recv", Field, 1},
+ {"TCPInfo.Last_data_sent", Field, 1},
+ {"TCPInfo.Lost", Field, 1},
+ {"TCPInfo.Options", Field, 1},
+ {"TCPInfo.Pad_cgo_0", Field, 1},
+ {"TCPInfo.Pmtu", Field, 1},
+ {"TCPInfo.Probes", Field, 1},
+ {"TCPInfo.Rcv_mss", Field, 1},
+ {"TCPInfo.Rcv_rtt", Field, 1},
+ {"TCPInfo.Rcv_space", Field, 1},
+ {"TCPInfo.Rcv_ssthresh", Field, 1},
+ {"TCPInfo.Reordering", Field, 1},
+ {"TCPInfo.Retrans", Field, 1},
+ {"TCPInfo.Retransmits", Field, 1},
+ {"TCPInfo.Rto", Field, 1},
+ {"TCPInfo.Rtt", Field, 1},
+ {"TCPInfo.Rttvar", Field, 1},
+ {"TCPInfo.Sacked", Field, 1},
+ {"TCPInfo.Snd_cwnd", Field, 1},
+ {"TCPInfo.Snd_mss", Field, 1},
+ {"TCPInfo.Snd_ssthresh", Field, 1},
+ {"TCPInfo.State", Field, 1},
+ {"TCPInfo.Total_retrans", Field, 1},
+ {"TCPInfo.Unacked", Field, 1},
+ {"TCPKeepalive", Type, 3},
+ {"TCPKeepalive.Interval", Field, 3},
+ {"TCPKeepalive.OnOff", Field, 3},
+ {"TCPKeepalive.Time", Field, 3},
+ {"TCP_CA_NAME_MAX", Const, 0},
+ {"TCP_CONGCTL", Const, 1},
+ {"TCP_CONGESTION", Const, 0},
+ {"TCP_CONNECTIONTIMEOUT", Const, 0},
+ {"TCP_CORK", Const, 0},
+ {"TCP_DEFER_ACCEPT", Const, 0},
+ {"TCP_ENABLE_ECN", Const, 16},
+ {"TCP_INFO", Const, 0},
+ {"TCP_KEEPALIVE", Const, 0},
+ {"TCP_KEEPCNT", Const, 0},
+ {"TCP_KEEPIDLE", Const, 0},
+ {"TCP_KEEPINIT", Const, 1},
+ {"TCP_KEEPINTVL", Const, 0},
+ {"TCP_LINGER2", Const, 0},
+ {"TCP_MAXBURST", Const, 0},
+ {"TCP_MAXHLEN", Const, 0},
+ {"TCP_MAXOLEN", Const, 0},
+ {"TCP_MAXSEG", Const, 0},
+ {"TCP_MAXWIN", Const, 0},
+ {"TCP_MAX_SACK", Const, 0},
+ {"TCP_MAX_WINSHIFT", Const, 0},
+ {"TCP_MD5SIG", Const, 0},
+ {"TCP_MD5SIG_MAXKEYLEN", Const, 0},
+ {"TCP_MINMSS", Const, 0},
+ {"TCP_MINMSSOVERLOAD", Const, 0},
+ {"TCP_MSS", Const, 0},
+ {"TCP_NODELAY", Const, 0},
+ {"TCP_NOOPT", Const, 0},
+ {"TCP_NOPUSH", Const, 0},
+ {"TCP_NOTSENT_LOWAT", Const, 16},
+ {"TCP_NSTATES", Const, 1},
+ {"TCP_QUICKACK", Const, 0},
+ {"TCP_RXT_CONNDROPTIME", Const, 0},
+ {"TCP_RXT_FINDROP", Const, 0},
+ {"TCP_SACK_ENABLE", Const, 1},
+ {"TCP_SENDMOREACKS", Const, 16},
+ {"TCP_SYNCNT", Const, 0},
+ {"TCP_VENDOR", Const, 3},
+ {"TCP_WINDOW_CLAMP", Const, 0},
+ {"TCSAFLUSH", Const, 1},
+ {"TCSETS", Const, 0},
+ {"TF_DISCONNECT", Const, 0},
+ {"TF_REUSE_SOCKET", Const, 0},
+ {"TF_USE_DEFAULT_WORKER", Const, 0},
+ {"TF_USE_KERNEL_APC", Const, 0},
+ {"TF_USE_SYSTEM_THREAD", Const, 0},
+ {"TF_WRITE_BEHIND", Const, 0},
+ {"TH32CS_INHERIT", Const, 4},
+ {"TH32CS_SNAPALL", Const, 4},
+ {"TH32CS_SNAPHEAPLIST", Const, 4},
+ {"TH32CS_SNAPMODULE", Const, 4},
+ {"TH32CS_SNAPMODULE32", Const, 4},
+ {"TH32CS_SNAPPROCESS", Const, 4},
+ {"TH32CS_SNAPTHREAD", Const, 4},
+ {"TIME_ZONE_ID_DAYLIGHT", Const, 0},
+ {"TIME_ZONE_ID_STANDARD", Const, 0},
+ {"TIME_ZONE_ID_UNKNOWN", Const, 0},
+ {"TIOCCBRK", Const, 0},
+ {"TIOCCDTR", Const, 0},
+ {"TIOCCONS", Const, 0},
+ {"TIOCDCDTIMESTAMP", Const, 0},
+ {"TIOCDRAIN", Const, 0},
+ {"TIOCDSIMICROCODE", Const, 0},
+ {"TIOCEXCL", Const, 0},
+ {"TIOCEXT", Const, 0},
+ {"TIOCFLAG_CDTRCTS", Const, 1},
+ {"TIOCFLAG_CLOCAL", Const, 1},
+ {"TIOCFLAG_CRTSCTS", Const, 1},
+ {"TIOCFLAG_MDMBUF", Const, 1},
+ {"TIOCFLAG_PPS", Const, 1},
+ {"TIOCFLAG_SOFTCAR", Const, 1},
+ {"TIOCFLUSH", Const, 0},
+ {"TIOCGDEV", Const, 0},
+ {"TIOCGDRAINWAIT", Const, 0},
+ {"TIOCGETA", Const, 0},
+ {"TIOCGETD", Const, 0},
+ {"TIOCGFLAGS", Const, 1},
+ {"TIOCGICOUNT", Const, 0},
+ {"TIOCGLCKTRMIOS", Const, 0},
+ {"TIOCGLINED", Const, 1},
+ {"TIOCGPGRP", Const, 0},
+ {"TIOCGPTN", Const, 0},
+ {"TIOCGQSIZE", Const, 1},
+ {"TIOCGRANTPT", Const, 1},
+ {"TIOCGRS485", Const, 0},
+ {"TIOCGSERIAL", Const, 0},
+ {"TIOCGSID", Const, 0},
+ {"TIOCGSIZE", Const, 1},
+ {"TIOCGSOFTCAR", Const, 0},
+ {"TIOCGTSTAMP", Const, 1},
+ {"TIOCGWINSZ", Const, 0},
+ {"TIOCINQ", Const, 0},
+ {"TIOCIXOFF", Const, 0},
+ {"TIOCIXON", Const, 0},
+ {"TIOCLINUX", Const, 0},
+ {"TIOCMBIC", Const, 0},
+ {"TIOCMBIS", Const, 0},
+ {"TIOCMGDTRWAIT", Const, 0},
+ {"TIOCMGET", Const, 0},
+ {"TIOCMIWAIT", Const, 0},
+ {"TIOCMODG", Const, 0},
+ {"TIOCMODS", Const, 0},
+ {"TIOCMSDTRWAIT", Const, 0},
+ {"TIOCMSET", Const, 0},
+ {"TIOCM_CAR", Const, 0},
+ {"TIOCM_CD", Const, 0},
+ {"TIOCM_CTS", Const, 0},
+ {"TIOCM_DCD", Const, 0},
+ {"TIOCM_DSR", Const, 0},
+ {"TIOCM_DTR", Const, 0},
+ {"TIOCM_LE", Const, 0},
+ {"TIOCM_RI", Const, 0},
+ {"TIOCM_RNG", Const, 0},
+ {"TIOCM_RTS", Const, 0},
+ {"TIOCM_SR", Const, 0},
+ {"TIOCM_ST", Const, 0},
+ {"TIOCNOTTY", Const, 0},
+ {"TIOCNXCL", Const, 0},
+ {"TIOCOUTQ", Const, 0},
+ {"TIOCPKT", Const, 0},
+ {"TIOCPKT_DATA", Const, 0},
+ {"TIOCPKT_DOSTOP", Const, 0},
+ {"TIOCPKT_FLUSHREAD", Const, 0},
+ {"TIOCPKT_FLUSHWRITE", Const, 0},
+ {"TIOCPKT_IOCTL", Const, 0},
+ {"TIOCPKT_NOSTOP", Const, 0},
+ {"TIOCPKT_START", Const, 0},
+ {"TIOCPKT_STOP", Const, 0},
+ {"TIOCPTMASTER", Const, 0},
+ {"TIOCPTMGET", Const, 1},
+ {"TIOCPTSNAME", Const, 1},
+ {"TIOCPTYGNAME", Const, 0},
+ {"TIOCPTYGRANT", Const, 0},
+ {"TIOCPTYUNLK", Const, 0},
+ {"TIOCRCVFRAME", Const, 1},
+ {"TIOCREMOTE", Const, 0},
+ {"TIOCSBRK", Const, 0},
+ {"TIOCSCONS", Const, 0},
+ {"TIOCSCTTY", Const, 0},
+ {"TIOCSDRAINWAIT", Const, 0},
+ {"TIOCSDTR", Const, 0},
+ {"TIOCSERCONFIG", Const, 0},
+ {"TIOCSERGETLSR", Const, 0},
+ {"TIOCSERGETMULTI", Const, 0},
+ {"TIOCSERGSTRUCT", Const, 0},
+ {"TIOCSERGWILD", Const, 0},
+ {"TIOCSERSETMULTI", Const, 0},
+ {"TIOCSERSWILD", Const, 0},
+ {"TIOCSER_TEMT", Const, 0},
+ {"TIOCSETA", Const, 0},
+ {"TIOCSETAF", Const, 0},
+ {"TIOCSETAW", Const, 0},
+ {"TIOCSETD", Const, 0},
+ {"TIOCSFLAGS", Const, 1},
+ {"TIOCSIG", Const, 0},
+ {"TIOCSLCKTRMIOS", Const, 0},
+ {"TIOCSLINED", Const, 1},
+ {"TIOCSPGRP", Const, 0},
+ {"TIOCSPTLCK", Const, 0},
+ {"TIOCSQSIZE", Const, 1},
+ {"TIOCSRS485", Const, 0},
+ {"TIOCSSERIAL", Const, 0},
+ {"TIOCSSIZE", Const, 1},
+ {"TIOCSSOFTCAR", Const, 0},
+ {"TIOCSTART", Const, 0},
+ {"TIOCSTAT", Const, 0},
+ {"TIOCSTI", Const, 0},
+ {"TIOCSTOP", Const, 0},
+ {"TIOCSTSTAMP", Const, 1},
+ {"TIOCSWINSZ", Const, 0},
+ {"TIOCTIMESTAMP", Const, 0},
+ {"TIOCUCNTL", Const, 0},
+ {"TIOCVHANGUP", Const, 0},
+ {"TIOCXMTFRAME", Const, 1},
+ {"TOKEN_ADJUST_DEFAULT", Const, 0},
+ {"TOKEN_ADJUST_GROUPS", Const, 0},
+ {"TOKEN_ADJUST_PRIVILEGES", Const, 0},
+ {"TOKEN_ADJUST_SESSIONID", Const, 11},
+ {"TOKEN_ALL_ACCESS", Const, 0},
+ {"TOKEN_ASSIGN_PRIMARY", Const, 0},
+ {"TOKEN_DUPLICATE", Const, 0},
+ {"TOKEN_EXECUTE", Const, 0},
+ {"TOKEN_IMPERSONATE", Const, 0},
+ {"TOKEN_QUERY", Const, 0},
+ {"TOKEN_QUERY_SOURCE", Const, 0},
+ {"TOKEN_READ", Const, 0},
+ {"TOKEN_WRITE", Const, 0},
+ {"TOSTOP", Const, 0},
+ {"TRUNCATE_EXISTING", Const, 0},
+ {"TUNATTACHFILTER", Const, 0},
+ {"TUNDETACHFILTER", Const, 0},
+ {"TUNGETFEATURES", Const, 0},
+ {"TUNGETIFF", Const, 0},
+ {"TUNGETSNDBUF", Const, 0},
+ {"TUNGETVNETHDRSZ", Const, 0},
+ {"TUNSETDEBUG", Const, 0},
+ {"TUNSETGROUP", Const, 0},
+ {"TUNSETIFF", Const, 0},
+ {"TUNSETLINK", Const, 0},
+ {"TUNSETNOCSUM", Const, 0},
+ {"TUNSETOFFLOAD", Const, 0},
+ {"TUNSETOWNER", Const, 0},
+ {"TUNSETPERSIST", Const, 0},
+ {"TUNSETSNDBUF", Const, 0},
+ {"TUNSETTXFILTER", Const, 0},
+ {"TUNSETVNETHDRSZ", Const, 0},
+ {"Tee", Func, 0},
+ {"TerminateProcess", Func, 0},
+ {"Termios", Type, 0},
+ {"Termios.Cc", Field, 0},
+ {"Termios.Cflag", Field, 0},
+ {"Termios.Iflag", Field, 0},
+ {"Termios.Ispeed", Field, 0},
+ {"Termios.Lflag", Field, 0},
+ {"Termios.Line", Field, 0},
+ {"Termios.Oflag", Field, 0},
+ {"Termios.Ospeed", Field, 0},
+ {"Termios.Pad_cgo_0", Field, 0},
+ {"Tgkill", Func, 0},
+ {"Time", Func, 0},
+ {"Time_t", Type, 0},
+ {"Times", Func, 0},
+ {"Timespec", Type, 0},
+ {"Timespec.Nsec", Field, 0},
+ {"Timespec.Pad_cgo_0", Field, 2},
+ {"Timespec.Sec", Field, 0},
+ {"TimespecToNsec", Func, 0},
+ {"Timeval", Type, 0},
+ {"Timeval.Pad_cgo_0", Field, 0},
+ {"Timeval.Sec", Field, 0},
+ {"Timeval.Usec", Field, 0},
+ {"Timeval32", Type, 0},
+ {"Timeval32.Sec", Field, 0},
+ {"Timeval32.Usec", Field, 0},
+ {"TimevalToNsec", Func, 0},
+ {"Timex", Type, 0},
+ {"Timex.Calcnt", Field, 0},
+ {"Timex.Constant", Field, 0},
+ {"Timex.Errcnt", Field, 0},
+ {"Timex.Esterror", Field, 0},
+ {"Timex.Freq", Field, 0},
+ {"Timex.Jitcnt", Field, 0},
+ {"Timex.Jitter", Field, 0},
+ {"Timex.Maxerror", Field, 0},
+ {"Timex.Modes", Field, 0},
+ {"Timex.Offset", Field, 0},
+ {"Timex.Pad_cgo_0", Field, 0},
+ {"Timex.Pad_cgo_1", Field, 0},
+ {"Timex.Pad_cgo_2", Field, 0},
+ {"Timex.Pad_cgo_3", Field, 0},
+ {"Timex.Ppsfreq", Field, 0},
+ {"Timex.Precision", Field, 0},
+ {"Timex.Shift", Field, 0},
+ {"Timex.Stabil", Field, 0},
+ {"Timex.Status", Field, 0},
+ {"Timex.Stbcnt", Field, 0},
+ {"Timex.Tai", Field, 0},
+ {"Timex.Tick", Field, 0},
+ {"Timex.Time", Field, 0},
+ {"Timex.Tolerance", Field, 0},
+ {"Timezoneinformation", Type, 0},
+ {"Timezoneinformation.Bias", Field, 0},
+ {"Timezoneinformation.DaylightBias", Field, 0},
+ {"Timezoneinformation.DaylightDate", Field, 0},
+ {"Timezoneinformation.DaylightName", Field, 0},
+ {"Timezoneinformation.StandardBias", Field, 0},
+ {"Timezoneinformation.StandardDate", Field, 0},
+ {"Timezoneinformation.StandardName", Field, 0},
+ {"Tms", Type, 0},
+ {"Tms.Cstime", Field, 0},
+ {"Tms.Cutime", Field, 0},
+ {"Tms.Stime", Field, 0},
+ {"Tms.Utime", Field, 0},
+ {"Token", Type, 0},
+ {"TokenAccessInformation", Const, 0},
+ {"TokenAuditPolicy", Const, 0},
+ {"TokenDefaultDacl", Const, 0},
+ {"TokenElevation", Const, 0},
+ {"TokenElevationType", Const, 0},
+ {"TokenGroups", Const, 0},
+ {"TokenGroupsAndPrivileges", Const, 0},
+ {"TokenHasRestrictions", Const, 0},
+ {"TokenImpersonationLevel", Const, 0},
+ {"TokenIntegrityLevel", Const, 0},
+ {"TokenLinkedToken", Const, 0},
+ {"TokenLogonSid", Const, 0},
+ {"TokenMandatoryPolicy", Const, 0},
+ {"TokenOrigin", Const, 0},
+ {"TokenOwner", Const, 0},
+ {"TokenPrimaryGroup", Const, 0},
+ {"TokenPrivileges", Const, 0},
+ {"TokenRestrictedSids", Const, 0},
+ {"TokenSandBoxInert", Const, 0},
+ {"TokenSessionId", Const, 0},
+ {"TokenSessionReference", Const, 0},
+ {"TokenSource", Const, 0},
+ {"TokenStatistics", Const, 0},
+ {"TokenType", Const, 0},
+ {"TokenUIAccess", Const, 0},
+ {"TokenUser", Const, 0},
+ {"TokenVirtualizationAllowed", Const, 0},
+ {"TokenVirtualizationEnabled", Const, 0},
+ {"Tokenprimarygroup", Type, 0},
+ {"Tokenprimarygroup.PrimaryGroup", Field, 0},
+ {"Tokenuser", Type, 0},
+ {"Tokenuser.User", Field, 0},
+ {"TranslateAccountName", Func, 0},
+ {"TranslateName", Func, 0},
+ {"TransmitFile", Func, 0},
+ {"TransmitFileBuffers", Type, 0},
+ {"TransmitFileBuffers.Head", Field, 0},
+ {"TransmitFileBuffers.HeadLength", Field, 0},
+ {"TransmitFileBuffers.Tail", Field, 0},
+ {"TransmitFileBuffers.TailLength", Field, 0},
+ {"Truncate", Func, 0},
+ {"UNIX_PATH_MAX", Const, 12},
+ {"USAGE_MATCH_TYPE_AND", Const, 0},
+ {"USAGE_MATCH_TYPE_OR", Const, 0},
+ {"UTF16FromString", Func, 1},
+ {"UTF16PtrFromString", Func, 1},
+ {"UTF16ToString", Func, 0},
+ {"Ucred", Type, 0},
+ {"Ucred.Gid", Field, 0},
+ {"Ucred.Pid", Field, 0},
+ {"Ucred.Uid", Field, 0},
+ {"Umask", Func, 0},
+ {"Uname", Func, 0},
+ {"Undelete", Func, 0},
+ {"UnixCredentials", Func, 0},
+ {"UnixRights", Func, 0},
+ {"Unlink", Func, 0},
+ {"Unlinkat", Func, 0},
+ {"UnmapViewOfFile", Func, 0},
+ {"Unmount", Func, 0},
+ {"Unsetenv", Func, 4},
+ {"Unshare", Func, 0},
+ {"UserInfo10", Type, 0},
+ {"UserInfo10.Comment", Field, 0},
+ {"UserInfo10.FullName", Field, 0},
+ {"UserInfo10.Name", Field, 0},
+ {"UserInfo10.UsrComment", Field, 0},
+ {"Ustat", Func, 0},
+ {"Ustat_t", Type, 0},
+ {"Ustat_t.Fname", Field, 0},
+ {"Ustat_t.Fpack", Field, 0},
+ {"Ustat_t.Pad_cgo_0", Field, 0},
+ {"Ustat_t.Pad_cgo_1", Field, 0},
+ {"Ustat_t.Tfree", Field, 0},
+ {"Ustat_t.Tinode", Field, 0},
+ {"Utimbuf", Type, 0},
+ {"Utimbuf.Actime", Field, 0},
+ {"Utimbuf.Modtime", Field, 0},
+ {"Utime", Func, 0},
+ {"Utimes", Func, 0},
+ {"UtimesNano", Func, 1},
+ {"Utsname", Type, 0},
+ {"Utsname.Domainname", Field, 0},
+ {"Utsname.Machine", Field, 0},
+ {"Utsname.Nodename", Field, 0},
+ {"Utsname.Release", Field, 0},
+ {"Utsname.Sysname", Field, 0},
+ {"Utsname.Version", Field, 0},
+ {"VDISCARD", Const, 0},
+ {"VDSUSP", Const, 1},
+ {"VEOF", Const, 0},
+ {"VEOL", Const, 0},
+ {"VEOL2", Const, 0},
+ {"VERASE", Const, 0},
+ {"VERASE2", Const, 1},
+ {"VINTR", Const, 0},
+ {"VKILL", Const, 0},
+ {"VLNEXT", Const, 0},
+ {"VMIN", Const, 0},
+ {"VQUIT", Const, 0},
+ {"VREPRINT", Const, 0},
+ {"VSTART", Const, 0},
+ {"VSTATUS", Const, 1},
+ {"VSTOP", Const, 0},
+ {"VSUSP", Const, 0},
+ {"VSWTC", Const, 0},
+ {"VT0", Const, 1},
+ {"VT1", Const, 1},
+ {"VTDLY", Const, 1},
+ {"VTIME", Const, 0},
+ {"VWERASE", Const, 0},
+ {"VirtualLock", Func, 0},
+ {"VirtualUnlock", Func, 0},
+ {"WAIT_ABANDONED", Const, 0},
+ {"WAIT_FAILED", Const, 0},
+ {"WAIT_OBJECT_0", Const, 0},
+ {"WAIT_TIMEOUT", Const, 0},
+ {"WALL", Const, 0},
+ {"WALLSIG", Const, 1},
+ {"WALTSIG", Const, 1},
+ {"WCLONE", Const, 0},
+ {"WCONTINUED", Const, 0},
+ {"WCOREFLAG", Const, 0},
+ {"WEXITED", Const, 0},
+ {"WLINUXCLONE", Const, 0},
+ {"WNOHANG", Const, 0},
+ {"WNOTHREAD", Const, 0},
+ {"WNOWAIT", Const, 0},
+ {"WNOZOMBIE", Const, 1},
+ {"WOPTSCHECKED", Const, 1},
+ {"WORDSIZE", Const, 0},
+ {"WSABuf", Type, 0},
+ {"WSABuf.Buf", Field, 0},
+ {"WSABuf.Len", Field, 0},
+ {"WSACleanup", Func, 0},
+ {"WSADESCRIPTION_LEN", Const, 0},
+ {"WSAData", Type, 0},
+ {"WSAData.Description", Field, 0},
+ {"WSAData.HighVersion", Field, 0},
+ {"WSAData.MaxSockets", Field, 0},
+ {"WSAData.MaxUdpDg", Field, 0},
+ {"WSAData.SystemStatus", Field, 0},
+ {"WSAData.VendorInfo", Field, 0},
+ {"WSAData.Version", Field, 0},
+ {"WSAEACCES", Const, 2},
+ {"WSAECONNABORTED", Const, 9},
+ {"WSAECONNRESET", Const, 3},
+ {"WSAEnumProtocols", Func, 2},
+ {"WSAID_CONNECTEX", Var, 1},
+ {"WSAIoctl", Func, 0},
+ {"WSAPROTOCOL_LEN", Const, 2},
+ {"WSAProtocolChain", Type, 2},
+ {"WSAProtocolChain.ChainEntries", Field, 2},
+ {"WSAProtocolChain.ChainLen", Field, 2},
+ {"WSAProtocolInfo", Type, 2},
+ {"WSAProtocolInfo.AddressFamily", Field, 2},
+ {"WSAProtocolInfo.CatalogEntryId", Field, 2},
+ {"WSAProtocolInfo.MaxSockAddr", Field, 2},
+ {"WSAProtocolInfo.MessageSize", Field, 2},
+ {"WSAProtocolInfo.MinSockAddr", Field, 2},
+ {"WSAProtocolInfo.NetworkByteOrder", Field, 2},
+ {"WSAProtocolInfo.Protocol", Field, 2},
+ {"WSAProtocolInfo.ProtocolChain", Field, 2},
+ {"WSAProtocolInfo.ProtocolMaxOffset", Field, 2},
+ {"WSAProtocolInfo.ProtocolName", Field, 2},
+ {"WSAProtocolInfo.ProviderFlags", Field, 2},
+ {"WSAProtocolInfo.ProviderId", Field, 2},
+ {"WSAProtocolInfo.ProviderReserved", Field, 2},
+ {"WSAProtocolInfo.SecurityScheme", Field, 2},
+ {"WSAProtocolInfo.ServiceFlags1", Field, 2},
+ {"WSAProtocolInfo.ServiceFlags2", Field, 2},
+ {"WSAProtocolInfo.ServiceFlags3", Field, 2},
+ {"WSAProtocolInfo.ServiceFlags4", Field, 2},
+ {"WSAProtocolInfo.SocketType", Field, 2},
+ {"WSAProtocolInfo.Version", Field, 2},
+ {"WSARecv", Func, 0},
+ {"WSARecvFrom", Func, 0},
+ {"WSASYS_STATUS_LEN", Const, 0},
+ {"WSASend", Func, 0},
+ {"WSASendTo", Func, 0},
+ {"WSASendto", Func, 0},
+ {"WSAStartup", Func, 0},
+ {"WSTOPPED", Const, 0},
+ {"WTRAPPED", Const, 1},
+ {"WUNTRACED", Const, 0},
+ {"Wait4", Func, 0},
+ {"WaitForSingleObject", Func, 0},
+ {"WaitStatus", Type, 0},
+ {"WaitStatus.ExitCode", Field, 0},
+ {"Win32FileAttributeData", Type, 0},
+ {"Win32FileAttributeData.CreationTime", Field, 0},
+ {"Win32FileAttributeData.FileAttributes", Field, 0},
+ {"Win32FileAttributeData.FileSizeHigh", Field, 0},
+ {"Win32FileAttributeData.FileSizeLow", Field, 0},
+ {"Win32FileAttributeData.LastAccessTime", Field, 0},
+ {"Win32FileAttributeData.LastWriteTime", Field, 0},
+ {"Win32finddata", Type, 0},
+ {"Win32finddata.AlternateFileName", Field, 0},
+ {"Win32finddata.CreationTime", Field, 0},
+ {"Win32finddata.FileAttributes", Field, 0},
+ {"Win32finddata.FileName", Field, 0},
+ {"Win32finddata.FileSizeHigh", Field, 0},
+ {"Win32finddata.FileSizeLow", Field, 0},
+ {"Win32finddata.LastAccessTime", Field, 0},
+ {"Win32finddata.LastWriteTime", Field, 0},
+ {"Win32finddata.Reserved0", Field, 0},
+ {"Win32finddata.Reserved1", Field, 0},
+ {"Write", Func, 0},
+ {"WriteConsole", Func, 1},
+ {"WriteFile", Func, 0},
+ {"X509_ASN_ENCODING", Const, 0},
+ {"XCASE", Const, 0},
+ {"XP1_CONNECTIONLESS", Const, 2},
+ {"XP1_CONNECT_DATA", Const, 2},
+ {"XP1_DISCONNECT_DATA", Const, 2},
+ {"XP1_EXPEDITED_DATA", Const, 2},
+ {"XP1_GRACEFUL_CLOSE", Const, 2},
+ {"XP1_GUARANTEED_DELIVERY", Const, 2},
+ {"XP1_GUARANTEED_ORDER", Const, 2},
+ {"XP1_IFS_HANDLES", Const, 2},
+ {"XP1_MESSAGE_ORIENTED", Const, 2},
+ {"XP1_MULTIPOINT_CONTROL_PLANE", Const, 2},
+ {"XP1_MULTIPOINT_DATA_PLANE", Const, 2},
+ {"XP1_PARTIAL_MESSAGE", Const, 2},
+ {"XP1_PSEUDO_STREAM", Const, 2},
+ {"XP1_QOS_SUPPORTED", Const, 2},
+ {"XP1_SAN_SUPPORT_SDP", Const, 2},
+ {"XP1_SUPPORT_BROADCAST", Const, 2},
+ {"XP1_SUPPORT_MULTIPOINT", Const, 2},
+ {"XP1_UNI_RECV", Const, 2},
+ {"XP1_UNI_SEND", Const, 2},
+ },
+ "syscall/js": {
+ {"CopyBytesToGo", Func, 0},
+ {"CopyBytesToJS", Func, 0},
+ {"Error", Type, 0},
+ {"Func", Type, 0},
+ {"FuncOf", Func, 0},
+ {"Global", Func, 0},
+ {"Null", Func, 0},
+ {"Type", Type, 0},
+ {"TypeBoolean", Const, 0},
+ {"TypeFunction", Const, 0},
+ {"TypeNull", Const, 0},
+ {"TypeNumber", Const, 0},
+ {"TypeObject", Const, 0},
+ {"TypeString", Const, 0},
+ {"TypeSymbol", Const, 0},
+ {"TypeUndefined", Const, 0},
+ {"Undefined", Func, 0},
+ {"Value", Type, 0},
+ {"ValueError", Type, 0},
+ {"ValueOf", Func, 0},
+ },
+ "testing": {
+ {"(*B).Cleanup", Method, 14},
+ {"(*B).Elapsed", Method, 20},
+ {"(*B).Error", Method, 0},
+ {"(*B).Errorf", Method, 0},
+ {"(*B).Fail", Method, 0},
+ {"(*B).FailNow", Method, 0},
+ {"(*B).Failed", Method, 0},
+ {"(*B).Fatal", Method, 0},
+ {"(*B).Fatalf", Method, 0},
+ {"(*B).Helper", Method, 9},
+ {"(*B).Log", Method, 0},
+ {"(*B).Logf", Method, 0},
+ {"(*B).Name", Method, 8},
+ {"(*B).ReportAllocs", Method, 1},
+ {"(*B).ReportMetric", Method, 13},
+ {"(*B).ResetTimer", Method, 0},
+ {"(*B).Run", Method, 7},
+ {"(*B).RunParallel", Method, 3},
+ {"(*B).SetBytes", Method, 0},
+ {"(*B).SetParallelism", Method, 3},
+ {"(*B).Setenv", Method, 17},
+ {"(*B).Skip", Method, 1},
+ {"(*B).SkipNow", Method, 1},
+ {"(*B).Skipf", Method, 1},
+ {"(*B).Skipped", Method, 1},
+ {"(*B).StartTimer", Method, 0},
+ {"(*B).StopTimer", Method, 0},
+ {"(*B).TempDir", Method, 15},
+ {"(*F).Add", Method, 18},
+ {"(*F).Cleanup", Method, 18},
+ {"(*F).Error", Method, 18},
+ {"(*F).Errorf", Method, 18},
+ {"(*F).Fail", Method, 18},
+ {"(*F).FailNow", Method, 18},
+ {"(*F).Failed", Method, 18},
+ {"(*F).Fatal", Method, 18},
+ {"(*F).Fatalf", Method, 18},
+ {"(*F).Fuzz", Method, 18},
+ {"(*F).Helper", Method, 18},
+ {"(*F).Log", Method, 18},
+ {"(*F).Logf", Method, 18},
+ {"(*F).Name", Method, 18},
+ {"(*F).Setenv", Method, 18},
+ {"(*F).Skip", Method, 18},
+ {"(*F).SkipNow", Method, 18},
+ {"(*F).Skipf", Method, 18},
+ {"(*F).Skipped", Method, 18},
+ {"(*F).TempDir", Method, 18},
+ {"(*M).Run", Method, 4},
+ {"(*PB).Next", Method, 3},
+ {"(*T).Cleanup", Method, 14},
+ {"(*T).Deadline", Method, 15},
+ {"(*T).Error", Method, 0},
+ {"(*T).Errorf", Method, 0},
+ {"(*T).Fail", Method, 0},
+ {"(*T).FailNow", Method, 0},
+ {"(*T).Failed", Method, 0},
+ {"(*T).Fatal", Method, 0},
+ {"(*T).Fatalf", Method, 0},
+ {"(*T).Helper", Method, 9},
+ {"(*T).Log", Method, 0},
+ {"(*T).Logf", Method, 0},
+ {"(*T).Name", Method, 8},
+ {"(*T).Parallel", Method, 0},
+ {"(*T).Run", Method, 7},
+ {"(*T).Setenv", Method, 17},
+ {"(*T).Skip", Method, 1},
+ {"(*T).SkipNow", Method, 1},
+ {"(*T).Skipf", Method, 1},
+ {"(*T).Skipped", Method, 1},
+ {"(*T).TempDir", Method, 15},
+ {"(BenchmarkResult).AllocedBytesPerOp", Method, 1},
+ {"(BenchmarkResult).AllocsPerOp", Method, 1},
+ {"(BenchmarkResult).MemString", Method, 1},
+ {"(BenchmarkResult).NsPerOp", Method, 0},
+ {"(BenchmarkResult).String", Method, 0},
+ {"AllocsPerRun", Func, 1},
+ {"B", Type, 0},
+ {"B.N", Field, 0},
+ {"Benchmark", Func, 0},
+ {"BenchmarkResult", Type, 0},
+ {"BenchmarkResult.Bytes", Field, 0},
+ {"BenchmarkResult.Extra", Field, 13},
+ {"BenchmarkResult.MemAllocs", Field, 1},
+ {"BenchmarkResult.MemBytes", Field, 1},
+ {"BenchmarkResult.N", Field, 0},
+ {"BenchmarkResult.T", Field, 0},
+ {"Cover", Type, 2},
+ {"Cover.Blocks", Field, 2},
+ {"Cover.Counters", Field, 2},
+ {"Cover.CoveredPackages", Field, 2},
+ {"Cover.Mode", Field, 2},
+ {"CoverBlock", Type, 2},
+ {"CoverBlock.Col0", Field, 2},
+ {"CoverBlock.Col1", Field, 2},
+ {"CoverBlock.Line0", Field, 2},
+ {"CoverBlock.Line1", Field, 2},
+ {"CoverBlock.Stmts", Field, 2},
+ {"CoverMode", Func, 8},
+ {"Coverage", Func, 4},
+ {"F", Type, 18},
+ {"Init", Func, 13},
+ {"InternalBenchmark", Type, 0},
+ {"InternalBenchmark.F", Field, 0},
+ {"InternalBenchmark.Name", Field, 0},
+ {"InternalExample", Type, 0},
+ {"InternalExample.F", Field, 0},
+ {"InternalExample.Name", Field, 0},
+ {"InternalExample.Output", Field, 0},
+ {"InternalExample.Unordered", Field, 7},
+ {"InternalFuzzTarget", Type, 18},
+ {"InternalFuzzTarget.Fn", Field, 18},
+ {"InternalFuzzTarget.Name", Field, 18},
+ {"InternalTest", Type, 0},
+ {"InternalTest.F", Field, 0},
+ {"InternalTest.Name", Field, 0},
+ {"M", Type, 4},
+ {"Main", Func, 0},
+ {"MainStart", Func, 4},
+ {"PB", Type, 3},
+ {"RegisterCover", Func, 2},
+ {"RunBenchmarks", Func, 0},
+ {"RunExamples", Func, 0},
+ {"RunTests", Func, 0},
+ {"Short", Func, 0},
+ {"T", Type, 0},
+ {"TB", Type, 2},
+ {"Testing", Func, 21},
+ {"Verbose", Func, 1},
+ },
+ "testing/fstest": {
+ {"(MapFS).Glob", Method, 16},
+ {"(MapFS).Open", Method, 16},
+ {"(MapFS).ReadDir", Method, 16},
+ {"(MapFS).ReadFile", Method, 16},
+ {"(MapFS).Stat", Method, 16},
+ {"(MapFS).Sub", Method, 16},
+ {"MapFS", Type, 16},
+ {"MapFile", Type, 16},
+ {"MapFile.Data", Field, 16},
+ {"MapFile.ModTime", Field, 16},
+ {"MapFile.Mode", Field, 16},
+ {"MapFile.Sys", Field, 16},
+ {"TestFS", Func, 16},
+ },
+ "testing/iotest": {
+ {"DataErrReader", Func, 0},
+ {"ErrReader", Func, 16},
+ {"ErrTimeout", Var, 0},
+ {"HalfReader", Func, 0},
+ {"NewReadLogger", Func, 0},
+ {"NewWriteLogger", Func, 0},
+ {"OneByteReader", Func, 0},
+ {"TestReader", Func, 16},
+ {"TimeoutReader", Func, 0},
+ {"TruncateWriter", Func, 0},
+ },
+ "testing/quick": {
+ {"(*CheckEqualError).Error", Method, 0},
+ {"(*CheckError).Error", Method, 0},
+ {"(SetupError).Error", Method, 0},
+ {"Check", Func, 0},
+ {"CheckEqual", Func, 0},
+ {"CheckEqualError", Type, 0},
+ {"CheckEqualError.CheckError", Field, 0},
+ {"CheckEqualError.Out1", Field, 0},
+ {"CheckEqualError.Out2", Field, 0},
+ {"CheckError", Type, 0},
+ {"CheckError.Count", Field, 0},
+ {"CheckError.In", Field, 0},
+ {"Config", Type, 0},
+ {"Config.MaxCount", Field, 0},
+ {"Config.MaxCountScale", Field, 0},
+ {"Config.Rand", Field, 0},
+ {"Config.Values", Field, 0},
+ {"Generator", Type, 0},
+ {"SetupError", Type, 0},
+ {"Value", Func, 0},
+ },
+ "testing/slogtest": {
+ {"Run", Func, 22},
+ {"TestHandler", Func, 21},
+ },
+ "text/scanner": {
+ {"(*Position).IsValid", Method, 0},
+ {"(*Scanner).Init", Method, 0},
+ {"(*Scanner).IsValid", Method, 0},
+ {"(*Scanner).Next", Method, 0},
+ {"(*Scanner).Peek", Method, 0},
+ {"(*Scanner).Pos", Method, 0},
+ {"(*Scanner).Scan", Method, 0},
+ {"(*Scanner).TokenText", Method, 0},
+ {"(Position).String", Method, 0},
+ {"(Scanner).String", Method, 0},
+ {"Char", Const, 0},
+ {"Comment", Const, 0},
+ {"EOF", Const, 0},
+ {"Float", Const, 0},
+ {"GoTokens", Const, 0},
+ {"GoWhitespace", Const, 0},
+ {"Ident", Const, 0},
+ {"Int", Const, 0},
+ {"Position", Type, 0},
+ {"Position.Column", Field, 0},
+ {"Position.Filename", Field, 0},
+ {"Position.Line", Field, 0},
+ {"Position.Offset", Field, 0},
+ {"RawString", Const, 0},
+ {"ScanChars", Const, 0},
+ {"ScanComments", Const, 0},
+ {"ScanFloats", Const, 0},
+ {"ScanIdents", Const, 0},
+ {"ScanInts", Const, 0},
+ {"ScanRawStrings", Const, 0},
+ {"ScanStrings", Const, 0},
+ {"Scanner", Type, 0},
+ {"Scanner.Error", Field, 0},
+ {"Scanner.ErrorCount", Field, 0},
+ {"Scanner.IsIdentRune", Field, 4},
+ {"Scanner.Mode", Field, 0},
+ {"Scanner.Position", Field, 0},
+ {"Scanner.Whitespace", Field, 0},
+ {"SkipComments", Const, 0},
+ {"String", Const, 0},
+ {"TokenString", Func, 0},
+ },
+ "text/tabwriter": {
+ {"(*Writer).Flush", Method, 0},
+ {"(*Writer).Init", Method, 0},
+ {"(*Writer).Write", Method, 0},
+ {"AlignRight", Const, 0},
+ {"Debug", Const, 0},
+ {"DiscardEmptyColumns", Const, 0},
+ {"Escape", Const, 0},
+ {"FilterHTML", Const, 0},
+ {"NewWriter", Func, 0},
+ {"StripEscape", Const, 0},
+ {"TabIndent", Const, 0},
+ {"Writer", Type, 0},
+ },
+ "text/template": {
+ {"(*Template).AddParseTree", Method, 0},
+ {"(*Template).Clone", Method, 0},
+ {"(*Template).DefinedTemplates", Method, 5},
+ {"(*Template).Delims", Method, 0},
+ {"(*Template).Execute", Method, 0},
+ {"(*Template).ExecuteTemplate", Method, 0},
+ {"(*Template).Funcs", Method, 0},
+ {"(*Template).Lookup", Method, 0},
+ {"(*Template).Name", Method, 0},
+ {"(*Template).New", Method, 0},
+ {"(*Template).Option", Method, 5},
+ {"(*Template).Parse", Method, 0},
+ {"(*Template).ParseFS", Method, 16},
+ {"(*Template).ParseFiles", Method, 0},
+ {"(*Template).ParseGlob", Method, 0},
+ {"(*Template).Templates", Method, 0},
+ {"(ExecError).Error", Method, 6},
+ {"(ExecError).Unwrap", Method, 13},
+ {"(Template).Copy", Method, 2},
+ {"(Template).ErrorContext", Method, 1},
+ {"ExecError", Type, 6},
+ {"ExecError.Err", Field, 6},
+ {"ExecError.Name", Field, 6},
+ {"FuncMap", Type, 0},
+ {"HTMLEscape", Func, 0},
+ {"HTMLEscapeString", Func, 0},
+ {"HTMLEscaper", Func, 0},
+ {"IsTrue", Func, 6},
+ {"JSEscape", Func, 0},
+ {"JSEscapeString", Func, 0},
+ {"JSEscaper", Func, 0},
+ {"Must", Func, 0},
+ {"New", Func, 0},
+ {"ParseFS", Func, 16},
+ {"ParseFiles", Func, 0},
+ {"ParseGlob", Func, 0},
+ {"Template", Type, 0},
+ {"Template.Tree", Field, 0},
+ {"URLQueryEscaper", Func, 0},
+ },
+ "text/template/parse": {
+ {"(*ActionNode).Copy", Method, 0},
+ {"(*ActionNode).String", Method, 0},
+ {"(*BoolNode).Copy", Method, 0},
+ {"(*BoolNode).String", Method, 0},
+ {"(*BranchNode).Copy", Method, 4},
+ {"(*BranchNode).String", Method, 0},
+ {"(*BreakNode).Copy", Method, 18},
+ {"(*BreakNode).String", Method, 18},
+ {"(*ChainNode).Add", Method, 1},
+ {"(*ChainNode).Copy", Method, 1},
+ {"(*ChainNode).String", Method, 1},
+ {"(*CommandNode).Copy", Method, 0},
+ {"(*CommandNode).String", Method, 0},
+ {"(*CommentNode).Copy", Method, 16},
+ {"(*CommentNode).String", Method, 16},
+ {"(*ContinueNode).Copy", Method, 18},
+ {"(*ContinueNode).String", Method, 18},
+ {"(*DotNode).Copy", Method, 0},
+ {"(*DotNode).String", Method, 0},
+ {"(*DotNode).Type", Method, 0},
+ {"(*FieldNode).Copy", Method, 0},
+ {"(*FieldNode).String", Method, 0},
+ {"(*IdentifierNode).Copy", Method, 0},
+ {"(*IdentifierNode).SetPos", Method, 1},
+ {"(*IdentifierNode).SetTree", Method, 4},
+ {"(*IdentifierNode).String", Method, 0},
+ {"(*IfNode).Copy", Method, 0},
+ {"(*IfNode).String", Method, 0},
+ {"(*ListNode).Copy", Method, 0},
+ {"(*ListNode).CopyList", Method, 0},
+ {"(*ListNode).String", Method, 0},
+ {"(*NilNode).Copy", Method, 1},
+ {"(*NilNode).String", Method, 1},
+ {"(*NilNode).Type", Method, 1},
+ {"(*NumberNode).Copy", Method, 0},
+ {"(*NumberNode).String", Method, 0},
+ {"(*PipeNode).Copy", Method, 0},
+ {"(*PipeNode).CopyPipe", Method, 0},
+ {"(*PipeNode).String", Method, 0},
+ {"(*RangeNode).Copy", Method, 0},
+ {"(*RangeNode).String", Method, 0},
+ {"(*StringNode).Copy", Method, 0},
+ {"(*StringNode).String", Method, 0},
+ {"(*TemplateNode).Copy", Method, 0},
+ {"(*TemplateNode).String", Method, 0},
+ {"(*TextNode).Copy", Method, 0},
+ {"(*TextNode).String", Method, 0},
+ {"(*Tree).Copy", Method, 2},
+ {"(*Tree).ErrorContext", Method, 1},
+ {"(*Tree).Parse", Method, 0},
+ {"(*VariableNode).Copy", Method, 0},
+ {"(*VariableNode).String", Method, 0},
+ {"(*WithNode).Copy", Method, 0},
+ {"(*WithNode).String", Method, 0},
+ {"(ActionNode).Position", Method, 1},
+ {"(ActionNode).Type", Method, 0},
+ {"(BoolNode).Position", Method, 1},
+ {"(BoolNode).Type", Method, 0},
+ {"(BranchNode).Position", Method, 1},
+ {"(BranchNode).Type", Method, 0},
+ {"(BreakNode).Position", Method, 18},
+ {"(BreakNode).Type", Method, 18},
+ {"(ChainNode).Position", Method, 1},
+ {"(ChainNode).Type", Method, 1},
+ {"(CommandNode).Position", Method, 1},
+ {"(CommandNode).Type", Method, 0},
+ {"(CommentNode).Position", Method, 16},
+ {"(CommentNode).Type", Method, 16},
+ {"(ContinueNode).Position", Method, 18},
+ {"(ContinueNode).Type", Method, 18},
+ {"(DotNode).Position", Method, 1},
+ {"(FieldNode).Position", Method, 1},
+ {"(FieldNode).Type", Method, 0},
+ {"(IdentifierNode).Position", Method, 1},
+ {"(IdentifierNode).Type", Method, 0},
+ {"(IfNode).Position", Method, 1},
+ {"(IfNode).Type", Method, 0},
+ {"(ListNode).Position", Method, 1},
+ {"(ListNode).Type", Method, 0},
+ {"(NilNode).Position", Method, 1},
+ {"(NodeType).Type", Method, 0},
+ {"(NumberNode).Position", Method, 1},
+ {"(NumberNode).Type", Method, 0},
+ {"(PipeNode).Position", Method, 1},
+ {"(PipeNode).Type", Method, 0},
+ {"(Pos).Position", Method, 1},
+ {"(RangeNode).Position", Method, 1},
+ {"(RangeNode).Type", Method, 0},
+ {"(StringNode).Position", Method, 1},
+ {"(StringNode).Type", Method, 0},
+ {"(TemplateNode).Position", Method, 1},
+ {"(TemplateNode).Type", Method, 0},
+ {"(TextNode).Position", Method, 1},
+ {"(TextNode).Type", Method, 0},
+ {"(VariableNode).Position", Method, 1},
+ {"(VariableNode).Type", Method, 0},
+ {"(WithNode).Position", Method, 1},
+ {"(WithNode).Type", Method, 0},
+ {"ActionNode", Type, 0},
+ {"ActionNode.Line", Field, 0},
+ {"ActionNode.NodeType", Field, 0},
+ {"ActionNode.Pipe", Field, 0},
+ {"ActionNode.Pos", Field, 1},
+ {"BoolNode", Type, 0},
+ {"BoolNode.NodeType", Field, 0},
+ {"BoolNode.Pos", Field, 1},
+ {"BoolNode.True", Field, 0},
+ {"BranchNode", Type, 0},
+ {"BranchNode.ElseList", Field, 0},
+ {"BranchNode.Line", Field, 0},
+ {"BranchNode.List", Field, 0},
+ {"BranchNode.NodeType", Field, 0},
+ {"BranchNode.Pipe", Field, 0},
+ {"BranchNode.Pos", Field, 1},
+ {"BreakNode", Type, 18},
+ {"BreakNode.Line", Field, 18},
+ {"BreakNode.NodeType", Field, 18},
+ {"BreakNode.Pos", Field, 18},
+ {"ChainNode", Type, 1},
+ {"ChainNode.Field", Field, 1},
+ {"ChainNode.Node", Field, 1},
+ {"ChainNode.NodeType", Field, 1},
+ {"ChainNode.Pos", Field, 1},
+ {"CommandNode", Type, 0},
+ {"CommandNode.Args", Field, 0},
+ {"CommandNode.NodeType", Field, 0},
+ {"CommandNode.Pos", Field, 1},
+ {"CommentNode", Type, 16},
+ {"CommentNode.NodeType", Field, 16},
+ {"CommentNode.Pos", Field, 16},
+ {"CommentNode.Text", Field, 16},
+ {"ContinueNode", Type, 18},
+ {"ContinueNode.Line", Field, 18},
+ {"ContinueNode.NodeType", Field, 18},
+ {"ContinueNode.Pos", Field, 18},
+ {"DotNode", Type, 0},
+ {"DotNode.NodeType", Field, 4},
+ {"DotNode.Pos", Field, 1},
+ {"FieldNode", Type, 0},
+ {"FieldNode.Ident", Field, 0},
+ {"FieldNode.NodeType", Field, 0},
+ {"FieldNode.Pos", Field, 1},
+ {"IdentifierNode", Type, 0},
+ {"IdentifierNode.Ident", Field, 0},
+ {"IdentifierNode.NodeType", Field, 0},
+ {"IdentifierNode.Pos", Field, 1},
+ {"IfNode", Type, 0},
+ {"IfNode.BranchNode", Field, 0},
+ {"IsEmptyTree", Func, 0},
+ {"ListNode", Type, 0},
+ {"ListNode.NodeType", Field, 0},
+ {"ListNode.Nodes", Field, 0},
+ {"ListNode.Pos", Field, 1},
+ {"Mode", Type, 16},
+ {"New", Func, 0},
+ {"NewIdentifier", Func, 0},
+ {"NilNode", Type, 1},
+ {"NilNode.NodeType", Field, 4},
+ {"NilNode.Pos", Field, 1},
+ {"Node", Type, 0},
+ {"NodeAction", Const, 0},
+ {"NodeBool", Const, 0},
+ {"NodeBreak", Const, 18},
+ {"NodeChain", Const, 1},
+ {"NodeCommand", Const, 0},
+ {"NodeComment", Const, 16},
+ {"NodeContinue", Const, 18},
+ {"NodeDot", Const, 0},
+ {"NodeField", Const, 0},
+ {"NodeIdentifier", Const, 0},
+ {"NodeIf", Const, 0},
+ {"NodeList", Const, 0},
+ {"NodeNil", Const, 1},
+ {"NodeNumber", Const, 0},
+ {"NodePipe", Const, 0},
+ {"NodeRange", Const, 0},
+ {"NodeString", Const, 0},
+ {"NodeTemplate", Const, 0},
+ {"NodeText", Const, 0},
+ {"NodeType", Type, 0},
+ {"NodeVariable", Const, 0},
+ {"NodeWith", Const, 0},
+ {"NumberNode", Type, 0},
+ {"NumberNode.Complex128", Field, 0},
+ {"NumberNode.Float64", Field, 0},
+ {"NumberNode.Int64", Field, 0},
+ {"NumberNode.IsComplex", Field, 0},
+ {"NumberNode.IsFloat", Field, 0},
+ {"NumberNode.IsInt", Field, 0},
+ {"NumberNode.IsUint", Field, 0},
+ {"NumberNode.NodeType", Field, 0},
+ {"NumberNode.Pos", Field, 1},
+ {"NumberNode.Text", Field, 0},
+ {"NumberNode.Uint64", Field, 0},
+ {"Parse", Func, 0},
+ {"ParseComments", Const, 16},
+ {"PipeNode", Type, 0},
+ {"PipeNode.Cmds", Field, 0},
+ {"PipeNode.Decl", Field, 0},
+ {"PipeNode.IsAssign", Field, 11},
+ {"PipeNode.Line", Field, 0},
+ {"PipeNode.NodeType", Field, 0},
+ {"PipeNode.Pos", Field, 1},
+ {"Pos", Type, 1},
+ {"RangeNode", Type, 0},
+ {"RangeNode.BranchNode", Field, 0},
+ {"SkipFuncCheck", Const, 17},
+ {"StringNode", Type, 0},
+ {"StringNode.NodeType", Field, 0},
+ {"StringNode.Pos", Field, 1},
+ {"StringNode.Quoted", Field, 0},
+ {"StringNode.Text", Field, 0},
+ {"TemplateNode", Type, 0},
+ {"TemplateNode.Line", Field, 0},
+ {"TemplateNode.Name", Field, 0},
+ {"TemplateNode.NodeType", Field, 0},
+ {"TemplateNode.Pipe", Field, 0},
+ {"TemplateNode.Pos", Field, 1},
+ {"TextNode", Type, 0},
+ {"TextNode.NodeType", Field, 0},
+ {"TextNode.Pos", Field, 1},
+ {"TextNode.Text", Field, 0},
+ {"Tree", Type, 0},
+ {"Tree.Mode", Field, 16},
+ {"Tree.Name", Field, 0},
+ {"Tree.ParseName", Field, 1},
+ {"Tree.Root", Field, 0},
+ {"VariableNode", Type, 0},
+ {"VariableNode.Ident", Field, 0},
+ {"VariableNode.NodeType", Field, 0},
+ {"VariableNode.Pos", Field, 1},
+ {"WithNode", Type, 0},
+ {"WithNode.BranchNode", Field, 0},
+ },
+ "time": {
+ {"(*Location).String", Method, 0},
+ {"(*ParseError).Error", Method, 0},
+ {"(*Ticker).Reset", Method, 15},
+ {"(*Ticker).Stop", Method, 0},
+ {"(*Time).GobDecode", Method, 0},
+ {"(*Time).UnmarshalBinary", Method, 2},
+ {"(*Time).UnmarshalJSON", Method, 0},
+ {"(*Time).UnmarshalText", Method, 2},
+ {"(*Timer).Reset", Method, 1},
+ {"(*Timer).Stop", Method, 0},
+ {"(Duration).Abs", Method, 19},
+ {"(Duration).Hours", Method, 0},
+ {"(Duration).Microseconds", Method, 13},
+ {"(Duration).Milliseconds", Method, 13},
+ {"(Duration).Minutes", Method, 0},
+ {"(Duration).Nanoseconds", Method, 0},
+ {"(Duration).Round", Method, 9},
+ {"(Duration).Seconds", Method, 0},
+ {"(Duration).String", Method, 0},
+ {"(Duration).Truncate", Method, 9},
+ {"(Month).String", Method, 0},
+ {"(Time).Add", Method, 0},
+ {"(Time).AddDate", Method, 0},
+ {"(Time).After", Method, 0},
+ {"(Time).AppendFormat", Method, 5},
+ {"(Time).Before", Method, 0},
+ {"(Time).Clock", Method, 0},
+ {"(Time).Compare", Method, 20},
+ {"(Time).Date", Method, 0},
+ {"(Time).Day", Method, 0},
+ {"(Time).Equal", Method, 0},
+ {"(Time).Format", Method, 0},
+ {"(Time).GoString", Method, 17},
+ {"(Time).GobEncode", Method, 0},
+ {"(Time).Hour", Method, 0},
+ {"(Time).ISOWeek", Method, 0},
+ {"(Time).In", Method, 0},
+ {"(Time).IsDST", Method, 17},
+ {"(Time).IsZero", Method, 0},
+ {"(Time).Local", Method, 0},
+ {"(Time).Location", Method, 0},
+ {"(Time).MarshalBinary", Method, 2},
+ {"(Time).MarshalJSON", Method, 0},
+ {"(Time).MarshalText", Method, 2},
+ {"(Time).Minute", Method, 0},
+ {"(Time).Month", Method, 0},
+ {"(Time).Nanosecond", Method, 0},
+ {"(Time).Round", Method, 1},
+ {"(Time).Second", Method, 0},
+ {"(Time).String", Method, 0},
+ {"(Time).Sub", Method, 0},
+ {"(Time).Truncate", Method, 1},
+ {"(Time).UTC", Method, 0},
+ {"(Time).Unix", Method, 0},
+ {"(Time).UnixMicro", Method, 17},
+ {"(Time).UnixMilli", Method, 17},
+ {"(Time).UnixNano", Method, 0},
+ {"(Time).Weekday", Method, 0},
+ {"(Time).Year", Method, 0},
+ {"(Time).YearDay", Method, 1},
+ {"(Time).Zone", Method, 0},
+ {"(Time).ZoneBounds", Method, 19},
+ {"(Weekday).String", Method, 0},
+ {"ANSIC", Const, 0},
+ {"After", Func, 0},
+ {"AfterFunc", Func, 0},
+ {"April", Const, 0},
+ {"August", Const, 0},
+ {"Date", Func, 0},
+ {"DateOnly", Const, 20},
+ {"DateTime", Const, 20},
+ {"December", Const, 0},
+ {"Duration", Type, 0},
+ {"February", Const, 0},
+ {"FixedZone", Func, 0},
+ {"Friday", Const, 0},
+ {"Hour", Const, 0},
+ {"January", Const, 0},
+ {"July", Const, 0},
+ {"June", Const, 0},
+ {"Kitchen", Const, 0},
+ {"Layout", Const, 17},
+ {"LoadLocation", Func, 0},
+ {"LoadLocationFromTZData", Func, 10},
+ {"Local", Var, 0},
+ {"Location", Type, 0},
+ {"March", Const, 0},
+ {"May", Const, 0},
+ {"Microsecond", Const, 0},
+ {"Millisecond", Const, 0},
+ {"Minute", Const, 0},
+ {"Monday", Const, 0},
+ {"Month", Type, 0},
+ {"Nanosecond", Const, 0},
+ {"NewTicker", Func, 0},
+ {"NewTimer", Func, 0},
+ {"November", Const, 0},
+ {"Now", Func, 0},
+ {"October", Const, 0},
+ {"Parse", Func, 0},
+ {"ParseDuration", Func, 0},
+ {"ParseError", Type, 0},
+ {"ParseError.Layout", Field, 0},
+ {"ParseError.LayoutElem", Field, 0},
+ {"ParseError.Message", Field, 0},
+ {"ParseError.Value", Field, 0},
+ {"ParseError.ValueElem", Field, 0},
+ {"ParseInLocation", Func, 1},
+ {"RFC1123", Const, 0},
+ {"RFC1123Z", Const, 0},
+ {"RFC3339", Const, 0},
+ {"RFC3339Nano", Const, 0},
+ {"RFC822", Const, 0},
+ {"RFC822Z", Const, 0},
+ {"RFC850", Const, 0},
+ {"RubyDate", Const, 0},
+ {"Saturday", Const, 0},
+ {"Second", Const, 0},
+ {"September", Const, 0},
+ {"Since", Func, 0},
+ {"Sleep", Func, 0},
+ {"Stamp", Const, 0},
+ {"StampMicro", Const, 0},
+ {"StampMilli", Const, 0},
+ {"StampNano", Const, 0},
+ {"Sunday", Const, 0},
+ {"Thursday", Const, 0},
+ {"Tick", Func, 0},
+ {"Ticker", Type, 0},
+ {"Ticker.C", Field, 0},
+ {"Time", Type, 0},
+ {"TimeOnly", Const, 20},
+ {"Timer", Type, 0},
+ {"Timer.C", Field, 0},
+ {"Tuesday", Const, 0},
+ {"UTC", Var, 0},
+ {"Unix", Func, 0},
+ {"UnixDate", Const, 0},
+ {"UnixMicro", Func, 17},
+ {"UnixMilli", Func, 17},
+ {"Until", Func, 8},
+ {"Wednesday", Const, 0},
+ {"Weekday", Type, 0},
+ },
+ "unicode": {
+ {"(SpecialCase).ToLower", Method, 0},
+ {"(SpecialCase).ToTitle", Method, 0},
+ {"(SpecialCase).ToUpper", Method, 0},
+ {"ASCII_Hex_Digit", Var, 0},
+ {"Adlam", Var, 7},
+ {"Ahom", Var, 5},
+ {"Anatolian_Hieroglyphs", Var, 5},
+ {"Arabic", Var, 0},
+ {"Armenian", Var, 0},
+ {"Avestan", Var, 0},
+ {"AzeriCase", Var, 0},
+ {"Balinese", Var, 0},
+ {"Bamum", Var, 0},
+ {"Bassa_Vah", Var, 4},
+ {"Batak", Var, 0},
+ {"Bengali", Var, 0},
+ {"Bhaiksuki", Var, 7},
+ {"Bidi_Control", Var, 0},
+ {"Bopomofo", Var, 0},
+ {"Brahmi", Var, 0},
+ {"Braille", Var, 0},
+ {"Buginese", Var, 0},
+ {"Buhid", Var, 0},
+ {"C", Var, 0},
+ {"Canadian_Aboriginal", Var, 0},
+ {"Carian", Var, 0},
+ {"CaseRange", Type, 0},
+ {"CaseRange.Delta", Field, 0},
+ {"CaseRange.Hi", Field, 0},
+ {"CaseRange.Lo", Field, 0},
+ {"CaseRanges", Var, 0},
+ {"Categories", Var, 0},
+ {"Caucasian_Albanian", Var, 4},
+ {"Cc", Var, 0},
+ {"Cf", Var, 0},
+ {"Chakma", Var, 1},
+ {"Cham", Var, 0},
+ {"Cherokee", Var, 0},
+ {"Chorasmian", Var, 16},
+ {"Co", Var, 0},
+ {"Common", Var, 0},
+ {"Coptic", Var, 0},
+ {"Cs", Var, 0},
+ {"Cuneiform", Var, 0},
+ {"Cypriot", Var, 0},
+ {"Cypro_Minoan", Var, 21},
+ {"Cyrillic", Var, 0},
+ {"Dash", Var, 0},
+ {"Deprecated", Var, 0},
+ {"Deseret", Var, 0},
+ {"Devanagari", Var, 0},
+ {"Diacritic", Var, 0},
+ {"Digit", Var, 0},
+ {"Dives_Akuru", Var, 16},
+ {"Dogra", Var, 13},
+ {"Duployan", Var, 4},
+ {"Egyptian_Hieroglyphs", Var, 0},
+ {"Elbasan", Var, 4},
+ {"Elymaic", Var, 14},
+ {"Ethiopic", Var, 0},
+ {"Extender", Var, 0},
+ {"FoldCategory", Var, 0},
+ {"FoldScript", Var, 0},
+ {"Georgian", Var, 0},
+ {"Glagolitic", Var, 0},
+ {"Gothic", Var, 0},
+ {"Grantha", Var, 4},
+ {"GraphicRanges", Var, 0},
+ {"Greek", Var, 0},
+ {"Gujarati", Var, 0},
+ {"Gunjala_Gondi", Var, 13},
+ {"Gurmukhi", Var, 0},
+ {"Han", Var, 0},
+ {"Hangul", Var, 0},
+ {"Hanifi_Rohingya", Var, 13},
+ {"Hanunoo", Var, 0},
+ {"Hatran", Var, 5},
+ {"Hebrew", Var, 0},
+ {"Hex_Digit", Var, 0},
+ {"Hiragana", Var, 0},
+ {"Hyphen", Var, 0},
+ {"IDS_Binary_Operator", Var, 0},
+ {"IDS_Trinary_Operator", Var, 0},
+ {"Ideographic", Var, 0},
+ {"Imperial_Aramaic", Var, 0},
+ {"In", Func, 2},
+ {"Inherited", Var, 0},
+ {"Inscriptional_Pahlavi", Var, 0},
+ {"Inscriptional_Parthian", Var, 0},
+ {"Is", Func, 0},
+ {"IsControl", Func, 0},
+ {"IsDigit", Func, 0},
+ {"IsGraphic", Func, 0},
+ {"IsLetter", Func, 0},
+ {"IsLower", Func, 0},
+ {"IsMark", Func, 0},
+ {"IsNumber", Func, 0},
+ {"IsOneOf", Func, 0},
+ {"IsPrint", Func, 0},
+ {"IsPunct", Func, 0},
+ {"IsSpace", Func, 0},
+ {"IsSymbol", Func, 0},
+ {"IsTitle", Func, 0},
+ {"IsUpper", Func, 0},
+ {"Javanese", Var, 0},
+ {"Join_Control", Var, 0},
+ {"Kaithi", Var, 0},
+ {"Kannada", Var, 0},
+ {"Katakana", Var, 0},
+ {"Kawi", Var, 21},
+ {"Kayah_Li", Var, 0},
+ {"Kharoshthi", Var, 0},
+ {"Khitan_Small_Script", Var, 16},
+ {"Khmer", Var, 0},
+ {"Khojki", Var, 4},
+ {"Khudawadi", Var, 4},
+ {"L", Var, 0},
+ {"Lao", Var, 0},
+ {"Latin", Var, 0},
+ {"Lepcha", Var, 0},
+ {"Letter", Var, 0},
+ {"Limbu", Var, 0},
+ {"Linear_A", Var, 4},
+ {"Linear_B", Var, 0},
+ {"Lisu", Var, 0},
+ {"Ll", Var, 0},
+ {"Lm", Var, 0},
+ {"Lo", Var, 0},
+ {"Logical_Order_Exception", Var, 0},
+ {"Lower", Var, 0},
+ {"LowerCase", Const, 0},
+ {"Lt", Var, 0},
+ {"Lu", Var, 0},
+ {"Lycian", Var, 0},
+ {"Lydian", Var, 0},
+ {"M", Var, 0},
+ {"Mahajani", Var, 4},
+ {"Makasar", Var, 13},
+ {"Malayalam", Var, 0},
+ {"Mandaic", Var, 0},
+ {"Manichaean", Var, 4},
+ {"Marchen", Var, 7},
+ {"Mark", Var, 0},
+ {"Masaram_Gondi", Var, 10},
+ {"MaxASCII", Const, 0},
+ {"MaxCase", Const, 0},
+ {"MaxLatin1", Const, 0},
+ {"MaxRune", Const, 0},
+ {"Mc", Var, 0},
+ {"Me", Var, 0},
+ {"Medefaidrin", Var, 13},
+ {"Meetei_Mayek", Var, 0},
+ {"Mende_Kikakui", Var, 4},
+ {"Meroitic_Cursive", Var, 1},
+ {"Meroitic_Hieroglyphs", Var, 1},
+ {"Miao", Var, 1},
+ {"Mn", Var, 0},
+ {"Modi", Var, 4},
+ {"Mongolian", Var, 0},
+ {"Mro", Var, 4},
+ {"Multani", Var, 5},
+ {"Myanmar", Var, 0},
+ {"N", Var, 0},
+ {"Nabataean", Var, 4},
+ {"Nag_Mundari", Var, 21},
+ {"Nandinagari", Var, 14},
+ {"Nd", Var, 0},
+ {"New_Tai_Lue", Var, 0},
+ {"Newa", Var, 7},
+ {"Nko", Var, 0},
+ {"Nl", Var, 0},
+ {"No", Var, 0},
+ {"Noncharacter_Code_Point", Var, 0},
+ {"Number", Var, 0},
+ {"Nushu", Var, 10},
+ {"Nyiakeng_Puachue_Hmong", Var, 14},
+ {"Ogham", Var, 0},
+ {"Ol_Chiki", Var, 0},
+ {"Old_Hungarian", Var, 5},
+ {"Old_Italic", Var, 0},
+ {"Old_North_Arabian", Var, 4},
+ {"Old_Permic", Var, 4},
+ {"Old_Persian", Var, 0},
+ {"Old_Sogdian", Var, 13},
+ {"Old_South_Arabian", Var, 0},
+ {"Old_Turkic", Var, 0},
+ {"Old_Uyghur", Var, 21},
+ {"Oriya", Var, 0},
+ {"Osage", Var, 7},
+ {"Osmanya", Var, 0},
+ {"Other", Var, 0},
+ {"Other_Alphabetic", Var, 0},
+ {"Other_Default_Ignorable_Code_Point", Var, 0},
+ {"Other_Grapheme_Extend", Var, 0},
+ {"Other_ID_Continue", Var, 0},
+ {"Other_ID_Start", Var, 0},
+ {"Other_Lowercase", Var, 0},
+ {"Other_Math", Var, 0},
+ {"Other_Uppercase", Var, 0},
+ {"P", Var, 0},
+ {"Pahawh_Hmong", Var, 4},
+ {"Palmyrene", Var, 4},
+ {"Pattern_Syntax", Var, 0},
+ {"Pattern_White_Space", Var, 0},
+ {"Pau_Cin_Hau", Var, 4},
+ {"Pc", Var, 0},
+ {"Pd", Var, 0},
+ {"Pe", Var, 0},
+ {"Pf", Var, 0},
+ {"Phags_Pa", Var, 0},
+ {"Phoenician", Var, 0},
+ {"Pi", Var, 0},
+ {"Po", Var, 0},
+ {"Prepended_Concatenation_Mark", Var, 7},
+ {"PrintRanges", Var, 0},
+ {"Properties", Var, 0},
+ {"Ps", Var, 0},
+ {"Psalter_Pahlavi", Var, 4},
+ {"Punct", Var, 0},
+ {"Quotation_Mark", Var, 0},
+ {"Radical", Var, 0},
+ {"Range16", Type, 0},
+ {"Range16.Hi", Field, 0},
+ {"Range16.Lo", Field, 0},
+ {"Range16.Stride", Field, 0},
+ {"Range32", Type, 0},
+ {"Range32.Hi", Field, 0},
+ {"Range32.Lo", Field, 0},
+ {"Range32.Stride", Field, 0},
+ {"RangeTable", Type, 0},
+ {"RangeTable.LatinOffset", Field, 1},
+ {"RangeTable.R16", Field, 0},
+ {"RangeTable.R32", Field, 0},
+ {"Regional_Indicator", Var, 10},
+ {"Rejang", Var, 0},
+ {"ReplacementChar", Const, 0},
+ {"Runic", Var, 0},
+ {"S", Var, 0},
+ {"STerm", Var, 0},
+ {"Samaritan", Var, 0},
+ {"Saurashtra", Var, 0},
+ {"Sc", Var, 0},
+ {"Scripts", Var, 0},
+ {"Sentence_Terminal", Var, 7},
+ {"Sharada", Var, 1},
+ {"Shavian", Var, 0},
+ {"Siddham", Var, 4},
+ {"SignWriting", Var, 5},
+ {"SimpleFold", Func, 0},
+ {"Sinhala", Var, 0},
+ {"Sk", Var, 0},
+ {"Sm", Var, 0},
+ {"So", Var, 0},
+ {"Soft_Dotted", Var, 0},
+ {"Sogdian", Var, 13},
+ {"Sora_Sompeng", Var, 1},
+ {"Soyombo", Var, 10},
+ {"Space", Var, 0},
+ {"SpecialCase", Type, 0},
+ {"Sundanese", Var, 0},
+ {"Syloti_Nagri", Var, 0},
+ {"Symbol", Var, 0},
+ {"Syriac", Var, 0},
+ {"Tagalog", Var, 0},
+ {"Tagbanwa", Var, 0},
+ {"Tai_Le", Var, 0},
+ {"Tai_Tham", Var, 0},
+ {"Tai_Viet", Var, 0},
+ {"Takri", Var, 1},
+ {"Tamil", Var, 0},
+ {"Tangsa", Var, 21},
+ {"Tangut", Var, 7},
+ {"Telugu", Var, 0},
+ {"Terminal_Punctuation", Var, 0},
+ {"Thaana", Var, 0},
+ {"Thai", Var, 0},
+ {"Tibetan", Var, 0},
+ {"Tifinagh", Var, 0},
+ {"Tirhuta", Var, 4},
+ {"Title", Var, 0},
+ {"TitleCase", Const, 0},
+ {"To", Func, 0},
+ {"ToLower", Func, 0},
+ {"ToTitle", Func, 0},
+ {"ToUpper", Func, 0},
+ {"Toto", Var, 21},
+ {"TurkishCase", Var, 0},
+ {"Ugaritic", Var, 0},
+ {"Unified_Ideograph", Var, 0},
+ {"Upper", Var, 0},
+ {"UpperCase", Const, 0},
+ {"UpperLower", Const, 0},
+ {"Vai", Var, 0},
+ {"Variation_Selector", Var, 0},
+ {"Version", Const, 0},
+ {"Vithkuqi", Var, 21},
+ {"Wancho", Var, 14},
+ {"Warang_Citi", Var, 4},
+ {"White_Space", Var, 0},
+ {"Yezidi", Var, 16},
+ {"Yi", Var, 0},
+ {"Z", Var, 0},
+ {"Zanabazar_Square", Var, 10},
+ {"Zl", Var, 0},
+ {"Zp", Var, 0},
+ {"Zs", Var, 0},
+ },
+ "unicode/utf16": {
+ {"AppendRune", Func, 20},
+ {"Decode", Func, 0},
+ {"DecodeRune", Func, 0},
+ {"Encode", Func, 0},
+ {"EncodeRune", Func, 0},
+ {"IsSurrogate", Func, 0},
+ },
+ "unicode/utf8": {
+ {"AppendRune", Func, 18},
+ {"DecodeLastRune", Func, 0},
+ {"DecodeLastRuneInString", Func, 0},
+ {"DecodeRune", Func, 0},
+ {"DecodeRuneInString", Func, 0},
+ {"EncodeRune", Func, 0},
+ {"FullRune", Func, 0},
+ {"FullRuneInString", Func, 0},
+ {"MaxRune", Const, 0},
+ {"RuneCount", Func, 0},
+ {"RuneCountInString", Func, 0},
+ {"RuneError", Const, 0},
+ {"RuneLen", Func, 0},
+ {"RuneSelf", Const, 0},
+ {"RuneStart", Func, 0},
+ {"UTFMax", Const, 0},
+ {"Valid", Func, 0},
+ {"ValidRune", Func, 1},
+ {"ValidString", Func, 0},
+ },
+ "unsafe": {
+ {"Add", Func, 0},
+ {"Alignof", Func, 0},
+ {"Offsetof", Func, 0},
+ {"Pointer", Type, 0},
+ {"Sizeof", Func, 0},
+ {"Slice", Func, 0},
+ {"SliceData", Func, 0},
+ {"String", Func, 0},
+ {"StringData", Func, 0},
+ },
+}
diff --git a/vendor/golang.org/x/tools/internal/stdlib/stdlib.go b/vendor/golang.org/x/tools/internal/stdlib/stdlib.go
new file mode 100644
index 00000000..98904017
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/stdlib/stdlib.go
@@ -0,0 +1,97 @@
+// Copyright 2022 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.
+
+//go:generate go run generate.go
+
+// Package stdlib provides a table of all exported symbols in the
+// standard library, along with the version at which they first
+// appeared.
+package stdlib
+
+import (
+ "fmt"
+ "strings"
+)
+
+type Symbol struct {
+ Name string
+ Kind Kind
+ Version Version // Go version that first included the symbol
+}
+
+// A Kind indicates the kind of a symbol:
+// function, variable, constant, type, and so on.
+type Kind int8
+
+const (
+ Invalid Kind = iota // Example name:
+ Type // "Buffer"
+ Func // "Println"
+ Var // "EOF"
+ Const // "Pi"
+ Field // "Point.X"
+ Method // "(*Buffer).Grow"
+)
+
+func (kind Kind) String() string {
+ return [...]string{
+ Invalid: "invalid",
+ Type: "type",
+ Func: "func",
+ Var: "var",
+ Const: "const",
+ Field: "field",
+ Method: "method",
+ }[kind]
+}
+
+// A Version represents a version of Go of the form "go1.%d".
+type Version int8
+
+// String returns a version string of the form "go1.23", without allocating.
+func (v Version) String() string { return versions[v] }
+
+var versions [30]string // (increase constant as needed)
+
+func init() {
+ for i := range versions {
+ versions[i] = fmt.Sprintf("go1.%d", i)
+ }
+}
+
+// HasPackage reports whether the specified package path is part of
+// the standard library's public API.
+func HasPackage(path string) bool {
+ _, ok := PackageSymbols[path]
+ return ok
+}
+
+// SplitField splits the field symbol name into type and field
+// components. It must be called only on Field symbols.
+//
+// Example: "File.Package" -> ("File", "Package")
+func (sym *Symbol) SplitField() (typename, name string) {
+ if sym.Kind != Field {
+ panic("not a field")
+ }
+ typename, name, _ = strings.Cut(sym.Name, ".")
+ return
+}
+
+// SplitMethod splits the method symbol name into pointer, receiver,
+// and method components. It must be called only on Method symbols.
+//
+// Example: "(*Buffer).Grow" -> (true, "Buffer", "Grow")
+func (sym *Symbol) SplitMethod() (ptr bool, recv, name string) {
+ if sym.Kind != Method {
+ panic("not a method")
+ }
+ recv, name, _ = strings.Cut(sym.Name, ".")
+ recv = recv[len("(") : len(recv)-len(")")]
+ ptr = recv[0] == '*'
+ if ptr {
+ recv = recv[len("*"):]
+ }
+ return
+}
diff --git a/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go b/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go
index 7e638ec2..ff9437a3 100644
--- a/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go
+++ b/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go
@@ -34,30 +34,16 @@ func GetLines(file *token.File) []int {
lines []int
_ []struct{}
}
- type tokenFile118 struct {
- _ *token.FileSet // deleted in go1.19
- tokenFile119
- }
-
- type uP = unsafe.Pointer
- switch unsafe.Sizeof(*file) {
- case unsafe.Sizeof(tokenFile118{}):
- var ptr *tokenFile118
- *(*uP)(uP(&ptr)) = uP(file)
- ptr.mu.Lock()
- defer ptr.mu.Unlock()
- return ptr.lines
- case unsafe.Sizeof(tokenFile119{}):
- var ptr *tokenFile119
- *(*uP)(uP(&ptr)) = uP(file)
- ptr.mu.Lock()
- defer ptr.mu.Unlock()
- return ptr.lines
-
- default:
+ if unsafe.Sizeof(*file) != unsafe.Sizeof(tokenFile119{}) {
panic("unexpected token.File size")
}
+ var ptr *tokenFile119
+ type uP = unsafe.Pointer
+ *(*uP)(uP(&ptr)) = uP(file)
+ ptr.mu.Lock()
+ defer ptr.mu.Unlock()
+ return ptr.lines
}
// AddExistingFiles adds the specified files to the FileSet if they
diff --git a/vendor/golang.org/x/tools/internal/typeparams/common.go b/vendor/golang.org/x/tools/internal/typeparams/common.go
deleted file mode 100644
index d0d0649f..00000000
--- a/vendor/golang.org/x/tools/internal/typeparams/common.go
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2021 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 typeparams contains common utilities for writing tools that interact
-// with generic Go code, as introduced with Go 1.18.
-//
-// Many of the types and functions in this package are proxies for the new APIs
-// introduced in the standard library with Go 1.18. For example, the
-// typeparams.Union type is an alias for go/types.Union, and the ForTypeSpec
-// function returns the value of the go/ast.TypeSpec.TypeParams field. At Go
-// versions older than 1.18 these helpers are implemented as stubs, allowing
-// users of this package to write code that handles generic constructs inline,
-// even if the Go version being used to compile does not support generics.
-//
-// Additionally, this package contains common utilities for working with the
-// new generic constructs, to supplement the standard library APIs. Notably,
-// the StructuralTerms API computes a minimal representation of the structural
-// restrictions on a type parameter.
-//
-// An external version of these APIs is available in the
-// golang.org/x/exp/typeparams module.
-package typeparams
-
-import (
- "fmt"
- "go/ast"
- "go/token"
- "go/types"
-)
-
-// UnpackIndexExpr extracts data from AST nodes that represent index
-// expressions.
-//
-// For an ast.IndexExpr, the resulting indices slice will contain exactly one
-// index expression. For an ast.IndexListExpr (go1.18+), it may have a variable
-// number of index expressions.
-//
-// For nodes that don't represent index expressions, the first return value of
-// UnpackIndexExpr will be nil.
-func UnpackIndexExpr(n ast.Node) (x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) {
- switch e := n.(type) {
- case *ast.IndexExpr:
- return e.X, e.Lbrack, []ast.Expr{e.Index}, e.Rbrack
- case *IndexListExpr:
- return e.X, e.Lbrack, e.Indices, e.Rbrack
- }
- return nil, token.NoPos, nil, token.NoPos
-}
-
-// PackIndexExpr returns an *ast.IndexExpr or *ast.IndexListExpr, depending on
-// the cardinality of indices. Calling PackIndexExpr with len(indices) == 0
-// will panic.
-func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) ast.Expr {
- switch len(indices) {
- case 0:
- panic("empty indices")
- case 1:
- return &ast.IndexExpr{
- X: x,
- Lbrack: lbrack,
- Index: indices[0],
- Rbrack: rbrack,
- }
- default:
- return &IndexListExpr{
- X: x,
- Lbrack: lbrack,
- Indices: indices,
- Rbrack: rbrack,
- }
- }
-}
-
-// IsTypeParam reports whether t is a type parameter.
-func IsTypeParam(t types.Type) bool {
- _, ok := t.(*TypeParam)
- return ok
-}
-
-// OriginMethod returns the origin method associated with the method fn.
-// For methods on a non-generic receiver base type, this is just
-// fn. However, for methods with a generic receiver, OriginMethod returns the
-// corresponding method in the method set of the origin type.
-//
-// As a special case, if fn is not a method (has no receiver), OriginMethod
-// returns fn.
-func OriginMethod(fn *types.Func) *types.Func {
- recv := fn.Type().(*types.Signature).Recv()
- if recv == nil {
- return fn
- }
- base := recv.Type()
- p, isPtr := base.(*types.Pointer)
- if isPtr {
- base = p.Elem()
- }
- named, isNamed := base.(*types.Named)
- if !isNamed {
- // Receiver is a *types.Interface.
- return fn
- }
- if ForNamed(named).Len() == 0 {
- // Receiver base has no type parameters, so we can avoid the lookup below.
- return fn
- }
- orig := NamedTypeOrigin(named)
- gfn, _, _ := types.LookupFieldOrMethod(orig, true, fn.Pkg(), fn.Name())
-
- // This is a fix for a gopls crash (#60628) due to a go/types bug (#60634). In:
- // package p
- // type T *int
- // func (*T) f() {}
- // LookupFieldOrMethod(T, true, p, f)=nil, but NewMethodSet(*T)={(*T).f}.
- // Here we make them consistent by force.
- // (The go/types bug is general, but this workaround is reached only
- // for generic T thanks to the early return above.)
- if gfn == nil {
- mset := types.NewMethodSet(types.NewPointer(orig))
- for i := 0; i < mset.Len(); i++ {
- m := mset.At(i)
- if m.Obj().Id() == fn.Id() {
- gfn = m.Obj()
- break
- }
- }
- }
-
- // In golang/go#61196, we observe another crash, this time inexplicable.
- if gfn == nil {
- panic(fmt.Sprintf("missing origin method for %s.%s; named == origin: %t, named.NumMethods(): %d, origin.NumMethods(): %d", named, fn, named == orig, named.NumMethods(), orig.NumMethods()))
- }
-
- return gfn.(*types.Func)
-}
-
-// GenericAssignableTo is a generalization of types.AssignableTo that
-// implements the following rule for uninstantiated generic types:
-//
-// If V and T are generic named types, then V is considered assignable to T if,
-// for every possible instantation of V[A_1, ..., A_N], the instantiation
-// T[A_1, ..., A_N] is valid and V[A_1, ..., A_N] implements T[A_1, ..., A_N].
-//
-// If T has structural constraints, they must be satisfied by V.
-//
-// For example, consider the following type declarations:
-//
-// type Interface[T any] interface {
-// Accept(T)
-// }
-//
-// type Container[T any] struct {
-// Element T
-// }
-//
-// func (c Container[T]) Accept(t T) { c.Element = t }
-//
-// In this case, GenericAssignableTo reports that instantiations of Container
-// are assignable to the corresponding instantiation of Interface.
-func GenericAssignableTo(ctxt *Context, V, T types.Type) bool {
- // If V and T are not both named, or do not have matching non-empty type
- // parameter lists, fall back on types.AssignableTo.
-
- VN, Vnamed := V.(*types.Named)
- TN, Tnamed := T.(*types.Named)
- if !Vnamed || !Tnamed {
- return types.AssignableTo(V, T)
- }
-
- vtparams := ForNamed(VN)
- ttparams := ForNamed(TN)
- if vtparams.Len() == 0 || vtparams.Len() != ttparams.Len() || NamedTypeArgs(VN).Len() != 0 || NamedTypeArgs(TN).Len() != 0 {
- return types.AssignableTo(V, T)
- }
-
- // V and T have the same (non-zero) number of type params. Instantiate both
- // with the type parameters of V. This must always succeed for V, and will
- // succeed for T if and only if the type set of each type parameter of V is a
- // subset of the type set of the corresponding type parameter of T, meaning
- // that every instantiation of V corresponds to a valid instantiation of T.
-
- // Minor optimization: ensure we share a context across the two
- // instantiations below.
- if ctxt == nil {
- ctxt = NewContext()
- }
-
- var targs []types.Type
- for i := 0; i < vtparams.Len(); i++ {
- targs = append(targs, vtparams.At(i))
- }
-
- vinst, err := Instantiate(ctxt, V, targs, true)
- if err != nil {
- panic("type parameters should satisfy their own constraints")
- }
-
- tinst, err := Instantiate(ctxt, T, targs, true)
- if err != nil {
- return false
- }
-
- return types.AssignableTo(vinst, tinst)
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/coretype.go b/vendor/golang.org/x/tools/internal/typeparams/coretype.go
deleted file mode 100644
index 71248209..00000000
--- a/vendor/golang.org/x/tools/internal/typeparams/coretype.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright 2022 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 typeparams
-
-import (
- "go/types"
-)
-
-// CoreType returns the core type of T or nil if T does not have a core type.
-//
-// See https://go.dev/ref/spec#Core_types for the definition of a core type.
-func CoreType(T types.Type) types.Type {
- U := T.Underlying()
- if _, ok := U.(*types.Interface); !ok {
- return U // for non-interface types,
- }
-
- terms, err := _NormalTerms(U)
- if len(terms) == 0 || err != nil {
- // len(terms) -> empty type set of interface.
- // err != nil => U is invalid, exceeds complexity bounds, or has an empty type set.
- return nil // no core type.
- }
-
- U = terms[0].Type().Underlying()
- var identical int // i in [0,identical) => Identical(U, terms[i].Type().Underlying())
- for identical = 1; identical < len(terms); identical++ {
- if !types.Identical(U, terms[identical].Type().Underlying()) {
- break
- }
- }
-
- if identical == len(terms) {
- // https://go.dev/ref/spec#Core_types
- // "There is a single type U which is the underlying type of all types in the type set of T"
- return U
- }
- ch, ok := U.(*types.Chan)
- if !ok {
- return nil // no core type as identical < len(terms) and U is not a channel.
- }
- // https://go.dev/ref/spec#Core_types
- // "the type chan E if T contains only bidirectional channels, or the type chan<- E or
- // <-chan E depending on the direction of the directional channels present."
- for chans := identical; chans < len(terms); chans++ {
- curr, ok := terms[chans].Type().Underlying().(*types.Chan)
- if !ok {
- return nil
- }
- if !types.Identical(ch.Elem(), curr.Elem()) {
- return nil // channel elements are not identical.
- }
- if ch.Dir() == types.SendRecv {
- // ch is bidirectional. We can safely always use curr's direction.
- ch = curr
- } else if curr.Dir() != types.SendRecv && ch.Dir() != curr.Dir() {
- // ch and curr are not bidirectional and not the same direction.
- return nil
- }
- }
- return ch
-}
-
-// _NormalTerms returns a slice of terms representing the normalized structural
-// type restrictions of a type, if any.
-//
-// For all types other than *types.TypeParam, *types.Interface, and
-// *types.Union, this is just a single term with Tilde() == false and
-// Type() == typ. For *types.TypeParam, *types.Interface, and *types.Union, see
-// below.
-//
-// Structural type restrictions of a type parameter are created via
-// non-interface types embedded in its constraint interface (directly, or via a
-// chain of interface embeddings). For example, in the declaration type
-// T[P interface{~int; m()}] int the structural restriction of the type
-// parameter P is ~int.
-//
-// With interface embedding and unions, the specification of structural type
-// restrictions may be arbitrarily complex. For example, consider the
-// following:
-//
-// type A interface{ ~string|~[]byte }
-//
-// type B interface{ int|string }
-//
-// type C interface { ~string|~int }
-//
-// type T[P interface{ A|B; C }] int
-//
-// In this example, the structural type restriction of P is ~string|int: A|B
-// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int,
-// which when intersected with C (~string|~int) yields ~string|int.
-//
-// _NormalTerms computes these expansions and reductions, producing a
-// "normalized" form of the embeddings. A structural restriction is normalized
-// if it is a single union containing no interface terms, and is minimal in the
-// sense that removing any term changes the set of types satisfying the
-// constraint. It is left as a proof for the reader that, modulo sorting, there
-// is exactly one such normalized form.
-//
-// Because the minimal representation always takes this form, _NormalTerms
-// returns a slice of tilde terms corresponding to the terms of the union in
-// the normalized structural restriction. An error is returned if the type is
-// invalid, exceeds complexity bounds, or has an empty type set. In the latter
-// case, _NormalTerms returns ErrEmptyTypeSet.
-//
-// _NormalTerms makes no guarantees about the order of terms, except that it
-// is deterministic.
-func _NormalTerms(typ types.Type) ([]*Term, error) {
- switch typ := typ.(type) {
- case *TypeParam:
- return StructuralTerms(typ)
- case *Union:
- return UnionTermSet(typ)
- case *types.Interface:
- return InterfaceTermSet(typ)
- default:
- return []*Term{NewTerm(false, typ)}, nil
- }
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go b/vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go
deleted file mode 100644
index 18212390..00000000
--- a/vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2021 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.
-
-//go:build !go1.18
-// +build !go1.18
-
-package typeparams
-
-// Enabled reports whether type parameters are enabled in the current build
-// environment.
-const Enabled = false
diff --git a/vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go b/vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go
deleted file mode 100644
index d6714882..00000000
--- a/vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2021 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.
-
-//go:build go1.18
-// +build go1.18
-
-package typeparams
-
-// Note: this constant is in a separate file as this is the only acceptable
-// diff between the <1.18 API of this package and the 1.18 API.
-
-// Enabled reports whether type parameters are enabled in the current build
-// environment.
-const Enabled = true
diff --git a/vendor/golang.org/x/tools/internal/typeparams/normalize.go b/vendor/golang.org/x/tools/internal/typeparams/normalize.go
deleted file mode 100644
index 9c631b65..00000000
--- a/vendor/golang.org/x/tools/internal/typeparams/normalize.go
+++ /dev/null
@@ -1,218 +0,0 @@
-// Copyright 2021 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 typeparams
-
-import (
- "errors"
- "fmt"
- "go/types"
- "os"
- "strings"
-)
-
-//go:generate go run copytermlist.go
-
-const debug = false
-
-var ErrEmptyTypeSet = errors.New("empty type set")
-
-// StructuralTerms returns a slice of terms representing the normalized
-// structural type restrictions of a type parameter, if any.
-//
-// Structural type restrictions of a type parameter are created via
-// non-interface types embedded in its constraint interface (directly, or via a
-// chain of interface embeddings). For example, in the declaration
-//
-// type T[P interface{~int; m()}] int
-//
-// the structural restriction of the type parameter P is ~int.
-//
-// With interface embedding and unions, the specification of structural type
-// restrictions may be arbitrarily complex. For example, consider the
-// following:
-//
-// type A interface{ ~string|~[]byte }
-//
-// type B interface{ int|string }
-//
-// type C interface { ~string|~int }
-//
-// type T[P interface{ A|B; C }] int
-//
-// In this example, the structural type restriction of P is ~string|int: A|B
-// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int,
-// which when intersected with C (~string|~int) yields ~string|int.
-//
-// StructuralTerms computes these expansions and reductions, producing a
-// "normalized" form of the embeddings. A structural restriction is normalized
-// if it is a single union containing no interface terms, and is minimal in the
-// sense that removing any term changes the set of types satisfying the
-// constraint. It is left as a proof for the reader that, modulo sorting, there
-// is exactly one such normalized form.
-//
-// Because the minimal representation always takes this form, StructuralTerms
-// returns a slice of tilde terms corresponding to the terms of the union in
-// the normalized structural restriction. An error is returned if the
-// constraint interface is invalid, exceeds complexity bounds, or has an empty
-// type set. In the latter case, StructuralTerms returns ErrEmptyTypeSet.
-//
-// StructuralTerms makes no guarantees about the order of terms, except that it
-// is deterministic.
-func StructuralTerms(tparam *TypeParam) ([]*Term, error) {
- constraint := tparam.Constraint()
- if constraint == nil {
- return nil, fmt.Errorf("%s has nil constraint", tparam)
- }
- iface, _ := constraint.Underlying().(*types.Interface)
- if iface == nil {
- return nil, fmt.Errorf("constraint is %T, not *types.Interface", constraint.Underlying())
- }
- return InterfaceTermSet(iface)
-}
-
-// InterfaceTermSet computes the normalized terms for a constraint interface,
-// returning an error if the term set cannot be computed or is empty. In the
-// latter case, the error will be ErrEmptyTypeSet.
-//
-// See the documentation of StructuralTerms for more information on
-// normalization.
-func InterfaceTermSet(iface *types.Interface) ([]*Term, error) {
- return computeTermSet(iface)
-}
-
-// UnionTermSet computes the normalized terms for a union, returning an error
-// if the term set cannot be computed or is empty. In the latter case, the
-// error will be ErrEmptyTypeSet.
-//
-// See the documentation of StructuralTerms for more information on
-// normalization.
-func UnionTermSet(union *Union) ([]*Term, error) {
- return computeTermSet(union)
-}
-
-func computeTermSet(typ types.Type) ([]*Term, error) {
- tset, err := computeTermSetInternal(typ, make(map[types.Type]*termSet), 0)
- if err != nil {
- return nil, err
- }
- if tset.terms.isEmpty() {
- return nil, ErrEmptyTypeSet
- }
- if tset.terms.isAll() {
- return nil, nil
- }
- var terms []*Term
- for _, term := range tset.terms {
- terms = append(terms, NewTerm(term.tilde, term.typ))
- }
- return terms, nil
-}
-
-// A termSet holds the normalized set of terms for a given type.
-//
-// The name termSet is intentionally distinct from 'type set': a type set is
-// all types that implement a type (and includes method restrictions), whereas
-// a term set just represents the structural restrictions on a type.
-type termSet struct {
- complete bool
- terms termlist
-}
-
-func indentf(depth int, format string, args ...interface{}) {
- fmt.Fprintf(os.Stderr, strings.Repeat(".", depth)+format+"\n", args...)
-}
-
-func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth int) (res *termSet, err error) {
- if t == nil {
- panic("nil type")
- }
-
- if debug {
- indentf(depth, "%s", t.String())
- defer func() {
- if err != nil {
- indentf(depth, "=> %s", err)
- } else {
- indentf(depth, "=> %s", res.terms.String())
- }
- }()
- }
-
- const maxTermCount = 100
- if tset, ok := seen[t]; ok {
- if !tset.complete {
- return nil, fmt.Errorf("cycle detected in the declaration of %s", t)
- }
- return tset, nil
- }
-
- // Mark the current type as seen to avoid infinite recursion.
- tset := new(termSet)
- defer func() {
- tset.complete = true
- }()
- seen[t] = tset
-
- switch u := t.Underlying().(type) {
- case *types.Interface:
- // The term set of an interface is the intersection of the term sets of its
- // embedded types.
- tset.terms = allTermlist
- for i := 0; i < u.NumEmbeddeds(); i++ {
- embedded := u.EmbeddedType(i)
- if _, ok := embedded.Underlying().(*TypeParam); ok {
- return nil, fmt.Errorf("invalid embedded type %T", embedded)
- }
- tset2, err := computeTermSetInternal(embedded, seen, depth+1)
- if err != nil {
- return nil, err
- }
- tset.terms = tset.terms.intersect(tset2.terms)
- }
- case *Union:
- // The term set of a union is the union of term sets of its terms.
- tset.terms = nil
- for i := 0; i < u.Len(); i++ {
- t := u.Term(i)
- var terms termlist
- switch t.Type().Underlying().(type) {
- case *types.Interface:
- tset2, err := computeTermSetInternal(t.Type(), seen, depth+1)
- if err != nil {
- return nil, err
- }
- terms = tset2.terms
- case *TypeParam, *Union:
- // A stand-alone type parameter or union is not permitted as union
- // term.
- return nil, fmt.Errorf("invalid union term %T", t)
- default:
- if t.Type() == types.Typ[types.Invalid] {
- continue
- }
- terms = termlist{{t.Tilde(), t.Type()}}
- }
- tset.terms = tset.terms.union(terms)
- if len(tset.terms) > maxTermCount {
- return nil, fmt.Errorf("exceeded max term count %d", maxTermCount)
- }
- }
- case *TypeParam:
- panic("unreachable")
- default:
- // For all other types, the term set is just a single non-tilde term
- // holding the type itself.
- if u != types.Typ[types.Invalid] {
- tset.terms = termlist{{false, t}}
- }
- }
- return tset, nil
-}
-
-// under is a facade for the go/types internal function of the same name. It is
-// used by typeterm.go.
-func under(t types.Type) types.Type {
- return t.Underlying()
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/termlist.go b/vendor/golang.org/x/tools/internal/typeparams/termlist.go
deleted file mode 100644
index cbd12f80..00000000
--- a/vendor/golang.org/x/tools/internal/typeparams/termlist.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2021 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.
-
-// Code generated by copytermlist.go DO NOT EDIT.
-
-package typeparams
-
-import (
- "bytes"
- "go/types"
-)
-
-// A termlist represents the type set represented by the union
-// t1 βͺ y2 βͺ ... tn of the type sets of the terms t1 to tn.
-// A termlist is in normal form if all terms are disjoint.
-// termlist operations don't require the operands to be in
-// normal form.
-type termlist []*term
-
-// allTermlist represents the set of all types.
-// It is in normal form.
-var allTermlist = termlist{new(term)}
-
-// String prints the termlist exactly (without normalization).
-func (xl termlist) String() string {
- if len(xl) == 0 {
- return "β
"
- }
- var buf bytes.Buffer
- for i, x := range xl {
- if i > 0 {
- buf.WriteString(" | ")
- }
- buf.WriteString(x.String())
- }
- return buf.String()
-}
-
-// isEmpty reports whether the termlist xl represents the empty set of types.
-func (xl termlist) isEmpty() bool {
- // If there's a non-nil term, the entire list is not empty.
- // If the termlist is in normal form, this requires at most
- // one iteration.
- for _, x := range xl {
- if x != nil {
- return false
- }
- }
- return true
-}
-
-// isAll reports whether the termlist xl represents the set of all types.
-func (xl termlist) isAll() bool {
- // If there's a π€ term, the entire list is π€.
- // If the termlist is in normal form, this requires at most
- // one iteration.
- for _, x := range xl {
- if x != nil && x.typ == nil {
- return true
- }
- }
- return false
-}
-
-// norm returns the normal form of xl.
-func (xl termlist) norm() termlist {
- // Quadratic algorithm, but good enough for now.
- // TODO(gri) fix asymptotic performance
- used := make([]bool, len(xl))
- var rl termlist
- for i, xi := range xl {
- if xi == nil || used[i] {
- continue
- }
- for j := i + 1; j < len(xl); j++ {
- xj := xl[j]
- if xj == nil || used[j] {
- continue
- }
- if u1, u2 := xi.union(xj); u2 == nil {
- // If we encounter a π€ term, the entire list is π€.
- // Exit early.
- // (Note that this is not just an optimization;
- // if we continue, we may end up with a π€ term
- // and other terms and the result would not be
- // in normal form.)
- if u1.typ == nil {
- return allTermlist
- }
- xi = u1
- used[j] = true // xj is now unioned into xi - ignore it in future iterations
- }
- }
- rl = append(rl, xi)
- }
- return rl
-}
-
-// union returns the union xl βͺ yl.
-func (xl termlist) union(yl termlist) termlist {
- return append(xl, yl...).norm()
-}
-
-// intersect returns the intersection xl β© yl.
-func (xl termlist) intersect(yl termlist) termlist {
- if xl.isEmpty() || yl.isEmpty() {
- return nil
- }
-
- // Quadratic algorithm, but good enough for now.
- // TODO(gri) fix asymptotic performance
- var rl termlist
- for _, x := range xl {
- for _, y := range yl {
- if r := x.intersect(y); r != nil {
- rl = append(rl, r)
- }
- }
- }
- return rl.norm()
-}
-
-// equal reports whether xl and yl represent the same type set.
-func (xl termlist) equal(yl termlist) bool {
- // TODO(gri) this should be more efficient
- return xl.subsetOf(yl) && yl.subsetOf(xl)
-}
-
-// includes reports whether t β xl.
-func (xl termlist) includes(t types.Type) bool {
- for _, x := range xl {
- if x.includes(t) {
- return true
- }
- }
- return false
-}
-
-// supersetOf reports whether y β xl.
-func (xl termlist) supersetOf(y *term) bool {
- for _, x := range xl {
- if y.subsetOf(x) {
- return true
- }
- }
- return false
-}
-
-// subsetOf reports whether xl β yl.
-func (xl termlist) subsetOf(yl termlist) bool {
- if yl.isEmpty() {
- return xl.isEmpty()
- }
-
- // each term x of xl must be a subset of yl
- for _, x := range xl {
- if !yl.supersetOf(x) {
- return false // x is not a subset yl
- }
- }
- return true
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go
deleted file mode 100644
index 7ed86e17..00000000
--- a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright 2021 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.
-
-//go:build !go1.18
-// +build !go1.18
-
-package typeparams
-
-import (
- "go/ast"
- "go/token"
- "go/types"
-)
-
-func unsupported() {
- panic("type parameters are unsupported at this go version")
-}
-
-// IndexListExpr is a placeholder type, as type parameters are not supported at
-// this Go version. Its methods panic on use.
-type IndexListExpr struct {
- ast.Expr
- X ast.Expr // expression
- Lbrack token.Pos // position of "["
- Indices []ast.Expr // index expressions
- Rbrack token.Pos // position of "]"
-}
-
-// ForTypeSpec returns an empty field list, as type parameters on not supported
-// at this Go version.
-func ForTypeSpec(*ast.TypeSpec) *ast.FieldList {
- return nil
-}
-
-// ForFuncType returns an empty field list, as type parameters are not
-// supported at this Go version.
-func ForFuncType(*ast.FuncType) *ast.FieldList {
- return nil
-}
-
-// TypeParam is a placeholder type, as type parameters are not supported at
-// this Go version. Its methods panic on use.
-type TypeParam struct{ types.Type }
-
-func (*TypeParam) Index() int { unsupported(); return 0 }
-func (*TypeParam) Constraint() types.Type { unsupported(); return nil }
-func (*TypeParam) Obj() *types.TypeName { unsupported(); return nil }
-
-// TypeParamList is a placeholder for an empty type parameter list.
-type TypeParamList struct{}
-
-func (*TypeParamList) Len() int { return 0 }
-func (*TypeParamList) At(int) *TypeParam { unsupported(); return nil }
-
-// TypeList is a placeholder for an empty type list.
-type TypeList struct{}
-
-func (*TypeList) Len() int { return 0 }
-func (*TypeList) At(int) types.Type { unsupported(); return nil }
-
-// NewTypeParam is unsupported at this Go version, and panics.
-func NewTypeParam(name *types.TypeName, constraint types.Type) *TypeParam {
- unsupported()
- return nil
-}
-
-// SetTypeParamConstraint is unsupported at this Go version, and panics.
-func SetTypeParamConstraint(tparam *TypeParam, constraint types.Type) {
- unsupported()
-}
-
-// NewSignatureType calls types.NewSignature, panicking if recvTypeParams or
-// typeParams is non-empty.
-func NewSignatureType(recv *types.Var, recvTypeParams, typeParams []*TypeParam, params, results *types.Tuple, variadic bool) *types.Signature {
- if len(recvTypeParams) != 0 || len(typeParams) != 0 {
- panic("signatures cannot have type parameters at this Go version")
- }
- return types.NewSignature(recv, params, results, variadic)
-}
-
-// ForSignature returns an empty slice.
-func ForSignature(*types.Signature) *TypeParamList {
- return nil
-}
-
-// RecvTypeParams returns a nil slice.
-func RecvTypeParams(sig *types.Signature) *TypeParamList {
- return nil
-}
-
-// IsComparable returns false, as no interfaces are type-restricted at this Go
-// version.
-func IsComparable(*types.Interface) bool {
- return false
-}
-
-// IsMethodSet returns true, as no interfaces are type-restricted at this Go
-// version.
-func IsMethodSet(*types.Interface) bool {
- return true
-}
-
-// IsImplicit returns false, as no interfaces are implicit at this Go version.
-func IsImplicit(*types.Interface) bool {
- return false
-}
-
-// MarkImplicit does nothing, because this Go version does not have implicit
-// interfaces.
-func MarkImplicit(*types.Interface) {}
-
-// ForNamed returns an empty type parameter list, as type parameters are not
-// supported at this Go version.
-func ForNamed(*types.Named) *TypeParamList {
- return nil
-}
-
-// SetForNamed panics if tparams is non-empty.
-func SetForNamed(_ *types.Named, tparams []*TypeParam) {
- if len(tparams) > 0 {
- unsupported()
- }
-}
-
-// NamedTypeArgs returns nil.
-func NamedTypeArgs(*types.Named) *TypeList {
- return nil
-}
-
-// NamedTypeOrigin is the identity method at this Go version.
-func NamedTypeOrigin(named *types.Named) *types.Named {
- return named
-}
-
-// Term holds information about a structural type restriction.
-type Term struct {
- tilde bool
- typ types.Type
-}
-
-func (m *Term) Tilde() bool { return m.tilde }
-func (m *Term) Type() types.Type { return m.typ }
-func (m *Term) String() string {
- pre := ""
- if m.tilde {
- pre = "~"
- }
- return pre + m.typ.String()
-}
-
-// NewTerm is unsupported at this Go version, and panics.
-func NewTerm(tilde bool, typ types.Type) *Term {
- return &Term{tilde, typ}
-}
-
-// Union is a placeholder type, as type parameters are not supported at this Go
-// version. Its methods panic on use.
-type Union struct{ types.Type }
-
-func (*Union) Len() int { return 0 }
-func (*Union) Term(i int) *Term { unsupported(); return nil }
-
-// NewUnion is unsupported at this Go version, and panics.
-func NewUnion(terms []*Term) *Union {
- unsupported()
- return nil
-}
-
-// InitInstanceInfo is a noop at this Go version.
-func InitInstanceInfo(*types.Info) {}
-
-// Instance is a placeholder type, as type parameters are not supported at this
-// Go version.
-type Instance struct {
- TypeArgs *TypeList
- Type types.Type
-}
-
-// GetInstances returns a nil map, as type parameters are not supported at this
-// Go version.
-func GetInstances(info *types.Info) map[*ast.Ident]Instance { return nil }
-
-// Context is a placeholder type, as type parameters are not supported at
-// this Go version.
-type Context struct{}
-
-// NewContext returns a placeholder Context instance.
-func NewContext() *Context {
- return &Context{}
-}
-
-// Instantiate is unsupported on this Go version, and panics.
-func Instantiate(ctxt *Context, typ types.Type, targs []types.Type, validate bool) (types.Type, error) {
- unsupported()
- return nil, nil
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go
deleted file mode 100644
index cf301af1..00000000
--- a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright 2021 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.
-
-//go:build go1.18
-// +build go1.18
-
-package typeparams
-
-import (
- "go/ast"
- "go/types"
-)
-
-// IndexListExpr is an alias for ast.IndexListExpr.
-type IndexListExpr = ast.IndexListExpr
-
-// ForTypeSpec returns n.TypeParams.
-func ForTypeSpec(n *ast.TypeSpec) *ast.FieldList {
- if n == nil {
- return nil
- }
- return n.TypeParams
-}
-
-// ForFuncType returns n.TypeParams.
-func ForFuncType(n *ast.FuncType) *ast.FieldList {
- if n == nil {
- return nil
- }
- return n.TypeParams
-}
-
-// TypeParam is an alias for types.TypeParam
-type TypeParam = types.TypeParam
-
-// TypeParamList is an alias for types.TypeParamList
-type TypeParamList = types.TypeParamList
-
-// TypeList is an alias for types.TypeList
-type TypeList = types.TypeList
-
-// NewTypeParam calls types.NewTypeParam.
-func NewTypeParam(name *types.TypeName, constraint types.Type) *TypeParam {
- return types.NewTypeParam(name, constraint)
-}
-
-// SetTypeParamConstraint calls tparam.SetConstraint(constraint).
-func SetTypeParamConstraint(tparam *TypeParam, constraint types.Type) {
- tparam.SetConstraint(constraint)
-}
-
-// NewSignatureType calls types.NewSignatureType.
-func NewSignatureType(recv *types.Var, recvTypeParams, typeParams []*TypeParam, params, results *types.Tuple, variadic bool) *types.Signature {
- return types.NewSignatureType(recv, recvTypeParams, typeParams, params, results, variadic)
-}
-
-// ForSignature returns sig.TypeParams()
-func ForSignature(sig *types.Signature) *TypeParamList {
- return sig.TypeParams()
-}
-
-// RecvTypeParams returns sig.RecvTypeParams().
-func RecvTypeParams(sig *types.Signature) *TypeParamList {
- return sig.RecvTypeParams()
-}
-
-// IsComparable calls iface.IsComparable().
-func IsComparable(iface *types.Interface) bool {
- return iface.IsComparable()
-}
-
-// IsMethodSet calls iface.IsMethodSet().
-func IsMethodSet(iface *types.Interface) bool {
- return iface.IsMethodSet()
-}
-
-// IsImplicit calls iface.IsImplicit().
-func IsImplicit(iface *types.Interface) bool {
- return iface.IsImplicit()
-}
-
-// MarkImplicit calls iface.MarkImplicit().
-func MarkImplicit(iface *types.Interface) {
- iface.MarkImplicit()
-}
-
-// ForNamed extracts the (possibly empty) type parameter object list from
-// named.
-func ForNamed(named *types.Named) *TypeParamList {
- return named.TypeParams()
-}
-
-// SetForNamed sets the type params tparams on n. Each tparam must be of
-// dynamic type *types.TypeParam.
-func SetForNamed(n *types.Named, tparams []*TypeParam) {
- n.SetTypeParams(tparams)
-}
-
-// NamedTypeArgs returns named.TypeArgs().
-func NamedTypeArgs(named *types.Named) *TypeList {
- return named.TypeArgs()
-}
-
-// NamedTypeOrigin returns named.Orig().
-func NamedTypeOrigin(named *types.Named) *types.Named {
- return named.Origin()
-}
-
-// Term is an alias for types.Term.
-type Term = types.Term
-
-// NewTerm calls types.NewTerm.
-func NewTerm(tilde bool, typ types.Type) *Term {
- return types.NewTerm(tilde, typ)
-}
-
-// Union is an alias for types.Union
-type Union = types.Union
-
-// NewUnion calls types.NewUnion.
-func NewUnion(terms []*Term) *Union {
- return types.NewUnion(terms)
-}
-
-// InitInstanceInfo initializes info to record information about type and
-// function instances.
-func InitInstanceInfo(info *types.Info) {
- info.Instances = make(map[*ast.Ident]types.Instance)
-}
-
-// Instance is an alias for types.Instance.
-type Instance = types.Instance
-
-// GetInstances returns info.Instances.
-func GetInstances(info *types.Info) map[*ast.Ident]Instance {
- return info.Instances
-}
-
-// Context is an alias for types.Context.
-type Context = types.Context
-
-// NewContext calls types.NewContext.
-func NewContext() *Context {
- return types.NewContext()
-}
-
-// Instantiate calls types.Instantiate.
-func Instantiate(ctxt *Context, typ types.Type, targs []types.Type, validate bool) (types.Type, error) {
- return types.Instantiate(ctxt, typ, targs, validate)
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeterm.go b/vendor/golang.org/x/tools/internal/typeparams/typeterm.go
deleted file mode 100644
index 7350bb70..00000000
--- a/vendor/golang.org/x/tools/internal/typeparams/typeterm.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2021 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.
-
-// Code generated by copytermlist.go DO NOT EDIT.
-
-package typeparams
-
-import "go/types"
-
-// A term describes elementary type sets:
-//
-// β
: (*term)(nil) == β
// set of no types (empty set)
-// π€: &term{} == π€ // set of all types (π€niverse)
-// T: &term{false, T} == {T} // set of type T
-// ~t: &term{true, t} == {t' | under(t') == t} // set of types with underlying type t
-type term struct {
- tilde bool // valid if typ != nil
- typ types.Type
-}
-
-func (x *term) String() string {
- switch {
- case x == nil:
- return "β
"
- case x.typ == nil:
- return "π€"
- case x.tilde:
- return "~" + x.typ.String()
- default:
- return x.typ.String()
- }
-}
-
-// equal reports whether x and y represent the same type set.
-func (x *term) equal(y *term) bool {
- // easy cases
- switch {
- case x == nil || y == nil:
- return x == y
- case x.typ == nil || y.typ == nil:
- return x.typ == y.typ
- }
- // β
β x, y β π€
-
- return x.tilde == y.tilde && types.Identical(x.typ, y.typ)
-}
-
-// union returns the union x βͺ y: zero, one, or two non-nil terms.
-func (x *term) union(y *term) (_, _ *term) {
- // easy cases
- switch {
- case x == nil && y == nil:
- return nil, nil // β
βͺ β
== β
- case x == nil:
- return y, nil // β
βͺ y == y
- case y == nil:
- return x, nil // x βͺ β
== x
- case x.typ == nil:
- return x, nil // π€ βͺ y == π€
- case y.typ == nil:
- return y, nil // x βͺ π€ == π€
- }
- // β
β x, y β π€
-
- if x.disjoint(y) {
- return x, y // x βͺ y == (x, y) if x β© y == β
- }
- // x.typ == y.typ
-
- // ~t βͺ ~t == ~t
- // ~t βͺ T == ~t
- // T βͺ ~t == ~t
- // T βͺ T == T
- if x.tilde || !y.tilde {
- return x, nil
- }
- return y, nil
-}
-
-// intersect returns the intersection x β© y.
-func (x *term) intersect(y *term) *term {
- // easy cases
- switch {
- case x == nil || y == nil:
- return nil // β
β© y == β
and β© β
== β
- case x.typ == nil:
- return y // π€ β© y == y
- case y.typ == nil:
- return x // x β© π€ == x
- }
- // β
β x, y β π€
-
- if x.disjoint(y) {
- return nil // x β© y == β
if x β© y == β
- }
- // x.typ == y.typ
-
- // ~t β© ~t == ~t
- // ~t β© T == T
- // T β© ~t == T
- // T β© T == T
- if !x.tilde || y.tilde {
- return x
- }
- return y
-}
-
-// includes reports whether t β x.
-func (x *term) includes(t types.Type) bool {
- // easy cases
- switch {
- case x == nil:
- return false // t β β
== false
- case x.typ == nil:
- return true // t β π€ == true
- }
- // β
β x β π€
-
- u := t
- if x.tilde {
- u = under(u)
- }
- return types.Identical(x.typ, u)
-}
-
-// subsetOf reports whether x β y.
-func (x *term) subsetOf(y *term) bool {
- // easy cases
- switch {
- case x == nil:
- return true // β
β y == true
- case y == nil:
- return false // x β β
== false since x != β
- case y.typ == nil:
- return true // x β π€ == true
- case x.typ == nil:
- return false // π€ β y == false since y != π€
- }
- // β
β x, y β π€
-
- if x.disjoint(y) {
- return false // x β y == false if x β© y == β
- }
- // x.typ == y.typ
-
- // ~t β ~t == true
- // ~t β T == false
- // T β ~t == true
- // T β T == true
- return !x.tilde || y.tilde
-}
-
-// disjoint reports whether x β© y == β
.
-// x.typ and y.typ must not be nil.
-func (x *term) disjoint(y *term) bool {
- if debug && (x.typ == nil || y.typ == nil) {
- panic("invalid argument(s)")
- }
- ux := x.typ
- if y.tilde {
- ux = under(ux)
- }
- uy := y.typ
- if x.tilde {
- uy = under(uy)
- }
- return !types.Identical(ux, uy)
-}
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go
index 07484073..834e0538 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go
@@ -167,7 +167,7 @@ const (
UntypedNilUse
// WrongAssignCount occurs when the number of values on the right-hand side
- // of an assignment or or initialization expression does not match the number
+ // of an assignment or initialization expression does not match the number
// of variables on the left-hand side.
//
// Example:
@@ -1449,10 +1449,10 @@ const (
NotAGenericType
// WrongTypeArgCount occurs when a type or function is instantiated with an
- // incorrent number of type arguments, including when a generic type or
+ // incorrect number of type arguments, including when a generic type or
// function is used without instantiation.
//
- // Errors inolving failed type inference are assigned other error codes.
+ // Errors involving failed type inference are assigned other error codes.
//
// Example:
// type T[p any] int
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/objectpath.go b/vendor/golang.org/x/tools/internal/typesinternal/objectpath.go
deleted file mode 100644
index 5e96e895..00000000
--- a/vendor/golang.org/x/tools/internal/typesinternal/objectpath.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2023 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 typesinternal
-
-import "go/types"
-
-// This file contains back doors that allow gopls to avoid method sorting when
-// using the objectpath package.
-//
-// This is performance-critical in certain repositories, but changing the
-// behavior of the objectpath package is still being discussed in
-// golang/go#61443. If we decide to remove the sorting in objectpath we can
-// simply delete these back doors. Otherwise, we should add a new API to
-// objectpath that allows controlling the sorting.
-
-// SkipEncoderMethodSorting marks enc (which must be an *objectpath.Encoder) as
-// not requiring sorted methods.
-var SkipEncoderMethodSorting func(enc interface{})
-
-// ObjectpathObject is like objectpath.Object, but allows suppressing method
-// sorting.
-var ObjectpathObject func(pkg *types.Package, p string, skipMethodSorting bool) (types.Object, error)
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/recv.go b/vendor/golang.org/x/tools/internal/typesinternal/recv.go
new file mode 100644
index 00000000..fea7c8b7
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/typesinternal/recv.go
@@ -0,0 +1,43 @@
+// Copyright 2024 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 typesinternal
+
+import (
+ "go/types"
+
+ "golang.org/x/tools/internal/aliases"
+)
+
+// ReceiverNamed returns the named type (if any) associated with the
+// type of recv, which may be of the form N or *N, or aliases thereof.
+// It also reports whether a Pointer was present.
+func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) {
+ t := recv.Type()
+ if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok {
+ isPtr = true
+ t = ptr.Elem()
+ }
+ named, _ = aliases.Unalias(t).(*types.Named)
+ return
+}
+
+// Unpointer returns T given *T or an alias thereof.
+// For all other types it is the identity function.
+// It does not look at underlying types.
+// The result may be an alias.
+//
+// Use this function to strip off the optional pointer on a receiver
+// in a field or method selection, without losing the named type
+// (which is needed to compute the method set).
+//
+// See also [typeparams.MustDeref], which removes one level of
+// indirection from the type, regardless of named types (analogous to
+// a LOAD instruction).
+func Unpointer(t types.Type) types.Type {
+ if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok {
+ return ptr.Elem()
+ }
+ return t
+}
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/toonew.go b/vendor/golang.org/x/tools/internal/typesinternal/toonew.go
new file mode 100644
index 00000000..cc86487e
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/typesinternal/toonew.go
@@ -0,0 +1,89 @@
+// Copyright 2024 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 typesinternal
+
+import (
+ "go/types"
+
+ "golang.org/x/tools/internal/stdlib"
+ "golang.org/x/tools/internal/versions"
+)
+
+// TooNewStdSymbols computes the set of package-level symbols
+// exported by pkg that are not available at the specified version.
+// The result maps each symbol to its minimum version.
+//
+// The pkg is allowed to contain type errors.
+func TooNewStdSymbols(pkg *types.Package, version string) map[types.Object]string {
+ disallowed := make(map[types.Object]string)
+
+ // Pass 1: package-level symbols.
+ symbols := stdlib.PackageSymbols[pkg.Path()]
+ for _, sym := range symbols {
+ symver := sym.Version.String()
+ if versions.Before(version, symver) {
+ switch sym.Kind {
+ case stdlib.Func, stdlib.Var, stdlib.Const, stdlib.Type:
+ disallowed[pkg.Scope().Lookup(sym.Name)] = symver
+ }
+ }
+ }
+
+ // Pass 2: fields and methods.
+ //
+ // We allow fields and methods if their associated type is
+ // disallowed, as otherwise we would report false positives
+ // for compatibility shims. Consider:
+ //
+ // //go:build go1.22
+ // type T struct { F std.Real } // correct new API
+ //
+ // //go:build !go1.22
+ // type T struct { F fake } // shim
+ // type fake struct { ... }
+ // func (fake) M () {}
+ //
+ // These alternative declarations of T use either the std.Real
+ // type, introduced in go1.22, or a fake type, for the field
+ // F. (The fakery could be arbitrarily deep, involving more
+ // nested fields and methods than are shown here.) Clients
+ // that use the compatibility shim T will compile with any
+ // version of go, whether older or newer than go1.22, but only
+ // the newer version will use the std.Real implementation.
+ //
+ // Now consider a reference to method M in new(T).F.M() in a
+ // module that requires a minimum of go1.21. The analysis may
+ // occur using a version of Go higher than 1.21, selecting the
+ // first version of T, so the method M is Real.M. This would
+ // spuriously cause the analyzer to report a reference to a
+ // too-new symbol even though this expression compiles just
+ // fine (with the fake implementation) using go1.21.
+ for _, sym := range symbols {
+ symVersion := sym.Version.String()
+ if !versions.Before(version, symVersion) {
+ continue // allowed
+ }
+
+ var obj types.Object
+ switch sym.Kind {
+ case stdlib.Field:
+ typename, name := sym.SplitField()
+ if t := pkg.Scope().Lookup(typename); t != nil && disallowed[t] == "" {
+ obj, _, _ = types.LookupFieldOrMethod(t.Type(), false, pkg, name)
+ }
+
+ case stdlib.Method:
+ ptr, recvname, name := sym.SplitMethod()
+ if t := pkg.Scope().Lookup(recvname); t != nil && disallowed[t] == "" {
+ obj, _, _ = types.LookupFieldOrMethod(t.Type(), ptr, pkg, name)
+ }
+ }
+ if obj != nil {
+ disallowed[obj] = symVersion
+ }
+ }
+
+ return disallowed
+}
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types.go b/vendor/golang.org/x/tools/internal/typesinternal/types.go
index ce7d4351..7c77c2fb 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/types.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/types.go
@@ -48,5 +48,3 @@ func ReadGo116ErrorData(err types.Error) (code ErrorCode, start, end token.Pos,
}
return ErrorCode(data[0]), token.Pos(data[1]), token.Pos(data[2]), true
}
-
-var SetGoVersion = func(conf *types.Config, version string) bool { return false }
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types_118.go b/vendor/golang.org/x/tools/internal/typesinternal/types_118.go
deleted file mode 100644
index a42b072a..00000000
--- a/vendor/golang.org/x/tools/internal/typesinternal/types_118.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2021 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.
-
-//go:build go1.18
-// +build go1.18
-
-package typesinternal
-
-import (
- "go/types"
-)
-
-func init() {
- SetGoVersion = func(conf *types.Config, version string) bool {
- conf.GoVersion = version
- return true
- }
-}
diff --git a/vendor/golang.org/x/tools/internal/versions/features.go b/vendor/golang.org/x/tools/internal/versions/features.go
new file mode 100644
index 00000000..b53f1786
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/features.go
@@ -0,0 +1,43 @@
+// Copyright 2023 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 versions
+
+// This file contains predicates for working with file versions to
+// decide when a tool should consider a language feature enabled.
+
+// GoVersions that features in x/tools can be gated to.
+const (
+ Go1_18 = "go1.18"
+ Go1_19 = "go1.19"
+ Go1_20 = "go1.20"
+ Go1_21 = "go1.21"
+ Go1_22 = "go1.22"
+)
+
+// Future is an invalid unknown Go version sometime in the future.
+// Do not use directly with Compare.
+const Future = ""
+
+// AtLeast reports whether the file version v comes after a Go release.
+//
+// Use this predicate to enable a behavior once a certain Go release
+// has happened (and stays enabled in the future).
+func AtLeast(v, release string) bool {
+ if v == Future {
+ return true // an unknown future version is always after y.
+ }
+ return Compare(Lang(v), Lang(release)) >= 0
+}
+
+// Before reports whether the file version v is strictly before a Go release.
+//
+// Use this predicate to disable a behavior once a certain Go release
+// has happened (and stays enabled in the future).
+func Before(v, release string) bool {
+ if v == Future {
+ return false // an unknown future version happens after y.
+ }
+ return Compare(Lang(v), Lang(release)) < 0
+}
diff --git a/vendor/golang.org/x/tools/internal/versions/gover.go b/vendor/golang.org/x/tools/internal/versions/gover.go
new file mode 100644
index 00000000..bbabcd22
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/gover.go
@@ -0,0 +1,172 @@
+// Copyright 2023 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.
+
+// This is a fork of internal/gover for use by x/tools until
+// go1.21 and earlier are no longer supported by x/tools.
+
+package versions
+
+import "strings"
+
+// A gover is a parsed Go gover: major[.Minor[.Patch]][kind[pre]]
+// The numbers are the original decimal strings to avoid integer overflows
+// and since there is very little actual math. (Probably overflow doesn't matter in practice,
+// but at the time this code was written, there was an existing test that used
+// go1.99999999999, which does not fit in an int on 32-bit platforms.
+// The "big decimal" representation avoids the problem entirely.)
+type gover struct {
+ major string // decimal
+ minor string // decimal or ""
+ patch string // decimal or ""
+ kind string // "", "alpha", "beta", "rc"
+ pre string // decimal or ""
+}
+
+// compare returns -1, 0, or +1 depending on whether
+// x < y, x == y, or x > y, interpreted as toolchain versions.
+// The versions x and y must not begin with a "go" prefix: just "1.21" not "go1.21".
+// Malformed versions compare less than well-formed versions and equal to each other.
+// The language version "1.21" compares less than the release candidate and eventual releases "1.21rc1" and "1.21.0".
+func compare(x, y string) int {
+ vx := parse(x)
+ vy := parse(y)
+
+ if c := cmpInt(vx.major, vy.major); c != 0 {
+ return c
+ }
+ if c := cmpInt(vx.minor, vy.minor); c != 0 {
+ return c
+ }
+ if c := cmpInt(vx.patch, vy.patch); c != 0 {
+ return c
+ }
+ if c := strings.Compare(vx.kind, vy.kind); c != 0 { // "" < alpha < beta < rc
+ return c
+ }
+ if c := cmpInt(vx.pre, vy.pre); c != 0 {
+ return c
+ }
+ return 0
+}
+
+// lang returns the Go language version. For example, lang("1.2.3") == "1.2".
+func lang(x string) string {
+ v := parse(x)
+ if v.minor == "" || v.major == "1" && v.minor == "0" {
+ return v.major
+ }
+ return v.major + "." + v.minor
+}
+
+// isValid reports whether the version x is valid.
+func isValid(x string) bool {
+ return parse(x) != gover{}
+}
+
+// parse parses the Go version string x into a version.
+// It returns the zero version if x is malformed.
+func parse(x string) gover {
+ var v gover
+
+ // Parse major version.
+ var ok bool
+ v.major, x, ok = cutInt(x)
+ if !ok {
+ return gover{}
+ }
+ if x == "" {
+ // Interpret "1" as "1.0.0".
+ v.minor = "0"
+ v.patch = "0"
+ return v
+ }
+
+ // Parse . before minor version.
+ if x[0] != '.' {
+ return gover{}
+ }
+
+ // Parse minor version.
+ v.minor, x, ok = cutInt(x[1:])
+ if !ok {
+ return gover{}
+ }
+ if x == "" {
+ // Patch missing is same as "0" for older versions.
+ // Starting in Go 1.21, patch missing is different from explicit .0.
+ if cmpInt(v.minor, "21") < 0 {
+ v.patch = "0"
+ }
+ return v
+ }
+
+ // Parse patch if present.
+ if x[0] == '.' {
+ v.patch, x, ok = cutInt(x[1:])
+ if !ok || x != "" {
+ // Note that we are disallowing prereleases (alpha, beta, rc) for patch releases here (x != "").
+ // Allowing them would be a bit confusing because we already have:
+ // 1.21 < 1.21rc1
+ // But a prerelease of a patch would have the opposite effect:
+ // 1.21.3rc1 < 1.21.3
+ // We've never needed them before, so let's not start now.
+ return gover{}
+ }
+ return v
+ }
+
+ // Parse prerelease.
+ i := 0
+ for i < len(x) && (x[i] < '0' || '9' < x[i]) {
+ if x[i] < 'a' || 'z' < x[i] {
+ return gover{}
+ }
+ i++
+ }
+ if i == 0 {
+ return gover{}
+ }
+ v.kind, x = x[:i], x[i:]
+ if x == "" {
+ return v
+ }
+ v.pre, x, ok = cutInt(x)
+ if !ok || x != "" {
+ return gover{}
+ }
+
+ return v
+}
+
+// cutInt scans the leading decimal number at the start of x to an integer
+// and returns that value and the rest of the string.
+func cutInt(x string) (n, rest string, ok bool) {
+ i := 0
+ for i < len(x) && '0' <= x[i] && x[i] <= '9' {
+ i++
+ }
+ if i == 0 || x[0] == '0' && i != 1 { // no digits or unnecessary leading zero
+ return "", "", false
+ }
+ return x[:i], x[i:], true
+}
+
+// cmpInt returns cmp.Compare(x, y) interpreting x and y as decimal numbers.
+// (Copied from golang.org/x/mod/semver's compareInt.)
+func cmpInt(x, y string) int {
+ if x == y {
+ return 0
+ }
+ if len(x) < len(y) {
+ return -1
+ }
+ if len(x) > len(y) {
+ return +1
+ }
+ if x < y {
+ return -1
+ } else {
+ return +1
+ }
+}
diff --git a/vendor/golang.org/x/tools/internal/versions/toolchain.go b/vendor/golang.org/x/tools/internal/versions/toolchain.go
new file mode 100644
index 00000000..377bf7a5
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/toolchain.go
@@ -0,0 +1,14 @@
+// Copyright 2024 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 versions
+
+// toolchain is maximum version (<1.22) that the go toolchain used
+// to build the current tool is known to support.
+//
+// When a tool is built with >=1.22, the value of toolchain is unused.
+//
+// x/tools does not support building with go <1.18. So we take this
+// as the minimum possible maximum.
+var toolchain string = Go1_18
diff --git a/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go b/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go
new file mode 100644
index 00000000..f65beed9
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go
@@ -0,0 +1,14 @@
+// Copyright 2024 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.
+
+//go:build go1.19
+// +build go1.19
+
+package versions
+
+func init() {
+ if Compare(toolchain, Go1_19) < 0 {
+ toolchain = Go1_19
+ }
+}
diff --git a/vendor/golang.org/x/tools/internal/versions/toolchain_go120.go b/vendor/golang.org/x/tools/internal/versions/toolchain_go120.go
new file mode 100644
index 00000000..1a9efa12
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/toolchain_go120.go
@@ -0,0 +1,14 @@
+// Copyright 2024 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.
+
+//go:build go1.20
+// +build go1.20
+
+package versions
+
+func init() {
+ if Compare(toolchain, Go1_20) < 0 {
+ toolchain = Go1_20
+ }
+}
diff --git a/vendor/golang.org/x/tools/internal/versions/toolchain_go121.go b/vendor/golang.org/x/tools/internal/versions/toolchain_go121.go
new file mode 100644
index 00000000..b7ef216d
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/toolchain_go121.go
@@ -0,0 +1,14 @@
+// Copyright 2024 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.
+
+//go:build go1.21
+// +build go1.21
+
+package versions
+
+func init() {
+ if Compare(toolchain, Go1_21) < 0 {
+ toolchain = Go1_21
+ }
+}
diff --git a/vendor/golang.org/x/tools/internal/versions/types.go b/vendor/golang.org/x/tools/internal/versions/types.go
new file mode 100644
index 00000000..562eef21
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/types.go
@@ -0,0 +1,19 @@
+// Copyright 2023 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 versions
+
+import (
+ "go/types"
+)
+
+// GoVersion returns the Go version of the type package.
+// It returns zero if no version can be determined.
+func GoVersion(pkg *types.Package) string {
+ // TODO(taking): x/tools can call GoVersion() [from 1.21] after 1.25.
+ if pkg, ok := any(pkg).(interface{ GoVersion() string }); ok {
+ return pkg.GoVersion()
+ }
+ return ""
+}
diff --git a/vendor/golang.org/x/tools/internal/versions/types_go121.go b/vendor/golang.org/x/tools/internal/versions/types_go121.go
new file mode 100644
index 00000000..b4345d33
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/types_go121.go
@@ -0,0 +1,30 @@
+// Copyright 2023 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.
+
+//go:build !go1.22
+// +build !go1.22
+
+package versions
+
+import (
+ "go/ast"
+ "go/types"
+)
+
+// FileVersion returns a language version (<=1.21) derived from runtime.Version()
+// or an unknown future version.
+func FileVersion(info *types.Info, file *ast.File) string {
+ // In x/tools built with Go <= 1.21, we do not have Info.FileVersions
+ // available. We use a go version derived from the toolchain used to
+ // compile the tool by default.
+ // This will be <= go1.21. We take this as the maximum version that
+ // this tool can support.
+ //
+ // There are no features currently in x/tools that need to tell fine grained
+ // differences for versions <1.22.
+ return toolchain
+}
+
+// InitFileVersions is a noop when compiled with this Go version.
+func InitFileVersions(*types.Info) {}
diff --git a/vendor/golang.org/x/tools/internal/versions/types_go122.go b/vendor/golang.org/x/tools/internal/versions/types_go122.go
new file mode 100644
index 00000000..e8180632
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/types_go122.go
@@ -0,0 +1,41 @@
+// Copyright 2023 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.
+
+//go:build go1.22
+// +build go1.22
+
+package versions
+
+import (
+ "go/ast"
+ "go/types"
+)
+
+// FileVersions returns a file's Go version.
+// The reported version is an unknown Future version if a
+// version cannot be determined.
+func FileVersion(info *types.Info, file *ast.File) string {
+ // In tools built with Go >= 1.22, the Go version of a file
+ // follow a cascades of sources:
+ // 1) types.Info.FileVersion, which follows the cascade:
+ // 1.a) file version (ast.File.GoVersion),
+ // 1.b) the package version (types.Config.GoVersion), or
+ // 2) is some unknown Future version.
+ //
+ // File versions require a valid package version to be provided to types
+ // in Config.GoVersion. Config.GoVersion is either from the package's module
+ // or the toolchain (go run). This value should be provided by go/packages
+ // or unitchecker.Config.GoVersion.
+ if v := info.FileVersions[file]; IsValid(v) {
+ return v
+ }
+ // Note: we could instead return runtime.Version() [if valid].
+ // This would act as a max version on what a tool can support.
+ return Future
+}
+
+// InitFileVersions initializes info to record Go versions for Go files.
+func InitFileVersions(info *types.Info) {
+ info.FileVersions = make(map[*ast.File]string)
+}
diff --git a/vendor/golang.org/x/tools/internal/versions/versions.go b/vendor/golang.org/x/tools/internal/versions/versions.go
new file mode 100644
index 00000000..8d1f7453
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/versions/versions.go
@@ -0,0 +1,57 @@
+// Copyright 2023 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 versions
+
+import (
+ "strings"
+)
+
+// Note: If we use build tags to use go/versions when go >=1.22,
+// we run into go.dev/issue/53737. Under some operations users would see an
+// import of "go/versions" even if they would not compile the file.
+// For example, during `go get -u ./...` (go.dev/issue/64490) we do not try to include
+// For this reason, this library just a clone of go/versions for the moment.
+
+// Lang returns the Go language version for version x.
+// If x is not a valid version, Lang returns the empty string.
+// For example:
+//
+// Lang("go1.21rc2") = "go1.21"
+// Lang("go1.21.2") = "go1.21"
+// Lang("go1.21") = "go1.21"
+// Lang("go1") = "go1"
+// Lang("bad") = ""
+// Lang("1.21") = ""
+func Lang(x string) string {
+ v := lang(stripGo(x))
+ if v == "" {
+ return ""
+ }
+ return x[:2+len(v)] // "go"+v without allocation
+}
+
+// Compare returns -1, 0, or +1 depending on whether
+// x < y, x == y, or x > y, interpreted as Go versions.
+// The versions x and y must begin with a "go" prefix: "go1.21" not "1.21".
+// Invalid versions, including the empty string, compare less than
+// valid versions and equal to each other.
+// The language version "go1.21" compares less than the
+// release candidate and eventual releases "go1.21rc1" and "go1.21.0".
+// Custom toolchain suffixes are ignored during comparison:
+// "go1.21.0" and "go1.21.0-bigcorp" are equal.
+func Compare(x, y string) int { return compare(stripGo(x), stripGo(y)) }
+
+// IsValid reports whether the version x is valid.
+func IsValid(x string) bool { return isValid(stripGo(x)) }
+
+// stripGo converts from a "go1.21" version to a "1.21" version.
+// If v does not start with "go", stripGo returns the empty string (a known invalid version).
+func stripGo(v string) string {
+ v, _, _ = strings.Cut(v, "-") // strip -bigcorp suffix.
+ if len(v) < 2 || v[:2] != "go" {
+ return ""
+ }
+ return v[2:]
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b1936a12..52d7dd84 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,7 +1,4 @@
-# cloud.google.com/go/compute v1.21.0
-## explicit; go 1.19
-cloud.google.com/go/compute/internal
-# cloud.google.com/go/compute/metadata v0.2.3
+# cloud.google.com/go/compute/metadata v0.3.0
## explicit; go 1.19
cloud.google.com/go/compute/metadata
# github.com/Azure/azure-sdk-for-go v58.0.0+incompatible
@@ -350,6 +347,9 @@ github.com/go-openapi/jsonreference/internal
# github.com/go-openapi/swag v0.22.3
## explicit; go 1.18
github.com/go-openapi/swag
+# github.com/go-resty/resty/v2 v2.13.1
+## explicit; go 1.16
+github.com/go-resty/resty/v2
# github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572
## explicit; go 1.13
github.com/go-task/slim-sprig
@@ -514,6 +514,11 @@ github.com/klauspost/compress/zstd/internal/xxhash
github.com/ktr0731/go-fuzzyfinder
github.com/ktr0731/go-fuzzyfinder/matching
github.com/ktr0731/go-fuzzyfinder/scoring
+# github.com/linode/linodego v1.42.0
+## explicit; go 1.22
+github.com/linode/linodego
+github.com/linode/linodego/internal/duration
+github.com/linode/linodego/internal/parseabletime
# github.com/lucasb-eyer/go-colorful v1.2.0
## explicit; go 1.12
github.com/lucasb-eyer/go-colorful
@@ -770,8 +775,8 @@ go.opencensus.io/trace/tracestate
# go.uber.org/mock v0.2.0
## explicit; go 1.19
go.uber.org/mock/gomock
-# golang.org/x/crypto v0.22.0
-## explicit; go 1.18
+# golang.org/x/crypto v0.28.0
+## explicit; go 1.20
golang.org/x/crypto/chacha20
golang.org/x/crypto/chacha20poly1305
golang.org/x/crypto/cryptobyte
@@ -782,12 +787,12 @@ golang.org/x/crypto/internal/poly1305
golang.org/x/crypto/pbkdf2
golang.org/x/crypto/pkcs12
golang.org/x/crypto/pkcs12/internal/rc2
-# golang.org/x/mod v0.12.0
-## explicit; go 1.17
+# golang.org/x/mod v0.17.0
+## explicit; go 1.18
golang.org/x/mod/internal/lazyregexp
golang.org/x/mod/module
golang.org/x/mod/semver
-# golang.org/x/net v0.24.0
+# golang.org/x/net v0.30.0
## explicit; go 1.18
golang.org/x/net/context
golang.org/x/net/html
@@ -800,30 +805,34 @@ golang.org/x/net/idna
golang.org/x/net/internal/socks
golang.org/x/net/internal/timeseries
golang.org/x/net/proxy
+golang.org/x/net/publicsuffix
golang.org/x/net/trace
-# golang.org/x/oauth2 v0.10.0
-## explicit; go 1.17
+# golang.org/x/oauth2 v0.23.0
+## explicit; go 1.18
golang.org/x/oauth2
golang.org/x/oauth2/authhandler
golang.org/x/oauth2/google
-golang.org/x/oauth2/google/internal/externalaccount
+golang.org/x/oauth2/google/externalaccount
+golang.org/x/oauth2/google/internal/externalaccountauthorizeduser
+golang.org/x/oauth2/google/internal/impersonate
+golang.org/x/oauth2/google/internal/stsexchange
golang.org/x/oauth2/internal
golang.org/x/oauth2/jws
golang.org/x/oauth2/jwt
-# golang.org/x/sync v0.3.0
-## explicit; go 1.17
+# golang.org/x/sync v0.8.0
+## explicit; go 1.18
golang.org/x/sync/errgroup
-# golang.org/x/sys v0.20.0
+# golang.org/x/sys v0.26.0
## explicit; go 1.18
golang.org/x/sys/cpu
golang.org/x/sys/execabs
golang.org/x/sys/plan9
golang.org/x/sys/unix
golang.org/x/sys/windows
-# golang.org/x/term v0.19.0
+# golang.org/x/term v0.25.0
## explicit; go 1.18
golang.org/x/term
-# golang.org/x/text v0.14.0
+# golang.org/x/text v0.19.0
## explicit; go 1.18
golang.org/x/text/cases
golang.org/x/text/encoding
@@ -847,11 +856,11 @@ golang.org/x/text/secure/bidirule
golang.org/x/text/transform
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
-# golang.org/x/time v0.3.0
-## explicit
-golang.org/x/time/rate
-# golang.org/x/tools v0.13.0
+# golang.org/x/time v0.5.0
## explicit; go 1.18
+golang.org/x/time/rate
+# golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
+## explicit; go 1.19
golang.org/x/tools/cmd/goimports
golang.org/x/tools/cmd/stringer
golang.org/x/tools/go/ast/astutil
@@ -860,21 +869,21 @@ golang.org/x/tools/go/gcexportdata
golang.org/x/tools/go/internal/packagesdriver
golang.org/x/tools/go/packages
golang.org/x/tools/go/types/objectpath
+golang.org/x/tools/internal/aliases
golang.org/x/tools/internal/event
golang.org/x/tools/internal/event/core
golang.org/x/tools/internal/event/keys
golang.org/x/tools/internal/event/label
-golang.org/x/tools/internal/event/tag
-golang.org/x/tools/internal/fastwalk
golang.org/x/tools/internal/gcimporter
golang.org/x/tools/internal/gocommand
golang.org/x/tools/internal/gopathwalk
golang.org/x/tools/internal/imports
golang.org/x/tools/internal/packagesinternal
golang.org/x/tools/internal/pkgbits
+golang.org/x/tools/internal/stdlib
golang.org/x/tools/internal/tokeninternal
-golang.org/x/tools/internal/typeparams
golang.org/x/tools/internal/typesinternal
+golang.org/x/tools/internal/versions
# google.golang.org/api v0.126.0
## explicit; go 1.19
google.golang.org/api/cloudresourcemanager/v1